diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 93efc78e5a9..9632e2d7de2 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -1157,6 +1157,24 @@ components:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
+ HTTPCDGatesBadRequestResponse:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPCDGatesBadRequestResponse'
+ description: Bad request.
+ HTTPCDGatesNotFoundResponse:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPCDGatesNotFoundResponse'
+ description: Deployment gate not found.
+ HTTPCDRulesNotFoundResponse:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPCDRulesNotFoundResponse'
+ description: Deployment rule not found.
NotAuthorizedResponse:
content:
application/json:
@@ -12576,6 +12594,91 @@ components:
meta:
$ref: '#/components/schemas/DataDeletionResponseMeta'
type: object
+ CreateDeploymentGateParams:
+ description: Parameters for creating a deployment gate.
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateDeploymentGateParamsData'
+ required:
+ - data
+ type: object
+ CreateDeploymentGateParamsData:
+ description: Parameters for creating a deployment gate.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CreateDeploymentGateParamsDataAttributes'
+ type:
+ $ref: '#/components/schemas/DeploymentGateDataType'
+ required:
+ - type
+ - attributes
+ type: object
+ CreateDeploymentGateParamsDataAttributes:
+ description: Parameters for creating a deployment gate.
+ properties:
+ dry_run:
+ default: false
+ description: Whether this gate is run in dry-run mode.
+ example: false
+ type: boolean
+ env:
+ description: The environment of the deployment gate.
+ example: production
+ type: string
+ identifier:
+ default: default
+ description: The identifier of the deployment gate.
+ example: pre
+ type: string
+ service:
+ description: The service of the deployment gate.
+ example: my-service
+ type: string
+ required:
+ - env
+ - service
+ type: object
+ CreateDeploymentRuleParams:
+ description: Parameters for creating a deployment rule.
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateDeploymentRuleParamsData'
+ type: object
+ CreateDeploymentRuleParamsData:
+ description: Parameters for creating a deployment rule.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CreateDeploymentRuleParamsDataAttributes'
+ type:
+ $ref: '#/components/schemas/DeploymentRuleDataType'
+ required:
+ - type
+ - attributes
+ type: object
+ CreateDeploymentRuleParamsDataAttributes:
+ description: Parameters for creating a deployment rule.
+ properties:
+ dry_run:
+ default: false
+ description: Whether this rule is run in dry-run mode.
+ example: false
+ type: boolean
+ name:
+ description: The name of the deployment rule.
+ example: My deployment rule
+ type: string
+ options:
+ $ref: '#/components/schemas/DeploymentRulesOptions'
+ type:
+ description: The type of the deployment rule (faulty_deployment_detection
+ or monitor).
+ example: faulty_deployment_detection
+ type: string
+ required:
+ - name
+ - options
+ - type
+ type: object
CreateIncidentNotificationRuleRequest:
description: Create request for a notification rule.
properties:
@@ -16284,6 +16387,113 @@ components:
format: uuid
type: string
type: object
+ DeploymentGateDataType:
+ description: Deployment gate resource type.
+ enum:
+ - deployment_gate
+ example: deployment_gate
+ type: string
+ x-enum-varnames:
+ - DEPLOYMENT_GATE
+ DeploymentGateResponse:
+ description: Response for a deployment gate.
+ properties:
+ data:
+ $ref: '#/components/schemas/DeploymentGateResponseData'
+ type: object
+ DeploymentGateResponseData:
+ description: Data for a deployment gate.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DeploymentGateResponseDataAttributes'
+ id:
+ description: Unique identifier of the deployment gate.
+ example: 1111-2222-3333-4444-555566667777
+ type: string
+ type:
+ $ref: '#/components/schemas/DeploymentGateDataType'
+ required:
+ - type
+ - attributes
+ - id
+ type: object
+ DeploymentGateResponseDataAttributes:
+ description: Basic information about a deployment gate.
+ properties:
+ created_at:
+ description: The timestamp when the deployment gate was created.
+ example: '2021-01-01T00:00:00Z'
+ format: date-time
+ type: string
+ created_by:
+ $ref: '#/components/schemas/DeploymentGateResponseDataAttributesCreatedBy'
+ dry_run:
+ description: Whether this gate is run in dry-run mode.
+ example: false
+ type: boolean
+ env:
+ description: The environment of the deployment gate.
+ example: production
+ type: string
+ identifier:
+ description: The identifier of the deployment gate.
+ example: pre
+ type: string
+ service:
+ description: The service of the deployment gate.
+ example: my-service
+ type: string
+ updated_at:
+ description: The timestamp when the deployment gate was last updated.
+ example: '2021-01-01T00:00:00Z'
+ format: date-time
+ type: string
+ updated_by:
+ $ref: '#/components/schemas/DeploymentGateResponseDataAttributesUpdatedBy'
+ required:
+ - created_at
+ - created_by
+ - dry_run
+ - env
+ - identifier
+ - service
+ type: object
+ DeploymentGateResponseDataAttributesCreatedBy:
+ description: Information about the user who created the deployment gate.
+ properties:
+ handle:
+ description: The handle of the user who created the deployment rule.
+ example: test-user
+ type: string
+ id:
+ description: The ID of the user who created the deployment rule.
+ example: 1111-2222-3333-4444-555566667777
+ type: string
+ name:
+ description: The name of the user who created the deployment rule.
+ example: Test User
+ type: string
+ required:
+ - id
+ type: object
+ DeploymentGateResponseDataAttributesUpdatedBy:
+ description: Information about the user who updated the deployment gate.
+ properties:
+ handle:
+ description: The handle of the user who updated the deployment rule.
+ example: test-user
+ type: string
+ id:
+ description: The ID of the user who updated the deployment rule.
+ example: 1111-2222-3333-4444-555566667777
+ type: string
+ name:
+ description: The name of the user who updated the deployment rule.
+ example: Test User
+ type: string
+ required:
+ - id
+ type: object
DeploymentMetadata:
description: Metadata object containing the publication creation information.
properties:
@@ -16323,6 +16533,164 @@ components:
type:
$ref: '#/components/schemas/AppDeploymentType'
type: object
+ DeploymentRuleDataType:
+ description: Deployment rule resource type.
+ enum:
+ - deployment_rule
+ example: deployment_rule
+ type: string
+ x-enum-varnames:
+ - DEPLOYMENT_RULE
+ DeploymentRuleOptionsFaultyDeploymentDetection:
+ additionalProperties: false
+ description: Faulty deployment detection options for deployment rules.
+ properties:
+ duration:
+ description: The duration for faulty deployment detection.
+ example: 3600
+ format: int64
+ type: integer
+ excluded_resources:
+ description: Resources to exclude from faulty deployment detection.
+ example:
+ - resource1
+ - resource2
+ items:
+ type: string
+ type: array
+ type: object
+ DeploymentRuleOptionsMonitor:
+ additionalProperties: false
+ description: Monitor options for deployment rules.
+ properties:
+ duration:
+ description: Seconds the monitor needs to stay in OK status for the rule
+ to pass.
+ example: 3600
+ format: int64
+ type: integer
+ query:
+ description: Monitors that match this query are evaluated.
+ example: service:my-service env:prod
+ type: string
+ required:
+ - query
+ type: object
+ DeploymentRuleResponse:
+ description: Response for a deployment rule.
+ properties:
+ data:
+ $ref: '#/components/schemas/DeploymentRuleResponseData'
+ type: object
+ DeploymentRuleResponseData:
+ description: Data for a deployment rule.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DeploymentRuleResponseDataAttributes'
+ id:
+ description: Unique identifier of the deployment rule.
+ example: 1111-2222-3333-4444-555566667777
+ type: string
+ type:
+ $ref: '#/components/schemas/DeploymentRuleDataType'
+ required:
+ - type
+ - attributes
+ - id
+ type: object
+ DeploymentRuleResponseDataAttributes:
+ description: Basic information about a deployment rule.
+ properties:
+ created_at:
+ description: The timestamp when the deployment rule was created.
+ example: '2021-01-01T00:00:00Z'
+ format: date-time
+ type: string
+ created_by:
+ $ref: '#/components/schemas/DeploymentRuleResponseDataAttributesCreatedBy'
+ dry_run:
+ description: Whether this rule is run in dry-run mode.
+ example: false
+ type: boolean
+ gate_id:
+ description: The ID of the deployment gate.
+ example: 1111-2222-3333-4444-555566667777
+ type: string
+ name:
+ description: The name of the deployment rule.
+ example: My deployment rule
+ type: string
+ options:
+ $ref: '#/components/schemas/DeploymentRulesOptions'
+ type:
+ $ref: '#/components/schemas/DeploymentRuleResponseDataAttributesType'
+ updated_at:
+ description: The timestamp when the deployment rule was last updated.
+ format: date-time
+ type: string
+ updated_by:
+ $ref: '#/components/schemas/DeploymentRuleResponseDataAttributesUpdatedBy'
+ required:
+ - created_at
+ - created_by
+ - dry_run
+ - gate_id
+ - name
+ - options
+ - type
+ type: object
+ DeploymentRuleResponseDataAttributesCreatedBy:
+ description: Information about the user who created the deployment rule.
+ properties:
+ handle:
+ description: The handle of the user who created the deployment rule.
+ example: test-user
+ type: string
+ id:
+ description: The ID of the user who created the deployment rule.
+ example: 1111-2222-3333-4444-555566667777
+ type: string
+ name:
+ description: The name of the user who created the deployment rule.
+ example: Test User
+ type: string
+ required:
+ - id
+ type: object
+ DeploymentRuleResponseDataAttributesType:
+ description: The type of the deployment rule.
+ enum:
+ - faulty_deployment_detection
+ - monitor
+ example: faulty_deployment_detection
+ type: string
+ x-enum-varnames:
+ - FAULTY_DEPLOYMENT_DETECTION
+ - MONITOR
+ DeploymentRuleResponseDataAttributesUpdatedBy:
+ description: Information about the user who updated the deployment rule.
+ properties:
+ handle:
+ description: The handle of the user who updated the deployment rule.
+ example: test-user
+ type: string
+ id:
+ description: The ID of the user who updated the deployment rule.
+ example: 1111-2222-3333-4444-555566667777
+ type: string
+ name:
+ description: The name of the user who updated the deployment rule.
+ example: Test User
+ type: string
+ required:
+ - id
+ type: object
+ DeploymentRulesOptions:
+ description: Options for deployment rule response representing either faulty
+ deployment detection or monitor options.
+ oneOf:
+ - $ref: '#/components/schemas/DeploymentRuleOptionsFaultyDeploymentDetection'
+ - $ref: '#/components/schemas/DeploymentRuleOptionsMonitor'
DetailedFinding:
description: A single finding with with message and resource configuration.
properties:
@@ -22414,6 +22782,33 @@ components:
example: application/json
type: string
type: object
+ HTTPCDGatesBadRequestResponse:
+ description: Bad request.
+ properties:
+ errors:
+ description: Structured errors.
+ items:
+ $ref: '#/components/schemas/HTTPCIAppError'
+ type: array
+ type: object
+ HTTPCDGatesNotFoundResponse:
+ description: Deployment gate not found.
+ properties:
+ errors:
+ description: Structured errors.
+ items:
+ $ref: '#/components/schemas/HTTPCIAppError'
+ type: array
+ type: object
+ HTTPCDRulesNotFoundResponse:
+ description: Deployment rule not found.
+ properties:
+ errors:
+ description: Structured errors.
+ items:
+ $ref: '#/components/schemas/HTTPCIAppError'
+ type: array
+ type: object
HTTPCIAppError:
description: List of errors.
properties:
@@ -51896,6 +52291,77 @@ components:
required:
- data
type: object
+ UpdateDeploymentGateParams:
+ description: Parameters for updating a deployment gate.
+ properties:
+ data:
+ $ref: '#/components/schemas/UpdateDeploymentGateParamsData'
+ required:
+ - data
+ type: object
+ UpdateDeploymentGateParamsData:
+ description: Parameters for updating a deployment gate.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/UpdateDeploymentGateParamsDataAttributes'
+ id:
+ description: Unique identifier of the deployment gate.
+ example: 12345678-1234-1234-1234-123456789012
+ type: string
+ type:
+ $ref: '#/components/schemas/DeploymentGateDataType'
+ required:
+ - type
+ - id
+ - attributes
+ type: object
+ UpdateDeploymentGateParamsDataAttributes:
+ description: Attributes for updating a deployment gate.
+ properties:
+ dry_run:
+ description: Whether to run in dry-run mode.
+ example: false
+ type: boolean
+ required:
+ - dry_run
+ type: object
+ UpdateDeploymentRuleParams:
+ description: Parameters for updating a deployment rule.
+ properties:
+ data:
+ $ref: '#/components/schemas/UpdateDeploymentRuleParamsData'
+ required:
+ - data
+ type: object
+ UpdateDeploymentRuleParamsData:
+ description: Parameters for updating a deployment rule.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/UpdateDeploymentRuleParamsDataAttributes'
+ type:
+ $ref: '#/components/schemas/DeploymentRuleDataType'
+ required:
+ - type
+ - attributes
+ type: object
+ UpdateDeploymentRuleParamsDataAttributes:
+ description: Parameters for updating a deployment rule.
+ properties:
+ dry_run:
+ description: Whether to run this rule in dry-run mode.
+ example: false
+ type: boolean
+ name:
+ description: The name of the deployment rule.
+ example: Updated deployment rule
+ type: string
+ options:
+ $ref: '#/components/schemas/DeploymentRulesOptions'
+ required:
+ - dry_run
+ - name
+ - options
+ type: object
UpdateOpenAPIResponse:
description: Response for `UpdateOpenAPI`.
properties:
@@ -61541,6 +62007,403 @@ paths:
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
contact [Datadog support](https://docs.datadoghq.com/help/).'
+ /api/v2/deployment_gates:
+ post:
+ description: Endpoint to create a deployment gate.
+ operationId: CreateDeploymentGate
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateDeploymentGateParams'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeploymentGateResponse'
+ 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: Create deployment gate
+ tags:
+ - Deployment Gates
+ x-permission:
+ operator: OR
+ permissions:
+ - deployment_gates_write
+ 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/).'
+ /api/v2/deployment_gates/{gate_id}/rules:
+ post:
+ description: Endpoint to create a deployment rule. A gate for the rule must
+ already exist.
+ operationId: CreateDeploymentRule
+ parameters:
+ - description: The ID of the deployment gate.
+ in: path
+ name: gate_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateDeploymentRuleParams'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeploymentRuleResponse'
+ 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: Create deployment rule
+ tags:
+ - Deployment Gates
+ x-permission:
+ operator: OR
+ permissions:
+ - deployment_gates_write
+ 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/).'
+ /api/v2/deployment_gates/{gate_id}/rules/{id}:
+ delete:
+ description: Endpoint to delete a deployment rule.
+ operationId: DeleteDeploymentRule
+ parameters:
+ - description: The ID of the deployment gate.
+ in: path
+ name: gate_id
+ required: true
+ schema:
+ type: string
+ - description: The ID of the deployment rule.
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: No Content
+ '400':
+ $ref: '#/components/responses/HTTPCDGatesBadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/HTTPCDGatesNotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ '500':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPCIAppErrors'
+ description: Internal Server Error
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Delete deployment rule
+ tags:
+ - Deployment Gates
+ x-permission:
+ operator: OR
+ permissions:
+ - deployment_gates_write
+ 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/).'
+ get:
+ description: Endpoint to get a deployment rule.
+ operationId: GetDeploymentRule
+ parameters:
+ - description: The ID of the deployment gate.
+ in: path
+ name: gate_id
+ required: true
+ schema:
+ type: string
+ - description: The ID of the deployment rule.
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeploymentRuleResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/HTTPCDGatesBadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/HTTPCDRulesNotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ '500':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPCIAppErrors'
+ description: Internal Server Error
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Get deployment rule
+ 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/).'
+ put:
+ description: Endpoint to update a deployment rule.
+ operationId: UpdateDeploymentRule
+ parameters:
+ - description: The ID of the deployment gate.
+ in: path
+ name: gate_id
+ required: true
+ schema:
+ type: string
+ - description: The ID of the deployment rule.
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateDeploymentRuleParams'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeploymentRuleResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/HTTPCDGatesBadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/HTTPCDRulesNotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ '500':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPCIAppErrors'
+ description: Internal Server Error
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Update deployment rule
+ tags:
+ - Deployment Gates
+ x-permission:
+ operator: OR
+ permissions:
+ - deployment_gates_write
+ 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/).'
+ /api/v2/deployment_gates/{id}:
+ delete:
+ description: Endpoint to delete a deployment gate. Rules associated with the
+ gate are also deleted.
+ operationId: DeleteDeploymentGate
+ parameters:
+ - description: The ID of the deployment gate.
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: No Content
+ '400':
+ $ref: '#/components/responses/HTTPCDGatesBadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/HTTPCDGatesNotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ '500':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPCIAppErrors'
+ description: Internal Server Error
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Delete deployment gate
+ tags:
+ - Deployment Gates
+ x-permission:
+ operator: OR
+ permissions:
+ - deployment_gates_write
+ 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/).'
+ get:
+ description: Endpoint to get a deployment gate.
+ operationId: GetDeploymentGate
+ parameters:
+ - description: The ID of the deployment gate.
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeploymentGateResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/HTTPCDGatesBadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/HTTPCDGatesNotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ '500':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPCIAppErrors'
+ description: Internal Server Error
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Get 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/).'
+ put:
+ description: Endpoint to update a deployment gate.
+ operationId: UpdateDeploymentGate
+ parameters:
+ - description: The ID of the deployment gate.
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateDeploymentGateParams'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeploymentGateResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/HTTPCDGatesBadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/HTTPCDGatesNotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ '500':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPCIAppErrors'
+ description: Internal Server Error
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Update deployment gate
+ tags:
+ - Deployment Gates
+ x-permission:
+ operator: OR
+ permissions:
+ - deployment_gates_write
+ 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/).'
/api/v2/domain_allowlist:
get:
description: Get the domain allowlist for an organization.
@@ -79554,8 +80417,7 @@ paths:
operator: OR
permissions:
- test_optimization_read
- x-unstable: '**Note**: This endpoint is in public beta and may be subject to
- change.
+ 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/).'
/api/v2/usage/application_security:
@@ -81289,6 +82151,10 @@ tags:
view certain types of telemetry (for example, logs, traces, metrics, and RUM data).'
name: Datasets
+- description: Manage Deployment Gates using this API to reduce the likelihood and
+ impact of incidents caused by deployments. See the [Deployment Gates documentation](https://docs.datadoghq.com/deployment_gates/)
+ for more information.
+ name: Deployment Gates
- description: 'Configure your Datadog Email Domain Allowlist directly through the
Datadog API.
diff --git a/examples/v2/deployment-gates/CreateDeploymentGate.java b/examples/v2/deployment-gates/CreateDeploymentGate.java
new file mode 100644
index 00000000000..ce578e117da
--- /dev/null
+++ b/examples/v2/deployment-gates/CreateDeploymentGate.java
@@ -0,0 +1,41 @@
+// Create deployment gate returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DeploymentGatesApi;
+import com.datadog.api.client.v2.model.CreateDeploymentGateParams;
+import com.datadog.api.client.v2.model.CreateDeploymentGateParamsData;
+import com.datadog.api.client.v2.model.CreateDeploymentGateParamsDataAttributes;
+import com.datadog.api.client.v2.model.DeploymentGateDataType;
+import com.datadog.api.client.v2.model.DeploymentGateResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.createDeploymentGate", true);
+ DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
+
+ CreateDeploymentGateParams body =
+ new CreateDeploymentGateParams()
+ .data(
+ new CreateDeploymentGateParamsData()
+ .attributes(
+ new CreateDeploymentGateParamsDataAttributes()
+ .dryRun(false)
+ .env("production")
+ .identifier("my-gate-1")
+ .service("my-service"))
+ .type(DeploymentGateDataType.DEPLOYMENT_GATE));
+
+ try {
+ DeploymentGateResponse result = apiInstance.createDeploymentGate(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DeploymentGatesApi#createDeploymentGate");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/deployment-gates/CreateDeploymentRule.java b/examples/v2/deployment-gates/CreateDeploymentRule.java
new file mode 100644
index 00000000000..c4ebc6736cb
--- /dev/null
+++ b/examples/v2/deployment-gates/CreateDeploymentRule.java
@@ -0,0 +1,49 @@
+// Create deployment rule returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DeploymentGatesApi;
+import com.datadog.api.client.v2.model.CreateDeploymentRuleParams;
+import com.datadog.api.client.v2.model.CreateDeploymentRuleParamsData;
+import com.datadog.api.client.v2.model.CreateDeploymentRuleParamsDataAttributes;
+import com.datadog.api.client.v2.model.DeploymentRuleDataType;
+import com.datadog.api.client.v2.model.DeploymentRuleOptionsFaultyDeploymentDetection;
+import com.datadog.api.client.v2.model.DeploymentRuleResponse;
+import com.datadog.api.client.v2.model.DeploymentRulesOptions;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.createDeploymentRule", true);
+ DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
+
+ // there is a valid "deployment_gate" in the system
+ String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
+
+ CreateDeploymentRuleParams body =
+ new CreateDeploymentRuleParams()
+ .data(
+ new CreateDeploymentRuleParamsData()
+ .attributes(
+ new CreateDeploymentRuleParamsDataAttributes()
+ .dryRun(false)
+ .name("My deployment rule")
+ .options(
+ new DeploymentRulesOptions(
+ new DeploymentRuleOptionsFaultyDeploymentDetection()))
+ .type("faulty_deployment_detection"))
+ .type(DeploymentRuleDataType.DEPLOYMENT_RULE));
+
+ try {
+ DeploymentRuleResponse result =
+ apiInstance.createDeploymentRule(DEPLOYMENT_GATE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DeploymentGatesApi#createDeploymentRule");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/deployment-gates/DeleteDeploymentGate.java b/examples/v2/deployment-gates/DeleteDeploymentGate.java
new file mode 100644
index 00000000000..25115a21138
--- /dev/null
+++ b/examples/v2/deployment-gates/DeleteDeploymentGate.java
@@ -0,0 +1,26 @@
+// Delete deployment gate returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DeploymentGatesApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.deleteDeploymentGate", true);
+ DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
+
+ // there is a valid "deployment_gate" in the system
+ String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
+
+ try {
+ apiInstance.deleteDeploymentGate(DEPLOYMENT_GATE_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DeploymentGatesApi#deleteDeploymentGate");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/deployment-gates/DeleteDeploymentRule.java b/examples/v2/deployment-gates/DeleteDeploymentRule.java
new file mode 100644
index 00000000000..a20d43c9454
--- /dev/null
+++ b/examples/v2/deployment-gates/DeleteDeploymentRule.java
@@ -0,0 +1,29 @@
+// Delete deployment rule returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DeploymentGatesApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.deleteDeploymentRule", true);
+ DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
+
+ // there is a valid "deployment_gate" in the system
+ String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
+
+ // there is a valid "deployment_rule" in the system
+ String DEPLOYMENT_RULE_DATA_ID = System.getenv("DEPLOYMENT_RULE_DATA_ID");
+
+ try {
+ apiInstance.deleteDeploymentRule(DEPLOYMENT_GATE_DATA_ID, DEPLOYMENT_RULE_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DeploymentGatesApi#deleteDeploymentRule");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/deployment-gates/GetDeploymentGate.java b/examples/v2/deployment-gates/GetDeploymentGate.java
new file mode 100644
index 00000000000..b16d04c32a5
--- /dev/null
+++ b/examples/v2/deployment-gates/GetDeploymentGate.java
@@ -0,0 +1,28 @@
+// Get deployment gate returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DeploymentGatesApi;
+import com.datadog.api.client.v2.model.DeploymentGateResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.getDeploymentGate", true);
+ DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
+
+ // there is a valid "deployment_gate" in the system
+ String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
+
+ try {
+ DeploymentGateResponse result = apiInstance.getDeploymentGate(DEPLOYMENT_GATE_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DeploymentGatesApi#getDeploymentGate");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/deployment-gates/GetDeploymentRule.java b/examples/v2/deployment-gates/GetDeploymentRule.java
new file mode 100644
index 00000000000..0d20305100c
--- /dev/null
+++ b/examples/v2/deployment-gates/GetDeploymentRule.java
@@ -0,0 +1,32 @@
+// Get deployment rule returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DeploymentGatesApi;
+import com.datadog.api.client.v2.model.DeploymentRuleResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.getDeploymentRule", true);
+ DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
+
+ // there is a valid "deployment_gate" in the system
+ String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
+
+ // there is a valid "deployment_rule" in the system
+ String DEPLOYMENT_RULE_DATA_ID = System.getenv("DEPLOYMENT_RULE_DATA_ID");
+
+ try {
+ DeploymentRuleResponse result =
+ apiInstance.getDeploymentRule(DEPLOYMENT_GATE_DATA_ID, DEPLOYMENT_RULE_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DeploymentGatesApi#getDeploymentRule");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/deployment-gates/UpdateDeploymentGate.java b/examples/v2/deployment-gates/UpdateDeploymentGate.java
new file mode 100644
index 00000000000..ffc6a5d0cbc
--- /dev/null
+++ b/examples/v2/deployment-gates/UpdateDeploymentGate.java
@@ -0,0 +1,41 @@
+// Update deployment gate returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DeploymentGatesApi;
+import com.datadog.api.client.v2.model.DeploymentGateDataType;
+import com.datadog.api.client.v2.model.DeploymentGateResponse;
+import com.datadog.api.client.v2.model.UpdateDeploymentGateParams;
+import com.datadog.api.client.v2.model.UpdateDeploymentGateParamsData;
+import com.datadog.api.client.v2.model.UpdateDeploymentGateParamsDataAttributes;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.updateDeploymentGate", true);
+ DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
+
+ // there is a valid "deployment_gate" in the system
+ String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
+
+ UpdateDeploymentGateParams body =
+ new UpdateDeploymentGateParams()
+ .data(
+ new UpdateDeploymentGateParamsData()
+ .attributes(new UpdateDeploymentGateParamsDataAttributes().dryRun(false))
+ .id("12345678-1234-1234-1234-123456789012")
+ .type(DeploymentGateDataType.DEPLOYMENT_GATE));
+
+ try {
+ DeploymentGateResponse result =
+ apiInstance.updateDeploymentGate(DEPLOYMENT_GATE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DeploymentGatesApi#updateDeploymentGate");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/deployment-gates/UpdateDeploymentRule.java b/examples/v2/deployment-gates/UpdateDeploymentRule.java
new file mode 100644
index 00000000000..11aba148a37
--- /dev/null
+++ b/examples/v2/deployment-gates/UpdateDeploymentRule.java
@@ -0,0 +1,51 @@
+// Update deployment rule returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.DeploymentGatesApi;
+import com.datadog.api.client.v2.model.DeploymentRuleDataType;
+import com.datadog.api.client.v2.model.DeploymentRuleOptionsFaultyDeploymentDetection;
+import com.datadog.api.client.v2.model.DeploymentRuleResponse;
+import com.datadog.api.client.v2.model.DeploymentRulesOptions;
+import com.datadog.api.client.v2.model.UpdateDeploymentRuleParams;
+import com.datadog.api.client.v2.model.UpdateDeploymentRuleParamsData;
+import com.datadog.api.client.v2.model.UpdateDeploymentRuleParamsDataAttributes;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.updateDeploymentRule", true);
+ DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
+
+ // there is a valid "deployment_gate" in the system
+ String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
+
+ // there is a valid "deployment_rule" in the system
+ String DEPLOYMENT_RULE_DATA_ID = System.getenv("DEPLOYMENT_RULE_DATA_ID");
+
+ UpdateDeploymentRuleParams body =
+ new UpdateDeploymentRuleParams()
+ .data(
+ new UpdateDeploymentRuleParamsData()
+ .attributes(
+ new UpdateDeploymentRuleParamsDataAttributes()
+ .dryRun(false)
+ .name("Updated deployment rule")
+ .options(
+ new DeploymentRulesOptions(
+ new DeploymentRuleOptionsFaultyDeploymentDetection())))
+ .type(DeploymentRuleDataType.DEPLOYMENT_RULE));
+
+ try {
+ DeploymentRuleResponse result =
+ apiInstance.updateDeploymentRule(DEPLOYMENT_GATE_DATA_ID, DEPLOYMENT_RULE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DeploymentGatesApi#updateDeploymentRule");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java
index 790a403d960..d564828bf22 100644
--- a/src/main/java/com/datadog/api/client/ApiClient.java
+++ b/src/main/java/com/datadog/api/client/ApiClient.java
@@ -725,6 +725,14 @@ public class ApiClient {
put("v2.cancelDataDeletionRequest", false);
put("v2.createDataDeletionRequest", false);
put("v2.getDataDeletionRequests", false);
+ put("v2.createDeploymentGate", false);
+ put("v2.createDeploymentRule", false);
+ put("v2.deleteDeploymentGate", false);
+ put("v2.deleteDeploymentRule", false);
+ put("v2.getDeploymentGate", false);
+ put("v2.getDeploymentRule", false);
+ put("v2.updateDeploymentGate", false);
+ put("v2.updateDeploymentRule", false);
put("v2.createIncident", false);
put("v2.createIncidentImpact", false);
put("v2.createIncidentIntegration", false);
diff --git a/src/main/java/com/datadog/api/client/v2/api/DeploymentGatesApi.java b/src/main/java/com/datadog/api/client/v2/api/DeploymentGatesApi.java
new file mode 100644
index 00000000000..7779295194d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/DeploymentGatesApi.java
@@ -0,0 +1,1410 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.CreateDeploymentGateParams;
+import com.datadog.api.client.v2.model.CreateDeploymentRuleParams;
+import com.datadog.api.client.v2.model.DeploymentGateResponse;
+import com.datadog.api.client.v2.model.DeploymentRuleResponse;
+import com.datadog.api.client.v2.model.UpdateDeploymentGateParams;
+import com.datadog.api.client.v2.model.UpdateDeploymentRuleParams;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentGatesApi {
+ private ApiClient apiClient;
+
+ public DeploymentGatesApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public DeploymentGatesApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Create deployment gate.
+ *
+ *
See {@link #createDeploymentGateWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return DeploymentGateResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DeploymentGateResponse createDeploymentGate(CreateDeploymentGateParams body)
+ throws ApiException {
+ return createDeploymentGateWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create deployment gate.
+ *
+ *
See {@link #createDeploymentGateWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<DeploymentGateResponse>
+ */
+ public CompletableFuture createDeploymentGateAsync(
+ CreateDeploymentGateParams body) {
+ return createDeploymentGateWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Endpoint to create a deployment gate.
+ *
+ * @param body (required)
+ * @return ApiResponse<DeploymentGateResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad request. | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse createDeploymentGateWithHttpInfo(
+ CreateDeploymentGateParams body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "createDeploymentGate";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createDeploymentGate");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/deployment_gates";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.createDeploymentGate",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create deployment gate.
+ *
+ * See {@link #createDeploymentGateWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<DeploymentGateResponse>>
+ */
+ public CompletableFuture>
+ createDeploymentGateWithHttpInfoAsync(CreateDeploymentGateParams body) {
+ // Check if unstable operation is enabled
+ String operationId = "createDeploymentGate";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createDeploymentGate"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/deployment_gates";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.createDeploymentGate",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create deployment rule.
+ *
+ * See {@link #createDeploymentRuleWithHttpInfo}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param body (required)
+ * @return DeploymentRuleResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DeploymentRuleResponse createDeploymentRule(String gateId, CreateDeploymentRuleParams body)
+ throws ApiException {
+ return createDeploymentRuleWithHttpInfo(gateId, body).getData();
+ }
+
+ /**
+ * Create deployment rule.
+ *
+ *
See {@link #createDeploymentRuleWithHttpInfoAsync}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param body (required)
+ * @return CompletableFuture<DeploymentRuleResponse>
+ */
+ public CompletableFuture createDeploymentRuleAsync(
+ String gateId, CreateDeploymentRuleParams body) {
+ return createDeploymentRuleWithHttpInfoAsync(gateId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Endpoint to create a deployment rule. A gate for the rule must already exist.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param body (required)
+ * @return ApiResponse<DeploymentRuleResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad request. | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse createDeploymentRuleWithHttpInfo(
+ String gateId, CreateDeploymentRuleParams body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "createDeploymentRule";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'gateId' is set
+ if (gateId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'gateId' when calling createDeploymentRule");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createDeploymentRule");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{gate_id}/rules"
+ .replaceAll("\\{" + "gate_id" + "\\}", apiClient.escapeString(gateId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.createDeploymentRule",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create deployment rule.
+ *
+ * See {@link #createDeploymentRuleWithHttpInfo}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<DeploymentRuleResponse>>
+ */
+ public CompletableFuture>
+ createDeploymentRuleWithHttpInfoAsync(String gateId, CreateDeploymentRuleParams body) {
+ // Check if unstable operation is enabled
+ String operationId = "createDeploymentRule";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'gateId' is set
+ if (gateId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'gateId' when calling createDeploymentRule"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createDeploymentRule"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{gate_id}/rules"
+ .replaceAll("\\{" + "gate_id" + "\\}", apiClient.escapeString(gateId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.createDeploymentRule",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete deployment gate.
+ *
+ * See {@link #deleteDeploymentGateWithHttpInfo}.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteDeploymentGate(String id) throws ApiException {
+ deleteDeploymentGateWithHttpInfo(id);
+ }
+
+ /**
+ * Delete deployment gate.
+ *
+ *
See {@link #deleteDeploymentGateWithHttpInfoAsync}.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteDeploymentGateAsync(String id) {
+ return deleteDeploymentGateWithHttpInfoAsync(id)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Endpoint to delete a deployment gate. Rules associated with the gate are also deleted.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 400 | Bad request. | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Deployment gate not found. | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse deleteDeploymentGateWithHttpInfo(String id) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "deleteDeploymentGate";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'id' when calling deleteDeploymentGate");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.deleteDeploymentGate",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete deployment gate.
+ *
+ * See {@link #deleteDeploymentGateWithHttpInfo}.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteDeploymentGateWithHttpInfoAsync(String id) {
+ // Check if unstable operation is enabled
+ String operationId = "deleteDeploymentGate";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'id' when calling deleteDeploymentGate"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.deleteDeploymentGate",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete deployment rule.
+ *
+ * See {@link #deleteDeploymentRuleWithHttpInfo}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteDeploymentRule(String gateId, String id) throws ApiException {
+ deleteDeploymentRuleWithHttpInfo(gateId, id);
+ }
+
+ /**
+ * Delete deployment rule.
+ *
+ *
See {@link #deleteDeploymentRuleWithHttpInfoAsync}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteDeploymentRuleAsync(String gateId, String id) {
+ return deleteDeploymentRuleWithHttpInfoAsync(gateId, id)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Endpoint to delete a deployment rule.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 400 | Bad request. | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Deployment gate not found. | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse deleteDeploymentRuleWithHttpInfo(String gateId, String id)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "deleteDeploymentRule";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'gateId' is set
+ if (gateId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'gateId' when calling deleteDeploymentRule");
+ }
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'id' when calling deleteDeploymentRule");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{gate_id}/rules/{id}"
+ .replaceAll("\\{" + "gate_id" + "\\}", apiClient.escapeString(gateId.toString()))
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.deleteDeploymentRule",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete deployment rule.
+ *
+ * See {@link #deleteDeploymentRuleWithHttpInfo}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteDeploymentRuleWithHttpInfoAsync(
+ String gateId, String id) {
+ // Check if unstable operation is enabled
+ String operationId = "deleteDeploymentRule";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'gateId' is set
+ if (gateId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'gateId' when calling deleteDeploymentRule"));
+ return result;
+ }
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'id' when calling deleteDeploymentRule"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{gate_id}/rules/{id}"
+ .replaceAll("\\{" + "gate_id" + "\\}", apiClient.escapeString(gateId.toString()))
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.deleteDeploymentRule",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Get deployment gate.
+ *
+ * See {@link #getDeploymentGateWithHttpInfo}.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @return DeploymentGateResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DeploymentGateResponse getDeploymentGate(String id) throws ApiException {
+ return getDeploymentGateWithHttpInfo(id).getData();
+ }
+
+ /**
+ * Get deployment gate.
+ *
+ *
See {@link #getDeploymentGateWithHttpInfoAsync}.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @return CompletableFuture<DeploymentGateResponse>
+ */
+ public CompletableFuture getDeploymentGateAsync(String id) {
+ return getDeploymentGateWithHttpInfoAsync(id)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Endpoint to get a deployment gate.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @return ApiResponse<DeploymentGateResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad request. | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Deployment gate not found. | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse getDeploymentGateWithHttpInfo(String id)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "getDeploymentGate";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'id' when calling getDeploymentGate");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.getDeploymentGate",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get deployment gate.
+ *
+ * See {@link #getDeploymentGateWithHttpInfo}.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @return CompletableFuture<ApiResponse<DeploymentGateResponse>>
+ */
+ public CompletableFuture> getDeploymentGateWithHttpInfoAsync(
+ String id) {
+ // Check if unstable operation is enabled
+ String operationId = "getDeploymentGate";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'id' when calling getDeploymentGate"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.getDeploymentGate",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get deployment rule.
+ *
+ * See {@link #getDeploymentRuleWithHttpInfo}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @return DeploymentRuleResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DeploymentRuleResponse getDeploymentRule(String gateId, String id) throws ApiException {
+ return getDeploymentRuleWithHttpInfo(gateId, id).getData();
+ }
+
+ /**
+ * Get deployment rule.
+ *
+ *
See {@link #getDeploymentRuleWithHttpInfoAsync}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @return CompletableFuture<DeploymentRuleResponse>
+ */
+ public CompletableFuture getDeploymentRuleAsync(
+ String gateId, String id) {
+ return getDeploymentRuleWithHttpInfoAsync(gateId, id)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Endpoint to get a deployment rule.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @return ApiResponse<DeploymentRuleResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad request. | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Deployment rule not found. | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse getDeploymentRuleWithHttpInfo(String gateId, String id)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "getDeploymentRule";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'gateId' is set
+ if (gateId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'gateId' when calling getDeploymentRule");
+ }
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'id' when calling getDeploymentRule");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{gate_id}/rules/{id}"
+ .replaceAll("\\{" + "gate_id" + "\\}", apiClient.escapeString(gateId.toString()))
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.getDeploymentRule",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get deployment rule.
+ *
+ * See {@link #getDeploymentRuleWithHttpInfo}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @return CompletableFuture<ApiResponse<DeploymentRuleResponse>>
+ */
+ public CompletableFuture> getDeploymentRuleWithHttpInfoAsync(
+ String gateId, String id) {
+ // Check if unstable operation is enabled
+ String operationId = "getDeploymentRule";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'gateId' is set
+ if (gateId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'gateId' when calling getDeploymentRule"));
+ return result;
+ }
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'id' when calling getDeploymentRule"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{gate_id}/rules/{id}"
+ .replaceAll("\\{" + "gate_id" + "\\}", apiClient.escapeString(gateId.toString()))
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.getDeploymentRule",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update deployment gate.
+ *
+ * See {@link #updateDeploymentGateWithHttpInfo}.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @param body (required)
+ * @return DeploymentGateResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DeploymentGateResponse updateDeploymentGate(String id, UpdateDeploymentGateParams body)
+ throws ApiException {
+ return updateDeploymentGateWithHttpInfo(id, body).getData();
+ }
+
+ /**
+ * Update deployment gate.
+ *
+ *
See {@link #updateDeploymentGateWithHttpInfoAsync}.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @param body (required)
+ * @return CompletableFuture<DeploymentGateResponse>
+ */
+ public CompletableFuture updateDeploymentGateAsync(
+ String id, UpdateDeploymentGateParams body) {
+ return updateDeploymentGateWithHttpInfoAsync(id, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Endpoint to update a deployment gate.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @param body (required)
+ * @return ApiResponse<DeploymentGateResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad request. | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Deployment gate not found. | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse updateDeploymentGateWithHttpInfo(
+ String id, UpdateDeploymentGateParams body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "updateDeploymentGate";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'id' when calling updateDeploymentGate");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateDeploymentGate");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.updateDeploymentGate",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "PUT",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update deployment gate.
+ *
+ * See {@link #updateDeploymentGateWithHttpInfo}.
+ *
+ * @param id The ID of the deployment gate. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<DeploymentGateResponse>>
+ */
+ public CompletableFuture>
+ updateDeploymentGateWithHttpInfoAsync(String id, UpdateDeploymentGateParams body) {
+ // Check if unstable operation is enabled
+ String operationId = "updateDeploymentGate";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'id' when calling updateDeploymentGate"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateDeploymentGate"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{id}"
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.updateDeploymentGate",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PUT",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update deployment rule.
+ *
+ * See {@link #updateDeploymentRuleWithHttpInfo}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @param body (required)
+ * @return DeploymentRuleResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DeploymentRuleResponse updateDeploymentRule(
+ String gateId, String id, UpdateDeploymentRuleParams body) throws ApiException {
+ return updateDeploymentRuleWithHttpInfo(gateId, id, body).getData();
+ }
+
+ /**
+ * Update deployment rule.
+ *
+ *
See {@link #updateDeploymentRuleWithHttpInfoAsync}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @param body (required)
+ * @return CompletableFuture<DeploymentRuleResponse>
+ */
+ public CompletableFuture updateDeploymentRuleAsync(
+ String gateId, String id, UpdateDeploymentRuleParams body) {
+ return updateDeploymentRuleWithHttpInfoAsync(gateId, id, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Endpoint to update a deployment rule.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @param body (required)
+ * @return ApiResponse<DeploymentRuleResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad request. | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Deployment rule not found. | - |
+ * | 429 | Too many requests | - |
+ * | 500 | Internal Server Error | - |
+ *
+ */
+ public ApiResponse updateDeploymentRuleWithHttpInfo(
+ String gateId, String id, UpdateDeploymentRuleParams body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "updateDeploymentRule";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'gateId' is set
+ if (gateId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'gateId' when calling updateDeploymentRule");
+ }
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'id' when calling updateDeploymentRule");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateDeploymentRule");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{gate_id}/rules/{id}"
+ .replaceAll("\\{" + "gate_id" + "\\}", apiClient.escapeString(gateId.toString()))
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.updateDeploymentRule",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "PUT",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update deployment rule.
+ *
+ * See {@link #updateDeploymentRuleWithHttpInfo}.
+ *
+ * @param gateId The ID of the deployment gate. (required)
+ * @param id The ID of the deployment rule. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<DeploymentRuleResponse>>
+ */
+ public CompletableFuture>
+ updateDeploymentRuleWithHttpInfoAsync(
+ String gateId, String id, UpdateDeploymentRuleParams body) {
+ // Check if unstable operation is enabled
+ String operationId = "updateDeploymentRule";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'gateId' is set
+ if (gateId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'gateId' when calling updateDeploymentRule"));
+ return result;
+ }
+
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'id' when calling updateDeploymentRule"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateDeploymentRule"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/deployment_gates/{gate_id}/rules/{id}"
+ .replaceAll("\\{" + "gate_id" + "\\}", apiClient.escapeString(gateId.toString()))
+ .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.DeploymentGatesApi.updateDeploymentRule",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PUT",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentGateParams.java b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentGateParams.java
new file mode 100644
index 00000000000..44eaced27b3
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentGateParams.java
@@ -0,0 +1,147 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Parameters for creating a deployment gate. */
+@JsonPropertyOrder({CreateDeploymentGateParams.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateDeploymentGateParams {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private CreateDeploymentGateParamsData data;
+
+ public CreateDeploymentGateParams() {}
+
+ @JsonCreator
+ public CreateDeploymentGateParams(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ CreateDeploymentGateParamsData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public CreateDeploymentGateParams data(CreateDeploymentGateParamsData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Parameters for creating a deployment gate.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CreateDeploymentGateParamsData getData() {
+ return data;
+ }
+
+ public void setData(CreateDeploymentGateParamsData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CreateDeploymentGateParams
+ */
+ @JsonAnySetter
+ public CreateDeploymentGateParams putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CreateDeploymentGateParams object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateDeploymentGateParams createDeploymentGateParams = (CreateDeploymentGateParams) o;
+ return Objects.equals(this.data, createDeploymentGateParams.data)
+ && Objects.equals(
+ this.additionalProperties, createDeploymentGateParams.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateDeploymentGateParams {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentGateParamsData.java b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentGateParamsData.java
new file mode 100644
index 00000000000..7b96d22837a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentGateParamsData.java
@@ -0,0 +1,184 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Parameters for creating a deployment gate. */
+@JsonPropertyOrder({
+ CreateDeploymentGateParamsData.JSON_PROPERTY_ATTRIBUTES,
+ CreateDeploymentGateParamsData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateDeploymentGateParamsData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private CreateDeploymentGateParamsDataAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private DeploymentGateDataType type;
+
+ public CreateDeploymentGateParamsData() {}
+
+ @JsonCreator
+ public CreateDeploymentGateParamsData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ CreateDeploymentGateParamsDataAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DeploymentGateDataType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public CreateDeploymentGateParamsData attributes(
+ CreateDeploymentGateParamsDataAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Parameters for creating a deployment gate.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CreateDeploymentGateParamsDataAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(CreateDeploymentGateParamsDataAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public CreateDeploymentGateParamsData type(DeploymentGateDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Deployment gate resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentGateDataType getType() {
+ return type;
+ }
+
+ public void setType(DeploymentGateDataType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CreateDeploymentGateParamsData
+ */
+ @JsonAnySetter
+ public CreateDeploymentGateParamsData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CreateDeploymentGateParamsData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateDeploymentGateParamsData createDeploymentGateParamsData =
+ (CreateDeploymentGateParamsData) o;
+ return Objects.equals(this.attributes, createDeploymentGateParamsData.attributes)
+ && Objects.equals(this.type, createDeploymentGateParamsData.type)
+ && Objects.equals(
+ this.additionalProperties, createDeploymentGateParamsData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateDeploymentGateParamsData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentGateParamsDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentGateParamsDataAttributes.java
new file mode 100644
index 00000000000..dc8ea772033
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentGateParamsDataAttributes.java
@@ -0,0 +1,230 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Parameters for creating a deployment gate. */
+@JsonPropertyOrder({
+ CreateDeploymentGateParamsDataAttributes.JSON_PROPERTY_DRY_RUN,
+ CreateDeploymentGateParamsDataAttributes.JSON_PROPERTY_ENV,
+ CreateDeploymentGateParamsDataAttributes.JSON_PROPERTY_IDENTIFIER,
+ CreateDeploymentGateParamsDataAttributes.JSON_PROPERTY_SERVICE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateDeploymentGateParamsDataAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DRY_RUN = "dry_run";
+ private Boolean dryRun = false;
+
+ public static final String JSON_PROPERTY_ENV = "env";
+ private String env;
+
+ public static final String JSON_PROPERTY_IDENTIFIER = "identifier";
+ private String identifier = "default";
+
+ public static final String JSON_PROPERTY_SERVICE = "service";
+ private String service;
+
+ public CreateDeploymentGateParamsDataAttributes() {}
+
+ @JsonCreator
+ public CreateDeploymentGateParamsDataAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ENV) String env,
+ @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service) {
+ this.env = env;
+ this.service = service;
+ }
+
+ public CreateDeploymentGateParamsDataAttributes dryRun(Boolean dryRun) {
+ this.dryRun = dryRun;
+ return this;
+ }
+
+ /**
+ * Whether this gate is run in dry-run mode.
+ *
+ * @return dryRun
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DRY_RUN)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getDryRun() {
+ return dryRun;
+ }
+
+ public void setDryRun(Boolean dryRun) {
+ this.dryRun = dryRun;
+ }
+
+ public CreateDeploymentGateParamsDataAttributes env(String env) {
+ this.env = env;
+ return this;
+ }
+
+ /**
+ * The environment of the deployment gate.
+ *
+ * @return env
+ */
+ @JsonProperty(JSON_PROPERTY_ENV)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getEnv() {
+ return env;
+ }
+
+ public void setEnv(String env) {
+ this.env = env;
+ }
+
+ public CreateDeploymentGateParamsDataAttributes identifier(String identifier) {
+ this.identifier = identifier;
+ return this;
+ }
+
+ /**
+ * The identifier of the deployment gate.
+ *
+ * @return identifier
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_IDENTIFIER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier) {
+ this.identifier = identifier;
+ }
+
+ public CreateDeploymentGateParamsDataAttributes service(String service) {
+ this.service = service;
+ return this;
+ }
+
+ /**
+ * The service of the deployment gate.
+ *
+ * @return service
+ */
+ @JsonProperty(JSON_PROPERTY_SERVICE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getService() {
+ return service;
+ }
+
+ public void setService(String service) {
+ this.service = service;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CreateDeploymentGateParamsDataAttributes
+ */
+ @JsonAnySetter
+ public CreateDeploymentGateParamsDataAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CreateDeploymentGateParamsDataAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateDeploymentGateParamsDataAttributes createDeploymentGateParamsDataAttributes =
+ (CreateDeploymentGateParamsDataAttributes) o;
+ return Objects.equals(this.dryRun, createDeploymentGateParamsDataAttributes.dryRun)
+ && Objects.equals(this.env, createDeploymentGateParamsDataAttributes.env)
+ && Objects.equals(this.identifier, createDeploymentGateParamsDataAttributes.identifier)
+ && Objects.equals(this.service, createDeploymentGateParamsDataAttributes.service)
+ && Objects.equals(
+ this.additionalProperties,
+ createDeploymentGateParamsDataAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(dryRun, env, identifier, service, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateDeploymentGateParamsDataAttributes {\n");
+ sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n");
+ sb.append(" env: ").append(toIndentedString(env)).append("\n");
+ sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
+ sb.append(" service: ").append(toIndentedString(service)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentRuleParams.java b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentRuleParams.java
new file mode 100644
index 00000000000..05c5bfa34bc
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentRuleParams.java
@@ -0,0 +1,137 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Parameters for creating a deployment rule. */
+@JsonPropertyOrder({CreateDeploymentRuleParams.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateDeploymentRuleParams {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private CreateDeploymentRuleParamsData data;
+
+ public CreateDeploymentRuleParams data(CreateDeploymentRuleParamsData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Parameters for creating a deployment rule.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CreateDeploymentRuleParamsData getData() {
+ return data;
+ }
+
+ public void setData(CreateDeploymentRuleParamsData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CreateDeploymentRuleParams
+ */
+ @JsonAnySetter
+ public CreateDeploymentRuleParams putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CreateDeploymentRuleParams object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateDeploymentRuleParams createDeploymentRuleParams = (CreateDeploymentRuleParams) o;
+ return Objects.equals(this.data, createDeploymentRuleParams.data)
+ && Objects.equals(
+ this.additionalProperties, createDeploymentRuleParams.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateDeploymentRuleParams {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentRuleParamsData.java b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentRuleParamsData.java
new file mode 100644
index 00000000000..a8feb49873b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentRuleParamsData.java
@@ -0,0 +1,184 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Parameters for creating a deployment rule. */
+@JsonPropertyOrder({
+ CreateDeploymentRuleParamsData.JSON_PROPERTY_ATTRIBUTES,
+ CreateDeploymentRuleParamsData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateDeploymentRuleParamsData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private CreateDeploymentRuleParamsDataAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private DeploymentRuleDataType type;
+
+ public CreateDeploymentRuleParamsData() {}
+
+ @JsonCreator
+ public CreateDeploymentRuleParamsData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ CreateDeploymentRuleParamsDataAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DeploymentRuleDataType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public CreateDeploymentRuleParamsData attributes(
+ CreateDeploymentRuleParamsDataAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Parameters for creating a deployment rule.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CreateDeploymentRuleParamsDataAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(CreateDeploymentRuleParamsDataAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public CreateDeploymentRuleParamsData type(DeploymentRuleDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Deployment rule resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentRuleDataType getType() {
+ return type;
+ }
+
+ public void setType(DeploymentRuleDataType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CreateDeploymentRuleParamsData
+ */
+ @JsonAnySetter
+ public CreateDeploymentRuleParamsData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CreateDeploymentRuleParamsData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateDeploymentRuleParamsData createDeploymentRuleParamsData =
+ (CreateDeploymentRuleParamsData) o;
+ return Objects.equals(this.attributes, createDeploymentRuleParamsData.attributes)
+ && Objects.equals(this.type, createDeploymentRuleParamsData.type)
+ && Objects.equals(
+ this.additionalProperties, createDeploymentRuleParamsData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateDeploymentRuleParamsData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentRuleParamsDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentRuleParamsDataAttributes.java
new file mode 100644
index 00000000000..14bb4bc93e2
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateDeploymentRuleParamsDataAttributes.java
@@ -0,0 +1,234 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Parameters for creating a deployment rule. */
+@JsonPropertyOrder({
+ CreateDeploymentRuleParamsDataAttributes.JSON_PROPERTY_DRY_RUN,
+ CreateDeploymentRuleParamsDataAttributes.JSON_PROPERTY_NAME,
+ CreateDeploymentRuleParamsDataAttributes.JSON_PROPERTY_OPTIONS,
+ CreateDeploymentRuleParamsDataAttributes.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateDeploymentRuleParamsDataAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DRY_RUN = "dry_run";
+ private Boolean dryRun = false;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public static final String JSON_PROPERTY_OPTIONS = "options";
+ private DeploymentRulesOptions options;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private String type;
+
+ public CreateDeploymentRuleParamsDataAttributes() {}
+
+ @JsonCreator
+ public CreateDeploymentRuleParamsDataAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name,
+ @JsonProperty(required = true, value = JSON_PROPERTY_OPTIONS) DeploymentRulesOptions options,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) {
+ this.name = name;
+ this.options = options;
+ this.unparsed |= options.unparsed;
+ this.type = type;
+ }
+
+ public CreateDeploymentRuleParamsDataAttributes dryRun(Boolean dryRun) {
+ this.dryRun = dryRun;
+ return this;
+ }
+
+ /**
+ * Whether this rule is run in dry-run mode.
+ *
+ * @return dryRun
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DRY_RUN)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getDryRun() {
+ return dryRun;
+ }
+
+ public void setDryRun(Boolean dryRun) {
+ this.dryRun = dryRun;
+ }
+
+ public CreateDeploymentRuleParamsDataAttributes name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the deployment rule.
+ *
+ * @return name
+ */
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public CreateDeploymentRuleParamsDataAttributes options(DeploymentRulesOptions options) {
+ this.options = options;
+ this.unparsed |= options.unparsed;
+ return this;
+ }
+
+ /**
+ * Options for deployment rule response representing either faulty deployment detection or monitor
+ * options.
+ *
+ * @return options
+ */
+ @JsonProperty(JSON_PROPERTY_OPTIONS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentRulesOptions getOptions() {
+ return options;
+ }
+
+ public void setOptions(DeploymentRulesOptions options) {
+ this.options = options;
+ }
+
+ public CreateDeploymentRuleParamsDataAttributes type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * The type of the deployment rule (faulty_deployment_detection or monitor).
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return CreateDeploymentRuleParamsDataAttributes
+ */
+ @JsonAnySetter
+ public CreateDeploymentRuleParamsDataAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this CreateDeploymentRuleParamsDataAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateDeploymentRuleParamsDataAttributes createDeploymentRuleParamsDataAttributes =
+ (CreateDeploymentRuleParamsDataAttributes) o;
+ return Objects.equals(this.dryRun, createDeploymentRuleParamsDataAttributes.dryRun)
+ && Objects.equals(this.name, createDeploymentRuleParamsDataAttributes.name)
+ && Objects.equals(this.options, createDeploymentRuleParamsDataAttributes.options)
+ && Objects.equals(this.type, createDeploymentRuleParamsDataAttributes.type)
+ && Objects.equals(
+ this.additionalProperties,
+ createDeploymentRuleParamsDataAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(dryRun, name, options, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateDeploymentRuleParamsDataAttributes {\n");
+ sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" options: ").append(toIndentedString(options)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentGateDataType.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateDataType.java
new file mode 100644
index 00000000000..b1b37193efc
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateDataType.java
@@ -0,0 +1,57 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** Deployment gate resource type. */
+@JsonSerialize(using = DeploymentGateDataType.DeploymentGateDataTypeSerializer.class)
+public class DeploymentGateDataType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("deployment_gate"));
+
+ public static final DeploymentGateDataType DEPLOYMENT_GATE =
+ new DeploymentGateDataType("deployment_gate");
+
+ DeploymentGateDataType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class DeploymentGateDataTypeSerializer
+ extends StdSerializer {
+ public DeploymentGateDataTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public DeploymentGateDataTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ DeploymentGateDataType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static DeploymentGateDataType fromValue(String value) {
+ return new DeploymentGateDataType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponse.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponse.java
new file mode 100644
index 00000000000..acddc3c585e
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponse.java
@@ -0,0 +1,136 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Response for a deployment gate. */
+@JsonPropertyOrder({DeploymentGateResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentGateResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private DeploymentGateResponseData data;
+
+ public DeploymentGateResponse data(DeploymentGateResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data for a deployment gate.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public DeploymentGateResponseData getData() {
+ return data;
+ }
+
+ public void setData(DeploymentGateResponseData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return DeploymentGateResponse
+ */
+ @JsonAnySetter
+ public DeploymentGateResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this DeploymentGateResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentGateResponse deploymentGateResponse = (DeploymentGateResponse) o;
+ return Objects.equals(this.data, deploymentGateResponse.data)
+ && Objects.equals(this.additionalProperties, deploymentGateResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentGateResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseData.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseData.java
new file mode 100644
index 00000000000..022be01ccfa
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseData.java
@@ -0,0 +1,210 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Data for a deployment gate. */
+@JsonPropertyOrder({
+ DeploymentGateResponseData.JSON_PROPERTY_ATTRIBUTES,
+ DeploymentGateResponseData.JSON_PROPERTY_ID,
+ DeploymentGateResponseData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentGateResponseData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private DeploymentGateResponseDataAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private DeploymentGateDataType type;
+
+ public DeploymentGateResponseData() {}
+
+ @JsonCreator
+ public DeploymentGateResponseData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ DeploymentGateResponseDataAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DeploymentGateDataType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public DeploymentGateResponseData attributes(DeploymentGateResponseDataAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Basic information about a deployment gate.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentGateResponseDataAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(DeploymentGateResponseDataAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public DeploymentGateResponseData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Unique identifier of the deployment gate.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public DeploymentGateResponseData type(DeploymentGateDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Deployment gate resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentGateDataType getType() {
+ return type;
+ }
+
+ public void setType(DeploymentGateDataType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return DeploymentGateResponseData
+ */
+ @JsonAnySetter
+ public DeploymentGateResponseData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this DeploymentGateResponseData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentGateResponseData deploymentGateResponseData = (DeploymentGateResponseData) o;
+ return Objects.equals(this.attributes, deploymentGateResponseData.attributes)
+ && Objects.equals(this.id, deploymentGateResponseData.id)
+ && Objects.equals(this.type, deploymentGateResponseData.type)
+ && Objects.equals(
+ this.additionalProperties, deploymentGateResponseData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentGateResponseData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseDataAttributes.java
new file mode 100644
index 00000000000..0f1350d70e1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseDataAttributes.java
@@ -0,0 +1,357 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.time.OffsetDateTime;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Basic information about a deployment gate. */
+@JsonPropertyOrder({
+ DeploymentGateResponseDataAttributes.JSON_PROPERTY_CREATED_AT,
+ DeploymentGateResponseDataAttributes.JSON_PROPERTY_CREATED_BY,
+ DeploymentGateResponseDataAttributes.JSON_PROPERTY_DRY_RUN,
+ DeploymentGateResponseDataAttributes.JSON_PROPERTY_ENV,
+ DeploymentGateResponseDataAttributes.JSON_PROPERTY_IDENTIFIER,
+ DeploymentGateResponseDataAttributes.JSON_PROPERTY_SERVICE,
+ DeploymentGateResponseDataAttributes.JSON_PROPERTY_UPDATED_AT,
+ DeploymentGateResponseDataAttributes.JSON_PROPERTY_UPDATED_BY
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentGateResponseDataAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CREATED_AT = "created_at";
+ private OffsetDateTime createdAt;
+
+ public static final String JSON_PROPERTY_CREATED_BY = "created_by";
+ private DeploymentGateResponseDataAttributesCreatedBy createdBy;
+
+ public static final String JSON_PROPERTY_DRY_RUN = "dry_run";
+ private Boolean dryRun;
+
+ public static final String JSON_PROPERTY_ENV = "env";
+ private String env;
+
+ public static final String JSON_PROPERTY_IDENTIFIER = "identifier";
+ private String identifier;
+
+ public static final String JSON_PROPERTY_SERVICE = "service";
+ private String service;
+
+ public static final String JSON_PROPERTY_UPDATED_AT = "updated_at";
+ private OffsetDateTime updatedAt;
+
+ public static final String JSON_PROPERTY_UPDATED_BY = "updated_by";
+ private DeploymentGateResponseDataAttributesUpdatedBy updatedBy;
+
+ public DeploymentGateResponseDataAttributes() {}
+
+ @JsonCreator
+ public DeploymentGateResponseDataAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt,
+ @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY)
+ DeploymentGateResponseDataAttributesCreatedBy createdBy,
+ @JsonProperty(required = true, value = JSON_PROPERTY_DRY_RUN) Boolean dryRun,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ENV) String env,
+ @JsonProperty(required = true, value = JSON_PROPERTY_IDENTIFIER) String identifier,
+ @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service) {
+ this.createdAt = createdAt;
+ this.createdBy = createdBy;
+ this.unparsed |= createdBy.unparsed;
+ this.dryRun = dryRun;
+ this.env = env;
+ this.identifier = identifier;
+ this.service = service;
+ }
+
+ public DeploymentGateResponseDataAttributes createdAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * The timestamp when the deployment gate was created.
+ *
+ * @return createdAt
+ */
+ @JsonProperty(JSON_PROPERTY_CREATED_AT)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ }
+
+ public DeploymentGateResponseDataAttributes createdBy(
+ DeploymentGateResponseDataAttributesCreatedBy createdBy) {
+ this.createdBy = createdBy;
+ this.unparsed |= createdBy.unparsed;
+ return this;
+ }
+
+ /**
+ * Information about the user who created the deployment gate.
+ *
+ * @return createdBy
+ */
+ @JsonProperty(JSON_PROPERTY_CREATED_BY)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentGateResponseDataAttributesCreatedBy getCreatedBy() {
+ return createdBy;
+ }
+
+ public void setCreatedBy(DeploymentGateResponseDataAttributesCreatedBy createdBy) {
+ this.createdBy = createdBy;
+ }
+
+ public DeploymentGateResponseDataAttributes dryRun(Boolean dryRun) {
+ this.dryRun = dryRun;
+ return this;
+ }
+
+ /**
+ * Whether this gate is run in dry-run mode.
+ *
+ * @return dryRun
+ */
+ @JsonProperty(JSON_PROPERTY_DRY_RUN)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Boolean getDryRun() {
+ return dryRun;
+ }
+
+ public void setDryRun(Boolean dryRun) {
+ this.dryRun = dryRun;
+ }
+
+ public DeploymentGateResponseDataAttributes env(String env) {
+ this.env = env;
+ return this;
+ }
+
+ /**
+ * The environment of the deployment gate.
+ *
+ * @return env
+ */
+ @JsonProperty(JSON_PROPERTY_ENV)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getEnv() {
+ return env;
+ }
+
+ public void setEnv(String env) {
+ this.env = env;
+ }
+
+ public DeploymentGateResponseDataAttributes identifier(String identifier) {
+ this.identifier = identifier;
+ return this;
+ }
+
+ /**
+ * The identifier of the deployment gate.
+ *
+ * @return identifier
+ */
+ @JsonProperty(JSON_PROPERTY_IDENTIFIER)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier) {
+ this.identifier = identifier;
+ }
+
+ public DeploymentGateResponseDataAttributes service(String service) {
+ this.service = service;
+ return this;
+ }
+
+ /**
+ * The service of the deployment gate.
+ *
+ * @return service
+ */
+ @JsonProperty(JSON_PROPERTY_SERVICE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getService() {
+ return service;
+ }
+
+ public void setService(String service) {
+ this.service = service;
+ }
+
+ public DeploymentGateResponseDataAttributes updatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * The timestamp when the deployment gate was last updated.
+ *
+ * @return updatedAt
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_AT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
+ public DeploymentGateResponseDataAttributes updatedBy(
+ DeploymentGateResponseDataAttributesUpdatedBy updatedBy) {
+ this.updatedBy = updatedBy;
+ this.unparsed |= updatedBy.unparsed;
+ return this;
+ }
+
+ /**
+ * Information about the user who updated the deployment gate.
+ *
+ * @return updatedBy
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_BY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public DeploymentGateResponseDataAttributesUpdatedBy getUpdatedBy() {
+ return updatedBy;
+ }
+
+ public void setUpdatedBy(DeploymentGateResponseDataAttributesUpdatedBy updatedBy) {
+ this.updatedBy = updatedBy;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return DeploymentGateResponseDataAttributes
+ */
+ @JsonAnySetter
+ public DeploymentGateResponseDataAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this DeploymentGateResponseDataAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentGateResponseDataAttributes deploymentGateResponseDataAttributes =
+ (DeploymentGateResponseDataAttributes) o;
+ return Objects.equals(this.createdAt, deploymentGateResponseDataAttributes.createdAt)
+ && Objects.equals(this.createdBy, deploymentGateResponseDataAttributes.createdBy)
+ && Objects.equals(this.dryRun, deploymentGateResponseDataAttributes.dryRun)
+ && Objects.equals(this.env, deploymentGateResponseDataAttributes.env)
+ && Objects.equals(this.identifier, deploymentGateResponseDataAttributes.identifier)
+ && Objects.equals(this.service, deploymentGateResponseDataAttributes.service)
+ && Objects.equals(this.updatedAt, deploymentGateResponseDataAttributes.updatedAt)
+ && Objects.equals(this.updatedBy, deploymentGateResponseDataAttributes.updatedBy)
+ && Objects.equals(
+ this.additionalProperties, deploymentGateResponseDataAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ createdAt,
+ createdBy,
+ dryRun,
+ env,
+ identifier,
+ service,
+ updatedAt,
+ updatedBy,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentGateResponseDataAttributes {\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n");
+ sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n");
+ sb.append(" env: ").append(toIndentedString(env)).append("\n");
+ sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n");
+ sb.append(" service: ").append(toIndentedString(service)).append("\n");
+ sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
+ sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseDataAttributesCreatedBy.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseDataAttributesCreatedBy.java
new file mode 100644
index 00000000000..43866a96279
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseDataAttributesCreatedBy.java
@@ -0,0 +1,203 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Information about the user who created the deployment gate. */
+@JsonPropertyOrder({
+ DeploymentGateResponseDataAttributesCreatedBy.JSON_PROPERTY_HANDLE,
+ DeploymentGateResponseDataAttributesCreatedBy.JSON_PROPERTY_ID,
+ DeploymentGateResponseDataAttributesCreatedBy.JSON_PROPERTY_NAME
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentGateResponseDataAttributesCreatedBy {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_HANDLE = "handle";
+ private String handle;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public DeploymentGateResponseDataAttributesCreatedBy() {}
+
+ @JsonCreator
+ public DeploymentGateResponseDataAttributesCreatedBy(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) {
+ this.id = id;
+ }
+
+ public DeploymentGateResponseDataAttributesCreatedBy handle(String handle) {
+ this.handle = handle;
+ return this;
+ }
+
+ /**
+ * The handle of the user who created the deployment rule.
+ *
+ * @return handle
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_HANDLE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getHandle() {
+ return handle;
+ }
+
+ public void setHandle(String handle) {
+ this.handle = handle;
+ }
+
+ public DeploymentGateResponseDataAttributesCreatedBy id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The ID of the user who created the deployment rule.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public DeploymentGateResponseDataAttributesCreatedBy name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the user who created the deployment rule.
+ *
+ * @return name
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return DeploymentGateResponseDataAttributesCreatedBy
+ */
+ @JsonAnySetter
+ public DeploymentGateResponseDataAttributesCreatedBy putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this DeploymentGateResponseDataAttributesCreatedBy object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentGateResponseDataAttributesCreatedBy deploymentGateResponseDataAttributesCreatedBy =
+ (DeploymentGateResponseDataAttributesCreatedBy) o;
+ return Objects.equals(this.handle, deploymentGateResponseDataAttributesCreatedBy.handle)
+ && Objects.equals(this.id, deploymentGateResponseDataAttributesCreatedBy.id)
+ && Objects.equals(this.name, deploymentGateResponseDataAttributesCreatedBy.name)
+ && Objects.equals(
+ this.additionalProperties,
+ deploymentGateResponseDataAttributesCreatedBy.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(handle, id, name, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentGateResponseDataAttributesCreatedBy {\n");
+ sb.append(" handle: ").append(toIndentedString(handle)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseDataAttributesUpdatedBy.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseDataAttributesUpdatedBy.java
new file mode 100644
index 00000000000..5e702a3652b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentGateResponseDataAttributesUpdatedBy.java
@@ -0,0 +1,203 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Information about the user who updated the deployment gate. */
+@JsonPropertyOrder({
+ DeploymentGateResponseDataAttributesUpdatedBy.JSON_PROPERTY_HANDLE,
+ DeploymentGateResponseDataAttributesUpdatedBy.JSON_PROPERTY_ID,
+ DeploymentGateResponseDataAttributesUpdatedBy.JSON_PROPERTY_NAME
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentGateResponseDataAttributesUpdatedBy {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_HANDLE = "handle";
+ private String handle;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public DeploymentGateResponseDataAttributesUpdatedBy() {}
+
+ @JsonCreator
+ public DeploymentGateResponseDataAttributesUpdatedBy(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) {
+ this.id = id;
+ }
+
+ public DeploymentGateResponseDataAttributesUpdatedBy handle(String handle) {
+ this.handle = handle;
+ return this;
+ }
+
+ /**
+ * The handle of the user who updated the deployment rule.
+ *
+ * @return handle
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_HANDLE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getHandle() {
+ return handle;
+ }
+
+ public void setHandle(String handle) {
+ this.handle = handle;
+ }
+
+ public DeploymentGateResponseDataAttributesUpdatedBy id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The ID of the user who updated the deployment rule.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public DeploymentGateResponseDataAttributesUpdatedBy name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the user who updated the deployment rule.
+ *
+ * @return name
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return DeploymentGateResponseDataAttributesUpdatedBy
+ */
+ @JsonAnySetter
+ public DeploymentGateResponseDataAttributesUpdatedBy putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this DeploymentGateResponseDataAttributesUpdatedBy object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentGateResponseDataAttributesUpdatedBy deploymentGateResponseDataAttributesUpdatedBy =
+ (DeploymentGateResponseDataAttributesUpdatedBy) o;
+ return Objects.equals(this.handle, deploymentGateResponseDataAttributesUpdatedBy.handle)
+ && Objects.equals(this.id, deploymentGateResponseDataAttributesUpdatedBy.id)
+ && Objects.equals(this.name, deploymentGateResponseDataAttributesUpdatedBy.name)
+ && Objects.equals(
+ this.additionalProperties,
+ deploymentGateResponseDataAttributesUpdatedBy.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(handle, id, name, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentGateResponseDataAttributesUpdatedBy {\n");
+ sb.append(" handle: ").append(toIndentedString(handle)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleDataType.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleDataType.java
new file mode 100644
index 00000000000..f15a4618c9b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleDataType.java
@@ -0,0 +1,57 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** Deployment rule resource type. */
+@JsonSerialize(using = DeploymentRuleDataType.DeploymentRuleDataTypeSerializer.class)
+public class DeploymentRuleDataType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("deployment_rule"));
+
+ public static final DeploymentRuleDataType DEPLOYMENT_RULE =
+ new DeploymentRuleDataType("deployment_rule");
+
+ DeploymentRuleDataType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class DeploymentRuleDataTypeSerializer
+ extends StdSerializer {
+ public DeploymentRuleDataTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public DeploymentRuleDataTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ DeploymentRuleDataType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static DeploymentRuleDataType fromValue(String value) {
+ return new DeploymentRuleDataType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleOptionsFaultyDeploymentDetection.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleOptionsFaultyDeploymentDetection.java
new file mode 100644
index 00000000000..d05637936a6
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleOptionsFaultyDeploymentDetection.java
@@ -0,0 +1,125 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Faulty deployment detection options for deployment rules. */
+@JsonPropertyOrder({
+ DeploymentRuleOptionsFaultyDeploymentDetection.JSON_PROPERTY_DURATION,
+ DeploymentRuleOptionsFaultyDeploymentDetection.JSON_PROPERTY_EXCLUDED_RESOURCES
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentRuleOptionsFaultyDeploymentDetection {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DURATION = "duration";
+ private Long duration;
+
+ public static final String JSON_PROPERTY_EXCLUDED_RESOURCES = "excluded_resources";
+ private List excludedResources = null;
+
+ public DeploymentRuleOptionsFaultyDeploymentDetection duration(Long duration) {
+ this.duration = duration;
+ return this;
+ }
+
+ /**
+ * The duration for faulty deployment detection.
+ *
+ * @return duration
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DURATION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Long getDuration() {
+ return duration;
+ }
+
+ public void setDuration(Long duration) {
+ this.duration = duration;
+ }
+
+ public DeploymentRuleOptionsFaultyDeploymentDetection excludedResources(
+ List excludedResources) {
+ this.excludedResources = excludedResources;
+ return this;
+ }
+
+ public DeploymentRuleOptionsFaultyDeploymentDetection addExcludedResourcesItem(
+ String excludedResourcesItem) {
+ if (this.excludedResources == null) {
+ this.excludedResources = new ArrayList<>();
+ }
+ this.excludedResources.add(excludedResourcesItem);
+ return this;
+ }
+
+ /**
+ * Resources to exclude from faulty deployment detection.
+ *
+ * @return excludedResources
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_EXCLUDED_RESOURCES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getExcludedResources() {
+ return excludedResources;
+ }
+
+ public void setExcludedResources(List excludedResources) {
+ this.excludedResources = excludedResources;
+ }
+
+ /** Return true if this DeploymentRuleOptionsFaultyDeploymentDetection object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentRuleOptionsFaultyDeploymentDetection deploymentRuleOptionsFaultyDeploymentDetection =
+ (DeploymentRuleOptionsFaultyDeploymentDetection) o;
+ return Objects.equals(this.duration, deploymentRuleOptionsFaultyDeploymentDetection.duration)
+ && Objects.equals(
+ this.excludedResources,
+ deploymentRuleOptionsFaultyDeploymentDetection.excludedResources);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(duration, excludedResources);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentRuleOptionsFaultyDeploymentDetection {\n");
+ sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
+ sb.append(" excludedResources: ").append(toIndentedString(excludedResources)).append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleOptionsMonitor.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleOptionsMonitor.java
new file mode 100644
index 00000000000..7436b00a94a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleOptionsMonitor.java
@@ -0,0 +1,118 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.Objects;
+
+/** Monitor options for deployment rules. */
+@JsonPropertyOrder({
+ DeploymentRuleOptionsMonitor.JSON_PROPERTY_DURATION,
+ DeploymentRuleOptionsMonitor.JSON_PROPERTY_QUERY
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentRuleOptionsMonitor {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DURATION = "duration";
+ private Long duration;
+
+ public static final String JSON_PROPERTY_QUERY = "query";
+ private String query;
+
+ public DeploymentRuleOptionsMonitor() {}
+
+ @JsonCreator
+ public DeploymentRuleOptionsMonitor(
+ @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) {
+ this.query = query;
+ }
+
+ public DeploymentRuleOptionsMonitor duration(Long duration) {
+ this.duration = duration;
+ return this;
+ }
+
+ /**
+ * Seconds the monitor needs to stay in OK status for the rule to pass.
+ *
+ * @return duration
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DURATION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Long getDuration() {
+ return duration;
+ }
+
+ public void setDuration(Long duration) {
+ this.duration = duration;
+ }
+
+ public DeploymentRuleOptionsMonitor query(String query) {
+ this.query = query;
+ return this;
+ }
+
+ /**
+ * Monitors that match this query are evaluated.
+ *
+ * @return query
+ */
+ @JsonProperty(JSON_PROPERTY_QUERY)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getQuery() {
+ return query;
+ }
+
+ public void setQuery(String query) {
+ this.query = query;
+ }
+
+ /** Return true if this DeploymentRuleOptionsMonitor object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentRuleOptionsMonitor deploymentRuleOptionsMonitor = (DeploymentRuleOptionsMonitor) o;
+ return Objects.equals(this.duration, deploymentRuleOptionsMonitor.duration)
+ && Objects.equals(this.query, deploymentRuleOptionsMonitor.query);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(duration, query);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentRuleOptionsMonitor {\n");
+ sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
+ sb.append(" query: ").append(toIndentedString(query)).append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponse.java
new file mode 100644
index 00000000000..9056c1c7161
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponse.java
@@ -0,0 +1,136 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Response for a deployment rule. */
+@JsonPropertyOrder({DeploymentRuleResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentRuleResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private DeploymentRuleResponseData data;
+
+ public DeploymentRuleResponse data(DeploymentRuleResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data for a deployment rule.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public DeploymentRuleResponseData getData() {
+ return data;
+ }
+
+ public void setData(DeploymentRuleResponseData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return DeploymentRuleResponse
+ */
+ @JsonAnySetter
+ public DeploymentRuleResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this DeploymentRuleResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentRuleResponse deploymentRuleResponse = (DeploymentRuleResponse) o;
+ return Objects.equals(this.data, deploymentRuleResponse.data)
+ && Objects.equals(this.additionalProperties, deploymentRuleResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentRuleResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseData.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseData.java
new file mode 100644
index 00000000000..8bae71f026d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseData.java
@@ -0,0 +1,210 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Data for a deployment rule. */
+@JsonPropertyOrder({
+ DeploymentRuleResponseData.JSON_PROPERTY_ATTRIBUTES,
+ DeploymentRuleResponseData.JSON_PROPERTY_ID,
+ DeploymentRuleResponseData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentRuleResponseData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private DeploymentRuleResponseDataAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private DeploymentRuleDataType type;
+
+ public DeploymentRuleResponseData() {}
+
+ @JsonCreator
+ public DeploymentRuleResponseData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ DeploymentRuleResponseDataAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DeploymentRuleDataType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public DeploymentRuleResponseData attributes(DeploymentRuleResponseDataAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Basic information about a deployment rule.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentRuleResponseDataAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(DeploymentRuleResponseDataAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public DeploymentRuleResponseData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Unique identifier of the deployment rule.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public DeploymentRuleResponseData type(DeploymentRuleDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Deployment rule resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentRuleDataType getType() {
+ return type;
+ }
+
+ public void setType(DeploymentRuleDataType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return DeploymentRuleResponseData
+ */
+ @JsonAnySetter
+ public DeploymentRuleResponseData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this DeploymentRuleResponseData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentRuleResponseData deploymentRuleResponseData = (DeploymentRuleResponseData) o;
+ return Objects.equals(this.attributes, deploymentRuleResponseData.attributes)
+ && Objects.equals(this.id, deploymentRuleResponseData.id)
+ && Objects.equals(this.type, deploymentRuleResponseData.type)
+ && Objects.equals(
+ this.additionalProperties, deploymentRuleResponseData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentRuleResponseData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributes.java
new file mode 100644
index 00000000000..bf82bcbd45d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributes.java
@@ -0,0 +1,395 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.time.OffsetDateTime;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Basic information about a deployment rule. */
+@JsonPropertyOrder({
+ DeploymentRuleResponseDataAttributes.JSON_PROPERTY_CREATED_AT,
+ DeploymentRuleResponseDataAttributes.JSON_PROPERTY_CREATED_BY,
+ DeploymentRuleResponseDataAttributes.JSON_PROPERTY_DRY_RUN,
+ DeploymentRuleResponseDataAttributes.JSON_PROPERTY_GATE_ID,
+ DeploymentRuleResponseDataAttributes.JSON_PROPERTY_NAME,
+ DeploymentRuleResponseDataAttributes.JSON_PROPERTY_OPTIONS,
+ DeploymentRuleResponseDataAttributes.JSON_PROPERTY_TYPE,
+ DeploymentRuleResponseDataAttributes.JSON_PROPERTY_UPDATED_AT,
+ DeploymentRuleResponseDataAttributes.JSON_PROPERTY_UPDATED_BY
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentRuleResponseDataAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CREATED_AT = "created_at";
+ private OffsetDateTime createdAt;
+
+ public static final String JSON_PROPERTY_CREATED_BY = "created_by";
+ private DeploymentRuleResponseDataAttributesCreatedBy createdBy;
+
+ public static final String JSON_PROPERTY_DRY_RUN = "dry_run";
+ private Boolean dryRun;
+
+ public static final String JSON_PROPERTY_GATE_ID = "gate_id";
+ private String gateId;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public static final String JSON_PROPERTY_OPTIONS = "options";
+ private DeploymentRulesOptions options;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private DeploymentRuleResponseDataAttributesType type;
+
+ public static final String JSON_PROPERTY_UPDATED_AT = "updated_at";
+ private OffsetDateTime updatedAt;
+
+ public static final String JSON_PROPERTY_UPDATED_BY = "updated_by";
+ private DeploymentRuleResponseDataAttributesUpdatedBy updatedBy;
+
+ public DeploymentRuleResponseDataAttributes() {}
+
+ @JsonCreator
+ public DeploymentRuleResponseDataAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt,
+ @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY)
+ DeploymentRuleResponseDataAttributesCreatedBy createdBy,
+ @JsonProperty(required = true, value = JSON_PROPERTY_DRY_RUN) Boolean dryRun,
+ @JsonProperty(required = true, value = JSON_PROPERTY_GATE_ID) String gateId,
+ @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name,
+ @JsonProperty(required = true, value = JSON_PROPERTY_OPTIONS) DeploymentRulesOptions options,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ DeploymentRuleResponseDataAttributesType type) {
+ this.createdAt = createdAt;
+ this.createdBy = createdBy;
+ this.unparsed |= createdBy.unparsed;
+ this.dryRun = dryRun;
+ this.gateId = gateId;
+ this.name = name;
+ this.options = options;
+ this.unparsed |= options.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public DeploymentRuleResponseDataAttributes createdAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * The timestamp when the deployment rule was created.
+ *
+ * @return createdAt
+ */
+ @JsonProperty(JSON_PROPERTY_CREATED_AT)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ }
+
+ public DeploymentRuleResponseDataAttributes createdBy(
+ DeploymentRuleResponseDataAttributesCreatedBy createdBy) {
+ this.createdBy = createdBy;
+ this.unparsed |= createdBy.unparsed;
+ return this;
+ }
+
+ /**
+ * Information about the user who created the deployment rule.
+ *
+ * @return createdBy
+ */
+ @JsonProperty(JSON_PROPERTY_CREATED_BY)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentRuleResponseDataAttributesCreatedBy getCreatedBy() {
+ return createdBy;
+ }
+
+ public void setCreatedBy(DeploymentRuleResponseDataAttributesCreatedBy createdBy) {
+ this.createdBy = createdBy;
+ }
+
+ public DeploymentRuleResponseDataAttributes dryRun(Boolean dryRun) {
+ this.dryRun = dryRun;
+ return this;
+ }
+
+ /**
+ * Whether this rule is run in dry-run mode.
+ *
+ * @return dryRun
+ */
+ @JsonProperty(JSON_PROPERTY_DRY_RUN)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Boolean getDryRun() {
+ return dryRun;
+ }
+
+ public void setDryRun(Boolean dryRun) {
+ this.dryRun = dryRun;
+ }
+
+ public DeploymentRuleResponseDataAttributes gateId(String gateId) {
+ this.gateId = gateId;
+ return this;
+ }
+
+ /**
+ * The ID of the deployment gate.
+ *
+ * @return gateId
+ */
+ @JsonProperty(JSON_PROPERTY_GATE_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getGateId() {
+ return gateId;
+ }
+
+ public void setGateId(String gateId) {
+ this.gateId = gateId;
+ }
+
+ public DeploymentRuleResponseDataAttributes name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the deployment rule.
+ *
+ * @return name
+ */
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public DeploymentRuleResponseDataAttributes options(DeploymentRulesOptions options) {
+ this.options = options;
+ this.unparsed |= options.unparsed;
+ return this;
+ }
+
+ /**
+ * Options for deployment rule response representing either faulty deployment detection or monitor
+ * options.
+ *
+ * @return options
+ */
+ @JsonProperty(JSON_PROPERTY_OPTIONS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentRulesOptions getOptions() {
+ return options;
+ }
+
+ public void setOptions(DeploymentRulesOptions options) {
+ this.options = options;
+ }
+
+ public DeploymentRuleResponseDataAttributes type(DeploymentRuleResponseDataAttributesType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the deployment rule.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DeploymentRuleResponseDataAttributesType getType() {
+ return type;
+ }
+
+ public void setType(DeploymentRuleResponseDataAttributesType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ public DeploymentRuleResponseDataAttributes updatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * The timestamp when the deployment rule was last updated.
+ *
+ * @return updatedAt
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_AT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
+ public DeploymentRuleResponseDataAttributes updatedBy(
+ DeploymentRuleResponseDataAttributesUpdatedBy updatedBy) {
+ this.updatedBy = updatedBy;
+ this.unparsed |= updatedBy.unparsed;
+ return this;
+ }
+
+ /**
+ * Information about the user who updated the deployment rule.
+ *
+ * @return updatedBy
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_BY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public DeploymentRuleResponseDataAttributesUpdatedBy getUpdatedBy() {
+ return updatedBy;
+ }
+
+ public void setUpdatedBy(DeploymentRuleResponseDataAttributesUpdatedBy updatedBy) {
+ this.updatedBy = updatedBy;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return DeploymentRuleResponseDataAttributes
+ */
+ @JsonAnySetter
+ public DeploymentRuleResponseDataAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this DeploymentRuleResponseDataAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentRuleResponseDataAttributes deploymentRuleResponseDataAttributes =
+ (DeploymentRuleResponseDataAttributes) o;
+ return Objects.equals(this.createdAt, deploymentRuleResponseDataAttributes.createdAt)
+ && Objects.equals(this.createdBy, deploymentRuleResponseDataAttributes.createdBy)
+ && Objects.equals(this.dryRun, deploymentRuleResponseDataAttributes.dryRun)
+ && Objects.equals(this.gateId, deploymentRuleResponseDataAttributes.gateId)
+ && Objects.equals(this.name, deploymentRuleResponseDataAttributes.name)
+ && Objects.equals(this.options, deploymentRuleResponseDataAttributes.options)
+ && Objects.equals(this.type, deploymentRuleResponseDataAttributes.type)
+ && Objects.equals(this.updatedAt, deploymentRuleResponseDataAttributes.updatedAt)
+ && Objects.equals(this.updatedBy, deploymentRuleResponseDataAttributes.updatedBy)
+ && Objects.equals(
+ this.additionalProperties, deploymentRuleResponseDataAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ createdAt,
+ createdBy,
+ dryRun,
+ gateId,
+ name,
+ options,
+ type,
+ updatedAt,
+ updatedBy,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentRuleResponseDataAttributes {\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n");
+ sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n");
+ sb.append(" gateId: ").append(toIndentedString(gateId)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" options: ").append(toIndentedString(options)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
+ sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributesCreatedBy.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributesCreatedBy.java
new file mode 100644
index 00000000000..b98ef1ec02a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributesCreatedBy.java
@@ -0,0 +1,203 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Information about the user who created the deployment rule. */
+@JsonPropertyOrder({
+ DeploymentRuleResponseDataAttributesCreatedBy.JSON_PROPERTY_HANDLE,
+ DeploymentRuleResponseDataAttributesCreatedBy.JSON_PROPERTY_ID,
+ DeploymentRuleResponseDataAttributesCreatedBy.JSON_PROPERTY_NAME
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentRuleResponseDataAttributesCreatedBy {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_HANDLE = "handle";
+ private String handle;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public DeploymentRuleResponseDataAttributesCreatedBy() {}
+
+ @JsonCreator
+ public DeploymentRuleResponseDataAttributesCreatedBy(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) {
+ this.id = id;
+ }
+
+ public DeploymentRuleResponseDataAttributesCreatedBy handle(String handle) {
+ this.handle = handle;
+ return this;
+ }
+
+ /**
+ * The handle of the user who created the deployment rule.
+ *
+ * @return handle
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_HANDLE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getHandle() {
+ return handle;
+ }
+
+ public void setHandle(String handle) {
+ this.handle = handle;
+ }
+
+ public DeploymentRuleResponseDataAttributesCreatedBy id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The ID of the user who created the deployment rule.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public DeploymentRuleResponseDataAttributesCreatedBy name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the user who created the deployment rule.
+ *
+ * @return name
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return DeploymentRuleResponseDataAttributesCreatedBy
+ */
+ @JsonAnySetter
+ public DeploymentRuleResponseDataAttributesCreatedBy putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this DeploymentRuleResponseDataAttributesCreatedBy object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentRuleResponseDataAttributesCreatedBy deploymentRuleResponseDataAttributesCreatedBy =
+ (DeploymentRuleResponseDataAttributesCreatedBy) o;
+ return Objects.equals(this.handle, deploymentRuleResponseDataAttributesCreatedBy.handle)
+ && Objects.equals(this.id, deploymentRuleResponseDataAttributesCreatedBy.id)
+ && Objects.equals(this.name, deploymentRuleResponseDataAttributesCreatedBy.name)
+ && Objects.equals(
+ this.additionalProperties,
+ deploymentRuleResponseDataAttributesCreatedBy.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(handle, id, name, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentRuleResponseDataAttributesCreatedBy {\n");
+ sb.append(" handle: ").append(toIndentedString(handle)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributesType.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributesType.java
new file mode 100644
index 00000000000..11303902e66
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributesType.java
@@ -0,0 +1,65 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** The type of the deployment rule. */
+@JsonSerialize(
+ using =
+ DeploymentRuleResponseDataAttributesType.DeploymentRuleResponseDataAttributesTypeSerializer
+ .class)
+public class DeploymentRuleResponseDataAttributesType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("faulty_deployment_detection", "monitor"));
+
+ public static final DeploymentRuleResponseDataAttributesType FAULTY_DEPLOYMENT_DETECTION =
+ new DeploymentRuleResponseDataAttributesType("faulty_deployment_detection");
+ public static final DeploymentRuleResponseDataAttributesType MONITOR =
+ new DeploymentRuleResponseDataAttributesType("monitor");
+
+ DeploymentRuleResponseDataAttributesType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class DeploymentRuleResponseDataAttributesTypeSerializer
+ extends StdSerializer {
+ public DeploymentRuleResponseDataAttributesTypeSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public DeploymentRuleResponseDataAttributesTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ DeploymentRuleResponseDataAttributesType value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static DeploymentRuleResponseDataAttributesType fromValue(String value) {
+ return new DeploymentRuleResponseDataAttributesType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributesUpdatedBy.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributesUpdatedBy.java
new file mode 100644
index 00000000000..981b2387b70
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentRuleResponseDataAttributesUpdatedBy.java
@@ -0,0 +1,203 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Information about the user who updated the deployment rule. */
+@JsonPropertyOrder({
+ DeploymentRuleResponseDataAttributesUpdatedBy.JSON_PROPERTY_HANDLE,
+ DeploymentRuleResponseDataAttributesUpdatedBy.JSON_PROPERTY_ID,
+ DeploymentRuleResponseDataAttributesUpdatedBy.JSON_PROPERTY_NAME
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class DeploymentRuleResponseDataAttributesUpdatedBy {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_HANDLE = "handle";
+ private String handle;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public DeploymentRuleResponseDataAttributesUpdatedBy() {}
+
+ @JsonCreator
+ public DeploymentRuleResponseDataAttributesUpdatedBy(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) {
+ this.id = id;
+ }
+
+ public DeploymentRuleResponseDataAttributesUpdatedBy handle(String handle) {
+ this.handle = handle;
+ return this;
+ }
+
+ /**
+ * The handle of the user who updated the deployment rule.
+ *
+ * @return handle
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_HANDLE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getHandle() {
+ return handle;
+ }
+
+ public void setHandle(String handle) {
+ this.handle = handle;
+ }
+
+ public DeploymentRuleResponseDataAttributesUpdatedBy id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The ID of the user who updated the deployment rule.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public DeploymentRuleResponseDataAttributesUpdatedBy name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the user who updated the deployment rule.
+ *
+ * @return name
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return DeploymentRuleResponseDataAttributesUpdatedBy
+ */
+ @JsonAnySetter
+ public DeploymentRuleResponseDataAttributesUpdatedBy putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this DeploymentRuleResponseDataAttributesUpdatedBy object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DeploymentRuleResponseDataAttributesUpdatedBy deploymentRuleResponseDataAttributesUpdatedBy =
+ (DeploymentRuleResponseDataAttributesUpdatedBy) o;
+ return Objects.equals(this.handle, deploymentRuleResponseDataAttributesUpdatedBy.handle)
+ && Objects.equals(this.id, deploymentRuleResponseDataAttributesUpdatedBy.id)
+ && Objects.equals(this.name, deploymentRuleResponseDataAttributesUpdatedBy.name)
+ && Objects.equals(
+ this.additionalProperties,
+ deploymentRuleResponseDataAttributesUpdatedBy.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(handle, id, name, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DeploymentRuleResponseDataAttributesUpdatedBy {\n");
+ sb.append(" handle: ").append(toIndentedString(handle)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DeploymentRulesOptions.java b/src/main/java/com/datadog/api/client/v2/model/DeploymentRulesOptions.java
new file mode 100644
index 00000000000..001e810e18e
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/DeploymentRulesOptions.java
@@ -0,0 +1,298 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.AbstractOpenApiSchema;
+import com.datadog.api.client.JSON;
+import com.datadog.api.client.UnparsedObject;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import jakarta.ws.rs.core.GenericType;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+@JsonDeserialize(using = DeploymentRulesOptions.DeploymentRulesOptionsDeserializer.class)
+@JsonSerialize(using = DeploymentRulesOptions.DeploymentRulesOptionsSerializer.class)
+public class DeploymentRulesOptions extends AbstractOpenApiSchema {
+ private static final Logger log = Logger.getLogger(DeploymentRulesOptions.class.getName());
+
+ @JsonIgnore public boolean unparsed = false;
+
+ public static class DeploymentRulesOptionsSerializer
+ extends StdSerializer {
+ public DeploymentRulesOptionsSerializer(Class t) {
+ super(t);
+ }
+
+ public DeploymentRulesOptionsSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ DeploymentRulesOptions value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.getActualInstance());
+ }
+ }
+
+ public static class DeploymentRulesOptionsDeserializer
+ extends StdDeserializer {
+ public DeploymentRulesOptionsDeserializer() {
+ this(DeploymentRulesOptions.class);
+ }
+
+ public DeploymentRulesOptionsDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public DeploymentRulesOptions deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+ JsonNode tree = jp.readValueAsTree();
+ Object deserialized = null;
+ Object tmp = null;
+ boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS);
+ int match = 0;
+ JsonToken token = tree.traverse(jp.getCodec()).nextToken();
+ // deserialize DeploymentRuleOptionsFaultyDeploymentDetection
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(Integer.class)
+ || DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(Long.class)
+ || DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(Float.class)
+ || DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(Double.class)
+ || DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(Boolean.class)
+ || DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(Integer.class)
+ || DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(Float.class)
+ || DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(
+ Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (DeploymentRuleOptionsFaultyDeploymentDetection.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp =
+ tree.traverse(jp.getCodec())
+ .readValueAs(DeploymentRuleOptionsFaultyDeploymentDetection.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((DeploymentRuleOptionsFaultyDeploymentDetection) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(
+ Level.FINER,
+ "Input data matches schema 'DeploymentRuleOptionsFaultyDeploymentDetection'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(
+ Level.FINER,
+ "Input data does not match schema 'DeploymentRuleOptionsFaultyDeploymentDetection'",
+ e);
+ }
+
+ // deserialize DeploymentRuleOptionsMonitor
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (DeploymentRuleOptionsMonitor.class.equals(Integer.class)
+ || DeploymentRuleOptionsMonitor.class.equals(Long.class)
+ || DeploymentRuleOptionsMonitor.class.equals(Float.class)
+ || DeploymentRuleOptionsMonitor.class.equals(Double.class)
+ || DeploymentRuleOptionsMonitor.class.equals(Boolean.class)
+ || DeploymentRuleOptionsMonitor.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((DeploymentRuleOptionsMonitor.class.equals(Integer.class)
+ || DeploymentRuleOptionsMonitor.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((DeploymentRuleOptionsMonitor.class.equals(Float.class)
+ || DeploymentRuleOptionsMonitor.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (DeploymentRuleOptionsMonitor.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (DeploymentRuleOptionsMonitor.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(DeploymentRuleOptionsMonitor.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((DeploymentRuleOptionsMonitor) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'DeploymentRuleOptionsMonitor'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'DeploymentRuleOptionsMonitor'", e);
+ }
+
+ DeploymentRulesOptions ret = new DeploymentRulesOptions();
+ if (match == 1) {
+ ret.setActualInstance(deserialized);
+ } else {
+ Map res =
+ new ObjectMapper()
+ .readValue(
+ tree.traverse(jp.getCodec()).readValueAsTree().toString(),
+ new TypeReference