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