-
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 71a1e1d2 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Oct 11, 2023
1 parent
ecd7d8c
commit 5c49070
Showing
11 changed files
with
344 additions
and
8 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
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,30 @@ | ||
// Get all teams with fields_team parameter returns "OK" response | ||
|
||
import com.datadog.api.client.ApiClient; | ||
import com.datadog.api.client.ApiException; | ||
import com.datadog.api.client.v2.api.TeamsApi; | ||
import com.datadog.api.client.v2.api.TeamsApi.ListTeamsOptionalParameters; | ||
import com.datadog.api.client.v2.model.TeamsField; | ||
import com.datadog.api.client.v2.model.TeamsResponse; | ||
import java.util.Arrays; | ||
|
||
public class Example { | ||
public static void main(String[] args) { | ||
ApiClient defaultClient = ApiClient.getDefaultApiClient(); | ||
TeamsApi apiInstance = new TeamsApi(defaultClient); | ||
|
||
try { | ||
TeamsResponse result = | ||
apiInstance.listTeams( | ||
new ListTeamsOptionalParameters() | ||
.fieldsTeam(Arrays.asList(TeamsField.ID, TeamsField.NAME, TeamsField.HANDLE))); | ||
System.out.println(result); | ||
} catch (ApiException e) { | ||
System.err.println("Exception when calling TeamsApi#listTeams"); | ||
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.