-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit b1d18df4 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Jan 28, 2025
1 parent
2a3a7e2
commit c862554
Showing
37 changed files
with
3,795 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Create workflows webhook handle returns "CREATED" response | ||
|
||
import com.datadog.api.client.ApiClient; | ||
import com.datadog.api.client.ApiException; | ||
import com.datadog.api.client.v2.api.MicrosoftTeamsIntegrationApi; | ||
import com.datadog.api.client.v2.model.MicrosoftTeamsCreateWorkflowsWebhookHandleRequest; | ||
import com.datadog.api.client.v2.model.MicrosoftTeamsWorkflowsWebhookHandleRequestAttributes; | ||
import com.datadog.api.client.v2.model.MicrosoftTeamsWorkflowsWebhookHandleRequestData; | ||
import com.datadog.api.client.v2.model.MicrosoftTeamsWorkflowsWebhookHandleResponse; | ||
import com.datadog.api.client.v2.model.MicrosoftTeamsWorkflowsWebhookHandleType; | ||
|
||
public class Example { | ||
public static void main(String[] args) { | ||
ApiClient defaultClient = ApiClient.getDefaultApiClient(); | ||
MicrosoftTeamsIntegrationApi apiInstance = new MicrosoftTeamsIntegrationApi(defaultClient); | ||
|
||
MicrosoftTeamsCreateWorkflowsWebhookHandleRequest body = | ||
new MicrosoftTeamsCreateWorkflowsWebhookHandleRequest() | ||
.data( | ||
new MicrosoftTeamsWorkflowsWebhookHandleRequestData() | ||
.attributes( | ||
new MicrosoftTeamsWorkflowsWebhookHandleRequestAttributes() | ||
.name("fake-handle-name") | ||
.url("https://fake.url.com")) | ||
.type(MicrosoftTeamsWorkflowsWebhookHandleType.WORKFLOWS_WEBHOOK_HANDLE)); | ||
|
||
try { | ||
MicrosoftTeamsWorkflowsWebhookHandleResponse result = | ||
apiInstance.createWorkflowsWebhookHandle(body); | ||
System.out.println(result); | ||
} catch (ApiException e) { | ||
System.err.println( | ||
"Exception when calling MicrosoftTeamsIntegrationApi#createWorkflowsWebhookHandle"); | ||
System.err.println("Status code: " + e.getCode()); | ||
System.err.println("Reason: " + e.getResponseBody()); | ||
System.err.println("Response headers: " + e.getResponseHeaders()); | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
Oops, something went wrong.