From 324dddaa8ead0a87605d9bd30fcbc882ecff5ff8 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 9 Dec 2025 16:20:52 +0000 Subject: [PATCH] Regenerate client from commit 03ff95c of spec repo --- .generator/schemas/v2/openapi.yaml | 81 ++++++++ .../frozen.json | 1 + .../recording.har | 147 ++++++++++++++ features/v2/deployment_gates.feature | 17 ++ features/v2/undo.json | 6 + .../src/support/scenarios_model_mapping.ts | 7 + .../src/v2/DeploymentGatesApi.ts | 183 ++++++++++++++++++ services/deployment_gates/src/v2/index.ts | 5 + .../v2/models/DeploymentGateRulesResponse.ts | 46 +++++ .../models/ListDeploymentRuleResponseData.ts | 63 ++++++ .../v2/models/ListDeploymentRulesDataType.ts | 9 + ...stDeploymentRulesResponseDataAttributes.ts | 40 ++++ .../src/v2/models/TypingInfo.ts | 8 + 13 files changed, 613 insertions(+) create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Get-rules-for-a-deployment-gate-returns-OK-response_353728880/frozen.json create mode 100644 cassettes/v2/Deployment-Gates_4242274226/Get-rules-for-a-deployment-gate-returns-OK-response_353728880/recording.har create mode 100644 services/deployment_gates/src/v2/models/DeploymentGateRulesResponse.ts create mode 100644 services/deployment_gates/src/v2/models/ListDeploymentRuleResponseData.ts create mode 100644 services/deployment_gates/src/v2/models/ListDeploymentRulesDataType.ts create mode 100644 services/deployment_gates/src/v2/models/ListDeploymentRulesResponseDataAttributes.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index dad178ca22d3..70cb1fd3b9e1 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -17075,6 +17075,12 @@ components: required: - id type: object + DeploymentGateRulesResponse: + description: Response for a deployment gate rules. + properties: + data: + $ref: '#/components/schemas/ListDeploymentRuleResponseData' + type: object DeploymentMetadata: description: Metadata object containing the publication creation information. properties: @@ -30199,6 +30205,37 @@ components: type: string x-enum-varnames: - LIST_CONNECTIONS_RESPONSE + ListDeploymentRuleResponseData: + description: Data for a list of deployment rules. + properties: + attributes: + $ref: '#/components/schemas/ListDeploymentRulesResponseDataAttributes' + id: + description: Unique identifier of the deployment rule. + example: 1111-2222-3333-4444-555566667777 + type: string + type: + $ref: '#/components/schemas/ListDeploymentRulesDataType' + required: + - type + - attributes + - id + type: object + ListDeploymentRulesDataType: + description: List deployment rule resource type. + enum: + - list_deployment_rules + example: list_deployment_rules + type: string + x-enum-varnames: + - LIST_DEPLOYMENT_RULES + ListDeploymentRulesResponseDataAttributes: + properties: + rules: + items: + $ref: '#/components/schemas/DeploymentRuleResponseDataAttributes' + type: array + type: object ListDevicesResponse: description: List devices response. properties: @@ -66236,6 +66273,50 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/deployment_gates/{gate_id}/rules: + get: + description: Endpoint to get rules for a deployment gate. + operationId: GetDeploymentGateRules + parameters: + - description: The ID of the deployment gate. + in: path + name: gate_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentGateRulesResponse' + description: OK + '400': + $ref: '#/components/responses/HTTPCDGatesBadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get rules for a deployment gate + tags: + - Deployment Gates + x-permission: + operator: OR + permissions: + - deployment_gates_read + x-unstable: '**Note**: This endpoint is in preview and may be subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' post: description: Endpoint to create a deployment rule. A gate for the rule must already exist. diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-rules-for-a-deployment-gate-returns-OK-response_353728880/frozen.json b/cassettes/v2/Deployment-Gates_4242274226/Get-rules-for-a-deployment-gate-returns-OK-response_353728880/frozen.json new file mode 100644 index 000000000000..f70325d73ffb --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-rules-for-a-deployment-gate-returns-OK-response_353728880/frozen.json @@ -0,0 +1 @@ +"2025-12-09T13:34:21.892Z" diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-rules-for-a-deployment-gate-returns-OK-response_353728880/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Get-rules-for-a-deployment-gate-returns-OK-response_353728880/recording.har new file mode 100644 index 000000000000..31860d768fee --- /dev/null +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-rules-for-a-deployment-gate-returns-OK-response_353728880/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Deployment Gates/Get rules for a deployment gate returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "70acb264a190c9504530585b68c408be", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 571, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates" + }, + "response": { + "bodySize": 515, + "content": { + "mimeType": "application/vnd.api+json", + "size": 515, + "text": "{\"data\":{\"id\":\"4e020f52-06d2-4584-9bc8-4955ce5de1b8\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-09T13:34:22.624907Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-09T13:34:22.624907Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-12-09T13:34:22.335Z", + "time": 387 + }, + { + "_id": "81c8d0b2a998da5d9a002f821c6ac9c4", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 562, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/4e020f52-06d2-4584-9bc8-4955ce5de1b8/rules" + }, + "response": { + "bodySize": 111, + "content": { + "mimeType": "application/vnd.api+json", + "size": 111, + "text": "{\"data\":{\"id\":\"4e020f52-06d2-4584-9bc8-4955ce5de1b8\",\"type\":\"list_deployment_rules\",\"attributes\":{\"rules\":[]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 681, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-12-09T13:34:22.743Z", + "time": 351 + }, + { + "_id": "c3189f134404427635b10ed79b16b239", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 544, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/deployment_gates/4e020f52-06d2-4584-9bc8-4955ce5de1b8" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 623, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-12-09T13:34:23.101Z", + "time": 543 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/features/v2/deployment_gates.feature b/features/v2/deployment_gates.feature index e4023c5650b1..cb0c5a1262d6 100644 --- a/features/v2/deployment_gates.feature +++ b/features/v2/deployment_gates.feature @@ -207,6 +207,23 @@ Feature: Deployment Gates When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get rules for a deployment gate returns "Bad request." response + Given operation "GetDeploymentGateRules" enabled + And new "GetDeploymentGateRules" request + And request contains "gate_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad request. + + @team:DataDog/ci-app-backend + Scenario: Get rules for a deployment gate returns "OK" response + Given there is a valid "deployment_gate" in the system + And operation "GetDeploymentGateRules" enabled + And new "GetDeploymentGateRules" request + And request contains "gate_id" parameter from "deployment_gate.data.id" + When the request is sent + Then the response status is 200 OK + @team:DataDog/ci-app-backend Scenario: Update deployment gate returns "Bad Request" response Given operation "UpdateDeploymentGate" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index 71dba8f3e387..396d52383628 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1335,6 +1335,12 @@ "type": "unsafe" } }, + "GetDeploymentGateRules": { + "tag": "Deployment Gates", + "undo": { + "type": "safe" + } + }, "CreateDeploymentRule": { "tag": "Deployment Gates", "undo": { diff --git a/private/bdd_runner/src/support/scenarios_model_mapping.ts b/private/bdd_runner/src/support/scenarios_model_mapping.ts index 3f1725f44d8e..8e8f75060f82 100644 --- a/private/bdd_runner/src/support/scenarios_model_mapping.ts +++ b/private/bdd_runner/src/support/scenarios_model_mapping.ts @@ -5407,6 +5407,13 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { }, operationResponseType: "DeploymentGateResponse", }, + "DeploymentGatesApi.V2.GetDeploymentGateRules": { + gateId: { + type: "string", + format: "", + }, + operationResponseType: "DeploymentGateRulesResponse", + }, "DeploymentGatesApi.V2.CreateDeploymentRule": { gateId: { type: "string", diff --git a/services/deployment_gates/src/v2/DeploymentGatesApi.ts b/services/deployment_gates/src/v2/DeploymentGatesApi.ts index 7072e65499f8..d0a4c7927936 100644 --- a/services/deployment_gates/src/v2/DeploymentGatesApi.ts +++ b/services/deployment_gates/src/v2/DeploymentGatesApi.ts @@ -26,6 +26,7 @@ import { APIErrorResponse } from "./models/APIErrorResponse"; import { CreateDeploymentGateParams } from "./models/CreateDeploymentGateParams"; import { CreateDeploymentRuleParams } from "./models/CreateDeploymentRuleParams"; import { DeploymentGateResponse } from "./models/DeploymentGateResponse"; +import { DeploymentGateRulesResponse } from "./models/DeploymentGateRulesResponse"; import { DeploymentRuleResponse } from "./models/DeploymentRuleResponse"; import { HTTPCDGatesBadRequestResponse } from "./models/HTTPCDGatesBadRequestResponse"; import { HTTPCDGatesNotFoundResponse } from "./models/HTTPCDGatesNotFoundResponse"; @@ -330,6 +331,60 @@ export class DeploymentGatesApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async getDeploymentGateRules( + gateId: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "DeploymentGatesApi.v2.getDeploymentGateRules" + ] + ) { + throw new Error( + "Unstable operation 'getDeploymentGateRules' is disabled. Enable it by setting `configuration.unstableOperations['DeploymentGatesApi.v2.getDeploymentGateRules'] = true`", + ); + } + + // verify required parameter 'gateId' is not null or undefined + if (gateId === null || gateId === undefined) { + throw new RequiredError("gateId", "getDeploymentGateRules"); + } + + // Path Params + const localVarPath = "/api/v2/deployment_gates/{gate_id}/rules".replace( + "{gate_id}", + encodeURIComponent(String(gateId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "DeploymentGatesApi.v2.getDeploymentGateRules", + DeploymentGatesApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async getDeploymentRule( gateId: string, id: string, @@ -1060,6 +1115,105 @@ export class DeploymentGatesApiResponseProcessor { ); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDeploymentGateRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async getDeploymentGateRules( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: DeploymentGateRulesResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "DeploymentGateRulesResponse", + ) as DeploymentGateRulesResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = parse(await response.body.text(), contentType); + let body: HTTPCDGatesBadRequestResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "HTTPCDGatesBadRequestResponse", + ) as HTTPCDGatesBadRequestResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 500) { + const bodyText = parse(await response.body.text(), contentType); + let body: HTTPCIAppErrors; + try { + body = deserialize( + bodyText, + TypingInfo, + "HTTPCIAppErrors", + ) as HTTPCIAppErrors; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: DeploymentGateRulesResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "DeploymentGateRulesResponse", + "", + ) as DeploymentGateRulesResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -1469,6 +1623,14 @@ export interface DeploymentGatesApiGetDeploymentGateRequest { id: string; } +export interface DeploymentGatesApiGetDeploymentGateRulesRequest { + /** + * The ID of the deployment gate. + * @type string + */ + gateId: string; +} + export interface DeploymentGatesApiGetDeploymentRuleRequest { /** * The ID of the deployment gate. @@ -1638,6 +1800,27 @@ export class DeploymentGatesApi { }); } + /** + * Endpoint to get rules for a deployment gate. + * @param param The request object + */ + public getDeploymentGateRules( + param: DeploymentGatesApiGetDeploymentGateRulesRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.getDeploymentGateRules( + param.gateId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getDeploymentGateRules(responseContext); + }); + }); + } + /** * Endpoint to get a deployment rule. * @param param The request object diff --git a/services/deployment_gates/src/v2/index.ts b/services/deployment_gates/src/v2/index.ts index 39795012091b..ff42e5ab29d1 100644 --- a/services/deployment_gates/src/v2/index.ts +++ b/services/deployment_gates/src/v2/index.ts @@ -4,6 +4,7 @@ export { DeploymentGatesApiDeleteDeploymentGateRequest, DeploymentGatesApiDeleteDeploymentRuleRequest, DeploymentGatesApiGetDeploymentGateRequest, + DeploymentGatesApiGetDeploymentGateRulesRequest, DeploymentGatesApiGetDeploymentRuleRequest, DeploymentGatesApiUpdateDeploymentGateRequest, DeploymentGatesApiUpdateDeploymentRuleRequest, @@ -23,6 +24,7 @@ export { DeploymentGateResponseData } from "./models/DeploymentGateResponseData" export { DeploymentGateResponseDataAttributes } from "./models/DeploymentGateResponseDataAttributes"; export { DeploymentGateResponseDataAttributesCreatedBy } from "./models/DeploymentGateResponseDataAttributesCreatedBy"; export { DeploymentGateResponseDataAttributesUpdatedBy } from "./models/DeploymentGateResponseDataAttributesUpdatedBy"; +export { DeploymentGateRulesResponse } from "./models/DeploymentGateRulesResponse"; export { DeploymentRuleDataType } from "./models/DeploymentRuleDataType"; export { DeploymentRuleOptionsFaultyDeploymentDetection } from "./models/DeploymentRuleOptionsFaultyDeploymentDetection"; export { DeploymentRuleOptionsMonitor } from "./models/DeploymentRuleOptionsMonitor"; @@ -38,6 +40,9 @@ export { HTTPCDGatesNotFoundResponse } from "./models/HTTPCDGatesNotFoundRespons export { HTTPCDRulesNotFoundResponse } from "./models/HTTPCDRulesNotFoundResponse"; export { HTTPCIAppError } from "./models/HTTPCIAppError"; export { HTTPCIAppErrors } from "./models/HTTPCIAppErrors"; +export { ListDeploymentRuleResponseData } from "./models/ListDeploymentRuleResponseData"; +export { ListDeploymentRulesDataType } from "./models/ListDeploymentRulesDataType"; +export { ListDeploymentRulesResponseDataAttributes } from "./models/ListDeploymentRulesResponseDataAttributes"; export { UpdateDeploymentGateParams } from "./models/UpdateDeploymentGateParams"; export { UpdateDeploymentGateParamsData } from "./models/UpdateDeploymentGateParamsData"; export { UpdateDeploymentGateParamsDataAttributes } from "./models/UpdateDeploymentGateParamsDataAttributes"; diff --git a/services/deployment_gates/src/v2/models/DeploymentGateRulesResponse.ts b/services/deployment_gates/src/v2/models/DeploymentGateRulesResponse.ts new file mode 100644 index 000000000000..4b03f1ba4d27 --- /dev/null +++ b/services/deployment_gates/src/v2/models/DeploymentGateRulesResponse.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { ListDeploymentRuleResponseData } from "./ListDeploymentRuleResponseData"; + +/** + * Response for a deployment gate rules. + */ +export class DeploymentGateRulesResponse { + /** + * Data for a list of deployment rules. + */ + "data"?: ListDeploymentRuleResponseData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ListDeploymentRuleResponseData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DeploymentGateRulesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/deployment_gates/src/v2/models/ListDeploymentRuleResponseData.ts b/services/deployment_gates/src/v2/models/ListDeploymentRuleResponseData.ts new file mode 100644 index 000000000000..210bd23ee3ae --- /dev/null +++ b/services/deployment_gates/src/v2/models/ListDeploymentRuleResponseData.ts @@ -0,0 +1,63 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { ListDeploymentRulesDataType } from "./ListDeploymentRulesDataType"; +import { ListDeploymentRulesResponseDataAttributes } from "./ListDeploymentRulesResponseDataAttributes"; + +/** + * Data for a list of deployment rules. + */ +export class ListDeploymentRuleResponseData { + "attributes": ListDeploymentRulesResponseDataAttributes; + /** + * Unique identifier of the deployment rule. + */ + "id": string; + /** + * List deployment rule resource type. + */ + "type": ListDeploymentRulesDataType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ListDeploymentRulesResponseDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "ListDeploymentRulesDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ListDeploymentRuleResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/deployment_gates/src/v2/models/ListDeploymentRulesDataType.ts b/services/deployment_gates/src/v2/models/ListDeploymentRulesDataType.ts new file mode 100644 index 000000000000..1f8060090818 --- /dev/null +++ b/services/deployment_gates/src/v2/models/ListDeploymentRulesDataType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * List deployment rule resource type. + */ +export type ListDeploymentRulesDataType = + | typeof LIST_DEPLOYMENT_RULES + | UnparsedObject; +export const LIST_DEPLOYMENT_RULES = "list_deployment_rules"; diff --git a/services/deployment_gates/src/v2/models/ListDeploymentRulesResponseDataAttributes.ts b/services/deployment_gates/src/v2/models/ListDeploymentRulesResponseDataAttributes.ts new file mode 100644 index 000000000000..58cbc9181d31 --- /dev/null +++ b/services/deployment_gates/src/v2/models/ListDeploymentRulesResponseDataAttributes.ts @@ -0,0 +1,40 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { DeploymentRuleResponseDataAttributes } from "./DeploymentRuleResponseDataAttributes"; + +export class ListDeploymentRulesResponseDataAttributes { + "rules"?: Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + rules: { + baseName: "rules", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ListDeploymentRulesResponseDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/deployment_gates/src/v2/models/TypingInfo.ts b/services/deployment_gates/src/v2/models/TypingInfo.ts index 555c97f3f461..13961d1329d9 100644 --- a/services/deployment_gates/src/v2/models/TypingInfo.ts +++ b/services/deployment_gates/src/v2/models/TypingInfo.ts @@ -12,6 +12,7 @@ import { DeploymentGateResponseData } from "./DeploymentGateResponseData"; import { DeploymentGateResponseDataAttributes } from "./DeploymentGateResponseDataAttributes"; import { DeploymentGateResponseDataAttributesCreatedBy } from "./DeploymentGateResponseDataAttributesCreatedBy"; import { DeploymentGateResponseDataAttributesUpdatedBy } from "./DeploymentGateResponseDataAttributesUpdatedBy"; +import { DeploymentGateRulesResponse } from "./DeploymentGateRulesResponse"; import { DeploymentRuleOptionsFaultyDeploymentDetection } from "./DeploymentRuleOptionsFaultyDeploymentDetection"; import { DeploymentRuleOptionsMonitor } from "./DeploymentRuleOptionsMonitor"; import { DeploymentRuleResponse } from "./DeploymentRuleResponse"; @@ -24,6 +25,8 @@ import { HTTPCDGatesNotFoundResponse } from "./HTTPCDGatesNotFoundResponse"; import { HTTPCDRulesNotFoundResponse } from "./HTTPCDRulesNotFoundResponse"; import { HTTPCIAppError } from "./HTTPCIAppError"; import { HTTPCIAppErrors } from "./HTTPCIAppErrors"; +import { ListDeploymentRuleResponseData } from "./ListDeploymentRuleResponseData"; +import { ListDeploymentRulesResponseDataAttributes } from "./ListDeploymentRulesResponseDataAttributes"; import { UpdateDeploymentGateParams } from "./UpdateDeploymentGateParams"; import { UpdateDeploymentGateParamsData } from "./UpdateDeploymentGateParamsData"; import { UpdateDeploymentGateParamsDataAttributes } from "./UpdateDeploymentGateParamsDataAttributes"; @@ -39,6 +42,7 @@ export const TypingInfo: ModelTypingInfo = { "faulty_deployment_detection", "monitor", ], + ListDeploymentRulesDataType: ["list_deployment_rules"], }, oneOfMap: { DeploymentRulesOptions: [ @@ -63,6 +67,7 @@ export const TypingInfo: ModelTypingInfo = { DeploymentGateResponseDataAttributesCreatedBy, DeploymentGateResponseDataAttributesUpdatedBy: DeploymentGateResponseDataAttributesUpdatedBy, + DeploymentGateRulesResponse: DeploymentGateRulesResponse, DeploymentRuleOptionsFaultyDeploymentDetection: DeploymentRuleOptionsFaultyDeploymentDetection, DeploymentRuleOptionsMonitor: DeploymentRuleOptionsMonitor, @@ -78,6 +83,9 @@ export const TypingInfo: ModelTypingInfo = { HTTPCDRulesNotFoundResponse: HTTPCDRulesNotFoundResponse, HTTPCIAppError: HTTPCIAppError, HTTPCIAppErrors: HTTPCIAppErrors, + ListDeploymentRuleResponseData: ListDeploymentRuleResponseData, + ListDeploymentRulesResponseDataAttributes: + ListDeploymentRulesResponseDataAttributes, UpdateDeploymentGateParams: UpdateDeploymentGateParams, UpdateDeploymentGateParamsData: UpdateDeploymentGateParamsData, UpdateDeploymentGateParamsDataAttributes: