From 2def574f91bb000d9429198fd61f2cb4c2985123 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:35:17 +0000 Subject: [PATCH] Edit Naming for v2 Microsoft Teams Integration Endpoints (#2044) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 335 ++++++++---------- ...api-handle-returns-CREATED-response.frozen | 1 - ...te-api-handle-returns-CREATED-response.yml | 40 --- ...lete-api-handle-returns-OK-response.frozen | 1 - .../Delete-api-handle-returns-OK-response.yml | 56 --- ...all-api-handles-returns-OK-response.frozen | 1 - ...et-all-api-handles-returns-OK-response.yml | 65 ---- ...rmation-by-name-returns-OK-response.frozen | 1 - ...nformation-by-name-returns-OK-response.yml | 60 ---- ...dle-information-returns-OK-response.frozen | 1 - ...handle-information-returns-OK-response.yml | 60 ---- ...date-api-handle-returns-OK-response.frozen | 1 - .../Update-api-handle-returns-OK-response.yml | 64 ---- .../CreateApiHandle.rb | 17 - .../CreateTenantBasedHandle.rb | 17 + ... => CreateTenantBasedHandle_1540689753.rb} | 10 +- .../DeleteApiHandle_377884154.rb | 8 - .../DeleteTenantBasedHandle.rb | 5 + .../DeleteTenantBasedHandle_377884154.rb | 8 + .../GetApiHandle.rb | 5 - .../GetApiHandleByName.rb | 5 - .../GetApiHandleByName_1103107145.rb | 8 - .../GetApiHandle_2883785101.rb | 8 - .../GetTenantBasedHandle.rb | 5 + .../GetTenantBasedHandle_2883785101.rb | 8 + .../ListApiHandles.rb | 5 - ...ApiHandle.rb => ListTenantBasedHandles.rb} | 4 +- ...rb => ListTenantBasedHandles_769592979.rb} | 2 +- .../UpdateApiHandle.rb | 17 - .../UpdateApiHandle_419892746.rb | 18 - .../UpdateTenantBasedHandle.rb | 17 + .../UpdateTenantBasedHandle_419892746.rb | 18 + features/scenarios_model_mapping.rb | 18 +- features/v2/given.json | 8 +- .../v2/microsoft_teams_integration.feature | 193 ++++------ features/v2/undo.json | 18 +- lib/datadog_api_client/inflector.rb | 27 +- .../v2/api/microsoft_teams_integration_api.rb | 259 +++++--------- ...icrosoft_teams_api_handle_info_response.rb | 105 ------ ...ams_create_tenant_based_handle_request.rb} | 10 +- ...t_teams_tenant_based_handle_attributes.rb} | 8 +- ..._based_handle_info_response_attributes.rb} | 8 +- ...tenant_based_handle_info_response_data.rb} | 16 +- ...ft_teams_tenant_based_handle_info_type.rb} | 6 +- ...tenant_based_handle_request_attributes.rb} | 8 +- ...teams_tenant_based_handle_request_data.rb} | 14 +- ...oft_teams_tenant_based_handle_response.rb} | 10 +- ...eams_tenant_based_handle_response_data.rb} | 16 +- ...crosoft_teams_tenant_based_handle_type.rb} | 6 +- ...ft_teams_tenant_based_handles_response.rb} | 10 +- ...ams_update_tenant_based_handle_request.rb} | 10 +- ...pdate_tenant_based_handle_request_data.rb} | 14 +- 53 files changed, 516 insertions(+), 1127 deletions(-) delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Create-api-handle-returns-CREATED-response.frozen delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Create-api-handle-returns-CREATED-response.yml delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Delete-api-handle-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Delete-api-handle-returns-OK-response.yml delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Get-all-api-handles-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Get-all-api-handles-returns-OK-response.yml delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-by-name-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-by-name-returns-OK-response.yml delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-returns-OK-response.yml delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Update-api-handle-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/microsoft_teams_integration/Update-api-handle-returns-OK-response.yml delete mode 100644 examples/v2/microsoft-teams-integration/CreateApiHandle.rb create mode 100644 examples/v2/microsoft-teams-integration/CreateTenantBasedHandle.rb rename examples/v2/microsoft-teams-integration/{CreateApiHandle_1540689753.rb => CreateTenantBasedHandle_1540689753.rb} (51%) delete mode 100644 examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.rb create mode 100644 examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle.rb create mode 100644 examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle_377884154.rb delete mode 100644 examples/v2/microsoft-teams-integration/GetApiHandle.rb delete mode 100644 examples/v2/microsoft-teams-integration/GetApiHandleByName.rb delete mode 100644 examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.rb delete mode 100644 examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.rb create mode 100644 examples/v2/microsoft-teams-integration/GetTenantBasedHandle.rb create mode 100644 examples/v2/microsoft-teams-integration/GetTenantBasedHandle_2883785101.rb delete mode 100644 examples/v2/microsoft-teams-integration/ListApiHandles.rb rename examples/v2/microsoft-teams-integration/{DeleteApiHandle.rb => ListTenantBasedHandles.rb} (51%) rename examples/v2/microsoft-teams-integration/{ListApiHandles_769592979.rb => ListTenantBasedHandles_769592979.rb} (77%) delete mode 100644 examples/v2/microsoft-teams-integration/UpdateApiHandle.rb delete mode 100644 examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.rb create mode 100644 examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle.rb create mode 100644 examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle_419892746.rb delete mode 100644 lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response.rb rename lib/datadog_api_client/v2/models/{microsoft_teams_create_api_handle_request.rb => microsoft_teams_create_tenant_based_handle_request.rb} (91%) rename lib/datadog_api_client/v2/models/{microsoft_teams_api_handle_attributes.rb => microsoft_teams_tenant_based_handle_attributes.rb} (96%) rename lib/datadog_api_client/v2/models/{microsoft_teams_api_handle_info_response_attributes.rb => microsoft_teams_tenant_based_handle_info_response_attributes.rb} (96%) rename lib/datadog_api_client/v2/models/{microsoft_teams_api_handle_info_response_data.rb => microsoft_teams_tenant_based_handle_info_response_data.rb} (89%) rename lib/datadog_api_client/v2/models/{microsoft_teams_api_handle_info_type.rb => microsoft_teams_tenant_based_handle_info_type.rb} (77%) rename lib/datadog_api_client/v2/models/{microsoft_teams_api_handle_request_attributes.rb => microsoft_teams_tenant_based_handle_request_attributes.rb} (96%) rename lib/datadog_api_client/v2/models/{microsoft_teams_update_api_handle_request_data.rb => microsoft_teams_tenant_based_handle_request_data.rb} (89%) rename lib/datadog_api_client/v2/models/{microsoft_teams_create_api_handle_response.rb => microsoft_teams_tenant_based_handle_response.rb} (91%) rename lib/datadog_api_client/v2/models/{microsoft_teams_api_handle_response_data.rb => microsoft_teams_tenant_based_handle_response_data.rb} (89%) rename lib/datadog_api_client/v2/models/{microsoft_teams_api_handle_type.rb => microsoft_teams_tenant_based_handle_type.rb} (79%) rename lib/datadog_api_client/v2/models/{microsoft_teams_api_handles_response.rb => microsoft_teams_tenant_based_handles_response.rb} (91%) rename lib/datadog_api_client/v2/models/{microsoft_teams_update_api_handle_request.rb => microsoft_teams_update_tenant_based_handle_request.rb} (91%) rename lib/datadog_api_client/v2/models/{microsoft_teams_api_handle_request_data.rb => microsoft_teams_update_tenant_based_handle_request_data.rb} (89%) diff --git a/.apigentools-info b/.apigentools-info index f65272d4b6a..3090f3100bc 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-03 13:53:56.145082", - "spec_repo_commit": "2c46d95c" + "regenerated": "2024-10-03 16:37:51.332832", + "spec_repo_commit": "ef194005" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-03 13:53:56.159367", - "spec_repo_commit": "2c46d95c" + "regenerated": "2024-10-03 16:37:51.347144", + "spec_repo_commit": "ef194005" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0b749be5074..5233ad64ba8 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -458,24 +458,24 @@ components: required: true schema: type: string - MicrosoftTeamsHandleIDPathParameter: - description: Your handle id. - in: path - name: handle_id - required: true + MicrosoftTeamsHandleNameQueryParameter: + description: Your tenant-based handle name. + in: query + name: name + required: false schema: type: string - MicrosoftTeamsHandleNamePathParameter: - description: Your handle name. + MicrosoftTeamsTeamNamePathParameter: + description: Your team name. in: path - name: handle_name + name: team_name required: true schema: type: string - MicrosoftTeamsTeamNamePathParameter: - description: Your team name. + MicrosoftTeamsTenantBasedHandleIDPathParameter: + description: Your tenant-based handle id. in: path - name: team_name + name: handle_id required: true schema: type: string @@ -14840,8 +14840,64 @@ components: - data_source - query type: object - MicrosoftTeamsApiHandleAttributes: - description: Handle attributes. + MicrosoftTeamsChannelInfoResponseAttributes: + description: Channel attributes. + properties: + is_primary: + description: Indicates if this is the primary channel. + example: true + maxLength: 255 + type: boolean + team_id: + description: Team id. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 255 + type: string + tenant_id: + description: Tenant id. + example: 00000000-0000-0000-0000-000000000001 + maxLength: 255 + type: string + type: object + MicrosoftTeamsChannelInfoResponseData: + description: Channel data from a response. + properties: + attributes: + $ref: '#/components/schemas/MicrosoftTeamsChannelInfoResponseAttributes' + id: + description: The ID of the channel. + example: 19:b41k24b14bn1nwffkernfkwrnfneubgkr@thread.tacv2 + maxLength: 255 + minLength: 1 + type: string + type: + $ref: '#/components/schemas/MicrosoftTeamsChannelInfoType' + type: object + MicrosoftTeamsChannelInfoType: + default: ms-teams-channel-info + description: Channel info resource type. + enum: + - ms-teams-channel-info + example: ms-teams-channel-info + type: string + x-enum-varnames: + - MS_TEAMS_CHANNEL_INFO + MicrosoftTeamsCreateTenantBasedHandleRequest: + description: Create tenant-based handle request. + properties: + data: + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleRequestData' + required: + - data + type: object + MicrosoftTeamsGetChannelByNameResponse: + description: Response with channel, team, and tenant ID information. + properties: + data: + $ref: '#/components/schemas/MicrosoftTeamsChannelInfoResponseData' + type: object + MicrosoftTeamsTenantBasedHandleAttributes: + description: Tenant-based handle attributes. properties: channel_id: description: Channel id. @@ -14849,7 +14905,7 @@ components: maxLength: 255 type: string name: - description: Handle name. + description: Tenant-based handle name. example: fake-handle-name maxLength: 255 type: string @@ -14864,14 +14920,8 @@ components: maxLength: 255 type: string type: object - MicrosoftTeamsApiHandleInfoResponse: - description: Response of a handle. - properties: - data: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponseData' - type: object - MicrosoftTeamsApiHandleInfoResponseAttributes: - description: Handle attributes. + MicrosoftTeamsTenantBasedHandleInfoResponseAttributes: + description: Tenant-based handle attributes. properties: channel_id: description: Channel id. @@ -14884,7 +14934,7 @@ components: maxLength: 255 type: string name: - description: Handle name. + description: Tenant-based handle name. example: fake-handle-name maxLength: 255 type: string @@ -14909,31 +14959,31 @@ components: maxLength: 255 type: string type: object - MicrosoftTeamsApiHandleInfoResponseData: - description: Handle data from a response. + MicrosoftTeamsTenantBasedHandleInfoResponseData: + description: Tenant-based handle data from a response. properties: attributes: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponseAttributes' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleInfoResponseAttributes' id: - description: The ID of the handle. + description: The ID of the tenant-based handle. example: 596da4af-0563-4097-90ff-07230c3f9db3 maxLength: 100 minLength: 1 type: string type: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoType' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleInfoType' type: object - MicrosoftTeamsApiHandleInfoType: - default: ms-teams-handle-info - description: Handle resource type. + MicrosoftTeamsTenantBasedHandleInfoType: + default: ms-teams-tenant-based-handle-info + description: Tenant-based handle resource type. enum: - - ms-teams-handle-info - example: ms-teams-handle-info + - ms-teams-tenant-based-handle-info + example: ms-teams-tenant-based-handle-info type: string x-enum-varnames: - - MS_TEAMS_HANDLE_INFO - MicrosoftTeamsApiHandleRequestAttributes: - description: Handle attributes. + - MS_TEAMS_TENANT_BASED_HANDLE_INFO + MicrosoftTeamsTenantBasedHandleRequestAttributes: + description: Tenant-based handle attributes. properties: channel_id: description: Channel id. @@ -14941,7 +14991,7 @@ components: maxLength: 255 type: string name: - description: Handle name. + description: Tenant-based handle name. example: fake-handle-name maxLength: 255 type: string @@ -14961,45 +15011,53 @@ components: - team_id - tenant_id type: object - MicrosoftTeamsApiHandleRequestData: - description: Handle data from a response. + MicrosoftTeamsTenantBasedHandleRequestData: + description: Tenant-based handle data from a response. properties: attributes: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleRequestAttributes' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleRequestAttributes' type: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleType' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleType' required: - type - attributes type: object - MicrosoftTeamsApiHandleResponseData: - description: Handle data from a response. + MicrosoftTeamsTenantBasedHandleResponse: + description: Response of a tenant-based handle. + properties: + data: + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleResponseData' + required: + - data + type: object + MicrosoftTeamsTenantBasedHandleResponseData: + description: Tenant-based handle data from a response. properties: attributes: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleAttributes' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleAttributes' id: - description: The ID of the handle. + description: The ID of the tenant-based handle. example: 596da4af-0563-4097-90ff-07230c3f9db3 maxLength: 100 minLength: 1 type: string type: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleType' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleType' type: object - MicrosoftTeamsApiHandleType: - default: handle - description: Specifies the handle resource type. + MicrosoftTeamsTenantBasedHandleType: + default: tenant-based-handle + description: Specifies the tenant-based handle resource type. enum: - - handle - example: handle + - tenant-based-handle + example: tenant-based-handle type: string x-enum-varnames: - - HANDLE - MicrosoftTeamsApiHandlesResponse: - description: Response with a list of handles. + - TENANT_BASED_HANDLE + MicrosoftTeamsTenantBasedHandlesResponse: + description: Response with a list of tenant-based handles. properties: data: - description: An array of handles. + description: An array of tenant-based handles. example: - attributes: channelId: 19:b41k24b14bn1nwffkernfkwrnfneubgkr@thread.tacv2 @@ -15010,7 +15068,7 @@ components: tenantId: 00000000-0000-0000-0000-000000000001 tenantName: Company, Inc. id: 596da4af-0563-4097-90ff-07230c3f9db3 - type: ms-teams-handle-info + type: ms-teams-tenant-based-handle-info - attributes: channelId: 19:b41k24b14bn1nwffkernfkwrnfneubgk1@thread.tacv2 channelName: General2 @@ -15020,92 +15078,28 @@ components: tenantId: 00000000-0000-0000-0000-000000000003 tenantName: Company, Inc. id: 596da4af-0563-4097-90ff-07230c3f9db4 - type: ms-teams-handle-info + type: ms-teams-tenant-based-handle-info items: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponseData' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleInfoResponseData' type: array required: - data type: object - MicrosoftTeamsChannelInfoResponseAttributes: - description: Channel attributes. - properties: - is_primary: - description: Indicates if this is the primary channel. - example: true - maxLength: 255 - type: boolean - team_id: - description: Team id. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 255 - type: string - tenant_id: - description: Tenant id. - example: 00000000-0000-0000-0000-000000000001 - maxLength: 255 - type: string - type: object - MicrosoftTeamsChannelInfoResponseData: - description: Channel data from a response. - properties: - attributes: - $ref: '#/components/schemas/MicrosoftTeamsChannelInfoResponseAttributes' - id: - description: The ID of the channel. - example: 19:b41k24b14bn1nwffkernfkwrnfneubgkr@thread.tacv2 - maxLength: 255 - minLength: 1 - type: string - type: - $ref: '#/components/schemas/MicrosoftTeamsChannelInfoType' - type: object - MicrosoftTeamsChannelInfoType: - default: ms-teams-channel-info - description: Channel info resource type. - enum: - - ms-teams-channel-info - example: ms-teams-channel-info - type: string - x-enum-varnames: - - MS_TEAMS_CHANNEL_INFO - MicrosoftTeamsCreateApiHandleRequest: - description: Create handle request. - properties: - data: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleRequestData' - required: - - data - type: object - MicrosoftTeamsCreateApiHandleResponse: - description: Response of a handle. + MicrosoftTeamsUpdateTenantBasedHandleRequest: + description: Update tenant-based handle request. properties: data: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleResponseData' + $ref: '#/components/schemas/MicrosoftTeamsUpdateTenantBasedHandleRequestData' required: - data type: object - MicrosoftTeamsGetChannelByNameResponse: - description: Response with channel, team, and tenant ID information. - properties: - data: - $ref: '#/components/schemas/MicrosoftTeamsChannelInfoResponseData' - type: object - MicrosoftTeamsUpdateApiHandleRequest: - description: Update handle request. - properties: - data: - $ref: '#/components/schemas/MicrosoftTeamsUpdateApiHandleRequestData' - required: - - data - type: object - MicrosoftTeamsUpdateApiHandleRequestData: - description: Handle data from a response. + MicrosoftTeamsUpdateTenantBasedHandleRequestData: + description: Tenant-based handle data from a response. properties: attributes: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleAttributes' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleAttributes' type: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleType' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleType' required: - type - attributes @@ -30574,16 +30568,18 @@ paths: - Microsoft Teams Integration /api/v2/integration/ms-teams/configuration/tenant-based-handles: get: - description: Get a list of all handles from the Datadog Microsoft Teams integration. - operationId: ListApiHandles + description: Get a list of all tenant-based handles from the Datadog Microsoft + Teams integration. + operationId: ListTenantBasedHandles parameters: - $ref: '#/components/parameters/MicrosoftTeamsTenantIDQueryParameter' + - $ref: '#/components/parameters/MicrosoftTeamsHandleNameQueryParameter' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/MicrosoftTeamsApiHandlesResponse' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandlesResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -30595,25 +30591,25 @@ paths: $ref: '#/components/responses/PreconditionFailedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get all handles + summary: Get all tenant-based handles tags: - Microsoft Teams Integration post: - description: Create a handle in the Datadog Microsoft Teams integration. - operationId: CreateApiHandle + description: Create a tenant-based handle in the Datadog Microsoft Teams integration. + operationId: CreateTenantBasedHandle requestBody: content: application/json: schema: - $ref: '#/components/schemas/MicrosoftTeamsCreateApiHandleRequest' - description: Handle payload. + $ref: '#/components/schemas/MicrosoftTeamsCreateTenantBasedHandleRequest' + description: Tenant-based handle payload. required: true responses: '201': content: application/json: schema: - $ref: '#/components/schemas/MicrosoftTeamsCreateApiHandleResponse' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleResponse' description: CREATED '400': $ref: '#/components/responses/BadRequestResponse' @@ -30627,43 +30623,16 @@ paths: $ref: '#/components/responses/PreconditionFailedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create handle + summary: Create tenant-based handle tags: - Microsoft Teams Integration x-codegen-request-body-name: body - /api/v2/integration/ms-teams/configuration/tenant-based-handles/name/{handle_name}: - get: - description: Get the tenant, team, and channel information of a handle by name - from the Datadog Microsoft Teams integration. - operationId: GetApiHandleByName - parameters: - - $ref: '#/components/parameters/MicrosoftTeamsHandleNamePathParameter' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponse' - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '412': - $ref: '#/components/responses/PreconditionFailedResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get handle information by name - tags: - - Microsoft Teams Integration /api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}: delete: - description: Delete a handle from the Datadog Microsoft Teams integration. - operationId: DeleteApiHandle + description: Delete a tenant-based handle from the Datadog Microsoft Teams integration. + operationId: DeleteTenantBasedHandle parameters: - - $ref: '#/components/parameters/MicrosoftTeamsHandleIDPathParameter' + - $ref: '#/components/parameters/MicrosoftTeamsTenantBasedHandleIDPathParameter' responses: '204': description: OK @@ -30675,21 +30644,21 @@ paths: $ref: '#/components/responses/PreconditionFailedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete handle + summary: Delete tenant-based handle tags: - Microsoft Teams Integration get: - description: Get the tenant, team, and channel information of a handle from - the Datadog Microsoft Teams integration. - operationId: GetApiHandle + description: Get the tenant, team, and channel information of a tenant-based + handle from the Datadog Microsoft Teams integration. + operationId: GetTenantBasedHandle parameters: - - $ref: '#/components/parameters/MicrosoftTeamsHandleIDPathParameter' + - $ref: '#/components/parameters/MicrosoftTeamsTenantBasedHandleIDPathParameter' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponse' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -30701,27 +30670,27 @@ paths: $ref: '#/components/responses/PreconditionFailedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get handle information + summary: Get tenant-based handle information tags: - Microsoft Teams Integration patch: - description: Update a handle from the Datadog Microsoft Teams integration. - operationId: UpdateApiHandle + description: Update a tenant-based handle from the Datadog Microsoft Teams integration. + operationId: UpdateTenantBasedHandle parameters: - - $ref: '#/components/parameters/MicrosoftTeamsHandleIDPathParameter' + - $ref: '#/components/parameters/MicrosoftTeamsTenantBasedHandleIDPathParameter' requestBody: content: application/json: schema: - $ref: '#/components/schemas/MicrosoftTeamsUpdateApiHandleRequest' - description: Opsgenie service payload. + $ref: '#/components/schemas/MicrosoftTeamsUpdateTenantBasedHandleRequest' + description: Tenant-based handle payload. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponse' + $ref: '#/components/schemas/MicrosoftTeamsTenantBasedHandleResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -30735,7 +30704,7 @@ paths: $ref: '#/components/responses/PreconditionFailedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update handle + summary: Update tenant-based handle tags: - Microsoft Teams Integration x-codegen-request-body-name: body diff --git a/cassettes/features/v2/microsoft_teams_integration/Create-api-handle-returns-CREATED-response.frozen b/cassettes/features/v2/microsoft_teams_integration/Create-api-handle-returns-CREATED-response.frozen deleted file mode 100644 index 032d18d1ad2..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Create-api-handle-returns-CREATED-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-10-01T14:49:03.835Z \ No newline at end of file diff --git a/cassettes/features/v2/microsoft_teams_integration/Create-api-handle-returns-CREATED-response.yml b/cassettes/features/v2/microsoft_teams_integration/Create-api-handle-returns-CREATED-response.yml deleted file mode 100644 index 8fae80101d9..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Create-api-handle-returns-CREATED-response.yml +++ /dev/null @@ -1,40 +0,0 @@ -http_interactions: -- recorded_at: Tue, 01 Oct 2024 14:49:03 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Create_api_handle_returns_CREATED_response-1727794143","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"},"type":"handle"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"4d853924-8004-11ef-a396-da7ad0900002","type":"handle","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Create_api_handle_returns_CREATED_response-1727794143","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Tue, 01 Oct 2024 14:49:03 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4d853924-8004-11ef-a396-da7ad0900002 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/microsoft_teams_integration/Delete-api-handle-returns-OK-response.frozen b/cassettes/features/v2/microsoft_teams_integration/Delete-api-handle-returns-OK-response.frozen deleted file mode 100644 index c424a36934c..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Delete-api-handle-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-10-01T14:49:04.126Z \ No newline at end of file diff --git a/cassettes/features/v2/microsoft_teams_integration/Delete-api-handle-returns-OK-response.yml b/cassettes/features/v2/microsoft_teams_integration/Delete-api-handle-returns-OK-response.yml deleted file mode 100644 index f000813ce40..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Delete-api-handle-returns-OK-response.yml +++ /dev/null @@ -1,56 +0,0 @@ -http_interactions: -- recorded_at: Tue, 01 Oct 2024 14:49:04 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Delete_api_handle_returns_OK_response-1727794144","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"},"type":"handle"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"4da666b2-8004-11ef-a397-da7ad0900002","type":"handle","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Delete_api_handle_returns_OK_response-1727794144","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Tue, 01 Oct 2024 14:49:04 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4da666b2-8004-11ef-a397-da7ad0900002 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -- recorded_at: Tue, 01 Oct 2024 14:49:04 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4da666b2-8004-11ef-a397-da7ad0900002 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/microsoft_teams_integration/Get-all-api-handles-returns-OK-response.frozen b/cassettes/features/v2/microsoft_teams_integration/Get-all-api-handles-returns-OK-response.frozen deleted file mode 100644 index e2451a0ca56..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Get-all-api-handles-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-10-01T14:49:04.412Z \ No newline at end of file diff --git a/cassettes/features/v2/microsoft_teams_integration/Get-all-api-handles-returns-OK-response.yml b/cassettes/features/v2/microsoft_teams_integration/Get-all-api-handles-returns-OK-response.yml deleted file mode 100644 index 5f5f1ece6f1..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Get-all-api-handles-returns-OK-response.yml +++ /dev/null @@ -1,65 +0,0 @@ -http_interactions: -- recorded_at: Tue, 01 Oct 2024 14:49:04 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Get_all_api_handles_returns_OK_response-1727794144","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"},"type":"handle"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"4dd2b640-8004-11ef-a398-da7ad0900002","type":"handle","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Get_all_api_handles_returns_OK_response-1727794144","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Tue, 01 Oct 2024 14:49:04 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles - response: - body: - encoding: UTF-8 - string: '{"data":[{"id":"5f002dba-7cd2-11ef-8717-da7ad0900002","type":"ms-teams-handle-info","attributes":{"channel_id":"19:m2LnqTUOkhuzGCyeG_0xql4rbKc2ZSJ25JS6UZINc-01@thread.tacv2","channel_name":"General","name":"test","team_id":"008b01f1-4b68-4e81-b8a9-cfa27ba6c112","team_name":"incident-6252-is_this_a_new_title","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97","tenant_name":"Datadog, - Inc."}},{"id":"9fc79cf6-7ffd-11ef-b391-da7ad0900002","type":"ms-teams-handle-info","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","channel_name":"General-1","name":"TwA43H2NIrilngRZ6dOvNBVNFx4fZvPgdYaroSwcvoObDbJ8RRJtSyKCjkiV2AaVziZSfxNKrL7oV4XHAC0gDv4cuZwGzkv3hJyPGqCuUEHP89CyJMOrtkCRgCM5XeNqoK28J2todRY8ibd3S3xwIwmCK83F2bnBjVB6WEDbmO92F7B9XcIglNwPpy7KMeNRjzxy8Y3c0Ji6jYQIIMRDnawdBGWqCQmGtJ7mFPCHpYlZHKBT7uyV1gIAuGtwIr","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","team_name":"Chat - Integrations","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97","tenant_name":"Datadog, - Inc."}},{"id":"73ffbd06-8002-11ef-af80-da7ad0900002","type":"ms-teams-handle-info","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","channel_name":"General-1","name":"TwA43H2NIrilngRZ6dOvNBVNFx4fZvPgdYaroSwcvoObDbJ8RRJtSyKCjkiV2AaVziZSfxNKrL7oV4XHAC0gDv4cuZwGzkv3hJyPGqCuUEHP89CyJMOrtkCRgCM5XeNqoK28J2todRY8ibd3S3xwIwmCK83F2bnBjVB6WEDbmO92F7B9XcIglNwPpy7KMeNRjzxy8Y3c0Ji6jYQIIMRDnawdBGWqCQmGtJ7mFPCHpYlZHKBT7uyV1gIAuGtwI","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","team_name":"Chat - Integrations","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97","tenant_name":"Datadog, - Inc."}},{"id":"4dd2b640-8004-11ef-a398-da7ad0900002","type":"ms-teams-handle-info","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","channel_name":"General-1","name":"Test-Get_all_api_handles_returns_OK_response-1727794144","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","team_name":"Chat - Integrations","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97","tenant_name":"Datadog, - Inc."}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Tue, 01 Oct 2024 14:49:04 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4dd2b640-8004-11ef-a398-da7ad0900002 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-by-name-returns-OK-response.frozen b/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-by-name-returns-OK-response.frozen deleted file mode 100644 index f659c7f4956..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-by-name-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-10-01T14:49:04.773Z \ No newline at end of file diff --git a/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-by-name-returns-OK-response.yml b/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-by-name-returns-OK-response.yml deleted file mode 100644 index aad5948224a..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-by-name-returns-OK-response.yml +++ /dev/null @@ -1,60 +0,0 @@ -http_interactions: -- recorded_at: Tue, 01 Oct 2024 14:49:04 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Get_api_handle_information_by_name_returns_OK_response-1727794144","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"},"type":"handle"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"4e084346-8004-11ef-b4b6-da7ad0900002","type":"handle","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Get_api_handle_information_by_name_returns_OK_response-1727794144","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Tue, 01 Oct 2024 14:49:04 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/name/Test-Get_api_handle_information_by_name_returns_OK_response-1727794144 - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"4e084346-8004-11ef-b4b6-da7ad0900002","type":"ms-teams-handle-info","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","channel_name":"General-1","name":"Test-Get_api_handle_information_by_name_returns_OK_response-1727794144","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","team_name":"Chat - Integrations","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97","tenant_name":"Datadog, - Inc."}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Tue, 01 Oct 2024 14:49:04 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4e084346-8004-11ef-b4b6-da7ad0900002 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-returns-OK-response.frozen b/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-returns-OK-response.frozen deleted file mode 100644 index 712c03f8798..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-10-01T14:49:05.113Z \ No newline at end of file diff --git a/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-returns-OK-response.yml b/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-returns-OK-response.yml deleted file mode 100644 index 8e4de717111..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Get-api-handle-information-returns-OK-response.yml +++ /dev/null @@ -1,60 +0,0 @@ -http_interactions: -- recorded_at: Tue, 01 Oct 2024 14:49:05 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Get_api_handle_information_returns_OK_response-1727794145","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"},"type":"handle"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"4e3c0816-8004-11ef-b813-da7ad0900002","type":"handle","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Get_api_handle_information_returns_OK_response-1727794145","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Tue, 01 Oct 2024 14:49:05 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4e3c0816-8004-11ef-b813-da7ad0900002 - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"4e3c0816-8004-11ef-b813-da7ad0900002","type":"ms-teams-handle-info","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","channel_name":"General-1","name":"Test-Get_api_handle_information_returns_OK_response-1727794145","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","team_name":"Chat - Integrations","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97","tenant_name":"Datadog, - Inc."}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Tue, 01 Oct 2024 14:49:05 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4e3c0816-8004-11ef-b813-da7ad0900002 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/microsoft_teams_integration/Update-api-handle-returns-OK-response.frozen b/cassettes/features/v2/microsoft_teams_integration/Update-api-handle-returns-OK-response.frozen deleted file mode 100644 index af5a435fda0..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Update-api-handle-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-10-01T14:49:05.470Z \ No newline at end of file diff --git a/cassettes/features/v2/microsoft_teams_integration/Update-api-handle-returns-OK-response.yml b/cassettes/features/v2/microsoft_teams_integration/Update-api-handle-returns-OK-response.yml deleted file mode 100644 index 4e3a63efb8d..00000000000 --- a/cassettes/features/v2/microsoft_teams_integration/Update-api-handle-returns-OK-response.yml +++ /dev/null @@ -1,64 +0,0 @@ -http_interactions: -- recorded_at: Tue, 01 Oct 2024 14:49:05 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Update_api_handle_returns_OK_response-1727794145","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"},"type":"handle"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"4e741fa8-8004-11ef-8fa4-da7ad0900002","type":"handle","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","name":"Test-Update_api_handle_returns_OK_response-1727794145","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97"}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Tue, 01 Oct 2024 14:49:05 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Update_api_handle_returns_OK_response-1727794145--updated"},"type":"handle"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: PATCH - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4e741fa8-8004-11ef-8fa4-da7ad0900002 - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"4e741fa8-8004-11ef-8fa4-da7ad0900002","type":"ms-teams-handle-info","attributes":{"channel_id":"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2","channel_name":"General-1","name":"Test-Update_api_handle_returns_OK_response-1727794145--updated","team_id":"e5f50a58-c929-4fb3-8866-e2cd836de3c2","team_name":"Chat - Integrations","tenant_id":"4d3bac44-0230-4732-9e70-cc00736f0a97","tenant_name":"Datadog, - Inc."}}}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Tue, 01 Oct 2024 14:49:05 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4e741fa8-8004-11ef-8fa4-da7ad0900002 - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/examples/v2/microsoft-teams-integration/CreateApiHandle.rb b/examples/v2/microsoft-teams-integration/CreateApiHandle.rb deleted file mode 100644 index 9251fa9e93d..00000000000 --- a/examples/v2/microsoft-teams-integration/CreateApiHandle.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Create handle returns "CREATED" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new - -body = DatadogAPIClient::V2::MicrosoftTeamsCreateApiHandleRequest.new({ - data: DatadogAPIClient::V2::MicrosoftTeamsApiHandleRequestData.new({ - attributes: DatadogAPIClient::V2::MicrosoftTeamsApiHandleRequestAttributes.new({ - channel_id: "fake-channel-id", - name: "fake-handle-name", - team_id: "00000000-0000-0000-0000-000000000000", - tenant_id: "00000000-0000-0000-0000-000000000001", - }), - type: DatadogAPIClient::V2::MicrosoftTeamsApiHandleType::HANDLE, - }), -}) -p api_instance.create_api_handle(body) diff --git a/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle.rb b/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle.rb new file mode 100644 index 00000000000..9b173de9746 --- /dev/null +++ b/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle.rb @@ -0,0 +1,17 @@ +# Create tenant-based handle returns "CREATED" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new + +body = DatadogAPIClient::V2::MicrosoftTeamsCreateTenantBasedHandleRequest.new({ + data: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestData.new({ + attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestAttributes.new({ + channel_id: "fake-channel-id", + name: "fake-handle-name", + team_id: "00000000-0000-0000-0000-000000000000", + tenant_id: "00000000-0000-0000-0000-000000000001", + }), + type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE, + }), +}) +p api_instance.create_tenant_based_handle(body) diff --git a/examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.rb b/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle_1540689753.rb similarity index 51% rename from examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.rb rename to examples/v2/microsoft-teams-integration/CreateTenantBasedHandle_1540689753.rb index 60fac955598..515e98d1bc4 100644 --- a/examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.rb +++ b/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle_1540689753.rb @@ -3,15 +3,15 @@ require "datadog_api_client" api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new -body = DatadogAPIClient::V2::MicrosoftTeamsCreateApiHandleRequest.new({ - data: DatadogAPIClient::V2::MicrosoftTeamsApiHandleRequestData.new({ - attributes: DatadogAPIClient::V2::MicrosoftTeamsApiHandleRequestAttributes.new({ +body = DatadogAPIClient::V2::MicrosoftTeamsCreateTenantBasedHandleRequest.new({ + data: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestData.new({ + attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestAttributes.new({ channel_id: "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2", name: "Example-Microsoft-Teams-Integration", team_id: "e5f50a58-c929-4fb3-8866-e2cd836de3c2", tenant_id: "4d3bac44-0230-4732-9e70-cc00736f0a97", }), - type: DatadogAPIClient::V2::MicrosoftTeamsApiHandleType::HANDLE, + type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE, }), }) -p api_instance.create_api_handle(body) +p api_instance.create_tenant_based_handle(body) diff --git a/examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.rb b/examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.rb deleted file mode 100644 index 753ce60094f..00000000000 --- a/examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete api handle returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new - -# there is a valid "api_handle" in the system -API_HANDLE_DATA_ID = ENV["API_HANDLE_DATA_ID"] -api_instance.delete_api_handle(API_HANDLE_DATA_ID) diff --git a/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle.rb b/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle.rb new file mode 100644 index 00000000000..d4af1f6c1be --- /dev/null +++ b/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle.rb @@ -0,0 +1,5 @@ +# Delete tenant-based handle returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new +api_instance.delete_tenant_based_handle("handle_id") diff --git a/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle_377884154.rb b/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle_377884154.rb new file mode 100644 index 00000000000..48400c0a279 --- /dev/null +++ b/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle_377884154.rb @@ -0,0 +1,8 @@ +# Delete api handle returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new + +# there is a valid "tenant_based_handle" in the system +TENANT_BASED_HANDLE_DATA_ID = ENV["TENANT_BASED_HANDLE_DATA_ID"] +api_instance.delete_tenant_based_handle(TENANT_BASED_HANDLE_DATA_ID) diff --git a/examples/v2/microsoft-teams-integration/GetApiHandle.rb b/examples/v2/microsoft-teams-integration/GetApiHandle.rb deleted file mode 100644 index 4000d92147e..00000000000 --- a/examples/v2/microsoft-teams-integration/GetApiHandle.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Get handle information returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new -p api_instance.get_api_handle("handle_id") diff --git a/examples/v2/microsoft-teams-integration/GetApiHandleByName.rb b/examples/v2/microsoft-teams-integration/GetApiHandleByName.rb deleted file mode 100644 index 994ef901e3d..00000000000 --- a/examples/v2/microsoft-teams-integration/GetApiHandleByName.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Get handle information by name returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new -p api_instance.get_api_handle_by_name("handle_name") diff --git a/examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.rb b/examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.rb deleted file mode 100644 index c1dbd393462..00000000000 --- a/examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get api handle information by name returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new - -# there is a valid "api_handle" in the system -API_HANDLE_DATA_ATTRIBUTES_NAME = ENV["API_HANDLE_DATA_ATTRIBUTES_NAME"] -p api_instance.get_api_handle_by_name(API_HANDLE_DATA_ATTRIBUTES_NAME) diff --git a/examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.rb b/examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.rb deleted file mode 100644 index cb3d776a554..00000000000 --- a/examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get api handle information returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new - -# there is a valid "api_handle" in the system -API_HANDLE_DATA_ID = ENV["API_HANDLE_DATA_ID"] -p api_instance.get_api_handle(API_HANDLE_DATA_ID) diff --git a/examples/v2/microsoft-teams-integration/GetTenantBasedHandle.rb b/examples/v2/microsoft-teams-integration/GetTenantBasedHandle.rb new file mode 100644 index 00000000000..417bbc41323 --- /dev/null +++ b/examples/v2/microsoft-teams-integration/GetTenantBasedHandle.rb @@ -0,0 +1,5 @@ +# Get tenant-based handle information returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new +p api_instance.get_tenant_based_handle("handle_id") diff --git a/examples/v2/microsoft-teams-integration/GetTenantBasedHandle_2883785101.rb b/examples/v2/microsoft-teams-integration/GetTenantBasedHandle_2883785101.rb new file mode 100644 index 00000000000..b01f5ad0703 --- /dev/null +++ b/examples/v2/microsoft-teams-integration/GetTenantBasedHandle_2883785101.rb @@ -0,0 +1,8 @@ +# Get api handle information returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new + +# there is a valid "tenant_based_handle" in the system +TENANT_BASED_HANDLE_DATA_ID = ENV["TENANT_BASED_HANDLE_DATA_ID"] +p api_instance.get_tenant_based_handle(TENANT_BASED_HANDLE_DATA_ID) diff --git a/examples/v2/microsoft-teams-integration/ListApiHandles.rb b/examples/v2/microsoft-teams-integration/ListApiHandles.rb deleted file mode 100644 index bbe7cf9c3f6..00000000000 --- a/examples/v2/microsoft-teams-integration/ListApiHandles.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Get all handles returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new -p api_instance.list_api_handles() diff --git a/examples/v2/microsoft-teams-integration/DeleteApiHandle.rb b/examples/v2/microsoft-teams-integration/ListTenantBasedHandles.rb similarity index 51% rename from examples/v2/microsoft-teams-integration/DeleteApiHandle.rb rename to examples/v2/microsoft-teams-integration/ListTenantBasedHandles.rb index defd5e06a17..ff7e9566430 100644 --- a/examples/v2/microsoft-teams-integration/DeleteApiHandle.rb +++ b/examples/v2/microsoft-teams-integration/ListTenantBasedHandles.rb @@ -1,5 +1,5 @@ -# Delete handle returns "OK" response +# Get all tenant-based handles returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new -api_instance.delete_api_handle("handle_id") +p api_instance.list_tenant_based_handles() diff --git a/examples/v2/microsoft-teams-integration/ListApiHandles_769592979.rb b/examples/v2/microsoft-teams-integration/ListTenantBasedHandles_769592979.rb similarity index 77% rename from examples/v2/microsoft-teams-integration/ListApiHandles_769592979.rb rename to examples/v2/microsoft-teams-integration/ListTenantBasedHandles_769592979.rb index 324a28d5b21..96fecd2c71c 100644 --- a/examples/v2/microsoft-teams-integration/ListApiHandles_769592979.rb +++ b/examples/v2/microsoft-teams-integration/ListTenantBasedHandles_769592979.rb @@ -2,4 +2,4 @@ require "datadog_api_client" api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new -p api_instance.list_api_handles() +p api_instance.list_tenant_based_handles() diff --git a/examples/v2/microsoft-teams-integration/UpdateApiHandle.rb b/examples/v2/microsoft-teams-integration/UpdateApiHandle.rb deleted file mode 100644 index abd3ff4d09b..00000000000 --- a/examples/v2/microsoft-teams-integration/UpdateApiHandle.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Update handle returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new - -body = DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequest.new({ - data: DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequestData.new({ - attributes: DatadogAPIClient::V2::MicrosoftTeamsApiHandleAttributes.new({ - channel_id: "fake-channel-id", - name: "fake-handle-name", - team_id: "00000000-0000-0000-0000-000000000000", - tenant_id: "00000000-0000-0000-0000-000000000001", - }), - type: DatadogAPIClient::V2::MicrosoftTeamsApiHandleType::HANDLE, - }), -}) -p api_instance.update_api_handle("handle_id", body) diff --git a/examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.rb b/examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.rb deleted file mode 100644 index da99dd07546..00000000000 --- a/examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.rb +++ /dev/null @@ -1,18 +0,0 @@ -# Update api handle returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new - -# there is a valid "api_handle" in the system -API_HANDLE_DATA_ATTRIBUTES_NAME = ENV["API_HANDLE_DATA_ATTRIBUTES_NAME"] -API_HANDLE_DATA_ID = ENV["API_HANDLE_DATA_ID"] - -body = DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequest.new({ - data: DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequestData.new({ - attributes: DatadogAPIClient::V2::MicrosoftTeamsApiHandleAttributes.new({ - name: "fake-handle-name--updated", - }), - type: DatadogAPIClient::V2::MicrosoftTeamsApiHandleType::HANDLE, - }), -}) -p api_instance.update_api_handle(API_HANDLE_DATA_ID, body) diff --git a/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle.rb b/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle.rb new file mode 100644 index 00000000000..0373012667b --- /dev/null +++ b/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle.rb @@ -0,0 +1,17 @@ +# Update tenant-based handle returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new + +body = DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequest.new({ + data: DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequestData.new({ + attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleAttributes.new({ + channel_id: "fake-channel-id", + name: "fake-handle-name", + team_id: "00000000-0000-0000-0000-000000000000", + tenant_id: "00000000-0000-0000-0000-000000000001", + }), + type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE, + }), +}) +p api_instance.update_tenant_based_handle("handle_id", body) diff --git a/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle_419892746.rb b/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle_419892746.rb new file mode 100644 index 00000000000..3f4e8c0b488 --- /dev/null +++ b/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle_419892746.rb @@ -0,0 +1,18 @@ +# Update api handle returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new + +# there is a valid "tenant_based_handle" in the system +TENANT_BASED_HANDLE_DATA_ATTRIBUTES_NAME = ENV["TENANT_BASED_HANDLE_DATA_ATTRIBUTES_NAME"] +TENANT_BASED_HANDLE_DATA_ID = ENV["TENANT_BASED_HANDLE_DATA_ID"] + +body = DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequest.new({ + data: DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequestData.new({ + attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleAttributes.new({ + name: "fake-handle-name--updated", + }), + type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE, + }), +}) +p api_instance.update_tenant_based_handle(TENANT_BASED_HANDLE_DATA_ID, body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 4273ed6562f..22680bf2ee4 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1322,24 +1322,22 @@ "team_name" => "String", "channel_name" => "String", }, - "v2.ListApiHandles" => { + "v2.ListTenantBasedHandles" => { "tenant_id" => "String", + "name" => "String", }, - "v2.CreateApiHandle" => { - "body" => "MicrosoftTeamsCreateApiHandleRequest", - }, - "v2.GetApiHandleByName" => { - "handle_name" => "String", + "v2.CreateTenantBasedHandle" => { + "body" => "MicrosoftTeamsCreateTenantBasedHandleRequest", }, - "v2.DeleteApiHandle" => { + "v2.DeleteTenantBasedHandle" => { "handle_id" => "String", }, - "v2.GetApiHandle" => { + "v2.GetTenantBasedHandle" => { "handle_id" => "String", }, - "v2.UpdateApiHandle" => { + "v2.UpdateTenantBasedHandle" => { "handle_id" => "String", - "body" => "MicrosoftTeamsUpdateApiHandleRequest", + "body" => "MicrosoftTeamsUpdateTenantBasedHandleRequest", }, "v2.CreateOpsgenieService" => { "body" => "OpsgenieServiceCreateRequest", diff --git a/features/v2/given.json b/features/v2/given.json index d3652a2a757..efc7bed91b5 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -216,13 +216,13 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"tenant_id\": \"4d3bac44-0230-4732-9e70-cc00736f0a97\",\n \"team_id\": \"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\n \"channel_id\": \"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\"\n },\n \"type\": \"handle\"\n }\n}" + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"tenant_id\": \"4d3bac44-0230-4732-9e70-cc00736f0a97\",\n \"team_id\": \"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\n \"channel_id\": \"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\"\n },\n \"type\": \"tenant-based-handle\"\n }\n}" } ], - "step": "there is a valid \"api_handle\" in the system", - "key": "api_handle", + "step": "there is a valid \"tenant_based_handle\" in the system", + "key": "tenant_based_handle", "tag": "Microsoft Teams Integration", - "operationId": "CreateApiHandle" + "operationId": "CreateTenantBasedHandle" }, { "parameters": [ diff --git a/features/v2/microsoft_teams_integration.feature b/features/v2/microsoft_teams_integration.feature index f1a34862f85..59f31993a73 100644 --- a/features/v2/microsoft_teams_integration.feature +++ b/features/v2/microsoft_teams_integration.feature @@ -10,132 +10,121 @@ Feature: Microsoft Teams Integration And a valid "appKeyAuth" key in the system And an instance of "MicrosoftTeamsIntegration" API - @team:DataDog/chat-integrations + @integration-only @team:DataDog/chat-integrations Scenario: Create api handle returns "CREATED" response - Given new "CreateApiHandle" request - And body with value {"data": {"attributes": {"channel_id": "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2", "name": "{{unique}}", "team_id": "e5f50a58-c929-4fb3-8866-e2cd836de3c2", "tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97"}, "type": "handle"}} + Given new "CreateTenantBasedHandle" request + And body with value {"data": {"attributes": {"channel_id": "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2", "name": "{{unique}}", "team_id": "e5f50a58-c929-4fb3-8866-e2cd836de3c2", "tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 201 CREATED And the response "data.attributes.name" is equal to "{{unique}}" @generated @skip @team:DataDog/chat-integrations - Scenario: Create handle returns "Bad Request" response - Given new "CreateApiHandle" request - And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + Scenario: Create tenant-based handle returns "Bad Request" response + Given new "CreateTenantBasedHandle" request + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/chat-integrations - Scenario: Create handle returns "CREATED" response - Given new "CreateApiHandle" request - And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + Scenario: Create tenant-based handle returns "CREATED" response + Given new "CreateTenantBasedHandle" request + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 201 CREATED @generated @skip @team:DataDog/chat-integrations - Scenario: Create handle returns "Conflict" response - Given new "CreateApiHandle" request - And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + Scenario: Create tenant-based handle returns "Conflict" response + Given new "CreateTenantBasedHandle" request + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 409 Conflict @generated @skip @team:DataDog/chat-integrations - Scenario: Create handle returns "Failed Precondition" response - Given new "CreateApiHandle" request - And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + Scenario: Create tenant-based handle returns "Failed Precondition" response + Given new "CreateTenantBasedHandle" request + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 412 Failed Precondition @generated @skip @team:DataDog/chat-integrations - Scenario: Create handle returns "Not Found" response - Given new "CreateApiHandle" request - And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + Scenario: Create tenant-based handle returns "Not Found" response + Given new "CreateTenantBasedHandle" request + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 404 Not Found - @team:DataDog/chat-integrations + @integration-only @team:DataDog/chat-integrations Scenario: Delete api handle returns "OK" response - Given there is a valid "api_handle" in the system - And new "DeleteApiHandle" request - And request contains "handle_id" parameter from "api_handle.data.id" + Given there is a valid "tenant_based_handle" in the system + And new "DeleteTenantBasedHandle" request + And request contains "handle_id" parameter from "tenant_based_handle.data.id" When the request is sent Then the response status is 204 OK @generated @skip @team:DataDog/chat-integrations - Scenario: Delete handle returns "Bad Request" response - Given new "DeleteApiHandle" request + Scenario: Delete tenant-based handle returns "Bad Request" response + Given new "DeleteTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/chat-integrations - Scenario: Delete handle returns "Failed Precondition" response - Given new "DeleteApiHandle" request + Scenario: Delete tenant-based handle returns "Failed Precondition" response + Given new "DeleteTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 412 Failed Precondition @generated @skip @team:DataDog/chat-integrations - Scenario: Delete handle returns "OK" response - Given new "DeleteApiHandle" request + Scenario: Delete tenant-based handle returns "OK" response + Given new "DeleteTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 OK - @team:DataDog/chat-integrations + @integration-only @team:DataDog/chat-integrations Scenario: Get all api handles returns "OK" response - Given there is a valid "api_handle" in the system - And new "ListApiHandles" request + Given there is a valid "tenant_based_handle" in the system + And new "ListTenantBasedHandles" request When the request is sent Then the response status is 200 OK - And the response "data[0].type" is equal to "ms-teams-handle-info" + And the response "data[0].type" is equal to "ms-teams-tenant-based-handle-info" @generated @skip @team:DataDog/chat-integrations - Scenario: Get all handles returns "Bad Request" response - Given new "ListApiHandles" request + Scenario: Get all tenant-based handles returns "Bad Request" response + Given new "ListTenantBasedHandles" request When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/chat-integrations - Scenario: Get all handles returns "Failed Precondition" response - Given new "ListApiHandles" request + Scenario: Get all tenant-based handles returns "Failed Precondition" response + Given new "ListTenantBasedHandles" request When the request is sent Then the response status is 412 Failed Precondition @generated @skip @team:DataDog/chat-integrations - Scenario: Get all handles returns "Not Found" response - Given new "ListApiHandles" request + Scenario: Get all tenant-based handles returns "Not Found" response + Given new "ListTenantBasedHandles" request When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/chat-integrations - Scenario: Get all handles returns "OK" response - Given new "ListApiHandles" request + Scenario: Get all tenant-based handles returns "OK" response + Given new "ListTenantBasedHandles" request When the request is sent Then the response status is 200 OK - @team:DataDog/chat-integrations - Scenario: Get api handle information by name returns "OK" response - Given there is a valid "api_handle" in the system - And new "GetApiHandleByName" request - And request contains "handle_name" parameter from "api_handle.data.attributes.name" - When the request is sent - Then the response status is 200 OK - And the response "data.attributes.channel_id" has the same value as "api_handle.data.attributes.channel_id" - And the response "data.attributes.team_id" has the same value as "api_handle.data.attributes.team_id" - And the response "data.attributes.tenant_id" has the same value as "api_handle.data.attributes.tenant_id" - - @team:DataDog/chat-integrations + @integration-only @team:DataDog/chat-integrations Scenario: Get api handle information returns "OK" response - Given there is a valid "api_handle" in the system - And new "GetApiHandle" request - And request contains "handle_id" parameter from "api_handle.data.id" + Given there is a valid "tenant_based_handle" in the system + And new "GetTenantBasedHandle" request + And request contains "handle_id" parameter from "tenant_based_handle.data.id" When the request is sent Then the response status is 200 OK - And the response "data.attributes.name" has the same value as "api_handle.data.attributes.name" - And the response "data.attributes.channel_id" has the same value as "api_handle.data.attributes.channel_id" - And the response "data.attributes.team_id" has the same value as "api_handle.data.attributes.team_id" - And the response "data.attributes.tenant_id" has the same value as "api_handle.data.attributes.tenant_id" + And the response "data.attributes.name" has the same value as "tenant_based_handle.data.attributes.name" + And the response "data.attributes.channel_id" has the same value as "tenant_based_handle.data.attributes.channel_id" + And the response "data.attributes.team_id" has the same value as "tenant_based_handle.data.attributes.team_id" + And the response "data.attributes.tenant_id" has the same value as "tenant_based_handle.data.attributes.tenant_id" @generated @skip @team:DataDog/chat-integrations Scenario: Get channel information by name returns "Bad Request" response @@ -165,107 +154,79 @@ Feature: Microsoft Teams Integration Then the response status is 200 OK @generated @skip @team:DataDog/chat-integrations - Scenario: Get handle information by name returns "Bad Request" response - Given new "GetApiHandleByName" request - And request contains "handle_name" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/chat-integrations - Scenario: Get handle information by name returns "Failed Precondition" response - Given new "GetApiHandleByName" request - And request contains "handle_name" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 412 Failed Precondition - - @generated @skip @team:DataDog/chat-integrations - Scenario: Get handle information by name returns "Not Found" response - Given new "GetApiHandleByName" request - And request contains "handle_name" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/chat-integrations - Scenario: Get handle information by name returns "OK" response - Given new "GetApiHandleByName" request - And request contains "handle_name" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/chat-integrations - Scenario: Get handle information returns "Bad Request" response - Given new "GetApiHandle" request + Scenario: Get tenant-based handle information returns "Bad Request" response + Given new "GetTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/chat-integrations - Scenario: Get handle information returns "Failed Precondition" response - Given new "GetApiHandle" request + Scenario: Get tenant-based handle information returns "Failed Precondition" response + Given new "GetTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 412 Failed Precondition @generated @skip @team:DataDog/chat-integrations - Scenario: Get handle information returns "Not Found" response - Given new "GetApiHandle" request + Scenario: Get tenant-based handle information returns "Not Found" response + Given new "GetTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/chat-integrations - Scenario: Get handle information returns "OK" response - Given new "GetApiHandle" request + Scenario: Get tenant-based handle information returns "OK" response + Given new "GetTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @team:DataDog/chat-integrations + @integration-only @team:DataDog/chat-integrations Scenario: Update api handle returns "OK" response - Given there is a valid "api_handle" in the system - And new "UpdateApiHandle" request - And request contains "handle_id" parameter from "api_handle.data.id" - And body with value {"data": {"attributes": {"name": "{{api_handle.data.attributes.name}}--updated"}, "type": "handle"}} + Given there is a valid "tenant_based_handle" in the system + And new "UpdateTenantBasedHandle" request + And request contains "handle_id" parameter from "tenant_based_handle.data.id" + And body with value {"data": {"attributes": {"name": "{{tenant_based_handle.data.attributes.name}}--updated"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 200 OK - And the response "data.attributes.name" is equal to "{{api_handle.data.attributes.name}}--updated" + And the response "data.attributes.name" is equal to "{{tenant_based_handle.data.attributes.name}}--updated" @generated @skip @team:DataDog/chat-integrations - Scenario: Update handle returns "Bad Request" response - Given new "UpdateApiHandle" request + Scenario: Update tenant-based handle returns "Bad Request" response + Given new "UpdateTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/chat-integrations - Scenario: Update handle returns "Conflict" response - Given new "UpdateApiHandle" request + Scenario: Update tenant-based handle returns "Conflict" response + Given new "UpdateTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 409 Conflict @generated @skip @team:DataDog/chat-integrations - Scenario: Update handle returns "Failed Precondition" response - Given new "UpdateApiHandle" request + Scenario: Update tenant-based handle returns "Failed Precondition" response + Given new "UpdateTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 412 Failed Precondition @generated @skip @team:DataDog/chat-integrations - Scenario: Update handle returns "Not Found" response - Given new "UpdateApiHandle" request + Scenario: Update tenant-based handle returns "Not Found" response + Given new "UpdateTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/chat-integrations - Scenario: Update handle returns "OK" response - Given new "UpdateApiHandle" request + Scenario: Update tenant-based handle returns "OK" response + Given new "UpdateTenantBasedHandle" request And request contains "handle_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "tenant-based-handle"}} When the request is sent Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 66c71e9fbb3..62da7c99ef9 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -794,16 +794,16 @@ "type": "safe" } }, - "ListApiHandles": { + "ListTenantBasedHandles": { "tag": "Microsoft Teams Integration", "undo": { "type": "safe" } }, - "CreateApiHandle": { + "CreateTenantBasedHandle": { "tag": "Microsoft Teams Integration", "undo": { - "operationId": "DeleteApiHandle", + "operationId": "DeleteTenantBasedHandle", "parameters": [ { "name": "handle_id", @@ -813,25 +813,19 @@ "type": "unsafe" } }, - "GetApiHandleByName": { - "tag": "Microsoft Teams Integration", - "undo": { - "type": "safe" - } - }, - "DeleteApiHandle": { + "DeleteTenantBasedHandle": { "tag": "Microsoft Teams Integration", "undo": { "type": "idempotent" } }, - "GetApiHandle": { + "GetTenantBasedHandle": { "tag": "Microsoft Teams Integration", "undo": { "type": "safe" } }, - "UpdateApiHandle": { + "UpdateTenantBasedHandle": { "tag": "Microsoft Teams Integration", "undo": { "type": "idempotent" diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 95593278eec..98d810f7dc4 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1799,24 +1799,23 @@ def overrides "v2.metric_type" => "MetricType", "v2.metric_volumes" => "MetricVolumes", "v2.metric_volumes_response" => "MetricVolumesResponse", - "v2.microsoft_teams_api_handle_attributes" => "MicrosoftTeamsApiHandleAttributes", - "v2.microsoft_teams_api_handle_info_response" => "MicrosoftTeamsApiHandleInfoResponse", - "v2.microsoft_teams_api_handle_info_response_attributes" => "MicrosoftTeamsApiHandleInfoResponseAttributes", - "v2.microsoft_teams_api_handle_info_response_data" => "MicrosoftTeamsApiHandleInfoResponseData", - "v2.microsoft_teams_api_handle_info_type" => "MicrosoftTeamsApiHandleInfoType", - "v2.microsoft_teams_api_handle_request_attributes" => "MicrosoftTeamsApiHandleRequestAttributes", - "v2.microsoft_teams_api_handle_request_data" => "MicrosoftTeamsApiHandleRequestData", - "v2.microsoft_teams_api_handle_response_data" => "MicrosoftTeamsApiHandleResponseData", - "v2.microsoft_teams_api_handles_response" => "MicrosoftTeamsApiHandlesResponse", - "v2.microsoft_teams_api_handle_type" => "MicrosoftTeamsApiHandleType", "v2.microsoft_teams_channel_info_response_attributes" => "MicrosoftTeamsChannelInfoResponseAttributes", "v2.microsoft_teams_channel_info_response_data" => "MicrosoftTeamsChannelInfoResponseData", "v2.microsoft_teams_channel_info_type" => "MicrosoftTeamsChannelInfoType", - "v2.microsoft_teams_create_api_handle_request" => "MicrosoftTeamsCreateApiHandleRequest", - "v2.microsoft_teams_create_api_handle_response" => "MicrosoftTeamsCreateApiHandleResponse", + "v2.microsoft_teams_create_tenant_based_handle_request" => "MicrosoftTeamsCreateTenantBasedHandleRequest", "v2.microsoft_teams_get_channel_by_name_response" => "MicrosoftTeamsGetChannelByNameResponse", - "v2.microsoft_teams_update_api_handle_request" => "MicrosoftTeamsUpdateApiHandleRequest", - "v2.microsoft_teams_update_api_handle_request_data" => "MicrosoftTeamsUpdateApiHandleRequestData", + "v2.microsoft_teams_tenant_based_handle_attributes" => "MicrosoftTeamsTenantBasedHandleAttributes", + "v2.microsoft_teams_tenant_based_handle_info_response_attributes" => "MicrosoftTeamsTenantBasedHandleInfoResponseAttributes", + "v2.microsoft_teams_tenant_based_handle_info_response_data" => "MicrosoftTeamsTenantBasedHandleInfoResponseData", + "v2.microsoft_teams_tenant_based_handle_info_type" => "MicrosoftTeamsTenantBasedHandleInfoType", + "v2.microsoft_teams_tenant_based_handle_request_attributes" => "MicrosoftTeamsTenantBasedHandleRequestAttributes", + "v2.microsoft_teams_tenant_based_handle_request_data" => "MicrosoftTeamsTenantBasedHandleRequestData", + "v2.microsoft_teams_tenant_based_handle_response" => "MicrosoftTeamsTenantBasedHandleResponse", + "v2.microsoft_teams_tenant_based_handle_response_data" => "MicrosoftTeamsTenantBasedHandleResponseData", + "v2.microsoft_teams_tenant_based_handles_response" => "MicrosoftTeamsTenantBasedHandlesResponse", + "v2.microsoft_teams_tenant_based_handle_type" => "MicrosoftTeamsTenantBasedHandleType", + "v2.microsoft_teams_update_tenant_based_handle_request" => "MicrosoftTeamsUpdateTenantBasedHandleRequest", + "v2.microsoft_teams_update_tenant_based_handle_request_data" => "MicrosoftTeamsUpdateTenantBasedHandleRequestData", "v2.monitor_config_policy_attribute_create_request" => "MonitorConfigPolicyAttributeCreateRequest", "v2.monitor_config_policy_attribute_edit_request" => "MonitorConfigPolicyAttributeEditRequest", "v2.monitor_config_policy_attribute_response" => "MonitorConfigPolicyAttributeResponse", diff --git a/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb b/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb index 71e00be5f0f..f09ff130b87 100644 --- a/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb +++ b/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb @@ -23,29 +23,29 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end - # Create handle. + # Create tenant-based handle. # - # @see #create_api_handle_with_http_info - def create_api_handle(body, opts = {}) - data, _status_code, _headers = create_api_handle_with_http_info(body, opts) + # @see #create_tenant_based_handle_with_http_info + def create_tenant_based_handle(body, opts = {}) + data, _status_code, _headers = create_tenant_based_handle_with_http_info(body, opts) data end - # Create handle. + # Create tenant-based handle. # - # Create a handle in the Datadog Microsoft Teams integration. + # Create a tenant-based handle in the Datadog Microsoft Teams integration. # - # @param body [MicrosoftTeamsCreateApiHandleRequest] Handle payload. + # @param body [MicrosoftTeamsCreateTenantBasedHandleRequest] Tenant-based handle payload. # @param opts [Hash] the optional parameters - # @return [Array<(MicrosoftTeamsCreateApiHandleResponse, Integer, Hash)>] MicrosoftTeamsCreateApiHandleResponse data, response status code and response headers - def create_api_handle_with_http_info(body, opts = {}) + # @return [Array<(MicrosoftTeamsTenantBasedHandleResponse, Integer, Hash)>] MicrosoftTeamsTenantBasedHandleResponse data, response status code and response headers + def create_tenant_based_handle_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.create_api_handle ...' + @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.create_tenant_based_handle ...' 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 MicrosoftTeamsIntegrationAPI.create_api_handle" + fail ArgumentError, "Missing the required parameter 'body' when calling MicrosoftTeamsIntegrationAPI.create_tenant_based_handle" end # resource path local_var_path = '/api/v2/integration/ms-teams/configuration/tenant-based-handles' @@ -67,13 +67,13 @@ def create_api_handle_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'MicrosoftTeamsCreateApiHandleResponse' + return_type = opts[:debug_return_type] || 'MicrosoftTeamsTenantBasedHandleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :create_api_handle, + :operation => :create_tenant_based_handle, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -85,34 +85,34 @@ def create_api_handle_with_http_info(body, opts = {}) 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: MicrosoftTeamsIntegrationAPI#create_api_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MicrosoftTeamsIntegrationAPI#create_tenant_based_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete handle. + # Delete tenant-based handle. # - # @see #delete_api_handle_with_http_info - def delete_api_handle(handle_id, opts = {}) - delete_api_handle_with_http_info(handle_id, opts) + # @see #delete_tenant_based_handle_with_http_info + def delete_tenant_based_handle(handle_id, opts = {}) + delete_tenant_based_handle_with_http_info(handle_id, opts) nil end - # Delete handle. + # Delete tenant-based handle. # - # Delete a handle from the Datadog Microsoft Teams integration. + # Delete a tenant-based handle from the Datadog Microsoft Teams integration. # - # @param handle_id [String] Your handle id. + # @param handle_id [String] Your tenant-based handle id. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_api_handle_with_http_info(handle_id, opts = {}) + def delete_tenant_based_handle_with_http_info(handle_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.delete_api_handle ...' + @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.delete_tenant_based_handle ...' end # verify the required parameter 'handle_id' is set if @api_client.config.client_side_validation && handle_id.nil? - fail ArgumentError, "Missing the required parameter 'handle_id' when calling MicrosoftTeamsIntegrationAPI.delete_api_handle" + fail ArgumentError, "Missing the required parameter 'handle_id' when calling MicrosoftTeamsIntegrationAPI.delete_tenant_based_handle" end # resource path local_var_path = '/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}'.sub('{handle_id}', CGI.escape(handle_id.to_s).gsub('%2F', '/')) @@ -138,7 +138,7 @@ def delete_api_handle_with_http_info(handle_id, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :delete_api_handle, + :operation => :delete_tenant_based_handle, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -150,102 +150,47 @@ def delete_api_handle_with_http_info(handle_id, opts = {}) 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: MicrosoftTeamsIntegrationAPI#delete_api_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MicrosoftTeamsIntegrationAPI#delete_tenant_based_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get handle information. + # Get channel information by name. # - # @see #get_api_handle_with_http_info - def get_api_handle(handle_id, opts = {}) - data, _status_code, _headers = get_api_handle_with_http_info(handle_id, opts) + # @see #get_channel_by_name_with_http_info + def get_channel_by_name(tenant_name, team_name, channel_name, opts = {}) + data, _status_code, _headers = get_channel_by_name_with_http_info(tenant_name, team_name, channel_name, opts) data end - # Get handle information. + # Get channel information by name. # - # Get the tenant, team, and channel information of a handle from the Datadog Microsoft Teams integration. + # Get the tenant, team, and channel ID of a channel in the Datadog Microsoft Teams integration. # - # @param handle_id [String] Your handle id. + # @param tenant_name [String] Your tenant name. + # @param team_name [String] Your team name. + # @param channel_name [String] Your channel name. # @param opts [Hash] the optional parameters - # @return [Array<(MicrosoftTeamsApiHandleInfoResponse, Integer, Hash)>] MicrosoftTeamsApiHandleInfoResponse data, response status code and response headers - def get_api_handle_with_http_info(handle_id, opts = {}) + # @return [Array<(MicrosoftTeamsGetChannelByNameResponse, Integer, Hash)>] MicrosoftTeamsGetChannelByNameResponse data, response status code and response headers + def get_channel_by_name_with_http_info(tenant_name, team_name, channel_name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.get_api_handle ...' - end - # verify the required parameter 'handle_id' is set - if @api_client.config.client_side_validation && handle_id.nil? - fail ArgumentError, "Missing the required parameter 'handle_id' when calling MicrosoftTeamsIntegrationAPI.get_api_handle" + @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.get_channel_by_name ...' end - # resource path - local_var_path = '/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}'.sub('{handle_id}', CGI.escape(handle_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']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'MicrosoftTeamsApiHandleInfoResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :get_api_handle, - :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: MicrosoftTeamsIntegrationAPI#get_api_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + # verify the required parameter 'tenant_name' is set + if @api_client.config.client_side_validation && tenant_name.nil? + fail ArgumentError, "Missing the required parameter 'tenant_name' when calling MicrosoftTeamsIntegrationAPI.get_channel_by_name" end - return data, status_code, headers - end - - # Get handle information by name. - # - # @see #get_api_handle_by_name_with_http_info - def get_api_handle_by_name(handle_name, opts = {}) - data, _status_code, _headers = get_api_handle_by_name_with_http_info(handle_name, opts) - data - end - - # Get handle information by name. - # - # Get the tenant, team, and channel information of a handle by name from the Datadog Microsoft Teams integration. - # - # @param handle_name [String] Your handle name. - # @param opts [Hash] the optional parameters - # @return [Array<(MicrosoftTeamsApiHandleInfoResponse, Integer, Hash)>] MicrosoftTeamsApiHandleInfoResponse data, response status code and response headers - def get_api_handle_by_name_with_http_info(handle_name, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.get_api_handle_by_name ...' + # verify the required parameter 'team_name' is set + if @api_client.config.client_side_validation && team_name.nil? + fail ArgumentError, "Missing the required parameter 'team_name' when calling MicrosoftTeamsIntegrationAPI.get_channel_by_name" end - # verify the required parameter 'handle_name' is set - if @api_client.config.client_side_validation && handle_name.nil? - fail ArgumentError, "Missing the required parameter 'handle_name' when calling MicrosoftTeamsIntegrationAPI.get_api_handle_by_name" + # verify the required parameter 'channel_name' is set + if @api_client.config.client_side_validation && channel_name.nil? + fail ArgumentError, "Missing the required parameter 'channel_name' when calling MicrosoftTeamsIntegrationAPI.get_channel_by_name" end # resource path - local_var_path = '/api/v2/integration/ms-teams/configuration/tenant-based-handles/name/{handle_name}'.sub('{handle_name}', CGI.escape(handle_name.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}'.sub('{tenant_name}', CGI.escape(tenant_name.to_s).gsub('%2F', '/')).sub('{team_name}', CGI.escape(team_name.to_s).gsub('%2F', '/')).sub('{channel_name}', CGI.escape(channel_name.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -262,13 +207,13 @@ def get_api_handle_by_name_with_http_info(handle_name, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MicrosoftTeamsApiHandleInfoResponse' + return_type = opts[:debug_return_type] || 'MicrosoftTeamsGetChannelByNameResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :get_api_handle_by_name, + :operation => :get_channel_by_name, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -280,47 +225,37 @@ def get_api_handle_by_name_with_http_info(handle_name, opts = {}) 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: MicrosoftTeamsIntegrationAPI#get_api_handle_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MicrosoftTeamsIntegrationAPI#get_channel_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get channel information by name. + # Get tenant-based handle information. # - # @see #get_channel_by_name_with_http_info - def get_channel_by_name(tenant_name, team_name, channel_name, opts = {}) - data, _status_code, _headers = get_channel_by_name_with_http_info(tenant_name, team_name, channel_name, opts) + # @see #get_tenant_based_handle_with_http_info + def get_tenant_based_handle(handle_id, opts = {}) + data, _status_code, _headers = get_tenant_based_handle_with_http_info(handle_id, opts) data end - # Get channel information by name. + # Get tenant-based handle information. # - # Get the tenant, team, and channel ID of a channel in the Datadog Microsoft Teams integration. + # Get the tenant, team, and channel information of a tenant-based handle from the Datadog Microsoft Teams integration. # - # @param tenant_name [String] Your tenant name. - # @param team_name [String] Your team name. - # @param channel_name [String] Your channel name. + # @param handle_id [String] Your tenant-based handle id. # @param opts [Hash] the optional parameters - # @return [Array<(MicrosoftTeamsGetChannelByNameResponse, Integer, Hash)>] MicrosoftTeamsGetChannelByNameResponse data, response status code and response headers - def get_channel_by_name_with_http_info(tenant_name, team_name, channel_name, opts = {}) + # @return [Array<(MicrosoftTeamsTenantBasedHandleResponse, Integer, Hash)>] MicrosoftTeamsTenantBasedHandleResponse data, response status code and response headers + def get_tenant_based_handle_with_http_info(handle_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.get_channel_by_name ...' - end - # verify the required parameter 'tenant_name' is set - if @api_client.config.client_side_validation && tenant_name.nil? - fail ArgumentError, "Missing the required parameter 'tenant_name' when calling MicrosoftTeamsIntegrationAPI.get_channel_by_name" - end - # verify the required parameter 'team_name' is set - if @api_client.config.client_side_validation && team_name.nil? - fail ArgumentError, "Missing the required parameter 'team_name' when calling MicrosoftTeamsIntegrationAPI.get_channel_by_name" + @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.get_tenant_based_handle ...' end - # verify the required parameter 'channel_name' is set - if @api_client.config.client_side_validation && channel_name.nil? - fail ArgumentError, "Missing the required parameter 'channel_name' when calling MicrosoftTeamsIntegrationAPI.get_channel_by_name" + # verify the required parameter 'handle_id' is set + if @api_client.config.client_side_validation && handle_id.nil? + fail ArgumentError, "Missing the required parameter 'handle_id' when calling MicrosoftTeamsIntegrationAPI.get_tenant_based_handle" end # resource path - local_var_path = '/api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}'.sub('{tenant_name}', CGI.escape(tenant_name.to_s).gsub('%2F', '/')).sub('{team_name}', CGI.escape(team_name.to_s).gsub('%2F', '/')).sub('{channel_name}', CGI.escape(channel_name.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}'.sub('{handle_id}', CGI.escape(handle_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -337,13 +272,13 @@ def get_channel_by_name_with_http_info(tenant_name, team_name, channel_name, opt post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MicrosoftTeamsGetChannelByNameResponse' + return_type = opts[:debug_return_type] || 'MicrosoftTeamsTenantBasedHandleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :get_channel_by_name, + :operation => :get_tenant_based_handle, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -355,30 +290,31 @@ def get_channel_by_name_with_http_info(tenant_name, team_name, channel_name, opt 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: MicrosoftTeamsIntegrationAPI#get_channel_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MicrosoftTeamsIntegrationAPI#get_tenant_based_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get all handles. + # Get all tenant-based handles. # - # @see #list_api_handles_with_http_info - def list_api_handles(opts = {}) - data, _status_code, _headers = list_api_handles_with_http_info(opts) + # @see #list_tenant_based_handles_with_http_info + def list_tenant_based_handles(opts = {}) + data, _status_code, _headers = list_tenant_based_handles_with_http_info(opts) data end - # Get all handles. + # Get all tenant-based handles. # - # Get a list of all handles from the Datadog Microsoft Teams integration. + # Get a list of all tenant-based handles from the Datadog Microsoft Teams integration. # # @param opts [Hash] the optional parameters # @option opts [String] :tenant_id Your tenant id. - # @return [Array<(MicrosoftTeamsApiHandlesResponse, Integer, Hash)>] MicrosoftTeamsApiHandlesResponse data, response status code and response headers - def list_api_handles_with_http_info(opts = {}) + # @option opts [String] :name Your tenant-based handle name. + # @return [Array<(MicrosoftTeamsTenantBasedHandlesResponse, Integer, Hash)>] MicrosoftTeamsTenantBasedHandlesResponse data, response status code and response headers + def list_tenant_based_handles_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.list_api_handles ...' + @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.list_tenant_based_handles ...' end # resource path local_var_path = '/api/v2/integration/ms-teams/configuration/tenant-based-handles' @@ -386,6 +322,7 @@ def list_api_handles_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'tenant_id'] = opts[:'tenant_id'] if !opts[:'tenant_id'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? # header parameters header_params = opts[:header_params] || {} @@ -399,13 +336,13 @@ def list_api_handles_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MicrosoftTeamsApiHandlesResponse' + return_type = opts[:debug_return_type] || 'MicrosoftTeamsTenantBasedHandlesResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :list_api_handles, + :operation => :list_tenant_based_handles, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -417,39 +354,39 @@ def list_api_handles_with_http_info(opts = {}) 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: MicrosoftTeamsIntegrationAPI#list_api_handles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MicrosoftTeamsIntegrationAPI#list_tenant_based_handles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update handle. + # Update tenant-based handle. # - # @see #update_api_handle_with_http_info - def update_api_handle(handle_id, body, opts = {}) - data, _status_code, _headers = update_api_handle_with_http_info(handle_id, body, opts) + # @see #update_tenant_based_handle_with_http_info + def update_tenant_based_handle(handle_id, body, opts = {}) + data, _status_code, _headers = update_tenant_based_handle_with_http_info(handle_id, body, opts) data end - # Update handle. + # Update tenant-based handle. # - # Update a handle from the Datadog Microsoft Teams integration. + # Update a tenant-based handle from the Datadog Microsoft Teams integration. # - # @param handle_id [String] Your handle id. - # @param body [MicrosoftTeamsUpdateApiHandleRequest] Opsgenie service payload. + # @param handle_id [String] Your tenant-based handle id. + # @param body [MicrosoftTeamsUpdateTenantBasedHandleRequest] Tenant-based handle payload. # @param opts [Hash] the optional parameters - # @return [Array<(MicrosoftTeamsApiHandleInfoResponse, Integer, Hash)>] MicrosoftTeamsApiHandleInfoResponse data, response status code and response headers - def update_api_handle_with_http_info(handle_id, body, opts = {}) + # @return [Array<(MicrosoftTeamsTenantBasedHandleResponse, Integer, Hash)>] MicrosoftTeamsTenantBasedHandleResponse data, response status code and response headers + def update_tenant_based_handle_with_http_info(handle_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.update_api_handle ...' + @api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.update_tenant_based_handle ...' end # verify the required parameter 'handle_id' is set if @api_client.config.client_side_validation && handle_id.nil? - fail ArgumentError, "Missing the required parameter 'handle_id' when calling MicrosoftTeamsIntegrationAPI.update_api_handle" + fail ArgumentError, "Missing the required parameter 'handle_id' when calling MicrosoftTeamsIntegrationAPI.update_tenant_based_handle" 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 MicrosoftTeamsIntegrationAPI.update_api_handle" + fail ArgumentError, "Missing the required parameter 'body' when calling MicrosoftTeamsIntegrationAPI.update_tenant_based_handle" end # resource path local_var_path = '/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}'.sub('{handle_id}', CGI.escape(handle_id.to_s).gsub('%2F', '/')) @@ -471,13 +408,13 @@ def update_api_handle_with_http_info(handle_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'MicrosoftTeamsApiHandleInfoResponse' + return_type = opts[:debug_return_type] || 'MicrosoftTeamsTenantBasedHandleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :update_api_handle, + :operation => :update_tenant_based_handle, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -489,7 +426,7 @@ def update_api_handle_with_http_info(handle_id, body, opts = {}) 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: MicrosoftTeamsIntegrationAPI#update_api_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MicrosoftTeamsIntegrationAPI#update_tenant_based_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response.rb b/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response.rb deleted file mode 100644 index 7c79e5c529c..00000000000 --- a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response.rb +++ /dev/null @@ -1,105 +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 of a handle. - class MicrosoftTeamsApiHandleInfoResponse - include BaseGenericModel - - # Handle data from a response. - attr_accessor :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' => :'MicrosoftTeamsApiHandleInfoResponseData' - } - 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::MicrosoftTeamsApiHandleInfoResponse` 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 - - # 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].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_request.rb b/lib/datadog_api_client/v2/models/microsoft_teams_create_tenant_based_handle_request.rb similarity index 91% rename from lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_request.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_create_tenant_based_handle_request.rb index be02f5debde..06698a03692 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_request.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_create_tenant_based_handle_request.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Create handle request. - class MicrosoftTeamsCreateApiHandleRequest + # Create tenant-based handle request. + class MicrosoftTeamsCreateTenantBasedHandleRequest include BaseGenericModel - # Handle data from a response. + # Tenant-based handle data from a response. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'MicrosoftTeamsApiHandleRequestData' + :'data' => :'MicrosoftTeamsTenantBasedHandleRequestData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsCreateApiHandleRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsCreateTenantBasedHandleRequest` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_attributes.rb b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_attributes.rb similarity index 96% rename from lib/datadog_api_client/v2/models/microsoft_teams_api_handle_attributes.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_attributes.rb index 9a1320bc9a3..665dc71b605 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_attributes.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_attributes.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Handle attributes. - class MicrosoftTeamsApiHandleAttributes + # Tenant-based handle attributes. + class MicrosoftTeamsTenantBasedHandleAttributes include BaseGenericModel # Channel id. attr_reader :channel_id - # Handle name. + # Tenant-based handle name. attr_reader :name # Team id. @@ -62,7 +62,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsApiHandleAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleAttributes` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_attributes.rb b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_response_attributes.rb similarity index 96% rename from lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_attributes.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_response_attributes.rb index 6b44138a936..53ef564236d 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_response_attributes.rb @@ -17,8 +17,8 @@ require 'time' module DatadogAPIClient::V2 - # Handle attributes. - class MicrosoftTeamsApiHandleInfoResponseAttributes + # Tenant-based handle attributes. + class MicrosoftTeamsTenantBasedHandleInfoResponseAttributes include BaseGenericModel # Channel id. @@ -27,7 +27,7 @@ class MicrosoftTeamsApiHandleInfoResponseAttributes # Channel name. attr_reader :channel_name - # Handle name. + # Tenant-based handle name. attr_reader :name # Team id. @@ -77,7 +77,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsApiHandleInfoResponseAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleInfoResponseAttributes` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_data.rb b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_response_data.rb similarity index 89% rename from lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_data.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_response_data.rb index cbefc5cfb2f..fdbde980442 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_data.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_response_data.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # Handle data from a response. - class MicrosoftTeamsApiHandleInfoResponseData + # Tenant-based handle data from a response. + class MicrosoftTeamsTenantBasedHandleInfoResponseData include BaseGenericModel - # Handle attributes. + # Tenant-based handle attributes. attr_accessor :attributes - # The ID of the handle. + # The ID of the tenant-based handle. attr_reader :id - # Handle resource type. + # Tenant-based handle resource type. attr_accessor :type attr_accessor :additional_properties @@ -46,9 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'MicrosoftTeamsApiHandleInfoResponseAttributes', + :'attributes' => :'MicrosoftTeamsTenantBasedHandleInfoResponseAttributes', :'id' => :'String', - :'type' => :'MicrosoftTeamsApiHandleInfoType' + :'type' => :'MicrosoftTeamsTenantBasedHandleInfoType' } end @@ -57,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsApiHandleInfoResponseData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleInfoResponseData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_type.rb b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_type.rb similarity index 77% rename from lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_type.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_type.rb index 849b8d71f1e..87fbd18e1ba 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_type.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # Handle resource type. - class MicrosoftTeamsApiHandleInfoType + # Tenant-based handle resource type. + class MicrosoftTeamsTenantBasedHandleInfoType include BaseEnumModel - MS_TEAMS_HANDLE_INFO = "ms-teams-handle-info".freeze + MS_TEAMS_TENANT_BASED_HANDLE_INFO = "ms-teams-tenant-based-handle-info".freeze end end diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_attributes.rb b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_request_attributes.rb similarity index 96% rename from lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_attributes.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_request_attributes.rb index b2efb0f30a4..b1ef4bf9212 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_request_attributes.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Handle attributes. - class MicrosoftTeamsApiHandleRequestAttributes + # Tenant-based handle attributes. + class MicrosoftTeamsTenantBasedHandleRequestAttributes include BaseGenericModel # Channel id. attr_reader :channel_id - # Handle name. + # Tenant-based handle name. attr_reader :name # Team id. @@ -62,7 +62,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsApiHandleRequestAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestAttributes` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request_data.rb b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_request_data.rb similarity index 89% rename from lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request_data.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_request_data.rb index e42ecb77e29..4e07c39c03e 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request_data.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_request_data.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Handle data from a response. - class MicrosoftTeamsUpdateApiHandleRequestData + # Tenant-based handle data from a response. + class MicrosoftTeamsTenantBasedHandleRequestData include BaseGenericModel - # Handle attributes. + # Tenant-based handle attributes. attr_reader :attributes - # Specifies the handle resource type. + # Specifies the tenant-based handle resource type. attr_reader :type attr_accessor :additional_properties @@ -42,8 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'MicrosoftTeamsApiHandleAttributes', - :'type' => :'MicrosoftTeamsApiHandleType' + :'attributes' => :'MicrosoftTeamsTenantBasedHandleRequestAttributes', + :'type' => :'MicrosoftTeamsTenantBasedHandleType' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequestData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_response.rb b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_response.rb similarity index 91% rename from lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_response.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_response.rb index 2a7f6a7fd5b..b89052000e7 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_response.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Response of a handle. - class MicrosoftTeamsCreateApiHandleResponse + # Response of a tenant-based handle. + class MicrosoftTeamsTenantBasedHandleResponse include BaseGenericModel - # Handle data from a response. + # Tenant-based handle data from a response. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'MicrosoftTeamsApiHandleResponseData' + :'data' => :'MicrosoftTeamsTenantBasedHandleResponseData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsCreateApiHandleResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_response_data.rb b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_response_data.rb similarity index 89% rename from lib/datadog_api_client/v2/models/microsoft_teams_api_handle_response_data.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_response_data.rb index 410f05d9091..65beec75975 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_response_data.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_response_data.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # Handle data from a response. - class MicrosoftTeamsApiHandleResponseData + # Tenant-based handle data from a response. + class MicrosoftTeamsTenantBasedHandleResponseData include BaseGenericModel - # Handle attributes. + # Tenant-based handle attributes. attr_accessor :attributes - # The ID of the handle. + # The ID of the tenant-based handle. attr_reader :id - # Specifies the handle resource type. + # Specifies the tenant-based handle resource type. attr_accessor :type attr_accessor :additional_properties @@ -46,9 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'MicrosoftTeamsApiHandleAttributes', + :'attributes' => :'MicrosoftTeamsTenantBasedHandleAttributes', :'id' => :'String', - :'type' => :'MicrosoftTeamsApiHandleType' + :'type' => :'MicrosoftTeamsTenantBasedHandleType' } end @@ -57,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsApiHandleResponseData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleResponseData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_type.rb b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_type.rb similarity index 79% rename from lib/datadog_api_client/v2/models/microsoft_teams_api_handle_type.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_type.rb index 36ca4eec7ea..3c64ba38842 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_type.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # Specifies the handle resource type. - class MicrosoftTeamsApiHandleType + # Specifies the tenant-based handle resource type. + class MicrosoftTeamsTenantBasedHandleType include BaseEnumModel - HANDLE = "handle".freeze + TENANT_BASED_HANDLE = "tenant-based-handle".freeze end end diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_api_handles_response.rb b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handles_response.rb similarity index 91% rename from lib/datadog_api_client/v2/models/microsoft_teams_api_handles_response.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handles_response.rb index 69fec72e899..57f88842e74 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_api_handles_response.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handles_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Response with a list of handles. - class MicrosoftTeamsApiHandlesResponse + # Response with a list of tenant-based handles. + class MicrosoftTeamsTenantBasedHandlesResponse include BaseGenericModel - # An array of handles. + # An array of tenant-based handles. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Array' + :'data' => :'Array' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsApiHandlesResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandlesResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request.rb b/lib/datadog_api_client/v2/models/microsoft_teams_update_tenant_based_handle_request.rb similarity index 91% rename from lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_update_tenant_based_handle_request.rb index d3ad9646c62..216c70af718 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_update_tenant_based_handle_request.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Update handle request. - class MicrosoftTeamsUpdateApiHandleRequest + # Update tenant-based handle request. + class MicrosoftTeamsUpdateTenantBasedHandleRequest include BaseGenericModel - # Handle data from a response. + # Tenant-based handle data from a response. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'MicrosoftTeamsUpdateApiHandleRequestData' + :'data' => :'MicrosoftTeamsUpdateTenantBasedHandleRequestData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequest` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_data.rb b/lib/datadog_api_client/v2/models/microsoft_teams_update_tenant_based_handle_request_data.rb similarity index 89% rename from lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_data.rb rename to lib/datadog_api_client/v2/models/microsoft_teams_update_tenant_based_handle_request_data.rb index dbb3303d785..078457c02cf 100644 --- a/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_data.rb +++ b/lib/datadog_api_client/v2/models/microsoft_teams_update_tenant_based_handle_request_data.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Handle data from a response. - class MicrosoftTeamsApiHandleRequestData + # Tenant-based handle data from a response. + class MicrosoftTeamsUpdateTenantBasedHandleRequestData include BaseGenericModel - # Handle attributes. + # Tenant-based handle attributes. attr_reader :attributes - # Specifies the handle resource type. + # Specifies the tenant-based handle resource type. attr_reader :type attr_accessor :additional_properties @@ -42,8 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'MicrosoftTeamsApiHandleRequestAttributes', - :'type' => :'MicrosoftTeamsApiHandleType' + :'attributes' => :'MicrosoftTeamsTenantBasedHandleAttributes', + :'type' => :'MicrosoftTeamsTenantBasedHandleType' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsApiHandleRequestData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequestData` initialize method" end self.additional_properties = {}