diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index a484bec1a76..22aa66aee70 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -264,6 +264,22 @@ components:
required: true
schema:
type: string
+ ChangeRequestDecisionIDPathParameter:
+ description: The identifier of the change request decision.
+ example: decision-id-0
+ in: path
+ name: decision_id
+ required: true
+ schema:
+ type: string
+ ChangeRequestIDPathParameter:
+ description: The identifier of the change request.
+ example: CHM-1234
+ in: path
+ name: change_request_id
+ required: true
+ schema:
+ type: string
CloudAccountID:
description: Cloud Account id.
in: path
@@ -10567,6 +10583,626 @@ components:
required:
- changeEventTrigger
type: object
+ ChangeRequestBranchCreateAttributes:
+ description: Attributes for creating a change request branch.
+ properties:
+ branch_name:
+ description: The name of the branch to create.
+ example: chm/CHM-1234
+ type: string
+ repo_id:
+ description: The repository identifier in the format owner/repository.
+ example: DataDog/dd-source
+ type: string
+ required:
+ - repo_id
+ - branch_name
+ type: object
+ ChangeRequestBranchCreateData:
+ description: Data object to create a change request branch.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/ChangeRequestBranchCreateAttributes'
+ type:
+ $ref: '#/components/schemas/ChangeRequestBranchResourceType'
+ required:
+ - type
+ - attributes
+ type: object
+ ChangeRequestBranchCreateRequest:
+ description: Request object to create a branch for a change request.
+ properties:
+ data:
+ $ref: '#/components/schemas/ChangeRequestBranchCreateData'
+ required:
+ - data
+ type: object
+ ChangeRequestBranchResourceType:
+ description: Change request branch resource type.
+ enum:
+ - change_request_branch
+ example: change_request_branch
+ type: string
+ x-enum-varnames:
+ - CHANGE_REQUEST_BRANCH
+ ChangeRequestChangeType:
+ description: The type of the change request.
+ enum:
+ - NORMAL
+ - STANDARD
+ - EMERGENCY
+ example: NORMAL
+ type: string
+ x-enum-varnames:
+ - NORMAL
+ - STANDARD
+ - EMERGENCY
+ ChangeRequestCreateAttributes:
+ description: Attributes for creating a change request.
+ properties:
+ change_request_linked_incident_uuid:
+ description: The UUID of an incident to link to the change request.
+ example: 00000000-0000-0000-0000-000000000000
+ type: string
+ change_request_maintenance_window_query:
+ description: The maintenance window query for the change request.
+ example: ''
+ type: string
+ change_request_plan:
+ description: The plan associated with the change request.
+ example: 1. Deploy to staging 2. Run tests 3. Deploy to production
+ type: string
+ change_request_risk:
+ $ref: '#/components/schemas/ChangeRequestRiskLevel'
+ change_request_type:
+ $ref: '#/components/schemas/ChangeRequestChangeType'
+ description:
+ description: The description of the change request.
+ example: Deploying new payment service v2.1
+ type: string
+ end_date:
+ description: The planned end date of the change request.
+ example: '2024-01-02T15:00:00Z'
+ format: date-time
+ type: string
+ project_id:
+ description: The project UUID to associate with the change request.
+ example: d4bbe1af-f36e-42f1-87c1-493ca35c320e
+ type: string
+ requested_teams:
+ description: A list of team handles to request decisions from.
+ example:
+ - team-handle-1
+ items:
+ type: string
+ type: array
+ start_date:
+ description: The planned start date of the change request.
+ example: '2024-01-01T03:00:00Z'
+ format: date-time
+ type: string
+ title:
+ description: The title of the change request.
+ example: Deploy new payment service
+ type: string
+ required:
+ - title
+ type: object
+ ChangeRequestCreateData:
+ description: Data object to create a change request.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/ChangeRequestCreateAttributes'
+ type:
+ $ref: '#/components/schemas/ChangeRequestResourceType'
+ required:
+ - type
+ - attributes
+ type: object
+ ChangeRequestCreateRequest:
+ description: Request object to create a change request.
+ properties:
+ data:
+ $ref: '#/components/schemas/ChangeRequestCreateData'
+ required:
+ - data
+ type: object
+ ChangeRequestDecisionCreateAttributes:
+ description: Attributes for creating a change request decision.
+ properties:
+ change_request_status:
+ $ref: '#/components/schemas/ChangeRequestDecisionStatusType'
+ request_reason:
+ description: The reason for requesting the decision.
+ example: Please review and approve this change
+ type: string
+ type: object
+ ChangeRequestDecisionCreateItem:
+ description: An included change request decision for a create or update operation.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/ChangeRequestDecisionCreateAttributes'
+ id:
+ description: The decision identifier.
+ example: decision-id-0
+ type: string
+ relationships:
+ $ref: '#/components/schemas/ChangeRequestDecisionCreateRelationships'
+ type:
+ $ref: '#/components/schemas/ChangeRequestDecisionResourceType'
+ required:
+ - type
+ - id
+ type: object
+ ChangeRequestDecisionCreateRelationships:
+ description: Relationships for creating a change request decision.
+ properties:
+ requested_user:
+ $ref: '#/components/schemas/ChangeRequestUserRelationship'
+ type: object
+ ChangeRequestDecisionRelationshipData:
+ description: Change request decision relationship data.
+ properties:
+ id:
+ description: The decision UUID.
+ example: decision-id-0
+ type: string
+ type:
+ $ref: '#/components/schemas/ChangeRequestDecisionResourceType'
+ required:
+ - id
+ - type
+ type: object
+ ChangeRequestDecisionRelationships:
+ description: Relationships of a change request decision.
+ properties:
+ modified_by:
+ $ref: '#/components/schemas/ChangeRequestUserRelationship'
+ requested_by_user:
+ $ref: '#/components/schemas/ChangeRequestUserRelationship'
+ requested_user:
+ $ref: '#/components/schemas/ChangeRequestUserRelationship'
+ required:
+ - requested_user
+ - requested_by_user
+ - modified_by
+ type: object
+ ChangeRequestDecisionResourceType:
+ description: Change request decision resource type.
+ enum:
+ - change_request_decision
+ example: change_request_decision
+ type: string
+ x-enum-varnames:
+ - CHANGE_REQUEST_DECISION
+ ChangeRequestDecisionResponseAttributes:
+ description: Attributes of a change request decision in a response.
+ properties:
+ change_request_status:
+ $ref: '#/components/schemas/ChangeRequestDecisionStatusType'
+ decided_at:
+ description: Timestamp of when the decision was made.
+ example: '2024-01-02T00:00:00Z'
+ format: date-time
+ type: string
+ decision_reason:
+ description: The reason for the decision.
+ example: LGTM
+ type: string
+ deleted_at:
+ description: Timestamp of when the decision was deleted.
+ example: '0001-01-01T00:00:00Z'
+ format: date-time
+ type: string
+ request_reason:
+ description: The reason for requesting the decision.
+ example: Please review this change
+ type: string
+ requested_at:
+ description: Timestamp of when the decision was requested.
+ example: '2024-01-01T00:00:00Z'
+ format: date-time
+ type: string
+ required:
+ - change_request_status
+ - request_reason
+ - decision_reason
+ - requested_at
+ - decided_at
+ - deleted_at
+ type: object
+ ChangeRequestDecisionStatusType:
+ description: The status of a change request decision.
+ enum:
+ - REQUESTED
+ - APPROVED
+ - DECLINED
+ example: REQUESTED
+ type: string
+ x-enum-varnames:
+ - REQUESTED
+ - APPROVED
+ - DECLINED
+ ChangeRequestDecisionUpdateData:
+ description: Data object to update a change request decision.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/ChangeRequestDecisionUpdateDataAttributes'
+ relationships:
+ $ref: '#/components/schemas/ChangeRequestDecisionUpdateDataRelationships'
+ type:
+ $ref: '#/components/schemas/ChangeRequestResourceType'
+ required:
+ - type
+ type: object
+ ChangeRequestDecisionUpdateDataAttributes:
+ description: Attributes of the parent change request for a decision update.
+ properties:
+ id:
+ description: The identifier of the change request.
+ example: CHM-1234
+ type: string
+ type: object
+ ChangeRequestDecisionUpdateDataRelationships:
+ description: Relationships for updating a change request decision.
+ properties:
+ change_request_decisions:
+ $ref: '#/components/schemas/ChangeRequestDecisionsRelationship'
+ required:
+ - change_request_decisions
+ type: object
+ ChangeRequestDecisionUpdateRequest:
+ description: Request object to update a change request decision.
+ properties:
+ data:
+ $ref: '#/components/schemas/ChangeRequestDecisionUpdateData'
+ included:
+ $ref: '#/components/schemas/ChangeRequestUpdateIncluded'
+ required:
+ - data
+ type: object
+ ChangeRequestDecisionsRelationship:
+ description: Relationship to change request decisions.
+ properties:
+ data:
+ description: Array of decision relationship data.
+ items:
+ $ref: '#/components/schemas/ChangeRequestDecisionRelationshipData'
+ type: array
+ required:
+ - data
+ type: object
+ ChangeRequestIncluded:
+ description: Included resources related to the change request.
+ items:
+ $ref: '#/components/schemas/ChangeRequestIncludedItem'
+ type: array
+ ChangeRequestIncludedDecision:
+ description: An included change request decision resource.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/ChangeRequestDecisionResponseAttributes'
+ id:
+ description: The decision UUID.
+ example: decision-id-0
+ type: string
+ relationships:
+ $ref: '#/components/schemas/ChangeRequestDecisionRelationships'
+ type:
+ $ref: '#/components/schemas/ChangeRequestDecisionResourceType'
+ required:
+ - type
+ - id
+ - attributes
+ type: object
+ ChangeRequestIncludedItem:
+ description: An included resource item in the change request response.
+ oneOf:
+ - $ref: '#/components/schemas/ChangeRequestIncludedUser'
+ - $ref: '#/components/schemas/ChangeRequestIncludedDecision'
+ ChangeRequestIncludedUser:
+ description: An included user resource.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/ChangeRequestIncludedUserAttributes'
+ id:
+ description: The user UUID.
+ example: 00000000-0000-0000-0000-000000000000
+ type: string
+ type:
+ description: The resource type.
+ example: user
+ type: string
+ required:
+ - type
+ - id
+ - attributes
+ type: object
+ ChangeRequestIncludedUserAttributes:
+ description: Attributes of an included user.
+ properties:
+ email:
+ description: The email of the user.
+ example: john.doe@example.com
+ type: string
+ handle:
+ description: The handle of the user.
+ example: john.doe@example.com
+ type: string
+ name:
+ description: The name of the user.
+ example: John Doe
+ type: string
+ required:
+ - name
+ - email
+ - handle
+ type: object
+ ChangeRequestObjectAttributes:
+ additionalProperties:
+ items:
+ type: string
+ type: array
+ description: Custom attributes of the change request as key-value pairs.
+ type: object
+ ChangeRequestRelationships:
+ description: Relationships of a change request.
+ properties:
+ change_request_decisions:
+ $ref: '#/components/schemas/ChangeRequestDecisionsRelationship'
+ created_by:
+ $ref: '#/components/schemas/ChangeRequestUserRelationship'
+ modified_by:
+ $ref: '#/components/schemas/ChangeRequestUserRelationship'
+ required:
+ - created_by
+ - modified_by
+ - change_request_decisions
+ type: object
+ ChangeRequestResourceType:
+ description: Change request resource type.
+ enum:
+ - change_request
+ example: change_request
+ type: string
+ x-enum-varnames:
+ - CHANGE_REQUEST
+ ChangeRequestResponse:
+ description: Response object for a change request.
+ properties:
+ data:
+ $ref: '#/components/schemas/ChangeRequestResponseData'
+ included:
+ $ref: '#/components/schemas/ChangeRequestIncluded'
+ required:
+ - data
+ type: object
+ ChangeRequestResponseAttributes:
+ description: Attributes of a change request response.
+ properties:
+ archived_at:
+ description: Timestamp of when the change request was archived.
+ format: date-time
+ nullable: true
+ readOnly: true
+ type: string
+ attributes:
+ $ref: '#/components/schemas/ChangeRequestObjectAttributes'
+ change_request_linked_incident_uuid:
+ description: The UUID of the linked incident.
+ example: ''
+ type: string
+ change_request_maintenance_window_query:
+ description: The maintenance window query for the change request.
+ example: ''
+ type: string
+ change_request_plan:
+ description: The plan associated with the change request.
+ example: ''
+ type: string
+ change_request_risk:
+ $ref: '#/components/schemas/ChangeRequestRiskLevel'
+ change_request_type:
+ $ref: '#/components/schemas/ChangeRequestChangeType'
+ closed_at:
+ description: Timestamp of when the change request was closed.
+ format: date-time
+ nullable: true
+ readOnly: true
+ type: string
+ created_at:
+ description: Timestamp of when the change request was created.
+ example: '2024-01-01T00:00:00Z'
+ format: date-time
+ readOnly: true
+ type: string
+ creation_source:
+ description: The source from which the change request was created.
+ example: CS_MANUAL
+ type: string
+ description:
+ description: The description of the change request.
+ example: Deploying new payment service v2.1
+ type: string
+ end_date:
+ description: The planned end date of the change request.
+ example: '2024-01-02T15:00:00Z'
+ format: date-time
+ type: string
+ key:
+ description: The human-readable key of the change request.
+ example: CHM-1234
+ type: string
+ modified_at:
+ description: Timestamp of when the change request was last modified.
+ example: '2024-01-01T00:00:00Z'
+ format: date-time
+ readOnly: true
+ type: string
+ plan_notebook_id:
+ description: The notebook ID associated with the change request plan.
+ example: 0
+ format: int64
+ type: integer
+ priority:
+ description: The priority of the change request.
+ example: NOT_DEFINED
+ type: string
+ project_id:
+ description: The project UUID associated with the change request.
+ example: d4bbe1af-f36e-42f1-87c1-493ca35c320e
+ type: string
+ start_date:
+ description: The planned start date of the change request.
+ example: '2024-01-01T03:00:00Z'
+ format: date-time
+ type: string
+ status:
+ description: The current status of the change request.
+ example: OPEN
+ type: string
+ title:
+ description: The title of the change request.
+ example: Deploy new payment service
+ type: string
+ type:
+ description: The case type.
+ example: CHANGE_REQUEST
+ type: string
+ required:
+ - key
+ - title
+ - type
+ - priority
+ - status
+ - description
+ - creation_source
+ - plan_notebook_id
+ - project_id
+ - attributes
+ - created_at
+ - modified_at
+ - change_request_type
+ - change_request_risk
+ - change_request_plan
+ - change_request_linked_incident_uuid
+ - change_request_maintenance_window_query
+ type: object
+ ChangeRequestResponseData:
+ description: Data object for a change request response.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/ChangeRequestResponseAttributes'
+ id:
+ description: The identifier of the change request.
+ example: CHM-1234
+ type: string
+ relationships:
+ $ref: '#/components/schemas/ChangeRequestRelationships'
+ type:
+ $ref: '#/components/schemas/ChangeRequestResourceType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ ChangeRequestRiskLevel:
+ description: The risk level of the change request.
+ enum:
+ - UNDEFINED
+ - LOW
+ - MEDIUM
+ - HIGH
+ example: LOW
+ type: string
+ x-enum-varnames:
+ - UNDEFINED
+ - LOW
+ - MEDIUM
+ - HIGH
+ ChangeRequestUpdateAttributes:
+ description: Attributes for updating a change request.
+ properties:
+ change_request_plan:
+ description: The plan associated with the change request.
+ example: Updated deployment plan
+ type: string
+ change_request_risk:
+ $ref: '#/components/schemas/ChangeRequestRiskLevel'
+ change_request_type:
+ $ref: '#/components/schemas/ChangeRequestChangeType'
+ end_date:
+ description: The planned end date of the change request.
+ example: '2024-01-02T15:00:00Z'
+ format: date-time
+ type: string
+ id:
+ description: The identifier of the change request to update.
+ example: CHM-1234
+ type: string
+ start_date:
+ description: The planned start date of the change request.
+ example: '2024-01-01T03:00:00Z'
+ format: date-time
+ type: string
+ type: object
+ ChangeRequestUpdateData:
+ description: Data object to update a change request.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/ChangeRequestUpdateAttributes'
+ relationships:
+ $ref: '#/components/schemas/ChangeRequestUpdateRelationships'
+ type:
+ $ref: '#/components/schemas/ChangeRequestResourceType'
+ required:
+ - type
+ type: object
+ ChangeRequestUpdateIncluded:
+ description: Included resources for the change request update.
+ items:
+ $ref: '#/components/schemas/ChangeRequestDecisionCreateItem'
+ type: array
+ ChangeRequestUpdateRelationships:
+ description: Relationships for updating a change request.
+ properties:
+ change_request_decisions:
+ $ref: '#/components/schemas/ChangeRequestDecisionsRelationship'
+ type: object
+ ChangeRequestUpdateRequest:
+ description: Request object to update a change request.
+ properties:
+ data:
+ $ref: '#/components/schemas/ChangeRequestUpdateData'
+ included:
+ $ref: '#/components/schemas/ChangeRequestUpdateIncluded'
+ required:
+ - data
+ type: object
+ ChangeRequestUserRelationship:
+ description: Relationship to a user.
+ properties:
+ data:
+ $ref: '#/components/schemas/ChangeRequestUserRelationshipData'
+ required:
+ - data
+ type: object
+ ChangeRequestUserRelationshipData:
+ description: User relationship data.
+ nullable: true
+ properties:
+ id:
+ description: The user UUID.
+ example: 00000000-0000-0000-0000-000000000000
+ type: string
+ type:
+ description: The user resource type.
+ example: user
+ type: string
+ required:
+ - id
+ - type
+ type: object
ChargebackBreakdown:
description: Charges breakdown.
properties:
@@ -74763,6 +75399,267 @@ paths:
limitParam: page[limit]
pageOffsetParam: page[offset]
resultsPath: data
+ /api/v2/change-management/change-request:
+ post:
+ description: Create a new change request.
+ operationId: CreateChangeRequest
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ChangeRequestCreateRequest'
+ description: Change request payload.
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ChangeRequestResponse'
+ description: Created
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Forbidden
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - cases_write
+ summary: Create a change request
+ tags:
+ - Change Management
+ x-unstable: '**Note**: This endpoint is in preview and is subject to change.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ /api/v2/change-management/change-request/{change_request_id}:
+ get:
+ description: Get the details of a change request by its ID.
+ operationId: GetChangeRequest
+ parameters:
+ - $ref: '#/components/parameters/ChangeRequestIDPathParameter'
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ChangeRequestResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - cases_read
+ summary: Get a change request
+ tags:
+ - Change Management
+ x-unstable: '**Note**: This endpoint is in preview and is subject to change.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ patch:
+ description: Update the properties of a change request.
+ operationId: UpdateChangeRequest
+ parameters:
+ - $ref: '#/components/parameters/ChangeRequestIDPathParameter'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ChangeRequestUpdateRequest'
+ description: Change request update payload.
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ChangeRequestResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Forbidden
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - cases_write
+ summary: Update a change request
+ tags:
+ - Change Management
+ x-unstable: '**Note**: This endpoint is in preview and is subject to change.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ /api/v2/change-management/change-request/{change_request_id}/branch:
+ post:
+ description: Create a new branch in a repository for a change request.
+ operationId: CreateChangeRequestBranch
+ parameters:
+ - $ref: '#/components/parameters/ChangeRequestIDPathParameter'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ChangeRequestBranchCreateRequest'
+ description: Branch creation payload.
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ChangeRequestResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - cases_write
+ summary: Create a change request branch
+ tags:
+ - Change Management
+ x-unstable: '**Note**: This endpoint is in preview and is subject to change.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ /api/v2/change-management/change-request/{change_request_id}/decisions/{decision_id}:
+ delete:
+ description: Delete a decision from a change request.
+ operationId: DeleteChangeRequestDecision
+ parameters:
+ - $ref: '#/components/parameters/ChangeRequestIDPathParameter'
+ - $ref: '#/components/parameters/ChangeRequestDecisionIDPathParameter'
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ChangeRequestResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - cases_write
+ summary: Delete a change request decision
+ tags:
+ - Change Management
+ x-unstable: '**Note**: This endpoint is in preview and is subject to change.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ patch:
+ description: Update a decision on a change request, such as approving or declining
+ it.
+ operationId: UpdateChangeRequestDecision
+ parameters:
+ - $ref: '#/components/parameters/ChangeRequestIDPathParameter'
+ - $ref: '#/components/parameters/ChangeRequestDecisionIDPathParameter'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ChangeRequestDecisionUpdateRequest'
+ description: Decision update payload.
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ChangeRequestResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - cases_write
+ summary: Update a change request decision
+ tags:
+ - Change Management
+ x-unstable: '**Note**: This endpoint is in preview and is subject to change.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/ci/pipeline:
post:
description: 'Send your pipeline event to your Datadog platform over HTTP. For
@@ -105183,6 +106080,10 @@ tags:
Management page](https://docs.datadoghq.com/service_management/case_management/)
for more information.
name: Case Management Type
+- description: View and manage change requests within Change Management. See the [Case
+ Management page](https://docs.datadoghq.com/service_management/case_management/)
+ for more information.
+ name: Change Management
- description: Configure AWS cloud authentication mappings for persona and intake
authentication through the Datadog API.
name: Cloud Authentication
diff --git a/examples/v2/change-management/CreateChangeRequest.java b/examples/v2/change-management/CreateChangeRequest.java
new file mode 100644
index 00000000000..31590e9e876
--- /dev/null
+++ b/examples/v2/change-management/CreateChangeRequest.java
@@ -0,0 +1,53 @@
+// Create a change request returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ChangeManagementApi;
+import com.datadog.api.client.v2.model.ChangeRequestChangeType;
+import com.datadog.api.client.v2.model.ChangeRequestCreateAttributes;
+import com.datadog.api.client.v2.model.ChangeRequestCreateData;
+import com.datadog.api.client.v2.model.ChangeRequestCreateRequest;
+import com.datadog.api.client.v2.model.ChangeRequestResourceType;
+import com.datadog.api.client.v2.model.ChangeRequestResponse;
+import com.datadog.api.client.v2.model.ChangeRequestRiskLevel;
+import java.time.OffsetDateTime;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.createChangeRequest", true);
+ ChangeManagementApi apiInstance = new ChangeManagementApi(defaultClient);
+
+ ChangeRequestCreateRequest body =
+ new ChangeRequestCreateRequest()
+ .data(
+ new ChangeRequestCreateData()
+ .attributes(
+ new ChangeRequestCreateAttributes()
+ .changeRequestLinkedIncidentUuid("00000000-0000-0000-0000-000000000000")
+ .changeRequestMaintenanceWindowQuery("")
+ .changeRequestPlan(
+ "1. Deploy to staging 2. Run tests 3. Deploy to production")
+ .changeRequestRisk(ChangeRequestRiskLevel.LOW)
+ .changeRequestType(ChangeRequestChangeType.NORMAL)
+ .description("Deploying new payment service v2.1")
+ .endDate(OffsetDateTime.parse("2024-01-02T15:00:00Z"))
+ .projectId("d4bbe1af-f36e-42f1-87c1-493ca35c320e")
+ .requestedTeams(Collections.singletonList("team-handle-1"))
+ .startDate(OffsetDateTime.parse("2024-01-01T03:00:00Z"))
+ .title("Deploy new payment service"))
+ .type(ChangeRequestResourceType.CHANGE_REQUEST));
+
+ try {
+ ChangeRequestResponse result = apiInstance.createChangeRequest(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ChangeManagementApi#createChangeRequest");
+ 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/change-management/CreateChangeRequestBranch.java b/examples/v2/change-management/CreateChangeRequestBranch.java
new file mode 100644
index 00000000000..19361f4c664
--- /dev/null
+++ b/examples/v2/change-management/CreateChangeRequestBranch.java
@@ -0,0 +1,39 @@
+// Create a change request branch returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ChangeManagementApi;
+import com.datadog.api.client.v2.model.ChangeRequestBranchCreateAttributes;
+import com.datadog.api.client.v2.model.ChangeRequestBranchCreateData;
+import com.datadog.api.client.v2.model.ChangeRequestBranchCreateRequest;
+import com.datadog.api.client.v2.model.ChangeRequestBranchResourceType;
+import com.datadog.api.client.v2.model.ChangeRequestResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.createChangeRequestBranch", true);
+ ChangeManagementApi apiInstance = new ChangeManagementApi(defaultClient);
+
+ ChangeRequestBranchCreateRequest body =
+ new ChangeRequestBranchCreateRequest()
+ .data(
+ new ChangeRequestBranchCreateData()
+ .attributes(
+ new ChangeRequestBranchCreateAttributes()
+ .branchName("chm/CHM-1234")
+ .repoId("DataDog/dd-source"))
+ .type(ChangeRequestBranchResourceType.CHANGE_REQUEST_BRANCH));
+
+ try {
+ ChangeRequestResponse result = apiInstance.createChangeRequestBranch("CHM-1234", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ChangeManagementApi#createChangeRequestBranch");
+ 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/change-management/DeleteChangeRequestDecision.java b/examples/v2/change-management/DeleteChangeRequestDecision.java
new file mode 100644
index 00000000000..3ede5575435
--- /dev/null
+++ b/examples/v2/change-management/DeleteChangeRequestDecision.java
@@ -0,0 +1,26 @@
+// Delete a change request decision returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ChangeManagementApi;
+import com.datadog.api.client.v2.model.ChangeRequestResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.deleteChangeRequestDecision", true);
+ ChangeManagementApi apiInstance = new ChangeManagementApi(defaultClient);
+
+ try {
+ ChangeRequestResponse result =
+ apiInstance.deleteChangeRequestDecision("CHM-1234", "decision-id-0");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ChangeManagementApi#deleteChangeRequestDecision");
+ 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/change-management/GetChangeRequest.java b/examples/v2/change-management/GetChangeRequest.java
new file mode 100644
index 00000000000..510f5f15dfb
--- /dev/null
+++ b/examples/v2/change-management/GetChangeRequest.java
@@ -0,0 +1,25 @@
+// Get a change request returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ChangeManagementApi;
+import com.datadog.api.client.v2.model.ChangeRequestResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.getChangeRequest", true);
+ ChangeManagementApi apiInstance = new ChangeManagementApi(defaultClient);
+
+ try {
+ ChangeRequestResponse result = apiInstance.getChangeRequest("CHM-1234");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ChangeManagementApi#getChangeRequest");
+ 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/change-management/UpdateChangeRequest.java b/examples/v2/change-management/UpdateChangeRequest.java
new file mode 100644
index 00000000000..655c13517f2
--- /dev/null
+++ b/examples/v2/change-management/UpdateChangeRequest.java
@@ -0,0 +1,85 @@
+// Update a change request returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ChangeManagementApi;
+import com.datadog.api.client.v2.model.ChangeRequestChangeType;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionCreateAttributes;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionCreateItem;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionCreateRelationships;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionRelationshipData;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionResourceType;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionStatusType;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionsRelationship;
+import com.datadog.api.client.v2.model.ChangeRequestResourceType;
+import com.datadog.api.client.v2.model.ChangeRequestResponse;
+import com.datadog.api.client.v2.model.ChangeRequestRiskLevel;
+import com.datadog.api.client.v2.model.ChangeRequestUpdateAttributes;
+import com.datadog.api.client.v2.model.ChangeRequestUpdateData;
+import com.datadog.api.client.v2.model.ChangeRequestUpdateRelationships;
+import com.datadog.api.client.v2.model.ChangeRequestUpdateRequest;
+import com.datadog.api.client.v2.model.ChangeRequestUserRelationship;
+import com.datadog.api.client.v2.model.ChangeRequestUserRelationshipData;
+import java.time.OffsetDateTime;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.updateChangeRequest", true);
+ ChangeManagementApi apiInstance = new ChangeManagementApi(defaultClient);
+
+ ChangeRequestUpdateRequest body =
+ new ChangeRequestUpdateRequest()
+ .data(
+ new ChangeRequestUpdateData()
+ .attributes(
+ new ChangeRequestUpdateAttributes()
+ .changeRequestPlan("Updated deployment plan")
+ .changeRequestRisk(ChangeRequestRiskLevel.LOW)
+ .changeRequestType(ChangeRequestChangeType.NORMAL)
+ .endDate(OffsetDateTime.parse("2024-01-02T15:00:00Z"))
+ .id("CHM-1234")
+ .startDate(OffsetDateTime.parse("2024-01-01T03:00:00Z")))
+ .relationships(
+ new ChangeRequestUpdateRelationships()
+ .changeRequestDecisions(
+ new ChangeRequestDecisionsRelationship()
+ .data(
+ Collections.singletonList(
+ new ChangeRequestDecisionRelationshipData()
+ .id("decision-id-0")
+ .type(
+ ChangeRequestDecisionResourceType
+ .CHANGE_REQUEST_DECISION)))))
+ .type(ChangeRequestResourceType.CHANGE_REQUEST))
+ .included(
+ Collections.singletonList(
+ new ChangeRequestDecisionCreateItem()
+ .attributes(
+ new ChangeRequestDecisionCreateAttributes()
+ .changeRequestStatus(ChangeRequestDecisionStatusType.REQUESTED)
+ .requestReason("Please review and approve this change"))
+ .id("decision-id-0")
+ .relationships(
+ new ChangeRequestDecisionCreateRelationships()
+ .requestedUser(
+ new ChangeRequestUserRelationship()
+ .data(
+ new ChangeRequestUserRelationshipData()
+ .id("00000000-0000-0000-0000-000000000000")
+ .type("user"))))
+ .type(ChangeRequestDecisionResourceType.CHANGE_REQUEST_DECISION)));
+
+ try {
+ ChangeRequestResponse result = apiInstance.updateChangeRequest("CHM-1234", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ChangeManagementApi#updateChangeRequest");
+ 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/change-management/UpdateChangeRequestDecision.java b/examples/v2/change-management/UpdateChangeRequestDecision.java
new file mode 100644
index 00000000000..02985e42dfa
--- /dev/null
+++ b/examples/v2/change-management/UpdateChangeRequestDecision.java
@@ -0,0 +1,76 @@
+// Update a change request decision returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ChangeManagementApi;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionCreateAttributes;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionCreateItem;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionCreateRelationships;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionRelationshipData;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionResourceType;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionStatusType;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionUpdateData;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionUpdateDataAttributes;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionUpdateDataRelationships;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionUpdateRequest;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionsRelationship;
+import com.datadog.api.client.v2.model.ChangeRequestResourceType;
+import com.datadog.api.client.v2.model.ChangeRequestResponse;
+import com.datadog.api.client.v2.model.ChangeRequestUserRelationship;
+import com.datadog.api.client.v2.model.ChangeRequestUserRelationshipData;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.updateChangeRequestDecision", true);
+ ChangeManagementApi apiInstance = new ChangeManagementApi(defaultClient);
+
+ ChangeRequestDecisionUpdateRequest body =
+ new ChangeRequestDecisionUpdateRequest()
+ .data(
+ new ChangeRequestDecisionUpdateData()
+ .attributes(new ChangeRequestDecisionUpdateDataAttributes().id("CHM-1234"))
+ .relationships(
+ new ChangeRequestDecisionUpdateDataRelationships()
+ .changeRequestDecisions(
+ new ChangeRequestDecisionsRelationship()
+ .data(
+ Collections.singletonList(
+ new ChangeRequestDecisionRelationshipData()
+ .id("decision-id-0")
+ .type(
+ ChangeRequestDecisionResourceType
+ .CHANGE_REQUEST_DECISION)))))
+ .type(ChangeRequestResourceType.CHANGE_REQUEST))
+ .included(
+ Collections.singletonList(
+ new ChangeRequestDecisionCreateItem()
+ .attributes(
+ new ChangeRequestDecisionCreateAttributes()
+ .changeRequestStatus(ChangeRequestDecisionStatusType.REQUESTED)
+ .requestReason("Please review and approve this change"))
+ .id("decision-id-0")
+ .relationships(
+ new ChangeRequestDecisionCreateRelationships()
+ .requestedUser(
+ new ChangeRequestUserRelationship()
+ .data(
+ new ChangeRequestUserRelationshipData()
+ .id("00000000-0000-0000-0000-000000000000")
+ .type("user"))))
+ .type(ChangeRequestDecisionResourceType.CHANGE_REQUEST_DECISION)));
+
+ try {
+ ChangeRequestResponse result =
+ apiInstance.updateChangeRequestDecision("CHM-1234", "decision-id-0", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ChangeManagementApi#updateChangeRequestDecision");
+ 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 7606b2b54f0..762908f9bb5 100644
--- a/src/main/java/com/datadog/api/client/ApiClient.java
+++ b/src/main/java/com/datadog/api/client/ApiClient.java
@@ -782,6 +782,12 @@ public class ApiClient {
put("v2.linkJiraIssueToCase", false);
put("v2.moveCaseToProject", false);
put("v2.unlinkJiraIssue", false);
+ put("v2.createChangeRequest", false);
+ put("v2.createChangeRequestBranch", false);
+ put("v2.deleteChangeRequestDecision", false);
+ put("v2.getChangeRequest", false);
+ put("v2.updateChangeRequest", false);
+ put("v2.updateChangeRequestDecision", false);
put("v2.listAWSCloudAuthPersonaMappings", false);
put("v2.activateContentPack", false);
put("v2.cancelThreatHuntingJob", false);
diff --git a/src/main/java/com/datadog/api/client/v2/api/ChangeManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/ChangeManagementApi.java
new file mode 100644
index 00000000000..f4554f41c09
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/ChangeManagementApi.java
@@ -0,0 +1,1116 @@
+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.ChangeRequestBranchCreateRequest;
+import com.datadog.api.client.v2.model.ChangeRequestCreateRequest;
+import com.datadog.api.client.v2.model.ChangeRequestDecisionUpdateRequest;
+import com.datadog.api.client.v2.model.ChangeRequestResponse;
+import com.datadog.api.client.v2.model.ChangeRequestUpdateRequest;
+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 ChangeManagementApi {
+ private ApiClient apiClient;
+
+ public ChangeManagementApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public ChangeManagementApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Create a change request.
+ *
+ *
See {@link #createChangeRequestWithHttpInfo}.
+ *
+ * @param body Change request payload. (required)
+ * @return ChangeRequestResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ChangeRequestResponse createChangeRequest(ChangeRequestCreateRequest body)
+ throws ApiException {
+ return createChangeRequestWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create a change request.
+ *
+ *
See {@link #createChangeRequestWithHttpInfoAsync}.
+ *
+ * @param body Change request payload. (required)
+ * @return CompletableFuture<ChangeRequestResponse>
+ */
+ public CompletableFuture createChangeRequestAsync(
+ ChangeRequestCreateRequest body) {
+ return createChangeRequestWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a new change request.
+ *
+ * @param body Change request payload. (required)
+ * @return ApiResponse<ChangeRequestResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | Created | - |
+ * | 400 | Bad Request | - |
+ * | 403 | Forbidden | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createChangeRequestWithHttpInfo(
+ ChangeRequestCreateRequest body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "createChangeRequest";
+ 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 createChangeRequest");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/change-management/change-request";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.createChangeRequest",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a change request.
+ *
+ * See {@link #createChangeRequestWithHttpInfo}.
+ *
+ * @param body Change request payload. (required)
+ * @return CompletableFuture<ApiResponse<ChangeRequestResponse>>
+ */
+ public CompletableFuture> createChangeRequestWithHttpInfoAsync(
+ ChangeRequestCreateRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "createChangeRequest";
+ 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 createChangeRequest"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/change-management/change-request";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.createChangeRequest",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a change request branch.
+ *
+ * See {@link #createChangeRequestBranchWithHttpInfo}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param body Branch creation payload. (required)
+ * @return ChangeRequestResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ChangeRequestResponse createChangeRequestBranch(
+ String changeRequestId, ChangeRequestBranchCreateRequest body) throws ApiException {
+ return createChangeRequestBranchWithHttpInfo(changeRequestId, body).getData();
+ }
+
+ /**
+ * Create a change request branch.
+ *
+ *
See {@link #createChangeRequestBranchWithHttpInfoAsync}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param body Branch creation payload. (required)
+ * @return CompletableFuture<ChangeRequestResponse>
+ */
+ public CompletableFuture createChangeRequestBranchAsync(
+ String changeRequestId, ChangeRequestBranchCreateRequest body) {
+ return createChangeRequestBranchWithHttpInfoAsync(changeRequestId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a new branch in a repository for a change request.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param body Branch creation payload. (required)
+ * @return ApiResponse<ChangeRequestResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createChangeRequestBranchWithHttpInfo(
+ String changeRequestId, ChangeRequestBranchCreateRequest body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "createChangeRequestBranch";
+ 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 'changeRequestId' is set
+ if (changeRequestId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'changeRequestId' when calling"
+ + " createChangeRequestBranch");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createChangeRequestBranch");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/change-management/change-request/{change_request_id}/branch"
+ .replaceAll(
+ "\\{" + "change_request_id" + "\\}",
+ apiClient.escapeString(changeRequestId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.createChangeRequestBranch",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a change request branch.
+ *
+ * See {@link #createChangeRequestBranchWithHttpInfo}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param body Branch creation payload. (required)
+ * @return CompletableFuture<ApiResponse<ChangeRequestResponse>>
+ */
+ public CompletableFuture>
+ createChangeRequestBranchWithHttpInfoAsync(
+ String changeRequestId, ChangeRequestBranchCreateRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "createChangeRequestBranch";
+ 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 'changeRequestId' is set
+ if (changeRequestId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'changeRequestId' when calling"
+ + " createChangeRequestBranch"));
+ 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 createChangeRequestBranch"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/change-management/change-request/{change_request_id}/branch"
+ .replaceAll(
+ "\\{" + "change_request_id" + "\\}",
+ apiClient.escapeString(changeRequestId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.createChangeRequestBranch",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete a change request decision.
+ *
+ * See {@link #deleteChangeRequestDecisionWithHttpInfo}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param decisionId The identifier of the change request decision. (required)
+ * @return ChangeRequestResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ChangeRequestResponse deleteChangeRequestDecision(
+ String changeRequestId, String decisionId) throws ApiException {
+ return deleteChangeRequestDecisionWithHttpInfo(changeRequestId, decisionId).getData();
+ }
+
+ /**
+ * Delete a change request decision.
+ *
+ *
See {@link #deleteChangeRequestDecisionWithHttpInfoAsync}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param decisionId The identifier of the change request decision. (required)
+ * @return CompletableFuture<ChangeRequestResponse>
+ */
+ public CompletableFuture deleteChangeRequestDecisionAsync(
+ String changeRequestId, String decisionId) {
+ return deleteChangeRequestDecisionWithHttpInfoAsync(changeRequestId, decisionId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete a decision from a change request.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param decisionId The identifier of the change request decision. (required)
+ * @return ApiResponse<ChangeRequestResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteChangeRequestDecisionWithHttpInfo(
+ String changeRequestId, String decisionId) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "deleteChangeRequestDecision";
+ 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 'changeRequestId' is set
+ if (changeRequestId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'changeRequestId' when calling"
+ + " deleteChangeRequestDecision");
+ }
+
+ // verify the required parameter 'decisionId' is set
+ if (decisionId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'decisionId' when calling deleteChangeRequestDecision");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/change-management/change-request/{change_request_id}/decisions/{decision_id}"
+ .replaceAll(
+ "\\{" + "change_request_id" + "\\}",
+ apiClient.escapeString(changeRequestId.toString()))
+ .replaceAll(
+ "\\{" + "decision_id" + "\\}", apiClient.escapeString(decisionId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.deleteChangeRequestDecision",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete a change request decision.
+ *
+ * See {@link #deleteChangeRequestDecisionWithHttpInfo}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param decisionId The identifier of the change request decision. (required)
+ * @return CompletableFuture<ApiResponse<ChangeRequestResponse>>
+ */
+ public CompletableFuture>
+ deleteChangeRequestDecisionWithHttpInfoAsync(String changeRequestId, String decisionId) {
+ // Check if unstable operation is enabled
+ String operationId = "deleteChangeRequestDecision";
+ 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 'changeRequestId' is set
+ if (changeRequestId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'changeRequestId' when calling"
+ + " deleteChangeRequestDecision"));
+ return result;
+ }
+
+ // verify the required parameter 'decisionId' is set
+ if (decisionId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'decisionId' when calling"
+ + " deleteChangeRequestDecision"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/change-management/change-request/{change_request_id}/decisions/{decision_id}"
+ .replaceAll(
+ "\\{" + "change_request_id" + "\\}",
+ apiClient.escapeString(changeRequestId.toString()))
+ .replaceAll(
+ "\\{" + "decision_id" + "\\}", apiClient.escapeString(decisionId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.deleteChangeRequestDecision",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get a change request.
+ *
+ * See {@link #getChangeRequestWithHttpInfo}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @return ChangeRequestResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ChangeRequestResponse getChangeRequest(String changeRequestId) throws ApiException {
+ return getChangeRequestWithHttpInfo(changeRequestId).getData();
+ }
+
+ /**
+ * Get a change request.
+ *
+ *
See {@link #getChangeRequestWithHttpInfoAsync}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @return CompletableFuture<ChangeRequestResponse>
+ */
+ public CompletableFuture getChangeRequestAsync(String changeRequestId) {
+ return getChangeRequestWithHttpInfoAsync(changeRequestId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get the details of a change request by its ID.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @return ApiResponse<ChangeRequestResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getChangeRequestWithHttpInfo(String changeRequestId)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "getChangeRequest";
+ 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 'changeRequestId' is set
+ if (changeRequestId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'changeRequestId' when calling getChangeRequest");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/change-management/change-request/{change_request_id}"
+ .replaceAll(
+ "\\{" + "change_request_id" + "\\}",
+ apiClient.escapeString(changeRequestId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.getChangeRequest",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get a change request.
+ *
+ * See {@link #getChangeRequestWithHttpInfo}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @return CompletableFuture<ApiResponse<ChangeRequestResponse>>
+ */
+ public CompletableFuture> getChangeRequestWithHttpInfoAsync(
+ String changeRequestId) {
+ // Check if unstable operation is enabled
+ String operationId = "getChangeRequest";
+ 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 'changeRequestId' is set
+ if (changeRequestId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'changeRequestId' when calling getChangeRequest"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/change-management/change-request/{change_request_id}"
+ .replaceAll(
+ "\\{" + "change_request_id" + "\\}",
+ apiClient.escapeString(changeRequestId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.getChangeRequest",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update a change request.
+ *
+ * See {@link #updateChangeRequestWithHttpInfo}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param body Change request update payload. (required)
+ * @return ChangeRequestResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ChangeRequestResponse updateChangeRequest(
+ String changeRequestId, ChangeRequestUpdateRequest body) throws ApiException {
+ return updateChangeRequestWithHttpInfo(changeRequestId, body).getData();
+ }
+
+ /**
+ * Update a change request.
+ *
+ *
See {@link #updateChangeRequestWithHttpInfoAsync}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param body Change request update payload. (required)
+ * @return CompletableFuture<ChangeRequestResponse>
+ */
+ public CompletableFuture updateChangeRequestAsync(
+ String changeRequestId, ChangeRequestUpdateRequest body) {
+ return updateChangeRequestWithHttpInfoAsync(changeRequestId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update the properties of a change request.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param body Change request update payload. (required)
+ * @return ApiResponse<ChangeRequestResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateChangeRequestWithHttpInfo(
+ String changeRequestId, ChangeRequestUpdateRequest body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "updateChangeRequest";
+ 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 'changeRequestId' is set
+ if (changeRequestId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'changeRequestId' when calling updateChangeRequest");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateChangeRequest");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/change-management/change-request/{change_request_id}"
+ .replaceAll(
+ "\\{" + "change_request_id" + "\\}",
+ apiClient.escapeString(changeRequestId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.updateChangeRequest",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update a change request.
+ *
+ * See {@link #updateChangeRequestWithHttpInfo}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param body Change request update payload. (required)
+ * @return CompletableFuture<ApiResponse<ChangeRequestResponse>>
+ */
+ public CompletableFuture> updateChangeRequestWithHttpInfoAsync(
+ String changeRequestId, ChangeRequestUpdateRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "updateChangeRequest";
+ 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 'changeRequestId' is set
+ if (changeRequestId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'changeRequestId' when calling updateChangeRequest"));
+ 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 updateChangeRequest"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/change-management/change-request/{change_request_id}"
+ .replaceAll(
+ "\\{" + "change_request_id" + "\\}",
+ apiClient.escapeString(changeRequestId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.updateChangeRequest",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update a change request decision.
+ *
+ * See {@link #updateChangeRequestDecisionWithHttpInfo}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param decisionId The identifier of the change request decision. (required)
+ * @param body Decision update payload. (required)
+ * @return ChangeRequestResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ChangeRequestResponse updateChangeRequestDecision(
+ String changeRequestId, String decisionId, ChangeRequestDecisionUpdateRequest body)
+ throws ApiException {
+ return updateChangeRequestDecisionWithHttpInfo(changeRequestId, decisionId, body).getData();
+ }
+
+ /**
+ * Update a change request decision.
+ *
+ *
See {@link #updateChangeRequestDecisionWithHttpInfoAsync}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param decisionId The identifier of the change request decision. (required)
+ * @param body Decision update payload. (required)
+ * @return CompletableFuture<ChangeRequestResponse>
+ */
+ public CompletableFuture updateChangeRequestDecisionAsync(
+ String changeRequestId, String decisionId, ChangeRequestDecisionUpdateRequest body) {
+ return updateChangeRequestDecisionWithHttpInfoAsync(changeRequestId, decisionId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update a decision on a change request, such as approving or declining it.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param decisionId The identifier of the change request decision. (required)
+ * @param body Decision update payload. (required)
+ * @return ApiResponse<ChangeRequestResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateChangeRequestDecisionWithHttpInfo(
+ String changeRequestId, String decisionId, ChangeRequestDecisionUpdateRequest body)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "updateChangeRequestDecision";
+ 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 'changeRequestId' is set
+ if (changeRequestId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'changeRequestId' when calling"
+ + " updateChangeRequestDecision");
+ }
+
+ // verify the required parameter 'decisionId' is set
+ if (decisionId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'decisionId' when calling updateChangeRequestDecision");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateChangeRequestDecision");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/change-management/change-request/{change_request_id}/decisions/{decision_id}"
+ .replaceAll(
+ "\\{" + "change_request_id" + "\\}",
+ apiClient.escapeString(changeRequestId.toString()))
+ .replaceAll(
+ "\\{" + "decision_id" + "\\}", apiClient.escapeString(decisionId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.updateChangeRequestDecision",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update a change request decision.
+ *
+ * See {@link #updateChangeRequestDecisionWithHttpInfo}.
+ *
+ * @param changeRequestId The identifier of the change request. (required)
+ * @param decisionId The identifier of the change request decision. (required)
+ * @param body Decision update payload. (required)
+ * @return CompletableFuture<ApiResponse<ChangeRequestResponse>>
+ */
+ public CompletableFuture>
+ updateChangeRequestDecisionWithHttpInfoAsync(
+ String changeRequestId, String decisionId, ChangeRequestDecisionUpdateRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "updateChangeRequestDecision";
+ 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 'changeRequestId' is set
+ if (changeRequestId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'changeRequestId' when calling"
+ + " updateChangeRequestDecision"));
+ return result;
+ }
+
+ // verify the required parameter 'decisionId' is set
+ if (decisionId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'decisionId' when calling"
+ + " updateChangeRequestDecision"));
+ 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 updateChangeRequestDecision"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/change-management/change-request/{change_request_id}/decisions/{decision_id}"
+ .replaceAll(
+ "\\{" + "change_request_id" + "\\}",
+ apiClient.escapeString(changeRequestId.toString()))
+ .replaceAll(
+ "\\{" + "decision_id" + "\\}", apiClient.escapeString(decisionId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ChangeManagementApi.updateChangeRequestDecision",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ChangeRequestBranchCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestBranchCreateAttributes.java
new file mode 100644
index 00000000000..ecacbf36a15
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestBranchCreateAttributes.java
@@ -0,0 +1,175 @@
+/*
+ * 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;
+
+/** Attributes for creating a change request branch. */
+@JsonPropertyOrder({
+ ChangeRequestBranchCreateAttributes.JSON_PROPERTY_BRANCH_NAME,
+ ChangeRequestBranchCreateAttributes.JSON_PROPERTY_REPO_ID
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestBranchCreateAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_BRANCH_NAME = "branch_name";
+ private String branchName;
+
+ public static final String JSON_PROPERTY_REPO_ID = "repo_id";
+ private String repoId;
+
+ public ChangeRequestBranchCreateAttributes() {}
+
+ @JsonCreator
+ public ChangeRequestBranchCreateAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_BRANCH_NAME) String branchName,
+ @JsonProperty(required = true, value = JSON_PROPERTY_REPO_ID) String repoId) {
+ this.branchName = branchName;
+ this.repoId = repoId;
+ }
+
+ public ChangeRequestBranchCreateAttributes branchName(String branchName) {
+ this.branchName = branchName;
+ return this;
+ }
+
+ /**
+ * The name of the branch to create.
+ *
+ * @return branchName
+ */
+ @JsonProperty(JSON_PROPERTY_BRANCH_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getBranchName() {
+ return branchName;
+ }
+
+ public void setBranchName(String branchName) {
+ this.branchName = branchName;
+ }
+
+ public ChangeRequestBranchCreateAttributes repoId(String repoId) {
+ this.repoId = repoId;
+ return this;
+ }
+
+ /**
+ * The repository identifier in the format owner/repository.
+ *
+ * @return repoId
+ */
+ @JsonProperty(JSON_PROPERTY_REPO_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getRepoId() {
+ return repoId;
+ }
+
+ public void setRepoId(String repoId) {
+ this.repoId = repoId;
+ }
+
+ /**
+ * 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 ChangeRequestBranchCreateAttributes
+ */
+ @JsonAnySetter
+ public ChangeRequestBranchCreateAttributes 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 ChangeRequestBranchCreateAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestBranchCreateAttributes changeRequestBranchCreateAttributes =
+ (ChangeRequestBranchCreateAttributes) o;
+ return Objects.equals(this.branchName, changeRequestBranchCreateAttributes.branchName)
+ && Objects.equals(this.repoId, changeRequestBranchCreateAttributes.repoId)
+ && Objects.equals(
+ this.additionalProperties, changeRequestBranchCreateAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(branchName, repoId, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestBranchCreateAttributes {\n");
+ sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n");
+ sb.append(" repoId: ").append(toIndentedString(repoId)).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/ChangeRequestBranchCreateData.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestBranchCreateData.java
new file mode 100644
index 00000000000..68e5d7d26b6
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestBranchCreateData.java
@@ -0,0 +1,183 @@
+/*
+ * 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 object to create a change request branch. */
+@JsonPropertyOrder({
+ ChangeRequestBranchCreateData.JSON_PROPERTY_ATTRIBUTES,
+ ChangeRequestBranchCreateData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestBranchCreateData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private ChangeRequestBranchCreateAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private ChangeRequestBranchResourceType type;
+
+ public ChangeRequestBranchCreateData() {}
+
+ @JsonCreator
+ public ChangeRequestBranchCreateData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ ChangeRequestBranchCreateAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ ChangeRequestBranchResourceType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public ChangeRequestBranchCreateData attributes(ChangeRequestBranchCreateAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for creating a change request branch.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestBranchCreateAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(ChangeRequestBranchCreateAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public ChangeRequestBranchCreateData type(ChangeRequestBranchResourceType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Change request branch resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestBranchResourceType getType() {
+ return type;
+ }
+
+ public void setType(ChangeRequestBranchResourceType 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 ChangeRequestBranchCreateData
+ */
+ @JsonAnySetter
+ public ChangeRequestBranchCreateData 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 ChangeRequestBranchCreateData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestBranchCreateData changeRequestBranchCreateData = (ChangeRequestBranchCreateData) o;
+ return Objects.equals(this.attributes, changeRequestBranchCreateData.attributes)
+ && Objects.equals(this.type, changeRequestBranchCreateData.type)
+ && Objects.equals(
+ this.additionalProperties, changeRequestBranchCreateData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestBranchCreateData {\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/ChangeRequestBranchCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestBranchCreateRequest.java
new file mode 100644
index 00000000000..06693000448
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestBranchCreateRequest.java
@@ -0,0 +1,148 @@
+/*
+ * 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;
+
+/** Request object to create a branch for a change request. */
+@JsonPropertyOrder({ChangeRequestBranchCreateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestBranchCreateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private ChangeRequestBranchCreateData data;
+
+ public ChangeRequestBranchCreateRequest() {}
+
+ @JsonCreator
+ public ChangeRequestBranchCreateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ ChangeRequestBranchCreateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public ChangeRequestBranchCreateRequest data(ChangeRequestBranchCreateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data object to create a change request branch.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestBranchCreateData getData() {
+ return data;
+ }
+
+ public void setData(ChangeRequestBranchCreateData 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 ChangeRequestBranchCreateRequest
+ */
+ @JsonAnySetter
+ public ChangeRequestBranchCreateRequest 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 ChangeRequestBranchCreateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestBranchCreateRequest changeRequestBranchCreateRequest =
+ (ChangeRequestBranchCreateRequest) o;
+ return Objects.equals(this.data, changeRequestBranchCreateRequest.data)
+ && Objects.equals(
+ this.additionalProperties, changeRequestBranchCreateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestBranchCreateRequest {\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/ChangeRequestBranchResourceType.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestBranchResourceType.java
new file mode 100644
index 00000000000..5372c22a70b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestBranchResourceType.java
@@ -0,0 +1,58 @@
+/*
+ * 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;
+
+/** Change request branch resource type. */
+@JsonSerialize(
+ using = ChangeRequestBranchResourceType.ChangeRequestBranchResourceTypeSerializer.class)
+public class ChangeRequestBranchResourceType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("change_request_branch"));
+
+ public static final ChangeRequestBranchResourceType CHANGE_REQUEST_BRANCH =
+ new ChangeRequestBranchResourceType("change_request_branch");
+
+ ChangeRequestBranchResourceType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class ChangeRequestBranchResourceTypeSerializer
+ extends StdSerializer {
+ public ChangeRequestBranchResourceTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public ChangeRequestBranchResourceTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ChangeRequestBranchResourceType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static ChangeRequestBranchResourceType fromValue(String value) {
+ return new ChangeRequestBranchResourceType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ChangeRequestChangeType.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestChangeType.java
new file mode 100644
index 00000000000..80f4a4c049f
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestChangeType.java
@@ -0,0 +1,58 @@
+/*
+ * 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 change request. */
+@JsonSerialize(using = ChangeRequestChangeType.ChangeRequestChangeTypeSerializer.class)
+public class ChangeRequestChangeType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("NORMAL", "STANDARD", "EMERGENCY"));
+
+ public static final ChangeRequestChangeType NORMAL = new ChangeRequestChangeType("NORMAL");
+ public static final ChangeRequestChangeType STANDARD = new ChangeRequestChangeType("STANDARD");
+ public static final ChangeRequestChangeType EMERGENCY = new ChangeRequestChangeType("EMERGENCY");
+
+ ChangeRequestChangeType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class ChangeRequestChangeTypeSerializer
+ extends StdSerializer {
+ public ChangeRequestChangeTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public ChangeRequestChangeTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ChangeRequestChangeType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static ChangeRequestChangeType fromValue(String value) {
+ return new ChangeRequestChangeType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ChangeRequestCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestCreateAttributes.java
new file mode 100644
index 00000000000..7616f314e29
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestCreateAttributes.java
@@ -0,0 +1,460 @@
+/*
+ * 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.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Attributes for creating a change request. */
+@JsonPropertyOrder({
+ ChangeRequestCreateAttributes.JSON_PROPERTY_CHANGE_REQUEST_LINKED_INCIDENT_UUID,
+ ChangeRequestCreateAttributes.JSON_PROPERTY_CHANGE_REQUEST_MAINTENANCE_WINDOW_QUERY,
+ ChangeRequestCreateAttributes.JSON_PROPERTY_CHANGE_REQUEST_PLAN,
+ ChangeRequestCreateAttributes.JSON_PROPERTY_CHANGE_REQUEST_RISK,
+ ChangeRequestCreateAttributes.JSON_PROPERTY_CHANGE_REQUEST_TYPE,
+ ChangeRequestCreateAttributes.JSON_PROPERTY_DESCRIPTION,
+ ChangeRequestCreateAttributes.JSON_PROPERTY_END_DATE,
+ ChangeRequestCreateAttributes.JSON_PROPERTY_PROJECT_ID,
+ ChangeRequestCreateAttributes.JSON_PROPERTY_REQUESTED_TEAMS,
+ ChangeRequestCreateAttributes.JSON_PROPERTY_START_DATE,
+ ChangeRequestCreateAttributes.JSON_PROPERTY_TITLE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestCreateAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CHANGE_REQUEST_LINKED_INCIDENT_UUID =
+ "change_request_linked_incident_uuid";
+ private String changeRequestLinkedIncidentUuid;
+
+ public static final String JSON_PROPERTY_CHANGE_REQUEST_MAINTENANCE_WINDOW_QUERY =
+ "change_request_maintenance_window_query";
+ private String changeRequestMaintenanceWindowQuery;
+
+ public static final String JSON_PROPERTY_CHANGE_REQUEST_PLAN = "change_request_plan";
+ private String changeRequestPlan;
+
+ public static final String JSON_PROPERTY_CHANGE_REQUEST_RISK = "change_request_risk";
+ private ChangeRequestRiskLevel changeRequestRisk;
+
+ public static final String JSON_PROPERTY_CHANGE_REQUEST_TYPE = "change_request_type";
+ private ChangeRequestChangeType changeRequestType;
+
+ public static final String JSON_PROPERTY_DESCRIPTION = "description";
+ private String description;
+
+ public static final String JSON_PROPERTY_END_DATE = "end_date";
+ private OffsetDateTime endDate;
+
+ public static final String JSON_PROPERTY_PROJECT_ID = "project_id";
+ private String projectId;
+
+ public static final String JSON_PROPERTY_REQUESTED_TEAMS = "requested_teams";
+ private List requestedTeams = null;
+
+ public static final String JSON_PROPERTY_START_DATE = "start_date";
+ private OffsetDateTime startDate;
+
+ public static final String JSON_PROPERTY_TITLE = "title";
+ private String title;
+
+ public ChangeRequestCreateAttributes() {}
+
+ @JsonCreator
+ public ChangeRequestCreateAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) {
+ this.title = title;
+ }
+
+ public ChangeRequestCreateAttributes changeRequestLinkedIncidentUuid(
+ String changeRequestLinkedIncidentUuid) {
+ this.changeRequestLinkedIncidentUuid = changeRequestLinkedIncidentUuid;
+ return this;
+ }
+
+ /**
+ * The UUID of an incident to link to the change request.
+ *
+ * @return changeRequestLinkedIncidentUuid
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CHANGE_REQUEST_LINKED_INCIDENT_UUID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getChangeRequestLinkedIncidentUuid() {
+ return changeRequestLinkedIncidentUuid;
+ }
+
+ public void setChangeRequestLinkedIncidentUuid(String changeRequestLinkedIncidentUuid) {
+ this.changeRequestLinkedIncidentUuid = changeRequestLinkedIncidentUuid;
+ }
+
+ public ChangeRequestCreateAttributes changeRequestMaintenanceWindowQuery(
+ String changeRequestMaintenanceWindowQuery) {
+ this.changeRequestMaintenanceWindowQuery = changeRequestMaintenanceWindowQuery;
+ return this;
+ }
+
+ /**
+ * The maintenance window query for the change request.
+ *
+ * @return changeRequestMaintenanceWindowQuery
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CHANGE_REQUEST_MAINTENANCE_WINDOW_QUERY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getChangeRequestMaintenanceWindowQuery() {
+ return changeRequestMaintenanceWindowQuery;
+ }
+
+ public void setChangeRequestMaintenanceWindowQuery(String changeRequestMaintenanceWindowQuery) {
+ this.changeRequestMaintenanceWindowQuery = changeRequestMaintenanceWindowQuery;
+ }
+
+ public ChangeRequestCreateAttributes changeRequestPlan(String changeRequestPlan) {
+ this.changeRequestPlan = changeRequestPlan;
+ return this;
+ }
+
+ /**
+ * The plan associated with the change request.
+ *
+ * @return changeRequestPlan
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CHANGE_REQUEST_PLAN)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getChangeRequestPlan() {
+ return changeRequestPlan;
+ }
+
+ public void setChangeRequestPlan(String changeRequestPlan) {
+ this.changeRequestPlan = changeRequestPlan;
+ }
+
+ public ChangeRequestCreateAttributes changeRequestRisk(ChangeRequestRiskLevel changeRequestRisk) {
+ this.changeRequestRisk = changeRequestRisk;
+ this.unparsed |= !changeRequestRisk.isValid();
+ return this;
+ }
+
+ /**
+ * The risk level of the change request.
+ *
+ * @return changeRequestRisk
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CHANGE_REQUEST_RISK)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ChangeRequestRiskLevel getChangeRequestRisk() {
+ return changeRequestRisk;
+ }
+
+ public void setChangeRequestRisk(ChangeRequestRiskLevel changeRequestRisk) {
+ if (!changeRequestRisk.isValid()) {
+ this.unparsed = true;
+ }
+ this.changeRequestRisk = changeRequestRisk;
+ }
+
+ public ChangeRequestCreateAttributes changeRequestType(
+ ChangeRequestChangeType changeRequestType) {
+ this.changeRequestType = changeRequestType;
+ this.unparsed |= !changeRequestType.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the change request.
+ *
+ * @return changeRequestType
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CHANGE_REQUEST_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ChangeRequestChangeType getChangeRequestType() {
+ return changeRequestType;
+ }
+
+ public void setChangeRequestType(ChangeRequestChangeType changeRequestType) {
+ if (!changeRequestType.isValid()) {
+ this.unparsed = true;
+ }
+ this.changeRequestType = changeRequestType;
+ }
+
+ public ChangeRequestCreateAttributes description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the change request.
+ *
+ * @return description
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DESCRIPTION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public ChangeRequestCreateAttributes endDate(OffsetDateTime endDate) {
+ this.endDate = endDate;
+ return this;
+ }
+
+ /**
+ * The planned end date of the change request.
+ *
+ * @return endDate
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_END_DATE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OffsetDateTime getEndDate() {
+ return endDate;
+ }
+
+ public void setEndDate(OffsetDateTime endDate) {
+ this.endDate = endDate;
+ }
+
+ public ChangeRequestCreateAttributes projectId(String projectId) {
+ this.projectId = projectId;
+ return this;
+ }
+
+ /**
+ * The project UUID to associate with the change request.
+ *
+ * @return projectId
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_PROJECT_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public ChangeRequestCreateAttributes requestedTeams(List requestedTeams) {
+ this.requestedTeams = requestedTeams;
+ return this;
+ }
+
+ public ChangeRequestCreateAttributes addRequestedTeamsItem(String requestedTeamsItem) {
+ if (this.requestedTeams == null) {
+ this.requestedTeams = new ArrayList<>();
+ }
+ this.requestedTeams.add(requestedTeamsItem);
+ return this;
+ }
+
+ /**
+ * A list of team handles to request decisions from.
+ *
+ * @return requestedTeams
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_REQUESTED_TEAMS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getRequestedTeams() {
+ return requestedTeams;
+ }
+
+ public void setRequestedTeams(List requestedTeams) {
+ this.requestedTeams = requestedTeams;
+ }
+
+ public ChangeRequestCreateAttributes startDate(OffsetDateTime startDate) {
+ this.startDate = startDate;
+ return this;
+ }
+
+ /**
+ * The planned start date of the change request.
+ *
+ * @return startDate
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_START_DATE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OffsetDateTime getStartDate() {
+ return startDate;
+ }
+
+ public void setStartDate(OffsetDateTime startDate) {
+ this.startDate = startDate;
+ }
+
+ public ChangeRequestCreateAttributes title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * The title of the change request.
+ *
+ * @return title
+ */
+ @JsonProperty(JSON_PROPERTY_TITLE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * 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 ChangeRequestCreateAttributes
+ */
+ @JsonAnySetter
+ public ChangeRequestCreateAttributes 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 ChangeRequestCreateAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestCreateAttributes changeRequestCreateAttributes = (ChangeRequestCreateAttributes) o;
+ return Objects.equals(
+ this.changeRequestLinkedIncidentUuid,
+ changeRequestCreateAttributes.changeRequestLinkedIncidentUuid)
+ && Objects.equals(
+ this.changeRequestMaintenanceWindowQuery,
+ changeRequestCreateAttributes.changeRequestMaintenanceWindowQuery)
+ && Objects.equals(this.changeRequestPlan, changeRequestCreateAttributes.changeRequestPlan)
+ && Objects.equals(this.changeRequestRisk, changeRequestCreateAttributes.changeRequestRisk)
+ && Objects.equals(this.changeRequestType, changeRequestCreateAttributes.changeRequestType)
+ && Objects.equals(this.description, changeRequestCreateAttributes.description)
+ && Objects.equals(this.endDate, changeRequestCreateAttributes.endDate)
+ && Objects.equals(this.projectId, changeRequestCreateAttributes.projectId)
+ && Objects.equals(this.requestedTeams, changeRequestCreateAttributes.requestedTeams)
+ && Objects.equals(this.startDate, changeRequestCreateAttributes.startDate)
+ && Objects.equals(this.title, changeRequestCreateAttributes.title)
+ && Objects.equals(
+ this.additionalProperties, changeRequestCreateAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ changeRequestLinkedIncidentUuid,
+ changeRequestMaintenanceWindowQuery,
+ changeRequestPlan,
+ changeRequestRisk,
+ changeRequestType,
+ description,
+ endDate,
+ projectId,
+ requestedTeams,
+ startDate,
+ title,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestCreateAttributes {\n");
+ sb.append(" changeRequestLinkedIncidentUuid: ")
+ .append(toIndentedString(changeRequestLinkedIncidentUuid))
+ .append("\n");
+ sb.append(" changeRequestMaintenanceWindowQuery: ")
+ .append(toIndentedString(changeRequestMaintenanceWindowQuery))
+ .append("\n");
+ sb.append(" changeRequestPlan: ").append(toIndentedString(changeRequestPlan)).append("\n");
+ sb.append(" changeRequestRisk: ").append(toIndentedString(changeRequestRisk)).append("\n");
+ sb.append(" changeRequestType: ").append(toIndentedString(changeRequestType)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n");
+ sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n");
+ sb.append(" requestedTeams: ").append(toIndentedString(requestedTeams)).append("\n");
+ sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
+ sb.append(" title: ").append(toIndentedString(title)).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/ChangeRequestCreateData.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestCreateData.java
new file mode 100644
index 00000000000..308b408b29a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestCreateData.java
@@ -0,0 +1,181 @@
+/*
+ * 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 object to create a change request. */
+@JsonPropertyOrder({
+ ChangeRequestCreateData.JSON_PROPERTY_ATTRIBUTES,
+ ChangeRequestCreateData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestCreateData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private ChangeRequestCreateAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private ChangeRequestResourceType type;
+
+ public ChangeRequestCreateData() {}
+
+ @JsonCreator
+ public ChangeRequestCreateData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ ChangeRequestCreateAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ChangeRequestResourceType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public ChangeRequestCreateData attributes(ChangeRequestCreateAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for creating a change request.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestCreateAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(ChangeRequestCreateAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public ChangeRequestCreateData type(ChangeRequestResourceType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Change request resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestResourceType getType() {
+ return type;
+ }
+
+ public void setType(ChangeRequestResourceType 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 ChangeRequestCreateData
+ */
+ @JsonAnySetter
+ public ChangeRequestCreateData 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 ChangeRequestCreateData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestCreateData changeRequestCreateData = (ChangeRequestCreateData) o;
+ return Objects.equals(this.attributes, changeRequestCreateData.attributes)
+ && Objects.equals(this.type, changeRequestCreateData.type)
+ && Objects.equals(this.additionalProperties, changeRequestCreateData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestCreateData {\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/ChangeRequestCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestCreateRequest.java
new file mode 100644
index 00000000000..c0442e93fa2
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestCreateRequest.java
@@ -0,0 +1,146 @@
+/*
+ * 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;
+
+/** Request object to create a change request. */
+@JsonPropertyOrder({ChangeRequestCreateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestCreateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private ChangeRequestCreateData data;
+
+ public ChangeRequestCreateRequest() {}
+
+ @JsonCreator
+ public ChangeRequestCreateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ChangeRequestCreateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public ChangeRequestCreateRequest data(ChangeRequestCreateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data object to create a change request.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestCreateData getData() {
+ return data;
+ }
+
+ public void setData(ChangeRequestCreateData 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 ChangeRequestCreateRequest
+ */
+ @JsonAnySetter
+ public ChangeRequestCreateRequest 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 ChangeRequestCreateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestCreateRequest changeRequestCreateRequest = (ChangeRequestCreateRequest) o;
+ return Objects.equals(this.data, changeRequestCreateRequest.data)
+ && Objects.equals(
+ this.additionalProperties, changeRequestCreateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestCreateRequest {\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/ChangeRequestDecisionCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionCreateAttributes.java
new file mode 100644
index 00000000000..db34e2c9716
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionCreateAttributes.java
@@ -0,0 +1,174 @@
+/*
+ * 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;
+
+/** Attributes for creating a change request decision. */
+@JsonPropertyOrder({
+ ChangeRequestDecisionCreateAttributes.JSON_PROPERTY_CHANGE_REQUEST_STATUS,
+ ChangeRequestDecisionCreateAttributes.JSON_PROPERTY_REQUEST_REASON
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionCreateAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CHANGE_REQUEST_STATUS = "change_request_status";
+ private ChangeRequestDecisionStatusType changeRequestStatus;
+
+ public static final String JSON_PROPERTY_REQUEST_REASON = "request_reason";
+ private String requestReason;
+
+ public ChangeRequestDecisionCreateAttributes changeRequestStatus(
+ ChangeRequestDecisionStatusType changeRequestStatus) {
+ this.changeRequestStatus = changeRequestStatus;
+ this.unparsed |= !changeRequestStatus.isValid();
+ return this;
+ }
+
+ /**
+ * The status of a change request decision.
+ *
+ * @return changeRequestStatus
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CHANGE_REQUEST_STATUS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ChangeRequestDecisionStatusType getChangeRequestStatus() {
+ return changeRequestStatus;
+ }
+
+ public void setChangeRequestStatus(ChangeRequestDecisionStatusType changeRequestStatus) {
+ if (!changeRequestStatus.isValid()) {
+ this.unparsed = true;
+ }
+ this.changeRequestStatus = changeRequestStatus;
+ }
+
+ public ChangeRequestDecisionCreateAttributes requestReason(String requestReason) {
+ this.requestReason = requestReason;
+ return this;
+ }
+
+ /**
+ * The reason for requesting the decision.
+ *
+ * @return requestReason
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_REQUEST_REASON)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getRequestReason() {
+ return requestReason;
+ }
+
+ public void setRequestReason(String requestReason) {
+ this.requestReason = requestReason;
+ }
+
+ /**
+ * 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 ChangeRequestDecisionCreateAttributes
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionCreateAttributes 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 ChangeRequestDecisionCreateAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionCreateAttributes changeRequestDecisionCreateAttributes =
+ (ChangeRequestDecisionCreateAttributes) o;
+ return Objects.equals(
+ this.changeRequestStatus, changeRequestDecisionCreateAttributes.changeRequestStatus)
+ && Objects.equals(this.requestReason, changeRequestDecisionCreateAttributes.requestReason)
+ && Objects.equals(
+ this.additionalProperties, changeRequestDecisionCreateAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(changeRequestStatus, requestReason, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionCreateAttributes {\n");
+ sb.append(" changeRequestStatus: ")
+ .append(toIndentedString(changeRequestStatus))
+ .append("\n");
+ sb.append(" requestReason: ").append(toIndentedString(requestReason)).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/ChangeRequestDecisionCreateItem.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionCreateItem.java
new file mode 100644
index 00000000000..08cefd3137e
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionCreateItem.java
@@ -0,0 +1,239 @@
+/*
+ * 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;
+
+/** An included change request decision for a create or update operation. */
+@JsonPropertyOrder({
+ ChangeRequestDecisionCreateItem.JSON_PROPERTY_ATTRIBUTES,
+ ChangeRequestDecisionCreateItem.JSON_PROPERTY_ID,
+ ChangeRequestDecisionCreateItem.JSON_PROPERTY_RELATIONSHIPS,
+ ChangeRequestDecisionCreateItem.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionCreateItem {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private ChangeRequestDecisionCreateAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
+ private ChangeRequestDecisionCreateRelationships relationships;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private ChangeRequestDecisionResourceType type;
+
+ public ChangeRequestDecisionCreateItem() {}
+
+ @JsonCreator
+ public ChangeRequestDecisionCreateItem(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ ChangeRequestDecisionResourceType type) {
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public ChangeRequestDecisionCreateItem attributes(
+ ChangeRequestDecisionCreateAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for creating a change request decision.
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ChangeRequestDecisionCreateAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(ChangeRequestDecisionCreateAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public ChangeRequestDecisionCreateItem id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The decision identifier.
+ *
+ * @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 ChangeRequestDecisionCreateItem relationships(
+ ChangeRequestDecisionCreateRelationships relationships) {
+ this.relationships = relationships;
+ this.unparsed |= relationships.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationships for creating a change request decision.
+ *
+ * @return relationships
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ChangeRequestDecisionCreateRelationships getRelationships() {
+ return relationships;
+ }
+
+ public void setRelationships(ChangeRequestDecisionCreateRelationships relationships) {
+ this.relationships = relationships;
+ }
+
+ public ChangeRequestDecisionCreateItem type(ChangeRequestDecisionResourceType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Change request decision resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestDecisionResourceType getType() {
+ return type;
+ }
+
+ public void setType(ChangeRequestDecisionResourceType 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 ChangeRequestDecisionCreateItem
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionCreateItem 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 ChangeRequestDecisionCreateItem object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionCreateItem changeRequestDecisionCreateItem =
+ (ChangeRequestDecisionCreateItem) o;
+ return Objects.equals(this.attributes, changeRequestDecisionCreateItem.attributes)
+ && Objects.equals(this.id, changeRequestDecisionCreateItem.id)
+ && Objects.equals(this.relationships, changeRequestDecisionCreateItem.relationships)
+ && Objects.equals(this.type, changeRequestDecisionCreateItem.type)
+ && Objects.equals(
+ this.additionalProperties, changeRequestDecisionCreateItem.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, relationships, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionCreateItem {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionCreateRelationships.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionCreateRelationships.java
new file mode 100644
index 00000000000..1106b8d929a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionCreateRelationships.java
@@ -0,0 +1,141 @@
+/*
+ * 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;
+
+/** Relationships for creating a change request decision. */
+@JsonPropertyOrder({ChangeRequestDecisionCreateRelationships.JSON_PROPERTY_REQUESTED_USER})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionCreateRelationships {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_REQUESTED_USER = "requested_user";
+ private ChangeRequestUserRelationship requestedUser;
+
+ public ChangeRequestDecisionCreateRelationships requestedUser(
+ ChangeRequestUserRelationship requestedUser) {
+ this.requestedUser = requestedUser;
+ this.unparsed |= requestedUser.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationship to a user.
+ *
+ * @return requestedUser
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_REQUESTED_USER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ChangeRequestUserRelationship getRequestedUser() {
+ return requestedUser;
+ }
+
+ public void setRequestedUser(ChangeRequestUserRelationship requestedUser) {
+ this.requestedUser = requestedUser;
+ }
+
+ /**
+ * 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 ChangeRequestDecisionCreateRelationships
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionCreateRelationships 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 ChangeRequestDecisionCreateRelationships object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionCreateRelationships changeRequestDecisionCreateRelationships =
+ (ChangeRequestDecisionCreateRelationships) o;
+ return Objects.equals(
+ this.requestedUser, changeRequestDecisionCreateRelationships.requestedUser)
+ && Objects.equals(
+ this.additionalProperties,
+ changeRequestDecisionCreateRelationships.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(requestedUser, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionCreateRelationships {\n");
+ sb.append(" requestedUser: ").append(toIndentedString(requestedUser)).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/ChangeRequestDecisionRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionRelationshipData.java
new file mode 100644
index 00000000000..2fa31649fc8
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionRelationshipData.java
@@ -0,0 +1,181 @@
+/*
+ * 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;
+
+/** Change request decision relationship data. */
+@JsonPropertyOrder({
+ ChangeRequestDecisionRelationshipData.JSON_PROPERTY_ID,
+ ChangeRequestDecisionRelationshipData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionRelationshipData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private ChangeRequestDecisionResourceType type;
+
+ public ChangeRequestDecisionRelationshipData() {}
+
+ @JsonCreator
+ public ChangeRequestDecisionRelationshipData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ ChangeRequestDecisionResourceType type) {
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public ChangeRequestDecisionRelationshipData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The decision UUID.
+ *
+ * @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 ChangeRequestDecisionRelationshipData type(ChangeRequestDecisionResourceType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Change request decision resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestDecisionResourceType getType() {
+ return type;
+ }
+
+ public void setType(ChangeRequestDecisionResourceType 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 ChangeRequestDecisionRelationshipData
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionRelationshipData 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 ChangeRequestDecisionRelationshipData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionRelationshipData changeRequestDecisionRelationshipData =
+ (ChangeRequestDecisionRelationshipData) o;
+ return Objects.equals(this.id, changeRequestDecisionRelationshipData.id)
+ && Objects.equals(this.type, changeRequestDecisionRelationshipData.type)
+ && Objects.equals(
+ this.additionalProperties, changeRequestDecisionRelationshipData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionRelationshipData {\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/ChangeRequestDecisionRelationships.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionRelationships.java
new file mode 100644
index 00000000000..8a029ec49bd
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionRelationships.java
@@ -0,0 +1,214 @@
+/*
+ * 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;
+
+/** Relationships of a change request decision. */
+@JsonPropertyOrder({
+ ChangeRequestDecisionRelationships.JSON_PROPERTY_MODIFIED_BY,
+ ChangeRequestDecisionRelationships.JSON_PROPERTY_REQUESTED_BY_USER,
+ ChangeRequestDecisionRelationships.JSON_PROPERTY_REQUESTED_USER
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionRelationships {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_MODIFIED_BY = "modified_by";
+ private ChangeRequestUserRelationship modifiedBy;
+
+ public static final String JSON_PROPERTY_REQUESTED_BY_USER = "requested_by_user";
+ private ChangeRequestUserRelationship requestedByUser;
+
+ public static final String JSON_PROPERTY_REQUESTED_USER = "requested_user";
+ private ChangeRequestUserRelationship requestedUser;
+
+ public ChangeRequestDecisionRelationships() {}
+
+ @JsonCreator
+ public ChangeRequestDecisionRelationships(
+ @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_BY)
+ ChangeRequestUserRelationship modifiedBy,
+ @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTED_BY_USER)
+ ChangeRequestUserRelationship requestedByUser,
+ @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTED_USER)
+ ChangeRequestUserRelationship requestedUser) {
+ this.modifiedBy = modifiedBy;
+ this.unparsed |= modifiedBy.unparsed;
+ this.requestedByUser = requestedByUser;
+ this.unparsed |= requestedByUser.unparsed;
+ this.requestedUser = requestedUser;
+ this.unparsed |= requestedUser.unparsed;
+ }
+
+ public ChangeRequestDecisionRelationships modifiedBy(ChangeRequestUserRelationship modifiedBy) {
+ this.modifiedBy = modifiedBy;
+ this.unparsed |= modifiedBy.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationship to a user.
+ *
+ * @return modifiedBy
+ */
+ @JsonProperty(JSON_PROPERTY_MODIFIED_BY)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestUserRelationship getModifiedBy() {
+ return modifiedBy;
+ }
+
+ public void setModifiedBy(ChangeRequestUserRelationship modifiedBy) {
+ this.modifiedBy = modifiedBy;
+ }
+
+ public ChangeRequestDecisionRelationships requestedByUser(
+ ChangeRequestUserRelationship requestedByUser) {
+ this.requestedByUser = requestedByUser;
+ this.unparsed |= requestedByUser.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationship to a user.
+ *
+ * @return requestedByUser
+ */
+ @JsonProperty(JSON_PROPERTY_REQUESTED_BY_USER)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestUserRelationship getRequestedByUser() {
+ return requestedByUser;
+ }
+
+ public void setRequestedByUser(ChangeRequestUserRelationship requestedByUser) {
+ this.requestedByUser = requestedByUser;
+ }
+
+ public ChangeRequestDecisionRelationships requestedUser(
+ ChangeRequestUserRelationship requestedUser) {
+ this.requestedUser = requestedUser;
+ this.unparsed |= requestedUser.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationship to a user.
+ *
+ * @return requestedUser
+ */
+ @JsonProperty(JSON_PROPERTY_REQUESTED_USER)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestUserRelationship getRequestedUser() {
+ return requestedUser;
+ }
+
+ public void setRequestedUser(ChangeRequestUserRelationship requestedUser) {
+ this.requestedUser = requestedUser;
+ }
+
+ /**
+ * 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 ChangeRequestDecisionRelationships
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionRelationships 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 ChangeRequestDecisionRelationships object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionRelationships changeRequestDecisionRelationships =
+ (ChangeRequestDecisionRelationships) o;
+ return Objects.equals(this.modifiedBy, changeRequestDecisionRelationships.modifiedBy)
+ && Objects.equals(this.requestedByUser, changeRequestDecisionRelationships.requestedByUser)
+ && Objects.equals(this.requestedUser, changeRequestDecisionRelationships.requestedUser)
+ && Objects.equals(
+ this.additionalProperties, changeRequestDecisionRelationships.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(modifiedBy, requestedByUser, requestedUser, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionRelationships {\n");
+ sb.append(" modifiedBy: ").append(toIndentedString(modifiedBy)).append("\n");
+ sb.append(" requestedByUser: ").append(toIndentedString(requestedByUser)).append("\n");
+ sb.append(" requestedUser: ").append(toIndentedString(requestedUser)).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/ChangeRequestDecisionResourceType.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionResourceType.java
new file mode 100644
index 00000000000..7c234440ad1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionResourceType.java
@@ -0,0 +1,58 @@
+/*
+ * 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;
+
+/** Change request decision resource type. */
+@JsonSerialize(
+ using = ChangeRequestDecisionResourceType.ChangeRequestDecisionResourceTypeSerializer.class)
+public class ChangeRequestDecisionResourceType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("change_request_decision"));
+
+ public static final ChangeRequestDecisionResourceType CHANGE_REQUEST_DECISION =
+ new ChangeRequestDecisionResourceType("change_request_decision");
+
+ ChangeRequestDecisionResourceType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class ChangeRequestDecisionResourceTypeSerializer
+ extends StdSerializer {
+ public ChangeRequestDecisionResourceTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public ChangeRequestDecisionResourceTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ChangeRequestDecisionResourceType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static ChangeRequestDecisionResourceType fromValue(String value) {
+ return new ChangeRequestDecisionResourceType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionResponseAttributes.java
new file mode 100644
index 00000000000..c0dedd7c1bd
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionResponseAttributes.java
@@ -0,0 +1,308 @@
+/*
+ * 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;
+
+/** Attributes of a change request decision in a response. */
+@JsonPropertyOrder({
+ ChangeRequestDecisionResponseAttributes.JSON_PROPERTY_CHANGE_REQUEST_STATUS,
+ ChangeRequestDecisionResponseAttributes.JSON_PROPERTY_DECIDED_AT,
+ ChangeRequestDecisionResponseAttributes.JSON_PROPERTY_DECISION_REASON,
+ ChangeRequestDecisionResponseAttributes.JSON_PROPERTY_DELETED_AT,
+ ChangeRequestDecisionResponseAttributes.JSON_PROPERTY_REQUEST_REASON,
+ ChangeRequestDecisionResponseAttributes.JSON_PROPERTY_REQUESTED_AT
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionResponseAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CHANGE_REQUEST_STATUS = "change_request_status";
+ private ChangeRequestDecisionStatusType changeRequestStatus;
+
+ public static final String JSON_PROPERTY_DECIDED_AT = "decided_at";
+ private OffsetDateTime decidedAt;
+
+ public static final String JSON_PROPERTY_DECISION_REASON = "decision_reason";
+ private String decisionReason;
+
+ public static final String JSON_PROPERTY_DELETED_AT = "deleted_at";
+ private OffsetDateTime deletedAt;
+
+ public static final String JSON_PROPERTY_REQUEST_REASON = "request_reason";
+ private String requestReason;
+
+ public static final String JSON_PROPERTY_REQUESTED_AT = "requested_at";
+ private OffsetDateTime requestedAt;
+
+ public ChangeRequestDecisionResponseAttributes() {}
+
+ @JsonCreator
+ public ChangeRequestDecisionResponseAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_CHANGE_REQUEST_STATUS)
+ ChangeRequestDecisionStatusType changeRequestStatus,
+ @JsonProperty(required = true, value = JSON_PROPERTY_DECIDED_AT) OffsetDateTime decidedAt,
+ @JsonProperty(required = true, value = JSON_PROPERTY_DECISION_REASON) String decisionReason,
+ @JsonProperty(required = true, value = JSON_PROPERTY_DELETED_AT) OffsetDateTime deletedAt,
+ @JsonProperty(required = true, value = JSON_PROPERTY_REQUEST_REASON) String requestReason,
+ @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTED_AT)
+ OffsetDateTime requestedAt) {
+ this.changeRequestStatus = changeRequestStatus;
+ this.unparsed |= !changeRequestStatus.isValid();
+ this.decidedAt = decidedAt;
+ this.decisionReason = decisionReason;
+ this.deletedAt = deletedAt;
+ this.requestReason = requestReason;
+ this.requestedAt = requestedAt;
+ }
+
+ public ChangeRequestDecisionResponseAttributes changeRequestStatus(
+ ChangeRequestDecisionStatusType changeRequestStatus) {
+ this.changeRequestStatus = changeRequestStatus;
+ this.unparsed |= !changeRequestStatus.isValid();
+ return this;
+ }
+
+ /**
+ * The status of a change request decision.
+ *
+ * @return changeRequestStatus
+ */
+ @JsonProperty(JSON_PROPERTY_CHANGE_REQUEST_STATUS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestDecisionStatusType getChangeRequestStatus() {
+ return changeRequestStatus;
+ }
+
+ public void setChangeRequestStatus(ChangeRequestDecisionStatusType changeRequestStatus) {
+ if (!changeRequestStatus.isValid()) {
+ this.unparsed = true;
+ }
+ this.changeRequestStatus = changeRequestStatus;
+ }
+
+ public ChangeRequestDecisionResponseAttributes decidedAt(OffsetDateTime decidedAt) {
+ this.decidedAt = decidedAt;
+ return this;
+ }
+
+ /**
+ * Timestamp of when the decision was made.
+ *
+ * @return decidedAt
+ */
+ @JsonProperty(JSON_PROPERTY_DECIDED_AT)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OffsetDateTime getDecidedAt() {
+ return decidedAt;
+ }
+
+ public void setDecidedAt(OffsetDateTime decidedAt) {
+ this.decidedAt = decidedAt;
+ }
+
+ public ChangeRequestDecisionResponseAttributes decisionReason(String decisionReason) {
+ this.decisionReason = decisionReason;
+ return this;
+ }
+
+ /**
+ * The reason for the decision.
+ *
+ * @return decisionReason
+ */
+ @JsonProperty(JSON_PROPERTY_DECISION_REASON)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getDecisionReason() {
+ return decisionReason;
+ }
+
+ public void setDecisionReason(String decisionReason) {
+ this.decisionReason = decisionReason;
+ }
+
+ public ChangeRequestDecisionResponseAttributes deletedAt(OffsetDateTime deletedAt) {
+ this.deletedAt = deletedAt;
+ return this;
+ }
+
+ /**
+ * Timestamp of when the decision was deleted.
+ *
+ * @return deletedAt
+ */
+ @JsonProperty(JSON_PROPERTY_DELETED_AT)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OffsetDateTime getDeletedAt() {
+ return deletedAt;
+ }
+
+ public void setDeletedAt(OffsetDateTime deletedAt) {
+ this.deletedAt = deletedAt;
+ }
+
+ public ChangeRequestDecisionResponseAttributes requestReason(String requestReason) {
+ this.requestReason = requestReason;
+ return this;
+ }
+
+ /**
+ * The reason for requesting the decision.
+ *
+ * @return requestReason
+ */
+ @JsonProperty(JSON_PROPERTY_REQUEST_REASON)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getRequestReason() {
+ return requestReason;
+ }
+
+ public void setRequestReason(String requestReason) {
+ this.requestReason = requestReason;
+ }
+
+ public ChangeRequestDecisionResponseAttributes requestedAt(OffsetDateTime requestedAt) {
+ this.requestedAt = requestedAt;
+ return this;
+ }
+
+ /**
+ * Timestamp of when the decision was requested.
+ *
+ * @return requestedAt
+ */
+ @JsonProperty(JSON_PROPERTY_REQUESTED_AT)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public OffsetDateTime getRequestedAt() {
+ return requestedAt;
+ }
+
+ public void setRequestedAt(OffsetDateTime requestedAt) {
+ this.requestedAt = requestedAt;
+ }
+
+ /**
+ * 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 ChangeRequestDecisionResponseAttributes
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionResponseAttributes 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 ChangeRequestDecisionResponseAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionResponseAttributes changeRequestDecisionResponseAttributes =
+ (ChangeRequestDecisionResponseAttributes) o;
+ return Objects.equals(
+ this.changeRequestStatus, changeRequestDecisionResponseAttributes.changeRequestStatus)
+ && Objects.equals(this.decidedAt, changeRequestDecisionResponseAttributes.decidedAt)
+ && Objects.equals(
+ this.decisionReason, changeRequestDecisionResponseAttributes.decisionReason)
+ && Objects.equals(this.deletedAt, changeRequestDecisionResponseAttributes.deletedAt)
+ && Objects.equals(this.requestReason, changeRequestDecisionResponseAttributes.requestReason)
+ && Objects.equals(this.requestedAt, changeRequestDecisionResponseAttributes.requestedAt)
+ && Objects.equals(
+ this.additionalProperties,
+ changeRequestDecisionResponseAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ changeRequestStatus,
+ decidedAt,
+ decisionReason,
+ deletedAt,
+ requestReason,
+ requestedAt,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionResponseAttributes {\n");
+ sb.append(" changeRequestStatus: ")
+ .append(toIndentedString(changeRequestStatus))
+ .append("\n");
+ sb.append(" decidedAt: ").append(toIndentedString(decidedAt)).append("\n");
+ sb.append(" decisionReason: ").append(toIndentedString(decisionReason)).append("\n");
+ sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n");
+ sb.append(" requestReason: ").append(toIndentedString(requestReason)).append("\n");
+ sb.append(" requestedAt: ").append(toIndentedString(requestedAt)).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/ChangeRequestDecisionStatusType.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionStatusType.java
new file mode 100644
index 00000000000..b0602e5d7ca
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionStatusType.java
@@ -0,0 +1,62 @@
+/*
+ * 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 status of a change request decision. */
+@JsonSerialize(
+ using = ChangeRequestDecisionStatusType.ChangeRequestDecisionStatusTypeSerializer.class)
+public class ChangeRequestDecisionStatusType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("REQUESTED", "APPROVED", "DECLINED"));
+
+ public static final ChangeRequestDecisionStatusType REQUESTED =
+ new ChangeRequestDecisionStatusType("REQUESTED");
+ public static final ChangeRequestDecisionStatusType APPROVED =
+ new ChangeRequestDecisionStatusType("APPROVED");
+ public static final ChangeRequestDecisionStatusType DECLINED =
+ new ChangeRequestDecisionStatusType("DECLINED");
+
+ ChangeRequestDecisionStatusType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class ChangeRequestDecisionStatusTypeSerializer
+ extends StdSerializer {
+ public ChangeRequestDecisionStatusTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public ChangeRequestDecisionStatusTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ChangeRequestDecisionStatusType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static ChangeRequestDecisionStatusType fromValue(String value) {
+ return new ChangeRequestDecisionStatusType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionUpdateData.java
new file mode 100644
index 00000000000..4fbdb3401cb
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionUpdateData.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 object to update a change request decision. */
+@JsonPropertyOrder({
+ ChangeRequestDecisionUpdateData.JSON_PROPERTY_ATTRIBUTES,
+ ChangeRequestDecisionUpdateData.JSON_PROPERTY_RELATIONSHIPS,
+ ChangeRequestDecisionUpdateData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionUpdateData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private ChangeRequestDecisionUpdateDataAttributes attributes;
+
+ public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
+ private ChangeRequestDecisionUpdateDataRelationships relationships;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private ChangeRequestResourceType type;
+
+ public ChangeRequestDecisionUpdateData() {}
+
+ @JsonCreator
+ public ChangeRequestDecisionUpdateData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ChangeRequestResourceType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public ChangeRequestDecisionUpdateData attributes(
+ ChangeRequestDecisionUpdateDataAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes of the parent change request for a decision update.
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ChangeRequestDecisionUpdateDataAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(ChangeRequestDecisionUpdateDataAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public ChangeRequestDecisionUpdateData relationships(
+ ChangeRequestDecisionUpdateDataRelationships relationships) {
+ this.relationships = relationships;
+ this.unparsed |= relationships.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationships for updating a change request decision.
+ *
+ * @return relationships
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ChangeRequestDecisionUpdateDataRelationships getRelationships() {
+ return relationships;
+ }
+
+ public void setRelationships(ChangeRequestDecisionUpdateDataRelationships relationships) {
+ this.relationships = relationships;
+ }
+
+ public ChangeRequestDecisionUpdateData type(ChangeRequestResourceType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Change request resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestResourceType getType() {
+ return type;
+ }
+
+ public void setType(ChangeRequestResourceType 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 ChangeRequestDecisionUpdateData
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionUpdateData 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 ChangeRequestDecisionUpdateData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionUpdateData changeRequestDecisionUpdateData =
+ (ChangeRequestDecisionUpdateData) o;
+ return Objects.equals(this.attributes, changeRequestDecisionUpdateData.attributes)
+ && Objects.equals(this.relationships, changeRequestDecisionUpdateData.relationships)
+ && Objects.equals(this.type, changeRequestDecisionUpdateData.type)
+ && Objects.equals(
+ this.additionalProperties, changeRequestDecisionUpdateData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, relationships, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionUpdateData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionUpdateDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionUpdateDataAttributes.java
new file mode 100644
index 00000000000..b7aa71bcf2b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionUpdateDataAttributes.java
@@ -0,0 +1,138 @@
+/*
+ * 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;
+
+/** Attributes of the parent change request for a decision update. */
+@JsonPropertyOrder({ChangeRequestDecisionUpdateDataAttributes.JSON_PROPERTY_ID})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionUpdateDataAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public ChangeRequestDecisionUpdateDataAttributes id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The identifier of the change request.
+ *
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * 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 ChangeRequestDecisionUpdateDataAttributes
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionUpdateDataAttributes 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 ChangeRequestDecisionUpdateDataAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionUpdateDataAttributes changeRequestDecisionUpdateDataAttributes =
+ (ChangeRequestDecisionUpdateDataAttributes) o;
+ return Objects.equals(this.id, changeRequestDecisionUpdateDataAttributes.id)
+ && Objects.equals(
+ this.additionalProperties,
+ changeRequestDecisionUpdateDataAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionUpdateDataAttributes {\n");
+ sb.append(" id: ").append(toIndentedString(id)).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/ChangeRequestDecisionUpdateDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionUpdateDataRelationships.java
new file mode 100644
index 00000000000..b65f371ed05
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionUpdateDataRelationships.java
@@ -0,0 +1,157 @@
+/*
+ * 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;
+
+/** Relationships for updating a change request decision. */
+@JsonPropertyOrder({
+ ChangeRequestDecisionUpdateDataRelationships.JSON_PROPERTY_CHANGE_REQUEST_DECISIONS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionUpdateDataRelationships {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CHANGE_REQUEST_DECISIONS = "change_request_decisions";
+ private ChangeRequestDecisionsRelationship changeRequestDecisions;
+
+ public ChangeRequestDecisionUpdateDataRelationships() {}
+
+ @JsonCreator
+ public ChangeRequestDecisionUpdateDataRelationships(
+ @JsonProperty(required = true, value = JSON_PROPERTY_CHANGE_REQUEST_DECISIONS)
+ ChangeRequestDecisionsRelationship changeRequestDecisions) {
+ this.changeRequestDecisions = changeRequestDecisions;
+ this.unparsed |= changeRequestDecisions.unparsed;
+ }
+
+ public ChangeRequestDecisionUpdateDataRelationships changeRequestDecisions(
+ ChangeRequestDecisionsRelationship changeRequestDecisions) {
+ this.changeRequestDecisions = changeRequestDecisions;
+ this.unparsed |= changeRequestDecisions.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationship to change request decisions.
+ *
+ * @return changeRequestDecisions
+ */
+ @JsonProperty(JSON_PROPERTY_CHANGE_REQUEST_DECISIONS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestDecisionsRelationship getChangeRequestDecisions() {
+ return changeRequestDecisions;
+ }
+
+ public void setChangeRequestDecisions(ChangeRequestDecisionsRelationship changeRequestDecisions) {
+ this.changeRequestDecisions = changeRequestDecisions;
+ }
+
+ /**
+ * 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 ChangeRequestDecisionUpdateDataRelationships
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionUpdateDataRelationships 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 ChangeRequestDecisionUpdateDataRelationships object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionUpdateDataRelationships changeRequestDecisionUpdateDataRelationships =
+ (ChangeRequestDecisionUpdateDataRelationships) o;
+ return Objects.equals(
+ this.changeRequestDecisions,
+ changeRequestDecisionUpdateDataRelationships.changeRequestDecisions)
+ && Objects.equals(
+ this.additionalProperties,
+ changeRequestDecisionUpdateDataRelationships.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(changeRequestDecisions, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionUpdateDataRelationships {\n");
+ sb.append(" changeRequestDecisions: ")
+ .append(toIndentedString(changeRequestDecisions))
+ .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/ChangeRequestDecisionUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionUpdateRequest.java
new file mode 100644
index 00000000000..d901e251985
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionUpdateRequest.java
@@ -0,0 +1,193 @@
+/*
+ * 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.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Request object to update a change request decision. */
+@JsonPropertyOrder({
+ ChangeRequestDecisionUpdateRequest.JSON_PROPERTY_DATA,
+ ChangeRequestDecisionUpdateRequest.JSON_PROPERTY_INCLUDED
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionUpdateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private ChangeRequestDecisionUpdateData data;
+
+ public static final String JSON_PROPERTY_INCLUDED = "included";
+ private List included = null;
+
+ public ChangeRequestDecisionUpdateRequest() {}
+
+ @JsonCreator
+ public ChangeRequestDecisionUpdateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ ChangeRequestDecisionUpdateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public ChangeRequestDecisionUpdateRequest data(ChangeRequestDecisionUpdateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data object to update a change request decision.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestDecisionUpdateData getData() {
+ return data;
+ }
+
+ public void setData(ChangeRequestDecisionUpdateData data) {
+ this.data = data;
+ }
+
+ public ChangeRequestDecisionUpdateRequest included(
+ List included) {
+ this.included = included;
+ for (ChangeRequestDecisionCreateItem item : included) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public ChangeRequestDecisionUpdateRequest addIncludedItem(
+ ChangeRequestDecisionCreateItem includedItem) {
+ if (this.included == null) {
+ this.included = new ArrayList<>();
+ }
+ this.included.add(includedItem);
+ this.unparsed |= includedItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Included resources for the change request update.
+ *
+ * @return included
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_INCLUDED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getIncluded() {
+ return included;
+ }
+
+ public void setIncluded(List included) {
+ this.included = included;
+ }
+
+ /**
+ * 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 ChangeRequestDecisionUpdateRequest
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionUpdateRequest 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 ChangeRequestDecisionUpdateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionUpdateRequest changeRequestDecisionUpdateRequest =
+ (ChangeRequestDecisionUpdateRequest) o;
+ return Objects.equals(this.data, changeRequestDecisionUpdateRequest.data)
+ && Objects.equals(this.included, changeRequestDecisionUpdateRequest.included)
+ && Objects.equals(
+ this.additionalProperties, changeRequestDecisionUpdateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, included, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionUpdateRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" included: ").append(toIndentedString(included)).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/ChangeRequestDecisionsRelationship.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionsRelationship.java
new file mode 100644
index 00000000000..be0eede673b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestDecisionsRelationship.java
@@ -0,0 +1,158 @@
+/*
+ * 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.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Relationship to change request decisions. */
+@JsonPropertyOrder({ChangeRequestDecisionsRelationship.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestDecisionsRelationship {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private List data = new ArrayList<>();
+
+ public ChangeRequestDecisionsRelationship() {}
+
+ @JsonCreator
+ public ChangeRequestDecisionsRelationship(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ List data) {
+ this.data = data;
+ }
+
+ public ChangeRequestDecisionsRelationship data(List data) {
+ this.data = data;
+ for (ChangeRequestDecisionRelationshipData item : data) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public ChangeRequestDecisionsRelationship addDataItem(
+ ChangeRequestDecisionRelationshipData dataItem) {
+ this.data.add(dataItem);
+ this.unparsed |= dataItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Array of decision relationship data.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getData() {
+ return data;
+ }
+
+ public void setData(List 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 ChangeRequestDecisionsRelationship
+ */
+ @JsonAnySetter
+ public ChangeRequestDecisionsRelationship 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 ChangeRequestDecisionsRelationship object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestDecisionsRelationship changeRequestDecisionsRelationship =
+ (ChangeRequestDecisionsRelationship) o;
+ return Objects.equals(this.data, changeRequestDecisionsRelationship.data)
+ && Objects.equals(
+ this.additionalProperties, changeRequestDecisionsRelationship.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestDecisionsRelationship {\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/ChangeRequestIncludedDecision.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestIncludedDecision.java
new file mode 100644
index 00000000000..a47ef4d16d7
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestIncludedDecision.java
@@ -0,0 +1,241 @@
+/*
+ * 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;
+
+/** An included change request decision resource. */
+@JsonPropertyOrder({
+ ChangeRequestIncludedDecision.JSON_PROPERTY_ATTRIBUTES,
+ ChangeRequestIncludedDecision.JSON_PROPERTY_ID,
+ ChangeRequestIncludedDecision.JSON_PROPERTY_RELATIONSHIPS,
+ ChangeRequestIncludedDecision.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ChangeRequestIncludedDecision {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private ChangeRequestDecisionResponseAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
+ private ChangeRequestDecisionRelationships relationships;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private ChangeRequestDecisionResourceType type;
+
+ public ChangeRequestIncludedDecision() {}
+
+ @JsonCreator
+ public ChangeRequestIncludedDecision(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ ChangeRequestDecisionResponseAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ ChangeRequestDecisionResourceType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public ChangeRequestIncludedDecision attributes(
+ ChangeRequestDecisionResponseAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes of a change request decision in a response.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestDecisionResponseAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(ChangeRequestDecisionResponseAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public ChangeRequestIncludedDecision id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The decision UUID.
+ *
+ * @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 ChangeRequestIncludedDecision relationships(
+ ChangeRequestDecisionRelationships relationships) {
+ this.relationships = relationships;
+ this.unparsed |= relationships.unparsed;
+ return this;
+ }
+
+ /**
+ * Relationships of a change request decision.
+ *
+ * @return relationships
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ChangeRequestDecisionRelationships getRelationships() {
+ return relationships;
+ }
+
+ public void setRelationships(ChangeRequestDecisionRelationships relationships) {
+ this.relationships = relationships;
+ }
+
+ public ChangeRequestIncludedDecision type(ChangeRequestDecisionResourceType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Change request decision resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ChangeRequestDecisionResourceType getType() {
+ return type;
+ }
+
+ public void setType(ChangeRequestDecisionResourceType 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 ChangeRequestIncludedDecision
+ */
+ @JsonAnySetter
+ public ChangeRequestIncludedDecision 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 ChangeRequestIncludedDecision object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ChangeRequestIncludedDecision changeRequestIncludedDecision = (ChangeRequestIncludedDecision) o;
+ return Objects.equals(this.attributes, changeRequestIncludedDecision.attributes)
+ && Objects.equals(this.id, changeRequestIncludedDecision.id)
+ && Objects.equals(this.relationships, changeRequestIncludedDecision.relationships)
+ && Objects.equals(this.type, changeRequestIncludedDecision.type)
+ && Objects.equals(
+ this.additionalProperties, changeRequestIncludedDecision.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, relationships, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ChangeRequestIncludedDecision {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ChangeRequestIncludedItem.java b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestIncludedItem.java
new file mode 100644
index 00000000000..8462e6cdac3
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ChangeRequestIncludedItem.java
@@ -0,0 +1,283 @@
+/*
+ * 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 = ChangeRequestIncludedItem.ChangeRequestIncludedItemDeserializer.class)
+@JsonSerialize(using = ChangeRequestIncludedItem.ChangeRequestIncludedItemSerializer.class)
+public class ChangeRequestIncludedItem extends AbstractOpenApiSchema {
+ private static final Logger log = Logger.getLogger(ChangeRequestIncludedItem.class.getName());
+
+ @JsonIgnore public boolean unparsed = false;
+
+ public static class ChangeRequestIncludedItemSerializer
+ extends StdSerializer {
+ public ChangeRequestIncludedItemSerializer(Class t) {
+ super(t);
+ }
+
+ public ChangeRequestIncludedItemSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ChangeRequestIncludedItem value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.getActualInstance());
+ }
+ }
+
+ public static class ChangeRequestIncludedItemDeserializer
+ extends StdDeserializer {
+ public ChangeRequestIncludedItemDeserializer() {
+ this(ChangeRequestIncludedItem.class);
+ }
+
+ public ChangeRequestIncludedItemDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public ChangeRequestIncludedItem 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 ChangeRequestIncludedUser
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (ChangeRequestIncludedUser.class.equals(Integer.class)
+ || ChangeRequestIncludedUser.class.equals(Long.class)
+ || ChangeRequestIncludedUser.class.equals(Float.class)
+ || ChangeRequestIncludedUser.class.equals(Double.class)
+ || ChangeRequestIncludedUser.class.equals(Boolean.class)
+ || ChangeRequestIncludedUser.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((ChangeRequestIncludedUser.class.equals(Integer.class)
+ || ChangeRequestIncludedUser.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((ChangeRequestIncludedUser.class.equals(Float.class)
+ || ChangeRequestIncludedUser.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (ChangeRequestIncludedUser.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (ChangeRequestIncludedUser.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(ChangeRequestIncludedUser.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 (!((ChangeRequestIncludedUser) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'ChangeRequestIncludedUser'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'ChangeRequestIncludedUser'", e);
+ }
+
+ // deserialize ChangeRequestIncludedDecision
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (ChangeRequestIncludedDecision.class.equals(Integer.class)
+ || ChangeRequestIncludedDecision.class.equals(Long.class)
+ || ChangeRequestIncludedDecision.class.equals(Float.class)
+ || ChangeRequestIncludedDecision.class.equals(Double.class)
+ || ChangeRequestIncludedDecision.class.equals(Boolean.class)
+ || ChangeRequestIncludedDecision.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((ChangeRequestIncludedDecision.class.equals(Integer.class)
+ || ChangeRequestIncludedDecision.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((ChangeRequestIncludedDecision.class.equals(Float.class)
+ || ChangeRequestIncludedDecision.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (ChangeRequestIncludedDecision.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (ChangeRequestIncludedDecision.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(ChangeRequestIncludedDecision.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 (!((ChangeRequestIncludedDecision) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'ChangeRequestIncludedDecision'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'ChangeRequestIncludedDecision'", e);
+ }
+
+ ChangeRequestIncludedItem ret = new ChangeRequestIncludedItem();
+ if (match == 1) {
+ ret.setActualInstance(deserialized);
+ } else {
+ Map res =
+ new ObjectMapper()
+ .readValue(
+ tree.traverse(jp.getCodec()).readValueAsTree().toString(),
+ new TypeReference