From f5019c88587eba13b6e27baa9bc56e44d66f41c4 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 8 May 2026 17:42:34 +0000 Subject: [PATCH] Regenerate client from commit 96ec358 of spec repo --- .generator/schemas/v2/openapi.yaml | 446 ------- .../v2/incident-teams/CreateIncidentTeam.java | 36 - .../v2/incident-teams/DeleteIncidentTeam.java | 26 - .../v2/incident-teams/GetIncidentTeam.java | 28 - .../v2/incident-teams/ListIncidentTeams.java | 31 - .../v2/incident-teams/UpdateIncidentTeam.java | 40 - .../com/datadog/api/client/ApiClient.java | 5 - .../api/client/v2/api/IncidentTeamsApi.java | 1038 ----------------- .../model/IncidentTeamCreateAttributes.java | 144 --- .../v2/model/IncidentTeamCreateData.java | 196 ---- .../v2/model/IncidentTeamCreateRequest.java | 146 --- .../v2/model/IncidentTeamIncludedItems.java | 209 ---- .../v2/model/IncidentTeamRelationships.java | 167 --- .../client/v2/model/IncidentTeamResponse.java | 166 --- .../model/IncidentTeamResponseAttributes.java | 176 --- .../v2/model/IncidentTeamResponseData.java | 214 ---- .../api/client/v2/model/IncidentTeamType.java | 53 - .../model/IncidentTeamUpdateAttributes.java | 144 --- .../v2/model/IncidentTeamUpdateData.java | 223 ---- .../v2/model/IncidentTeamUpdateRequest.java | 146 --- .../v2/model/IncidentTeamsResponse.java | 193 --- ...ident_team_returns_CREATED_response.freeze | 1 - ...ncident_team_returns_CREATED_response.json | 57 - ...g_incident_team_returns_OK_response.freeze | 1 - ...ing_incident_team_returns_OK_response.json | 82 -- ..._incident_teams_returns_OK_response.freeze | 1 - ...ll_incident_teams_returns_OK_response.json | 88 -- ...n_incident_team_returns_OK_response.freeze | 1 - ..._an_incident_team_returns_OK_response.json | 83 -- ...g_incident_team_returns_OK_response.freeze | 1 - ...ing_incident_team_returns_OK_response.json | 87 -- .../com/datadog/api/client/v2/api/given.json | 12 - .../api/client/v2/api/incident_teams.feature | 146 --- .../com/datadog/api/client/v2/api/undo.json | 37 - 34 files changed, 4424 deletions(-) delete mode 100644 examples/v2/incident-teams/CreateIncidentTeam.java delete mode 100644 examples/v2/incident-teams/DeleteIncidentTeam.java delete mode 100644 examples/v2/incident-teams/GetIncidentTeam.java delete mode 100644 examples/v2/incident-teams/ListIncidentTeams.java delete mode 100644 examples/v2/incident-teams/UpdateIncidentTeam.java delete mode 100644 src/main/java/com/datadog/api/client/v2/api/IncidentTeamsApi.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateData.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateRequest.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamIncludedItems.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamRelationships.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponse.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseData.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamType.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateData.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateRequest.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/IncidentTeamsResponse.java delete mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_incident_team_returns_CREATED_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_incident_team_returns_CREATED_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Delete_an_existing_incident_team_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Delete_an_existing_incident_team_returns_OK_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_teams_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_teams_returns_OK_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_an_incident_team_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_an_incident_team_returns_OK_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Update_an_existing_incident_team_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Update_an_existing_incident_team_returns_OK_response.json delete mode 100644 src/test/resources/com/datadog/api/client/v2/api/incident_teams.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5fb172fd364..f9e16964b1d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -698,28 +698,6 @@ components: schema: example: "ExampleServiceName" type: string - IncidentTeamIDPathParameter: - description: The ID of the incident team. - in: path - name: team_id - required: true - schema: - type: string - IncidentTeamIncludeQueryParameter: - description: Specifies which types of related objects should be included in the response. - in: query - name: "include" - required: false - schema: - $ref: "#/components/schemas/IncidentRelatedObject" - IncidentTeamSearchQueryParameter: - description: A search query that filters teams by name. - in: query - name: "filter" - required: false - schema: - example: "ExampleTeamName" - type: string IncidentTodoIDPathParameter: description: The UUID of the incident todo. in: path @@ -34692,158 +34670,6 @@ components: - SEV_3 - SEV_4 - SEV_5 - IncidentTeamCreateAttributes: - description: The incident team's attributes for a create request. - properties: - name: - description: Name of the incident team. - example: "team name" - type: string - required: - - name - type: object - IncidentTeamCreateData: - description: Incident Team data for a create request. - properties: - attributes: - $ref: "#/components/schemas/IncidentTeamCreateAttributes" - relationships: - $ref: "#/components/schemas/IncidentTeamRelationships" - type: - $ref: "#/components/schemas/IncidentTeamType" - required: - - type - type: object - IncidentTeamCreateRequest: - description: Create request with an incident team payload. - properties: - data: - $ref: "#/components/schemas/IncidentTeamCreateData" - required: - - data - type: object - IncidentTeamIncludedItems: - description: An object related to an incident team which is present in the included payload. - oneOf: - - $ref: "#/components/schemas/User" - IncidentTeamRelationships: - description: The incident team's relationships. - properties: - created_by: - $ref: "#/components/schemas/RelationshipToUser" - last_modified_by: - $ref: "#/components/schemas/RelationshipToUser" - readOnly: true - type: object - IncidentTeamResponse: - description: Response with an incident team payload. - properties: - data: - $ref: "#/components/schemas/IncidentTeamResponseData" - included: - description: Included objects from relationships. - items: - $ref: "#/components/schemas/IncidentTeamIncludedItems" - readOnly: true - type: array - required: - - data - type: object - IncidentTeamResponseAttributes: - description: The incident team's attributes from a response. - properties: - created: - description: Timestamp of when the incident team was created. - format: date-time - readOnly: true - type: string - modified: - description: Timestamp of when the incident team was modified. - format: date-time - readOnly: true - type: string - name: - description: Name of the incident team. - example: "team name" - type: string - type: object - IncidentTeamResponseData: - description: Incident Team data from a response. - properties: - attributes: - $ref: "#/components/schemas/IncidentTeamResponseAttributes" - id: - description: The incident team's ID. - example: "00000000-7ea3-0000-000a-000000000000" - type: string - relationships: - $ref: "#/components/schemas/IncidentTeamRelationships" - type: - $ref: "#/components/schemas/IncidentTeamType" - type: object - IncidentTeamType: - default: teams - description: Incident Team resource type. - enum: - - teams - example: teams - type: string - x-enum-varnames: - - TEAMS - IncidentTeamUpdateAttributes: - description: The incident team's attributes for an update request. - properties: - name: - description: Name of the incident team. - example: "team name" - type: string - required: - - name - type: object - IncidentTeamUpdateData: - description: Incident Team data for an update request. - properties: - attributes: - $ref: "#/components/schemas/IncidentTeamUpdateAttributes" - id: - description: The incident team's ID. - example: "00000000-7ea3-0000-0001-000000000000" - type: string - relationships: - $ref: "#/components/schemas/IncidentTeamRelationships" - type: - $ref: "#/components/schemas/IncidentTeamType" - required: - - type - type: object - IncidentTeamUpdateRequest: - description: Update request with an incident team payload. - properties: - data: - $ref: "#/components/schemas/IncidentTeamUpdateData" - required: - - data - type: object - IncidentTeamsResponse: - description: Response with a list of incident team payloads. - properties: - data: - description: An array of incident teams. - example: [{"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0000-000000000000", "type": "teams"}] - items: - $ref: "#/components/schemas/IncidentTeamResponseData" - type: array - included: - description: Included related resources which the user requested. - items: - $ref: "#/components/schemas/IncidentTeamIncludedItems" - readOnly: true - type: array - meta: - $ref: "#/components/schemas/IncidentResponseMeta" - required: - - data - type: "object" IncidentTimelineCellCreateAttributes: description: The timeline cell's attributes for a create request. oneOf: @@ -143086,276 +142912,6 @@ paths: operator: OR permissions: - teams_read - /api/v2/teams: - get: - deprecated: true - description: >- - Get all incident teams for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident teams. - operationId: ListIncidentTeams - parameters: - - $ref: "#/components/parameters/IncidentTeamIncludeQueryParameter" - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/PageOffset" - - $ref: "#/components/parameters/IncidentTeamSearchQueryParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000002 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamsResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_read - summary: Get a list of all incident teams - tags: - - Incident Teams - "x-permission": - operator: OR - permissions: - - incident_read - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - post: - deprecated: true - description: Creates a new incident team. - operationId: CreateIncidentTeam - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - relationships: - created_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - last_modified_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamCreateRequest" - description: Incident Team Payload. - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000001 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamResponse" - description: CREATED - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Create a new incident team - tags: - - Incident Teams - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - /api/v2/teams/{team_id}: - delete: - deprecated: true - description: Deletes an existing incident team. - operationId: DeleteIncidentTeam - parameters: - - $ref: "#/components/parameters/IncidentTeamIDPathParameter" - responses: - "204": - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Delete an existing incident team - tags: - - Incident Teams - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - get: - deprecated: true - description: |- - Get details of an incident team. If the `include[users]` query parameter is provided, - the included attribute will contain the users related to these incident teams. - operationId: GetIncidentTeam - parameters: - - $ref: "#/components/parameters/IncidentTeamIDPathParameter" - - $ref: "#/components/parameters/IncidentTeamIncludeQueryParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000004 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_read - summary: Get details of an incident team - tags: - - Incident Teams - "x-permission": - operator: OR - permissions: - - incident_read - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - patch: - deprecated: true - description: >- - Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update. - operationId: UpdateIncidentTeam - parameters: - - $ref: "#/components/parameters/IncidentTeamIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-7ea3-0000-0001-000000000000 - relationships: - created_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - last_modified_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamUpdateRequest" - description: Incident Team Payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000003 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Update an existing incident team - tags: - - Incident Teams - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). /api/v2/test/flaky-test-management/tests: patch: description: |- @@ -146093,8 +145649,6 @@ tags: name: IP Allowlist - description: Create, update, delete, and retrieve services which can be associated with incidents. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/) for more information. name: Incident Services - - description: The Incident Teams endpoints are deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/) to create, update, delete, and retrieve teams which can be associated with incidents. - name: Incident Teams - description: Manage incident response, as well as associated attachments, metadata, and todos. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/) for more information. name: Incidents - description: |- diff --git a/examples/v2/incident-teams/CreateIncidentTeam.java b/examples/v2/incident-teams/CreateIncidentTeam.java deleted file mode 100644 index 3de867c5bc2..00000000000 --- a/examples/v2/incident-teams/CreateIncidentTeam.java +++ /dev/null @@ -1,36 +0,0 @@ -// Create a new incident team returns "CREATED" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.IncidentTeamsApi; -import com.datadog.api.client.v2.model.IncidentTeamCreateAttributes; -import com.datadog.api.client.v2.model.IncidentTeamCreateData; -import com.datadog.api.client.v2.model.IncidentTeamCreateRequest; -import com.datadog.api.client.v2.model.IncidentTeamResponse; -import com.datadog.api.client.v2.model.IncidentTeamType; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.createIncidentTeam", true); - IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient); - - IncidentTeamCreateRequest body = - new IncidentTeamCreateRequest() - .data( - new IncidentTeamCreateData() - .type(IncidentTeamType.TEAMS) - .attributes(new IncidentTeamCreateAttributes().name("Example-Incident-Team"))); - - try { - IncidentTeamResponse result = apiInstance.createIncidentTeam(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IncidentTeamsApi#createIncidentTeam"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/incident-teams/DeleteIncidentTeam.java b/examples/v2/incident-teams/DeleteIncidentTeam.java deleted file mode 100644 index 980da07a03a..00000000000 --- a/examples/v2/incident-teams/DeleteIncidentTeam.java +++ /dev/null @@ -1,26 +0,0 @@ -// Delete an existing incident team returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.IncidentTeamsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.deleteIncidentTeam", true); - IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient); - - // there is a valid "team" in the system - String TEAM_DATA_ID = System.getenv("TEAM_DATA_ID"); - - try { - apiInstance.deleteIncidentTeam(TEAM_DATA_ID); - } catch (ApiException e) { - System.err.println("Exception when calling IncidentTeamsApi#deleteIncidentTeam"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/incident-teams/GetIncidentTeam.java b/examples/v2/incident-teams/GetIncidentTeam.java deleted file mode 100644 index 65a44254d38..00000000000 --- a/examples/v2/incident-teams/GetIncidentTeam.java +++ /dev/null @@ -1,28 +0,0 @@ -// Get details of an incident team returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.IncidentTeamsApi; -import com.datadog.api.client.v2.model.IncidentTeamResponse; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.getIncidentTeam", true); - IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient); - - // there is a valid "team" in the system - String TEAM_DATA_ID = System.getenv("TEAM_DATA_ID"); - - try { - IncidentTeamResponse result = apiInstance.getIncidentTeam(TEAM_DATA_ID); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IncidentTeamsApi#getIncidentTeam"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/incident-teams/ListIncidentTeams.java b/examples/v2/incident-teams/ListIncidentTeams.java deleted file mode 100644 index 5413ad8be61..00000000000 --- a/examples/v2/incident-teams/ListIncidentTeams.java +++ /dev/null @@ -1,31 +0,0 @@ -// Get a list of all incident teams returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.IncidentTeamsApi; -import com.datadog.api.client.v2.api.IncidentTeamsApi.ListIncidentTeamsOptionalParameters; -import com.datadog.api.client.v2.model.IncidentTeamsResponse; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listIncidentTeams", true); - IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient); - - // there is a valid "team" in the system - String TEAM_DATA_ATTRIBUTES_NAME = System.getenv("TEAM_DATA_ATTRIBUTES_NAME"); - - try { - IncidentTeamsResponse result = - apiInstance.listIncidentTeams( - new ListIncidentTeamsOptionalParameters().filter(TEAM_DATA_ATTRIBUTES_NAME)); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IncidentTeamsApi#listIncidentTeams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/incident-teams/UpdateIncidentTeam.java b/examples/v2/incident-teams/UpdateIncidentTeam.java deleted file mode 100644 index 6ea1210f0f4..00000000000 --- a/examples/v2/incident-teams/UpdateIncidentTeam.java +++ /dev/null @@ -1,40 +0,0 @@ -// Update an existing incident team returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.IncidentTeamsApi; -import com.datadog.api.client.v2.model.IncidentTeamResponse; -import com.datadog.api.client.v2.model.IncidentTeamType; -import com.datadog.api.client.v2.model.IncidentTeamUpdateAttributes; -import com.datadog.api.client.v2.model.IncidentTeamUpdateData; -import com.datadog.api.client.v2.model.IncidentTeamUpdateRequest; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.updateIncidentTeam", true); - IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient); - - // there is a valid "team" in the system - String TEAM_DATA_ATTRIBUTES_NAME = System.getenv("TEAM_DATA_ATTRIBUTES_NAME"); - String TEAM_DATA_ID = System.getenv("TEAM_DATA_ID"); - - IncidentTeamUpdateRequest body = - new IncidentTeamUpdateRequest() - .data( - new IncidentTeamUpdateData() - .type(IncidentTeamType.TEAMS) - .attributes(new IncidentTeamUpdateAttributes().name("team name-updated"))); - - try { - IncidentTeamResponse result = apiInstance.updateIncidentTeam(TEAM_DATA_ID, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IncidentTeamsApi#updateIncidentTeam"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 1184f1246e6..c7f4d5924ee 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1028,11 +1028,6 @@ public class ApiClient { put("v2.addMemberTeam", false); put("v2.listMemberTeams", false); put("v2.removeMemberTeam", false); - put("v2.createIncidentTeam", false); - put("v2.deleteIncidentTeam", false); - put("v2.getIncidentTeam", false); - put("v2.listIncidentTeams", false); - put("v2.updateIncidentTeam", false); } }; protected static final java.util.logging.Logger logger = diff --git a/src/main/java/com/datadog/api/client/v2/api/IncidentTeamsApi.java b/src/main/java/com/datadog/api/client/v2/api/IncidentTeamsApi.java deleted file mode 100644 index 52f751926da..00000000000 --- a/src/main/java/com/datadog/api/client/v2/api/IncidentTeamsApi.java +++ /dev/null @@ -1,1038 +0,0 @@ -package com.datadog.api.client.v2.api; - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.IncidentRelatedObject; -import com.datadog.api.client.v2.model.IncidentTeamCreateRequest; -import com.datadog.api.client.v2.model.IncidentTeamResponse; -import com.datadog.api.client.v2.model.IncidentTeamUpdateRequest; -import com.datadog.api.client.v2.model.IncidentTeamsResponse; -import jakarta.ws.rs.client.Invocation; -import jakarta.ws.rs.core.GenericType; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamsApi { - private ApiClient apiClient; - - public IncidentTeamsApi() { - this(ApiClient.getDefaultApiClient()); - } - - public IncidentTeamsApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client. - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client. - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Create a new incident team. - * - *

See {@link #createIncidentTeamWithHttpInfo}. - * - * @param body Incident Team Payload. (required) - * @return IncidentTeamResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public IncidentTeamResponse createIncidentTeam(IncidentTeamCreateRequest body) - throws ApiException { - return createIncidentTeamWithHttpInfo(body).getData(); - } - - /** - * Create a new incident team. - * - *

See {@link #createIncidentTeamWithHttpInfoAsync}. - * - * @param body Incident Team Payload. (required) - * @return CompletableFuture<IncidentTeamResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture createIncidentTeamAsync( - IncidentTeamCreateRequest body) { - return createIncidentTeamWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Creates a new incident team. - * - * @param body Incident Team Payload. (required) - * @return ApiResponse<IncidentTeamResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
201 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
- * - * @deprecated - */ - @Deprecated - public ApiResponse createIncidentTeamWithHttpInfo( - IncidentTeamCreateRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "createIncidentTeam"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentTeam"); - } - // create path and map variables - String localVarPath = "/api/v2/teams"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.createIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Create a new incident team. - * - *

See {@link #createIncidentTeamWithHttpInfo}. - * - * @param body Incident Team Payload. (required) - * @return CompletableFuture<ApiResponse<IncidentTeamResponse>> - * @deprecated - */ - @Deprecated - public CompletableFuture> createIncidentTeamWithHttpInfoAsync( - IncidentTeamCreateRequest body) { - // Check if unstable operation is enabled - String operationId = "createIncidentTeam"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createIncidentTeam")); - return result; - } - // create path and map variables - String localVarPath = "/api/v2/teams"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.createIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Delete an existing incident team. - * - *

See {@link #deleteIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public void deleteIncidentTeam(String teamId) throws ApiException { - deleteIncidentTeamWithHttpInfo(teamId); - } - - /** - * Delete an existing incident team. - * - *

See {@link #deleteIncidentTeamWithHttpInfoAsync}. - * - * @param teamId The ID of the incident team. (required) - * @return CompletableFuture - * @deprecated - */ - @Deprecated - public CompletableFuture deleteIncidentTeamAsync(String teamId) { - return deleteIncidentTeamWithHttpInfoAsync(teamId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Deletes an existing incident team. - * - * @param teamId The ID of the incident team. (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
204 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
- * - * @deprecated - */ - @Deprecated - public ApiResponse deleteIncidentTeamWithHttpInfo(String teamId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "deleteIncidentTeam"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; - - // verify the required parameter 'teamId' is set - if (teamId == null) { - throw new ApiException( - 400, "Missing the required parameter 'teamId' when calling deleteIncidentTeam"); - } - // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.deleteIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** - * Delete an existing incident team. - * - *

See {@link #deleteIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @return CompletableFuture<ApiResponse<Void>> - * @deprecated - */ - @Deprecated - public CompletableFuture> deleteIncidentTeamWithHttpInfoAsync(String teamId) { - // Check if unstable operation is enabled - String operationId = "deleteIncidentTeam"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; - - // verify the required parameter 'teamId' is set - if (teamId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'teamId' when calling deleteIncidentTeam")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.deleteIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** Manage optional parameters to getIncidentTeam. */ - public static class GetIncidentTeamOptionalParameters { - private IncidentRelatedObject include; - - /** - * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) - * @return GetIncidentTeamOptionalParameters - */ - public GetIncidentTeamOptionalParameters include(IncidentRelatedObject include) { - this.include = include; - return this; - } - } - - /** - * Get details of an incident team. - * - *

See {@link #getIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @return IncidentTeamResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public IncidentTeamResponse getIncidentTeam(String teamId) throws ApiException { - return getIncidentTeamWithHttpInfo(teamId, new GetIncidentTeamOptionalParameters()).getData(); - } - - /** - * Get details of an incident team. - * - *

See {@link #getIncidentTeamWithHttpInfoAsync}. - * - * @param teamId The ID of the incident team. (required) - * @return CompletableFuture<IncidentTeamResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getIncidentTeamAsync(String teamId) { - return getIncidentTeamWithHttpInfoAsync(teamId, new GetIncidentTeamOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get details of an incident team. - * - *

See {@link #getIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @param parameters Optional parameters for the request. - * @return IncidentTeamResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public IncidentTeamResponse getIncidentTeam( - String teamId, GetIncidentTeamOptionalParameters parameters) throws ApiException { - return getIncidentTeamWithHttpInfo(teamId, parameters).getData(); - } - - /** - * Get details of an incident team. - * - *

See {@link #getIncidentTeamWithHttpInfoAsync}. - * - * @param teamId The ID of the incident team. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentTeamResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture getIncidentTeamAsync( - String teamId, GetIncidentTeamOptionalParameters parameters) { - return getIncidentTeamWithHttpInfoAsync(teamId, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get details of an incident team. If the include[users] query parameter is - * provided, the included attribute will contain the users related to these incident teams. - * - * @param teamId The ID of the incident team. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentTeamResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
- * - * @deprecated - */ - @Deprecated - public ApiResponse getIncidentTeamWithHttpInfo( - String teamId, GetIncidentTeamOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "getIncidentTeam"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; - - // verify the required parameter 'teamId' is set - if (teamId == null) { - throw new ApiException( - 400, "Missing the required parameter 'teamId' when calling getIncidentTeam"); - } - IncidentRelatedObject include = parameters.include; - // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.getIncidentTeam", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Get details of an incident team. - * - *

See {@link #getIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentTeamResponse>> - * @deprecated - */ - @Deprecated - public CompletableFuture> getIncidentTeamWithHttpInfoAsync( - String teamId, GetIncidentTeamOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "getIncidentTeam"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; - - // verify the required parameter 'teamId' is set - if (teamId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'teamId' when calling getIncidentTeam")); - return result; - } - IncidentRelatedObject include = parameters.include; - // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.getIncidentTeam", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listIncidentTeams. */ - public static class ListIncidentTeamsOptionalParameters { - private IncidentRelatedObject include; - private Long pageSize; - private Long pageOffset; - private String filter; - - /** - * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) - * @return ListIncidentTeamsOptionalParameters - */ - public ListIncidentTeamsOptionalParameters include(IncidentRelatedObject include) { - this.include = include; - return this; - } - - /** - * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default - * to 10) - * @return ListIncidentTeamsOptionalParameters - */ - public ListIncidentTeamsOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageOffset. - * - * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, - * default to 0) - * @return ListIncidentTeamsOptionalParameters - */ - public ListIncidentTeamsOptionalParameters pageOffset(Long pageOffset) { - this.pageOffset = pageOffset; - return this; - } - - /** - * Set filter. - * - * @param filter A search query that filters teams by name. (optional) - * @return ListIncidentTeamsOptionalParameters - */ - public ListIncidentTeamsOptionalParameters filter(String filter) { - this.filter = filter; - return this; - } - } - - /** - * Get a list of all incident teams. - * - *

See {@link #listIncidentTeamsWithHttpInfo}. - * - * @return IncidentTeamsResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public IncidentTeamsResponse listIncidentTeams() throws ApiException { - return listIncidentTeamsWithHttpInfo(new ListIncidentTeamsOptionalParameters()).getData(); - } - - /** - * Get a list of all incident teams. - * - *

See {@link #listIncidentTeamsWithHttpInfoAsync}. - * - * @return CompletableFuture<IncidentTeamsResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture listIncidentTeamsAsync() { - return listIncidentTeamsWithHttpInfoAsync(new ListIncidentTeamsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get a list of all incident teams. - * - *

See {@link #listIncidentTeamsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return IncidentTeamsResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public IncidentTeamsResponse listIncidentTeams(ListIncidentTeamsOptionalParameters parameters) - throws ApiException { - return listIncidentTeamsWithHttpInfo(parameters).getData(); - } - - /** - * Get a list of all incident teams. - * - *

See {@link #listIncidentTeamsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<IncidentTeamsResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture listIncidentTeamsAsync( - ListIncidentTeamsOptionalParameters parameters) { - return listIncidentTeamsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get all incident teams for the requesting user's organization. If the include[users] - * query parameter is provided, the included attribute will contain the users related to - * these incident teams. - * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentTeamsResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
- * - * @deprecated - */ - @Deprecated - public ApiResponse listIncidentTeamsWithHttpInfo( - ListIncidentTeamsOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listIncidentTeams"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; - IncidentRelatedObject include = parameters.include; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; - String filter = parameters.filter; - // create path and map variables - String localVarPath = "/api/v2/teams"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.listIncidentTeams", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Get a list of all incident teams. - * - *

See {@link #listIncidentTeamsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentTeamsResponse>> - * @deprecated - */ - @Deprecated - public CompletableFuture> listIncidentTeamsWithHttpInfoAsync( - ListIncidentTeamsOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "listIncidentTeams"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; - IncidentRelatedObject include = parameters.include; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; - String filter = parameters.filter; - // create path and map variables - String localVarPath = "/api/v2/teams"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.listIncidentTeams", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Update an existing incident team. - * - *

See {@link #updateIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @param body Incident Team Payload. (required) - * @return IncidentTeamResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public IncidentTeamResponse updateIncidentTeam(String teamId, IncidentTeamUpdateRequest body) - throws ApiException { - return updateIncidentTeamWithHttpInfo(teamId, body).getData(); - } - - /** - * Update an existing incident team. - * - *

See {@link #updateIncidentTeamWithHttpInfoAsync}. - * - * @param teamId The ID of the incident team. (required) - * @param body Incident Team Payload. (required) - * @return CompletableFuture<IncidentTeamResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture updateIncidentTeamAsync( - String teamId, IncidentTeamUpdateRequest body) { - return updateIncidentTeamWithHttpInfoAsync(teamId, body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Updates an existing incident team. Only provide the attributes which should be updated as this - * request is a partial update. - * - * @param teamId The ID of the incident team. (required) - * @param body Incident Team Payload. (required) - * @return ApiResponse<IncidentTeamResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
- * - * @deprecated - */ - @Deprecated - public ApiResponse updateIncidentTeamWithHttpInfo( - String teamId, IncidentTeamUpdateRequest body) throws ApiException { - // Check if unstable operation is enabled - String operationId = "updateIncidentTeam"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = body; - - // verify the required parameter 'teamId' is set - if (teamId == null) { - throw new ApiException( - 400, "Missing the required parameter 'teamId' when calling updateIncidentTeam"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentTeam"); - } - // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.updateIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Update an existing incident team. - * - *

See {@link #updateIncidentTeamWithHttpInfo}. - * - * @param teamId The ID of the incident team. (required) - * @param body Incident Team Payload. (required) - * @return CompletableFuture<ApiResponse<IncidentTeamResponse>> - * @deprecated - */ - @Deprecated - public CompletableFuture> updateIncidentTeamWithHttpInfoAsync( - String teamId, IncidentTeamUpdateRequest body) { - // Check if unstable operation is enabled - String operationId = "updateIncidentTeam"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = body; - - // verify the required parameter 'teamId' is set - if (teamId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'teamId' when calling updateIncidentTeam")); - return result; - } - - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling updateIncidentTeam")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/teams/{team_id}" - .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.IncidentTeamsApi.updateIncidentTeam", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateAttributes.java deleted file mode 100644 index 07adca5feda..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateAttributes.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** The incident team's attributes for a create request. */ -@JsonPropertyOrder({IncidentTeamCreateAttributes.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamCreateAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public IncidentTeamCreateAttributes() {} - - @JsonCreator - public IncidentTeamCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; - } - - public IncidentTeamCreateAttributes name(String name) { - this.name = name; - return this; - } - - /** - * Name of the incident team. - * - * @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamCreateAttributes - */ - @JsonAnySetter - public IncidentTeamCreateAttributes putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamCreateAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamCreateAttributes incidentTeamCreateAttributes = (IncidentTeamCreateAttributes) o; - return Objects.equals(this.name, incidentTeamCreateAttributes.name) - && Objects.equals( - this.additionalProperties, incidentTeamCreateAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamCreateAttributes {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateData.java deleted file mode 100644 index 4da1212d4d0..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateData.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Incident Team data for a create request. */ -@JsonPropertyOrder({ - IncidentTeamCreateData.JSON_PROPERTY_ATTRIBUTES, - IncidentTeamCreateData.JSON_PROPERTY_RELATIONSHIPS, - IncidentTeamCreateData.JSON_PROPERTY_TYPE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamCreateData { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private IncidentTeamCreateAttributes attributes; - - public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; - private IncidentTeamRelationships relationships; - - public static final String JSON_PROPERTY_TYPE = "type"; - private IncidentTeamType type = IncidentTeamType.TEAMS; - - public IncidentTeamCreateData() {} - - @JsonCreator - public IncidentTeamCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentTeamType type) { - this.type = type; - this.unparsed |= !type.isValid(); - } - - public IncidentTeamCreateData attributes(IncidentTeamCreateAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - return this; - } - - /** - * The incident team's attributes for a create request. - * - * @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamCreateAttributes getAttributes() { - return attributes; - } - - public void setAttributes(IncidentTeamCreateAttributes attributes) { - this.attributes = attributes; - } - - /** - * The incident team's relationships. - * - * @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamRelationships getRelationships() { - return relationships; - } - - public IncidentTeamCreateData type(IncidentTeamType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * Incident Team resource type. - * - * @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTeamType getType() { - return type; - } - - public void setType(IncidentTeamType type) { - if (!type.isValid()) { - this.unparsed = true; - } - this.type = type; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamCreateData - */ - @JsonAnySetter - public IncidentTeamCreateData putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamCreateData object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamCreateData incidentTeamCreateData = (IncidentTeamCreateData) o; - return Objects.equals(this.attributes, incidentTeamCreateData.attributes) - && Objects.equals(this.relationships, incidentTeamCreateData.relationships) - && Objects.equals(this.type, incidentTeamCreateData.type) - && Objects.equals(this.additionalProperties, incidentTeamCreateData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, relationships, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamCreateData {\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateRequest.java deleted file mode 100644 index 1b0a12e7569..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamCreateRequest.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Create request with an incident team payload. */ -@JsonPropertyOrder({IncidentTeamCreateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamCreateRequest { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private IncidentTeamCreateData data; - - public IncidentTeamCreateRequest() {} - - @JsonCreator - public IncidentTeamCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentTeamCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; - } - - public IncidentTeamCreateRequest data(IncidentTeamCreateData data) { - this.data = data; - this.unparsed |= data.unparsed; - return this; - } - - /** - * Incident Team data for a create request. - * - * @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTeamCreateData getData() { - return data; - } - - public void setData(IncidentTeamCreateData data) { - this.data = data; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamCreateRequest - */ - @JsonAnySetter - public IncidentTeamCreateRequest putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamCreateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamCreateRequest incidentTeamCreateRequest = (IncidentTeamCreateRequest) o; - return Objects.equals(this.data, incidentTeamCreateRequest.data) - && Objects.equals( - this.additionalProperties, incidentTeamCreateRequest.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamCreateRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamIncludedItems.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamIncludedItems.java deleted file mode 100644 index e7cd0d53089..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamIncludedItems.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.datadog.api.client.AbstractOpenApiSchema; -import com.datadog.api.client.JSON; -import com.datadog.api.client.UnparsedObject; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.MapperFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import jakarta.ws.rs.core.GenericType; -import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; - -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -@JsonDeserialize(using = IncidentTeamIncludedItems.IncidentTeamIncludedItemsDeserializer.class) -@JsonSerialize(using = IncidentTeamIncludedItems.IncidentTeamIncludedItemsSerializer.class) -public class IncidentTeamIncludedItems extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(IncidentTeamIncludedItems.class.getName()); - - @JsonIgnore public boolean unparsed = false; - - public static class IncidentTeamIncludedItemsSerializer - extends StdSerializer { - public IncidentTeamIncludedItemsSerializer(Class t) { - super(t); - } - - public IncidentTeamIncludedItemsSerializer() { - this(null); - } - - @Override - public void serialize( - IncidentTeamIncludedItems value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } - - public static class IncidentTeamIncludedItemsDeserializer - extends StdDeserializer { - public IncidentTeamIncludedItemsDeserializer() { - this(IncidentTeamIncludedItems.class); - } - - public IncidentTeamIncludedItemsDeserializer(Class vc) { - super(vc); - } - - @Override - public IncidentTeamIncludedItems deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - JsonNode tree = jp.readValueAsTree(); - Object deserialized = null; - Object tmp = null; - boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); - int match = 0; - JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - // deserialize User - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (User.class.equals(Integer.class) - || User.class.equals(Long.class) - || User.class.equals(Float.class) - || User.class.equals(Double.class) - || User.class.equals(Boolean.class) - || User.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((User.class.equals(Integer.class) || User.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((User.class.equals(Float.class) || User.class.equals(Double.class)) - && (token == JsonToken.VALUE_NUMBER_FLOAT - || token == JsonToken.VALUE_NUMBER_INT)); - attemptParsing |= - (User.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(User.class); - // TODO: there is no validation against JSON schema constraints - // (min, max, enum, pattern...), this does not perform a strict JSON - // validation, which means the 'match' count may be higher than it should be. - if (!((User) tmp).unparsed) { - deserialized = tmp; - match++; - } - log.log(Level.FINER, "Input data matches schema 'User'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'User'", e); - } - - IncidentTeamIncludedItems ret = new IncidentTeamIncludedItems(); - if (match == 1) { - ret.setActualInstance(deserialized); - } else { - Map res = - new ObjectMapper() - .readValue( - tree.traverse(jp.getCodec()).readValueAsTree().toString(), - new TypeReference>() {}); - ret.setActualInstance(new UnparsedObject(res)); - } - return ret; - } - - /** Handle deserialization of the 'null' value. */ - @Override - public IncidentTeamIncludedItems getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "IncidentTeamIncludedItems cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map schemas = new HashMap(); - - public IncidentTeamIncludedItems() { - super("oneOf", Boolean.FALSE); - } - - public IncidentTeamIncludedItems(User o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("User", new GenericType() {}); - JSON.registerDescendants(IncidentTeamIncludedItems.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map getSchemas() { - return IncidentTeamIncludedItems.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: User - * - *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a - * composed schema (allOf, anyOf, oneOf). - */ - @Override - public void setActualInstance(Object instance) { - if (JSON.isInstanceOf(User.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - throw new RuntimeException("Invalid instance type. Must be User"); - } - - /** - * Get the actual instance, which can be the following: User - * - * @return The actual instance (User) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `User`. If the actual instance is not `User`, the ClassCastException - * will be thrown. - * - * @return The actual instance of `User` - * @throws ClassCastException if the instance is not `User` - */ - public User getUser() throws ClassCastException { - return (User) super.getActualInstance(); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamRelationships.java deleted file mode 100644 index 7191e206baf..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamRelationships.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** The incident team's relationships. */ -@JsonPropertyOrder({ - IncidentTeamRelationships.JSON_PROPERTY_CREATED_BY, - IncidentTeamRelationships.JSON_PROPERTY_LAST_MODIFIED_BY -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamRelationships { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_CREATED_BY = "created_by"; - private RelationshipToUser createdBy; - - public static final String JSON_PROPERTY_LAST_MODIFIED_BY = "last_modified_by"; - private RelationshipToUser lastModifiedBy; - - public IncidentTeamRelationships createdBy(RelationshipToUser createdBy) { - this.createdBy = createdBy; - this.unparsed |= createdBy.unparsed; - return this; - } - - /** - * Relationship to user. - * - * @return createdBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getCreatedBy() { - return createdBy; - } - - public void setCreatedBy(RelationshipToUser createdBy) { - this.createdBy = createdBy; - } - - public IncidentTeamRelationships lastModifiedBy(RelationshipToUser lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; - this.unparsed |= lastModifiedBy.unparsed; - return this; - } - - /** - * Relationship to user. - * - * @return lastModifiedBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getLastModifiedBy() { - return lastModifiedBy; - } - - public void setLastModifiedBy(RelationshipToUser lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamRelationships - */ - @JsonAnySetter - public IncidentTeamRelationships putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamRelationships object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamRelationships incidentTeamRelationships = (IncidentTeamRelationships) o; - return Objects.equals(this.createdBy, incidentTeamRelationships.createdBy) - && Objects.equals(this.lastModifiedBy, incidentTeamRelationships.lastModifiedBy) - && Objects.equals( - this.additionalProperties, incidentTeamRelationships.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdBy, lastModifiedBy, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamRelationships {\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); - sb.append(" lastModifiedBy: ").append(toIndentedString(lastModifiedBy)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponse.java deleted file mode 100644 index 13f2a53f771..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponse.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** Response with an incident team payload. */ -@JsonPropertyOrder({ - IncidentTeamResponse.JSON_PROPERTY_DATA, - IncidentTeamResponse.JSON_PROPERTY_INCLUDED -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamResponse { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private IncidentTeamResponseData data; - - public static final String JSON_PROPERTY_INCLUDED = "included"; - private List included = null; - - public IncidentTeamResponse() {} - - @JsonCreator - public IncidentTeamResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentTeamResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; - } - - public IncidentTeamResponse data(IncidentTeamResponseData data) { - this.data = data; - this.unparsed |= data.unparsed; - return this; - } - - /** - * Incident Team data from a response. - * - * @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTeamResponseData getData() { - return data; - } - - public void setData(IncidentTeamResponseData data) { - this.data = data; - } - - /** - * Included objects from relationships. - * - * @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - return included; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamResponse - */ - @JsonAnySetter - public IncidentTeamResponse putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamResponse incidentTeamResponse = (IncidentTeamResponse) o; - return Objects.equals(this.data, incidentTeamResponse.data) - && Objects.equals(this.included, incidentTeamResponse.included) - && Objects.equals(this.additionalProperties, incidentTeamResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, included, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseAttributes.java deleted file mode 100644 index 4b4a56cd54e..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseAttributes.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** The incident team's attributes from a response. */ -@JsonPropertyOrder({ - IncidentTeamResponseAttributes.JSON_PROPERTY_CREATED, - IncidentTeamResponseAttributes.JSON_PROPERTY_MODIFIED, - IncidentTeamResponseAttributes.JSON_PROPERTY_NAME -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamResponseAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_CREATED = "created"; - private OffsetDateTime created; - - public static final String JSON_PROPERTY_MODIFIED = "modified"; - private OffsetDateTime modified; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - /** - * Timestamp of when the incident team was created. - * - * @return created - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreated() { - return created; - } - - /** - * Timestamp of when the incident team was modified. - * - * @return modified - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; - } - - public IncidentTeamResponseAttributes name(String name) { - this.name = name; - return this; - } - - /** - * Name of the incident team. - * - * @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamResponseAttributes - */ - @JsonAnySetter - public IncidentTeamResponseAttributes putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamResponseAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamResponseAttributes incidentTeamResponseAttributes = - (IncidentTeamResponseAttributes) o; - return Objects.equals(this.created, incidentTeamResponseAttributes.created) - && Objects.equals(this.modified, incidentTeamResponseAttributes.modified) - && Objects.equals(this.name, incidentTeamResponseAttributes.name) - && Objects.equals( - this.additionalProperties, incidentTeamResponseAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(created, modified, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamResponseAttributes {\n"); - sb.append(" created: ").append(toIndentedString(created)).append("\n"); - sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseData.java deleted file mode 100644 index cc1ef6e276b..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamResponseData.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Incident Team data from a response. */ -@JsonPropertyOrder({ - IncidentTeamResponseData.JSON_PROPERTY_ATTRIBUTES, - IncidentTeamResponseData.JSON_PROPERTY_ID, - IncidentTeamResponseData.JSON_PROPERTY_RELATIONSHIPS, - IncidentTeamResponseData.JSON_PROPERTY_TYPE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamResponseData { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private IncidentTeamResponseAttributes attributes; - - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; - private IncidentTeamRelationships relationships; - - public static final String JSON_PROPERTY_TYPE = "type"; - private IncidentTeamType type = IncidentTeamType.TEAMS; - - public IncidentTeamResponseData attributes(IncidentTeamResponseAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - return this; - } - - /** - * The incident team's attributes from a response. - * - * @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamResponseAttributes getAttributes() { - return attributes; - } - - public void setAttributes(IncidentTeamResponseAttributes attributes) { - this.attributes = attributes; - } - - public IncidentTeamResponseData id(String id) { - this.id = id; - return this; - } - - /** - * The incident team's ID. - * - * @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - /** - * The incident team's relationships. - * - * @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamRelationships getRelationships() { - return relationships; - } - - public IncidentTeamResponseData type(IncidentTeamType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * Incident Team resource type. - * - * @return type - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamType getType() { - return type; - } - - public void setType(IncidentTeamType type) { - if (!type.isValid()) { - this.unparsed = true; - } - this.type = type; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamResponseData - */ - @JsonAnySetter - public IncidentTeamResponseData putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamResponseData object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamResponseData incidentTeamResponseData = (IncidentTeamResponseData) o; - return Objects.equals(this.attributes, incidentTeamResponseData.attributes) - && Objects.equals(this.id, incidentTeamResponseData.id) - && Objects.equals(this.relationships, incidentTeamResponseData.relationships) - && Objects.equals(this.type, incidentTeamResponseData.type) - && Objects.equals(this.additionalProperties, incidentTeamResponseData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, id, relationships, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamResponseData {\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamType.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamType.java deleted file mode 100644 index 879d423ba46..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamType.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.datadog.api.client.ModelEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -/** Incident Team resource type. */ -@JsonSerialize(using = IncidentTeamType.IncidentTeamTypeSerializer.class) -public class IncidentTeamType extends ModelEnum { - - private static final Set allowedValues = new HashSet(Arrays.asList("teams")); - - public static final IncidentTeamType TEAMS = new IncidentTeamType("teams"); - - IncidentTeamType(String value) { - super(value, allowedValues); - } - - public static class IncidentTeamTypeSerializer extends StdSerializer { - public IncidentTeamTypeSerializer(Class t) { - super(t); - } - - public IncidentTeamTypeSerializer() { - this(null); - } - - @Override - public void serialize(IncidentTeamType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } - } - - @JsonCreator - public static IncidentTeamType fromValue(String value) { - return new IncidentTeamType(value); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateAttributes.java deleted file mode 100644 index 33717e8cb34..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateAttributes.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** The incident team's attributes for an update request. */ -@JsonPropertyOrder({IncidentTeamUpdateAttributes.JSON_PROPERTY_NAME}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamUpdateAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public IncidentTeamUpdateAttributes() {} - - @JsonCreator - public IncidentTeamUpdateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; - } - - public IncidentTeamUpdateAttributes name(String name) { - this.name = name; - return this; - } - - /** - * Name of the incident team. - * - * @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamUpdateAttributes - */ - @JsonAnySetter - public IncidentTeamUpdateAttributes putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamUpdateAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamUpdateAttributes incidentTeamUpdateAttributes = (IncidentTeamUpdateAttributes) o; - return Objects.equals(this.name, incidentTeamUpdateAttributes.name) - && Objects.equals( - this.additionalProperties, incidentTeamUpdateAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamUpdateAttributes {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateData.java deleted file mode 100644 index dc73e45f301..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateData.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Incident Team data for an update request. */ -@JsonPropertyOrder({ - IncidentTeamUpdateData.JSON_PROPERTY_ATTRIBUTES, - IncidentTeamUpdateData.JSON_PROPERTY_ID, - IncidentTeamUpdateData.JSON_PROPERTY_RELATIONSHIPS, - IncidentTeamUpdateData.JSON_PROPERTY_TYPE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamUpdateData { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private IncidentTeamUpdateAttributes attributes; - - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; - private IncidentTeamRelationships relationships; - - public static final String JSON_PROPERTY_TYPE = "type"; - private IncidentTeamType type = IncidentTeamType.TEAMS; - - public IncidentTeamUpdateData() {} - - @JsonCreator - public IncidentTeamUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentTeamType type) { - this.type = type; - this.unparsed |= !type.isValid(); - } - - public IncidentTeamUpdateData attributes(IncidentTeamUpdateAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - return this; - } - - /** - * The incident team's attributes for an update request. - * - * @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamUpdateAttributes getAttributes() { - return attributes; - } - - public void setAttributes(IncidentTeamUpdateAttributes attributes) { - this.attributes = attributes; - } - - public IncidentTeamUpdateData id(String id) { - this.id = id; - return this; - } - - /** - * The incident team's ID. - * - * @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - /** - * The incident team's relationships. - * - * @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentTeamRelationships getRelationships() { - return relationships; - } - - public IncidentTeamUpdateData type(IncidentTeamType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * Incident Team resource type. - * - * @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTeamType getType() { - return type; - } - - public void setType(IncidentTeamType type) { - if (!type.isValid()) { - this.unparsed = true; - } - this.type = type; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamUpdateData - */ - @JsonAnySetter - public IncidentTeamUpdateData putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamUpdateData object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamUpdateData incidentTeamUpdateData = (IncidentTeamUpdateData) o; - return Objects.equals(this.attributes, incidentTeamUpdateData.attributes) - && Objects.equals(this.id, incidentTeamUpdateData.id) - && Objects.equals(this.relationships, incidentTeamUpdateData.relationships) - && Objects.equals(this.type, incidentTeamUpdateData.type) - && Objects.equals(this.additionalProperties, incidentTeamUpdateData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, id, relationships, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamUpdateData {\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateRequest.java deleted file mode 100644 index f638f804f9a..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamUpdateRequest.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Update request with an incident team payload. */ -@JsonPropertyOrder({IncidentTeamUpdateRequest.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamUpdateRequest { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private IncidentTeamUpdateData data; - - public IncidentTeamUpdateRequest() {} - - @JsonCreator - public IncidentTeamUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentTeamUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; - } - - public IncidentTeamUpdateRequest data(IncidentTeamUpdateData data) { - this.data = data; - this.unparsed |= data.unparsed; - return this; - } - - /** - * Incident Team data for an update request. - * - * @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentTeamUpdateData getData() { - return data; - } - - public void setData(IncidentTeamUpdateData data) { - this.data = data; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamUpdateRequest - */ - @JsonAnySetter - public IncidentTeamUpdateRequest putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamUpdateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamUpdateRequest incidentTeamUpdateRequest = (IncidentTeamUpdateRequest) o; - return Objects.equals(this.data, incidentTeamUpdateRequest.data) - && Objects.equals( - this.additionalProperties, incidentTeamUpdateRequest.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamUpdateRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamsResponse.java b/src/main/java/com/datadog/api/client/v2/model/IncidentTeamsResponse.java deleted file mode 100644 index f6b452b29e5..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentTeamsResponse.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** Response with a list of incident team payloads. */ -@JsonPropertyOrder({ - IncidentTeamsResponse.JSON_PROPERTY_DATA, - IncidentTeamsResponse.JSON_PROPERTY_INCLUDED, - IncidentTeamsResponse.JSON_PROPERTY_META -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentTeamsResponse { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private List data = new ArrayList<>(); - - public static final String JSON_PROPERTY_INCLUDED = "included"; - private List included = null; - - public static final String JSON_PROPERTY_META = "meta"; - private IncidentResponseMeta meta; - - public IncidentTeamsResponse() {} - - @JsonCreator - public IncidentTeamsResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { - this.data = data; - } - - public IncidentTeamsResponse data(List data) { - this.data = data; - for (IncidentTeamResponseData item : data) { - this.unparsed |= item.unparsed; - } - return this; - } - - public IncidentTeamsResponse addDataItem(IncidentTeamResponseData dataItem) { - this.data.add(dataItem); - this.unparsed |= dataItem.unparsed; - return this; - } - - /** - * An array of incident teams. - * - * @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } - - /** - * Included related resources which the user requested. - * - * @return included - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - return included; - } - - /** - * The metadata object containing pagination metadata. - * - * @return meta - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_META) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentResponseMeta getMeta() { - return meta; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return IncidentTeamsResponse - */ - @JsonAnySetter - public IncidentTeamsResponse putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this IncidentTeamsResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentTeamsResponse incidentTeamsResponse = (IncidentTeamsResponse) o; - return Objects.equals(this.data, incidentTeamsResponse.data) - && Objects.equals(this.included, incidentTeamsResponse.included) - && Objects.equals(this.meta, incidentTeamsResponse.meta) - && Objects.equals(this.additionalProperties, incidentTeamsResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, included, meta, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentTeamsResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_incident_team_returns_CREATED_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_incident_team_returns_CREATED_response.freeze deleted file mode 100644 index 1d02b7f5cbe..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_a_new_incident_team_returns_CREATED_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:33.507Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_incident_team_returns_CREATED_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_incident_team_returns_CREATED_response.json deleted file mode 100644 index e4bd2f5c1e7..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_a_new_incident_team_returns_CREATED_response.json +++ /dev/null @@ -1,57 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Create_a_new_incident_team_returns_CREATED_response-1699307973\"},\"type\":\"teams\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/teams", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"teams\",\"id\":\"ad2b4266-f087-5b33-9da5-e726f61fd9b0\",\"attributes\":{\"name\":\"Test-Create_a_new_incident_team_returns_CREATED_response-1699307973\",\"created\":\"2023-11-06T21:59:33.756628+00:00\",\"modified\":\"2023-11-06T21:59:33.756628+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "52d60b42-9fa4-fcaf-3a9a-fefc9dc20a1d" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/teams/ad2b4266-f087-5b33-9da5-e726f61fd9b0", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": { - "Content-Type": [ - "text/html; charset=utf-8" - ] - }, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "d21d5707-d94e-bea6-1dcf-02e7ed02ff20" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_team_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_team_returns_OK_response.freeze deleted file mode 100644 index ddd60cfaeeb..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_team_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:33.925Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_team_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_team_returns_OK_response.json deleted file mode 100644 index 95ff6ac967b..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_team_returns_OK_response.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Delete_an_existing_incident_team_returns_OK_response-1699307973\"},\"type\":\"teams\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/teams", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"teams\",\"id\":\"a5250cc2-827f-509c-8159-2e0ccfb43cd3\",\"attributes\":{\"name\":\"Test-Delete_an_existing_incident_team_returns_OK_response-1699307973\",\"created\":\"2023-11-06T21:59:34.043971+00:00\",\"modified\":\"2023-11-06T21:59:34.043971+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "8bef6456-ddf5-29c0-2410-fa298b96a6b6" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/teams/a5250cc2-827f-509c-8159-2e0ccfb43cd3", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": { - "Content-Type": [ - "text/html; charset=utf-8" - ] - }, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "c1bbd510-0807-55fa-d134-b1178fd6fe83" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/teams/a5250cc2-827f-509c-8159-2e0ccfb43cd3", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": { - "Content-Type": [ - "text/html; charset=utf-8" - ] - }, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "c1bbd510-0807-55fa-d134-b1178fd6fe84" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_teams_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_teams_returns_OK_response.freeze deleted file mode 100644 index fe3e133ecee..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_teams_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:34.298Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_teams_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_teams_returns_OK_response.json deleted file mode 100644 index 12fdcd5b2dc..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_teams_returns_OK_response.json +++ /dev/null @@ -1,88 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974\"},\"type\":\"teams\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/teams", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"teams\",\"id\":\"7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8\",\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974\",\"created\":\"2023-11-06T21:59:34.424755+00:00\",\"modified\":\"2023-11-06T21:59:34.424755+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "c1f66efd-7d2a-8f21-4013-589b0d9c3cdd" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/teams", - "queryStringParameters": { - "filter": [ - "Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974" - ] - }, - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":[{\"type\":\"teams\",\"id\":\"7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8\",\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974\",\"created\":\"2023-11-06T21:59:34.424755+00:00\",\"modified\":\"2023-11-06T21:59:34.424755+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}],\"meta\":{\"pagination\":{\"offset\":0,\"next_offset\":1,\"size\":1,\"total\":3852},\"sort\":\"ASC\",\"total\":3852}}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "7d7f02cf-7211-abb8-f1e5-e1616fdd47aa" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/teams/7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": { - "Content-Type": [ - "text/html; charset=utf-8" - ] - }, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "3540ebac-7fbc-a73e-6b9a-cdbfd51000f2" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_team_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_team_returns_OK_response.freeze deleted file mode 100644 index 5791822adeb..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_team_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:34.734Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_team_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_team_returns_OK_response.json deleted file mode 100644 index 9b3bd8ab2e7..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_team_returns_OK_response.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974\"},\"type\":\"teams\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/teams", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"teams\",\"id\":\"98da5ea5-4d67-5296-b971-b8cd48f3e5f3\",\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974\",\"created\":\"2023-11-06T21:59:34.850054+00:00\",\"modified\":\"2023-11-06T21:59:34.850054+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "a8f6c0c7-9208-6522-43a9-c58961151c21" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/teams/98da5ea5-4d67-5296-b971-b8cd48f3e5f3", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"teams\",\"id\":\"98da5ea5-4d67-5296-b971-b8cd48f3e5f3\",\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974\",\"created\":\"2023-11-06T21:59:34.850054+00:00\",\"modified\":\"2023-11-06T21:59:34.850054+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "8fa876fe-7440-9119-f018-d2aeabd371e8" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/teams/98da5ea5-4d67-5296-b971-b8cd48f3e5f3", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": { - "Content-Type": [ - "text/html; charset=utf-8" - ] - }, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "ec8efcb4-d7ad-c50b-d1bd-ce152363bce1" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_incident_team_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_an_existing_incident_team_returns_OK_response.freeze deleted file mode 100644 index 95003d7bde7..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_incident_team_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:35.100Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_incident_team_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_an_existing_incident_team_returns_OK_response.json deleted file mode 100644 index 494b75a8f99..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_incident_team_returns_OK_response.json +++ /dev/null @@ -1,87 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1699307975\"},\"type\":\"teams\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/teams", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"teams\",\"id\":\"90c4f5c8-5965-533e-8b56-cffad17e03bf\",\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1699307975\",\"created\":\"2023-11-06T21:59:35.219247+00:00\",\"modified\":\"2023-11-06T21:59:35.219247+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "a5f93f76-901d-1471-ba7c-1ae6796b7f5c" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1699307975-updated\"},\"type\":\"teams\"}}" - }, - "headers": {}, - "method": "PATCH", - "path": "/api/v2/teams/90c4f5c8-5965-533e-8b56-cffad17e03bf", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"teams\",\"id\":\"90c4f5c8-5965-533e-8b56-cffad17e03bf\",\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1699307975-updated\",\"created\":\"2023-11-06T21:59:35.219247+00:00\",\"modified\":\"2023-11-06T21:59:35.364568+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "49b37212-0d37-8cc4-8da2-9c7374fe79eb" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/teams/90c4f5c8-5965-533e-8b56-cffad17e03bf", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": { - "Content-Type": [ - "text/html; charset=utf-8" - ] - }, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "93a01142-d813-6894-4872-e2fe6f5e4c8d" - } -] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index 98e2edab7a1..48979b4fe7b 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -1533,18 +1533,6 @@ "tag": "Teams", "operationId": "CreateTeamNotificationRule" }, - { - "parameters": [ - { - "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\"\n },\n \"type\": \"teams\"\n }\n}" - } - ], - "step": "there is a valid \"team\" in the system", - "key": "team", - "tag": "Incident Teams", - "operationId": "CreateIncidentTeam" - }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v2/api/incident_teams.feature b/src/test/resources/com/datadog/api/client/v2/api/incident_teams.feature deleted file mode 100644 index 5bbb4926393..00000000000 --- a/src/test/resources/com/datadog/api/client/v2/api/incident_teams.feature +++ /dev/null @@ -1,146 +0,0 @@ -@endpoint(incident-teams) @endpoint(incident-teams-v2) -Feature: Incident Teams - The Incident Teams endpoints are deprecated. See the [Teams API - endpoints](https://docs.datadoghq.com/api/latest/teams/) to create, - update, delete, and retrieve teams which can be associated with incidents. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "IncidentTeams" API - - @generated @skip @team:Datadog/incident-app - Scenario: Create a new incident team returns "Bad Request" response - Given operation "CreateIncidentTeam" enabled - And new "CreateIncidentTeam" request - And body with value {"data": {"attributes": {"name": "team name"}, "type": "teams"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:Datadog/incident-app - Scenario: Create a new incident team returns "CREATED" response - Given operation "CreateIncidentTeam" enabled - And new "CreateIncidentTeam" request - And body with value {"data": {"type": "teams", "attributes": {"name": "{{ unique }}"}}} - When the request is sent - Then the response status is 201 CREATED - And the response "data.type" is equal to "teams" - And the response "data.attributes.name" is equal to "{{ unique }}" - - @generated @skip @team:Datadog/incident-app - Scenario: Create a new incident team returns "Not Found" response - Given operation "CreateIncidentTeam" enabled - And new "CreateIncidentTeam" request - And body with value {"data": {"attributes": {"name": "team name"}, "type": "teams"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:Datadog/incident-app - Scenario: Delete an existing incident team returns "Bad Request" response - Given operation "DeleteIncidentTeam" enabled - And new "DeleteIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Delete an existing incident team returns "Not Found" response - Given operation "DeleteIncidentTeam" enabled - And new "DeleteIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Delete an existing incident team returns "OK" response - Given there is a valid "team" in the system - And operation "DeleteIncidentTeam" enabled - And new "DeleteIncidentTeam" request - And request contains "team_id" parameter from "team.data.id" - When the request is sent - Then the response status is 204 OK - - @generated @skip @team:Datadog/incident-app - Scenario: Get a list of all incident teams returns "Bad Request" response - Given operation "ListIncidentTeams" enabled - And new "ListIncidentTeams" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Get a list of all incident teams returns "Not Found" response - Given operation "ListIncidentTeams" enabled - And new "ListIncidentTeams" request - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Get a list of all incident teams returns "OK" response - Given there is a valid "team" in the system - And operation "ListIncidentTeams" enabled - And new "ListIncidentTeams" request - And request contains "filter" parameter from "team.data.attributes.name" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "data[0].type" is equal to "teams" - And the response "data[0].attributes.name" has the same value as "team.data.attributes.name" - - @generated @skip @team:Datadog/incident-app - Scenario: Get details of an incident team returns "Bad Request" response - Given operation "GetIncidentTeam" enabled - And new "GetIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Get details of an incident team returns "Not Found" response - Given operation "GetIncidentTeam" enabled - And new "GetIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Get details of an incident team returns "OK" response - Given there is a valid "team" in the system - And operation "GetIncidentTeam" enabled - And new "GetIncidentTeam" request - And request contains "team_id" parameter from "team.data.id" - When the request is sent - Then the response status is 200 OK - And the response "data.type" is equal to "teams" - And the response "data.id" is equal to "{{ team.data.id }}" - And the response "data.attributes.name" has the same value as "team.data.attributes.name" - - @generated @skip @team:Datadog/incident-app - Scenario: Update an existing incident team returns "Bad Request" response - Given operation "UpdateIncidentTeam" enabled - And new "UpdateIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0001-000000000000", "type": "teams"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Update an existing incident team returns "Not Found" response - Given operation "UpdateIncidentTeam" enabled - And new "UpdateIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0001-000000000000", "type": "teams"}} - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Update an existing incident team returns "OK" response - Given there is a valid "team" in the system - And operation "UpdateIncidentTeam" enabled - And new "UpdateIncidentTeam" request - And request contains "team_id" parameter from "team.data.id" - And body with value {"data": {"type": "teams", "attributes": {"name": "{{ team.data.attributes.name }}-updated"}}} - When the request is sent - Then the response status is 200 OK - And the response "data.type" is equal to "teams" - And the response "data.id" is equal to "{{ team.data.id }}" - And the response "data.attributes.name" is equal to "{{ team.data.attributes.name }}-updated" diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 8f3cc28492d..a3e509a0bcb 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -6964,43 +6964,6 @@ "type": "idempotent" } }, - "ListIncidentTeams": { - "tag": "Incident Teams", - "undo": { - "type": "safe" - } - }, - "CreateIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "operationId": "DeleteIncidentTeam", - "parameters": [ - { - "name": "team_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "type": "idempotent" - } - }, - "GetIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "type": "safe" - } - }, - "UpdateIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "type": "idempotent" - } - }, "UpdateFlakyTests": { "tag": "Test Optimization", "undo": {