diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 440627d7e6b3..a1bdb3e8a210 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 @@ -34691,158 +34669,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: @@ -142701,276 +142527,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: |- @@ -145709,8 +145265,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/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.frozen b/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.frozen deleted file mode 100644 index 1d02b7f5cbe4..000000000000 --- a/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:33.507Z \ No newline at end of file diff --git a/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.yml b/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.yml deleted file mode 100644 index f4952c3ff6d9..000000000000 --- a/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.yml +++ /dev/null @@ -1,44 +0,0 @@ -http_interactions: -- recorded_at: Mon, 06 Nov 2023 21:59:33 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Create_a_new_incident_team_returns_CREATED_response-1699307973"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - encoding: UTF-8 - string: '{"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"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Mon, 06 Nov 2023 21:59:33 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/ad2b4266-f087-5b33-9da5-e726f61fd9b0 - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.frozen b/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.frozen deleted file mode 100644 index ddd60cfaeeb2..000000000000 --- a/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:33.925Z \ No newline at end of file diff --git a/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.yml b/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.yml deleted file mode 100644 index f1756c0461fe..000000000000 --- a/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.yml +++ /dev/null @@ -1,62 +0,0 @@ -http_interactions: -- recorded_at: Mon, 06 Nov 2023 21:59:33 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Delete_an_existing_incident_team_returns_OK_response-1699307973"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - encoding: UTF-8 - string: '{"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"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Mon, 06 Nov 2023 21:59:33 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/a5250cc2-827f-509c-8159-2e0ccfb43cd3 - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -- recorded_at: Mon, 06 Nov 2023 21:59:33 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/a5250cc2-827f-509c-8159-2e0ccfb43cd3 - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.frozen b/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.frozen deleted file mode 100644 index fe3e133ecee2..000000000000 --- a/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:34.298Z \ No newline at end of file diff --git a/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.yml b/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.yml deleted file mode 100644 index 7854ab68856e..000000000000 --- a/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.yml +++ /dev/null @@ -1,64 +0,0 @@ -http_interactions: -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - encoding: UTF-8 - string: '{"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"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/teams?filter=Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974 - response: - body: - encoding: UTF-8 - string: '{"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}} - - ' - headers: - Content-Type: - - application/json - status: - code: 200 - message: OK -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8 - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.frozen b/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.frozen deleted file mode 100644 index 5791822adeb6..000000000000 --- a/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:34.734Z \ No newline at end of file diff --git a/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.yml b/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.yml deleted file mode 100644 index c3c367540ada..000000000000 --- a/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.yml +++ /dev/null @@ -1,64 +0,0 @@ -http_interactions: -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - encoding: UTF-8 - string: '{"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"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/teams/98da5ea5-4d67-5296-b971-b8cd48f3e5f3 - response: - body: - encoding: UTF-8 - string: '{"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"}}}}} - - ' - headers: - Content-Type: - - application/json - status: - code: 200 - message: OK -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/98da5ea5-4d67-5296-b971-b8cd48f3e5f3 - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.frozen b/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.frozen deleted file mode 100644 index 95003d7bde74..000000000000 --- a/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:35.100Z \ No newline at end of file diff --git a/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.yml b/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.yml deleted file mode 100644 index ebcf9e5fc773..000000000000 --- a/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.yml +++ /dev/null @@ -1,68 +0,0 @@ -http_interactions: -- recorded_at: Mon, 06 Nov 2023 21:59:35 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Update_an_existing_incident_team_returns_OK_response-1699307975"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - encoding: UTF-8 - string: '{"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"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Mon, 06 Nov 2023 21:59:35 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Update_an_existing_incident_team_returns_OK_response-1699307975-updated"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: PATCH - uri: https://api.datadoghq.com/api/v2/teams/90c4f5c8-5965-533e-8b56-cffad17e03bf - response: - body: - encoding: UTF-8 - string: '{"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"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 200 - message: OK -- recorded_at: Mon, 06 Nov 2023 21:59:35 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/90c4f5c8-5965-533e-8b56-cffad17e03bf - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/examples/v2/incident-teams/CreateIncidentTeam.rb b/examples/v2/incident-teams/CreateIncidentTeam.rb deleted file mode 100644 index d0ae4a25ecc0..000000000000 --- a/examples/v2/incident-teams/CreateIncidentTeam.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Create a new incident team returns "CREATED" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_incident_team".to_sym] = true -end -api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new - -body = DatadogAPIClient::V2::IncidentTeamCreateRequest.new({ - data: DatadogAPIClient::V2::IncidentTeamCreateData.new({ - type: DatadogAPIClient::V2::IncidentTeamType::TEAMS, - attributes: DatadogAPIClient::V2::IncidentTeamCreateAttributes.new({ - name: "Example-Incident-Team", - }), - }), -}) -p api_instance.create_incident_team(body) diff --git a/examples/v2/incident-teams/DeleteIncidentTeam.rb b/examples/v2/incident-teams/DeleteIncidentTeam.rb deleted file mode 100644 index 116b10154b96..000000000000 --- a/examples/v2/incident-teams/DeleteIncidentTeam.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Delete an existing incident team returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_incident_team".to_sym] = true -end -api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new - -# there is a valid "team" in the system -TEAM_DATA_ID = ENV["TEAM_DATA_ID"] -api_instance.delete_incident_team(TEAM_DATA_ID) diff --git a/examples/v2/incident-teams/GetIncidentTeam.rb b/examples/v2/incident-teams/GetIncidentTeam.rb deleted file mode 100644 index ab9270baa977..000000000000 --- a/examples/v2/incident-teams/GetIncidentTeam.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Get details of an incident team returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_incident_team".to_sym] = true -end -api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new - -# there is a valid "team" in the system -TEAM_DATA_ID = ENV["TEAM_DATA_ID"] -p api_instance.get_incident_team(TEAM_DATA_ID) diff --git a/examples/v2/incident-teams/ListIncidentTeams.rb b/examples/v2/incident-teams/ListIncidentTeams.rb deleted file mode 100644 index efddef6118b8..000000000000 --- a/examples/v2/incident-teams/ListIncidentTeams.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Get a list of all incident teams returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_incident_teams".to_sym] = true -end -api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new - -# there is a valid "team" in the system -TEAM_DATA_ATTRIBUTES_NAME = ENV["TEAM_DATA_ATTRIBUTES_NAME"] -opts = { - filter: TEAM_DATA_ATTRIBUTES_NAME, -} -p api_instance.list_incident_teams(opts) diff --git a/examples/v2/incident-teams/UpdateIncidentTeam.rb b/examples/v2/incident-teams/UpdateIncidentTeam.rb deleted file mode 100644 index 99e7000500d1..000000000000 --- a/examples/v2/incident-teams/UpdateIncidentTeam.rb +++ /dev/null @@ -1,21 +0,0 @@ -# Update an existing incident team returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_incident_team".to_sym] = true -end -api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new - -# there is a valid "team" in the system -TEAM_DATA_ATTRIBUTES_NAME = ENV["TEAM_DATA_ATTRIBUTES_NAME"] -TEAM_DATA_ID = ENV["TEAM_DATA_ID"] - -body = DatadogAPIClient::V2::IncidentTeamUpdateRequest.new({ - data: DatadogAPIClient::V2::IncidentTeamUpdateData.new({ - type: DatadogAPIClient::V2::IncidentTeamType::TEAMS, - attributes: DatadogAPIClient::V2::IncidentTeamUpdateAttributes.new({ - name: "team name-updated", - }), - }), -}) -p api_instance.update_incident_team(TEAM_DATA_ID, body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index f88a3c3f133f..64fa05527554 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -4605,26 +4605,6 @@ "v2.GetUserMemberships" => { "user_uuid" => "String", }, - "v2.ListIncidentTeams" => { - "include" => "IncidentRelatedObject", - "page_size" => "Integer", - "page_offset" => "Integer", - "filter" => "String", - }, - "v2.CreateIncidentTeam" => { - "body" => "IncidentTeamCreateRequest", - }, - "v2.DeleteIncidentTeam" => { - "team_id" => "String", - }, - "v2.GetIncidentTeam" => { - "team_id" => "String", - "include" => "IncidentRelatedObject", - }, - "v2.UpdateIncidentTeam" => { - "team_id" => "String", - "body" => "IncidentTeamUpdateRequest", - }, "v2.SearchWidgets" => { "experience_type" => "WidgetExperienceType", "filter_widget_type" => "WidgetType", diff --git a/features/v2/given.json b/features/v2/given.json index 98e2edab7a17..48979b4fe7be 100644 --- a/features/v2/given.json +++ b/features/v2/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/features/v2/incident_teams.feature b/features/v2/incident_teams.feature deleted file mode 100644 index 5bbb4926393c..000000000000 --- a/features/v2/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/features/v2/undo.json b/features/v2/undo.json index d5a8323e2702..473ed7c85aab 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -6958,43 +6958,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": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index eb82106f5652..dbb6cd75bc77 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -462,11 +462,6 @@ def initialize "v2.add_member_team": false, "v2.list_member_teams": false, "v2.remove_member_team": false, - "v2.create_incident_team": false, - "v2.delete_incident_team": false, - "v2.get_incident_team": false, - "v2.list_incident_teams": false, - "v2.update_incident_team": false, } @server_variables[:site] = ENV['DD_SITE'] if ENV.key? 'DD_SITE' @api_key['apiKeyAuth'] = ENV['DD_API_KEY'] if ENV.key? 'DD_API_KEY' diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 3ba1b16d4765..358c44011c57 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3170,19 +3170,6 @@ def overrides "v2.incident_service_update_request" => "IncidentServiceUpdateRequest", "v2.incident_severity" => "IncidentSeverity", "v2.incidents_response" => "IncidentsResponse", - "v2.incident_team_create_attributes" => "IncidentTeamCreateAttributes", - "v2.incident_team_create_data" => "IncidentTeamCreateData", - "v2.incident_team_create_request" => "IncidentTeamCreateRequest", - "v2.incident_team_included_items" => "IncidentTeamIncludedItems", - "v2.incident_team_relationships" => "IncidentTeamRelationships", - "v2.incident_team_response" => "IncidentTeamResponse", - "v2.incident_team_response_attributes" => "IncidentTeamResponseAttributes", - "v2.incident_team_response_data" => "IncidentTeamResponseData", - "v2.incident_teams_response" => "IncidentTeamsResponse", - "v2.incident_team_type" => "IncidentTeamType", - "v2.incident_team_update_attributes" => "IncidentTeamUpdateAttributes", - "v2.incident_team_update_data" => "IncidentTeamUpdateData", - "v2.incident_team_update_request" => "IncidentTeamUpdateRequest", "v2.incident_timeline_cell_create_attributes" => "IncidentTimelineCellCreateAttributes", "v2.incident_timeline_cell_markdown_content_type" => "IncidentTimelineCellMarkdownContentType", "v2.incident_timeline_cell_markdown_create_attributes" => "IncidentTimelineCellMarkdownCreateAttributes", @@ -6422,7 +6409,6 @@ def overrides "v2.google_chat_integration_api" => "GoogleChatIntegrationAPI", "v2.high_availability_multi_region_api" => "HighAvailabilityMultiRegionAPI", "v2.incident_services_api" => "IncidentServicesAPI", - "v2.incident_teams_api" => "IncidentTeamsAPI", "v2.incidents_api" => "IncidentsAPI", "v2.integrations_api" => "IntegrationsAPI", "v2.ip_allowlist_api" => "IPAllowlistAPI", diff --git a/lib/datadog_api_client/v2/api/incident_teams_api.rb b/lib/datadog_api_client/v2/api/incident_teams_api.rb deleted file mode 100644 index 93df27f0f80e..000000000000 --- a/lib/datadog_api_client/v2/api/incident_teams_api.rb +++ /dev/null @@ -1,419 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'cgi' - -module DatadogAPIClient::V2 - class IncidentTeamsAPI - attr_accessor :api_client - - def initialize(api_client = DatadogAPIClient::APIClient.default) - @api_client = api_client - end - - # Create a new incident team. - # - # @see #create_incident_team_with_http_info - def create_incident_team(body, opts = {}) - data, _status_code, _headers = create_incident_team_with_http_info(body, opts) - data - end - - # Create a new incident team. - # - # Creates a new incident team. - # - # @deprecated This API is deprecated. - # - # @param body [IncidentTeamCreateRequest] Incident Team Payload. - # @param opts [Hash] the optional parameters - # @return [Array<(IncidentTeamResponse, Integer, Hash)>] IncidentTeamResponse data, response status code and response headers - def create_incident_team_with_http_info(body, opts = {}) - warn "[DEPRECATION] `CreateIncidentTeam` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_team".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_team") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_team")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentTeamsAPI.create_incident_team ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling IncidentTeamsAPI.create_incident_team" - end - # resource path - local_var_path = '/api/v2/teams' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'IncidentTeamResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_incident_team, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentTeamsAPI#create_incident_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete an existing incident team. - # - # @see #delete_incident_team_with_http_info - def delete_incident_team(team_id, opts = {}) - delete_incident_team_with_http_info(team_id, opts) - nil - end - - # Delete an existing incident team. - # - # Deletes an existing incident team. - # - # @deprecated This API is deprecated. - # - # @param team_id [String] The ID of the incident team. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_team_with_http_info(team_id, opts = {}) - warn "[DEPRECATION] `DeleteIncidentTeam` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_team".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_team") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_team")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentTeamsAPI.delete_incident_team ...' - end - # verify the required parameter 'team_id' is set - if @api_client.config.client_side_validation && team_id.nil? - fail ArgumentError, "Missing the required parameter 'team_id' when calling IncidentTeamsAPI.delete_incident_team" - end - # resource path - local_var_path = '/api/v2/teams/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_incident_team, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentTeamsAPI#delete_incident_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get details of an incident team. - # - # @see #get_incident_team_with_http_info - def get_incident_team(team_id, opts = {}) - data, _status_code, _headers = get_incident_team_with_http_info(team_id, opts) - data - end - - # Get details of an incident team. - # - # 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. - # - # @deprecated This API is deprecated. - # - # @param team_id [String] The ID of the incident team. - # @param opts [Hash] the optional parameters - # @option opts [IncidentRelatedObject] :include Specifies which types of related objects should be included in the response. - # @return [Array<(IncidentTeamResponse, Integer, Hash)>] IncidentTeamResponse data, response status code and response headers - def get_incident_team_with_http_info(team_id, opts = {}) - warn "[DEPRECATION] `GetIncidentTeam` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_team".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_team") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_team")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentTeamsAPI.get_incident_team ...' - end - # verify the required parameter 'team_id' is set - if @api_client.config.client_side_validation && team_id.nil? - fail ArgumentError, "Missing the required parameter 'team_id' when calling IncidentTeamsAPI.get_incident_team" - end - allowable_values = ['users', 'attachments'] - if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include']) - fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}" - end - # resource path - local_var_path = '/api/v2/teams/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'IncidentTeamResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_incident_team, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentTeamsAPI#get_incident_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a list of all incident teams. - # - # @see #list_incident_teams_with_http_info - def list_incident_teams(opts = {}) - data, _status_code, _headers = list_incident_teams_with_http_info(opts) - data - end - - # Get a list of all incident teams. - # - # 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. - # - # @deprecated This API is deprecated. - # - # @param opts [Hash] the optional parameters - # @option opts [IncidentRelatedObject] :include Specifies which types of related objects should be included in the response. - # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. - # @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page. - # @option opts [String] :filter A search query that filters teams by name. - # @return [Array<(IncidentTeamsResponse, Integer, Hash)>] IncidentTeamsResponse data, response status code and response headers - def list_incident_teams_with_http_info(opts = {}) - warn "[DEPRECATION] `ListIncidentTeams` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_teams".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_teams") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_teams")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentTeamsAPI.list_incident_teams ...' - end - allowable_values = ['users', 'attachments'] - if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include']) - fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}" - end - # resource path - local_var_path = '/api/v2/teams' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? - query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'IncidentTeamsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_incident_teams, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentTeamsAPI#list_incident_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update an existing incident team. - # - # @see #update_incident_team_with_http_info - def update_incident_team(team_id, body, opts = {}) - data, _status_code, _headers = update_incident_team_with_http_info(team_id, body, opts) - data - end - - # Update an existing incident team. - # - # Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update. - # - # @deprecated This API is deprecated. - # - # @param team_id [String] The ID of the incident team. - # @param body [IncidentTeamUpdateRequest] Incident Team Payload. - # @param opts [Hash] the optional parameters - # @return [Array<(IncidentTeamResponse, Integer, Hash)>] IncidentTeamResponse data, response status code and response headers - def update_incident_team_with_http_info(team_id, body, opts = {}) - warn "[DEPRECATION] `UpdateIncidentTeam` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_team".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_team") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_team")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentTeamsAPI.update_incident_team ...' - end - # verify the required parameter 'team_id' is set - if @api_client.config.client_side_validation && team_id.nil? - fail ArgumentError, "Missing the required parameter 'team_id' when calling IncidentTeamsAPI.update_incident_team" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling IncidentTeamsAPI.update_incident_team" - end - # resource path - local_var_path = '/api/v2/teams/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'IncidentTeamResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :update_incident_team, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentTeamsAPI#update_incident_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_create_attributes.rb b/lib/datadog_api_client/v2/models/incident_team_create_attributes.rb deleted file mode 100644 index 3fc111a3a89d..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_create_attributes.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The incident team's attributes for a create request. - class IncidentTeamCreateAttributes - include BaseGenericModel - - # Name of the incident team. - attr_reader :name - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamCreateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @name.nil? - true - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_create_data.rb b/lib/datadog_api_client/v2/models/incident_team_create_data.rb deleted file mode 100644 index 65c77ac6a22f..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_create_data.rb +++ /dev/null @@ -1,143 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Incident Team data for a create request. - class IncidentTeamCreateData - include BaseGenericModel - - # The incident team's attributes for a create request. - attr_accessor :attributes - - # The incident team's relationships. - attr_accessor :relationships - - # Incident Team resource type. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'relationships' => :'relationships', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'IncidentTeamCreateAttributes', - :'relationships' => :'IncidentTeamRelationships', - :'type' => :'IncidentTeamType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamCreateData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - relationships == o.relationships && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, relationships, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_create_request.rb b/lib/datadog_api_client/v2/models/incident_team_create_request.rb deleted file mode 100644 index 4c8b26651729..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_create_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Create request with an incident team payload. - class IncidentTeamCreateRequest - include BaseGenericModel - - # Incident Team data for a create request. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'IncidentTeamCreateData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamCreateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_included_items.rb b/lib/datadog_api_client/v2/models/incident_team_included_items.rb deleted file mode 100644 index 8f1292fd5633..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_included_items.rb +++ /dev/null @@ -1,62 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # An object related to an incident team which is present in the included payload. - module IncidentTeamIncludedItems - class << self - include BaseOneOfModel - include BaseOneOfModelNoDiscriminator - - # List of class defined in oneOf (OpenAPI v3) - def openapi_one_of - [ - :'User' - ] - end - # Builds the object - # @param data [Mixed] Data to be matched against the list of oneOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of oneOf items and attempt to identify the appropriate one. - # Note: - # - We do not attempt to check whether exactly one item matches. - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_one_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - typed_data = find_and_cast_into_type(klass, data) - next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed - return typed_data if typed_data - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - if openapi_one_of.include?(:AnyType) - data - else - self._unparsed = true - DatadogAPIClient::UnparsedObject.new(data) - end - end - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_relationships.rb b/lib/datadog_api_client/v2/models/incident_team_relationships.rb deleted file mode 100644 index 427886bbc0e8..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_relationships.rb +++ /dev/null @@ -1,115 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The incident team's relationships. - class IncidentTeamRelationships - include BaseGenericModel - - # Relationship to user. - attr_accessor :created_by - - # Relationship to user. - attr_accessor :last_modified_by - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_by' => :'created_by', - :'last_modified_by' => :'last_modified_by' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_by' => :'RelationshipToUser', - :'last_modified_by' => :'RelationshipToUser' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamRelationships` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created_by') - self.created_by = attributes[:'created_by'] - end - - if attributes.key?(:'last_modified_by') - self.last_modified_by = attributes[:'last_modified_by'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_by == o.created_by && - last_modified_by == o.last_modified_by && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_by, last_modified_by, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_response.rb b/lib/datadog_api_client/v2/models/incident_team_response.rb deleted file mode 100644 index 0034ab4b68b9..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_response.rb +++ /dev/null @@ -1,135 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response with an incident team payload. - class IncidentTeamResponse - include BaseGenericModel - - # Incident Team data from a response. - attr_reader :data - - # Included objects from relationships. - attr_accessor :included - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data', - :'included' => :'included' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'IncidentTeamResponseData', - :'included' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - - if attributes.key?(:'included') - if (value = attributes[:'included']).is_a?(Array) - self.included = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - included == o.included && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, included, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_response_attributes.rb b/lib/datadog_api_client/v2/models/incident_team_response_attributes.rb deleted file mode 100644 index 61e5ba8b3c13..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_response_attributes.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The incident team's attributes from a response. - class IncidentTeamResponseAttributes - include BaseGenericModel - - # Timestamp of when the incident team was created. - attr_accessor :created - - # Timestamp of when the incident team was modified. - attr_accessor :modified - - # Name of the incident team. - attr_accessor :name - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created' => :'created', - :'modified' => :'modified', - :'name' => :'name' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created' => :'Time', - :'modified' => :'Time', - :'name' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamResponseAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created') - self.created = attributes[:'created'] - end - - if attributes.key?(:'modified') - self.modified = attributes[:'modified'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created == o.created && - modified == o.modified && - name == o.name && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created, modified, name, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_response_data.rb b/lib/datadog_api_client/v2/models/incident_team_response_data.rb deleted file mode 100644 index 51b918569c82..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_response_data.rb +++ /dev/null @@ -1,135 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Incident Team data from a response. - class IncidentTeamResponseData - include BaseGenericModel - - # The incident team's attributes from a response. - attr_accessor :attributes - - # The incident team's ID. - attr_accessor :id - - # The incident team's relationships. - attr_accessor :relationships - - # Incident Team resource type. - attr_accessor :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'relationships' => :'relationships', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'IncidentTeamResponseAttributes', - :'id' => :'String', - :'relationships' => :'IncidentTeamRelationships', - :'type' => :'IncidentTeamType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamResponseData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - relationships == o.relationships && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, relationships, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_type.rb b/lib/datadog_api_client/v2/models/incident_team_type.rb deleted file mode 100644 index 29e1020af05c..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Incident Team resource type. - class IncidentTeamType - include BaseEnumModel - - TEAMS = "teams".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_update_attributes.rb b/lib/datadog_api_client/v2/models/incident_team_update_attributes.rb deleted file mode 100644 index e174ec43996a..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_update_attributes.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The incident team's attributes for an update request. - class IncidentTeamUpdateAttributes - include BaseGenericModel - - # Name of the incident team. - attr_reader :name - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamUpdateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @name.nil? - true - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_update_data.rb b/lib/datadog_api_client/v2/models/incident_team_update_data.rb deleted file mode 100644 index 2a5ce5957911..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_update_data.rb +++ /dev/null @@ -1,153 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Incident Team data for an update request. - class IncidentTeamUpdateData - include BaseGenericModel - - # The incident team's attributes for an update request. - attr_accessor :attributes - - # The incident team's ID. - attr_accessor :id - - # The incident team's relationships. - attr_accessor :relationships - - # Incident Team resource type. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'relationships' => :'relationships', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'IncidentTeamUpdateAttributes', - :'id' => :'String', - :'relationships' => :'IncidentTeamRelationships', - :'type' => :'IncidentTeamType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamUpdateData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - relationships == o.relationships && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, relationships, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_update_request.rb b/lib/datadog_api_client/v2/models/incident_team_update_request.rb deleted file mode 100644 index e91949273b54..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_update_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Update request with an incident team payload. - class IncidentTeamUpdateRequest - include BaseGenericModel - - # Incident Team data for an update request. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'IncidentTeamUpdateData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamUpdateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_teams_response.rb b/lib/datadog_api_client/v2/models/incident_teams_response.rb deleted file mode 100644 index 30e03b61b990..000000000000 --- a/lib/datadog_api_client/v2/models/incident_teams_response.rb +++ /dev/null @@ -1,147 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response with a list of incident team payloads. - class IncidentTeamsResponse - include BaseGenericModel - - # An array of incident teams. - attr_reader :data - - # Included related resources which the user requested. - attr_accessor :included - - # The metadata object containing pagination metadata. - attr_accessor :meta - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data', - :'included' => :'included', - :'meta' => :'meta' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array', - :'included' => :'Array', - :'meta' => :'IncidentResponseMeta' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamsResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - - if attributes.key?(:'included') - if (value = attributes[:'included']).is_a?(Array) - self.included = value - end - end - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - included == o.included && - meta == o.meta && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, included, meta, additional_properties].hash - end - end -end