diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 28ca1e54306..c669399cd46 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -15122,6 +15122,88 @@ components:
- findings
- project
type: object
+ CreateMaintenanceRequest:
+ example:
+ data:
+ attributes:
+ completed_date: '2026-02-18T19:51:13.332360075Z'
+ completed_description: We have completed maintenance on the API to improve
+ performance.
+ components_affected:
+ - id: 1234abcd-12ab-34cd-56ef-123456abcdef
+ status: operational
+ in_progress_description: We are currently performing maintenance on the
+ API to improve performance.
+ scheduled_description: We will be performing maintenance on the API to
+ improve performance.
+ start_date: '2026-02-18T19:21:13.332360075Z'
+ title: API Maintenance
+ id: 00000000-0000-0000-0000-000000000000
+ type: maintenances
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateMaintenanceRequestData'
+ type: object
+ CreateMaintenanceRequestData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CreateMaintenanceRequestDataAttributes'
+ type:
+ $ref: '#/components/schemas/PatchMaintenanceRequestDataType'
+ required:
+ - attributes
+ - type
+ type: object
+ CreateMaintenanceRequestDataAttributes:
+ description: The supported attributes for creating a maintenance.
+ properties:
+ completed_date:
+ description: Timestamp of when the maintenance was completed.
+ format: date-time
+ type: string
+ completed_description:
+ description: The description shown when the maintenance is completed.
+ type: string
+ components_affected:
+ description: The components affected by the maintenance.
+ items:
+ $ref: '#/components/schemas/CreateMaintenanceRequestDataAttributesComponentsAffectedItems'
+ type: array
+ in_progress_description:
+ description: The description shown while the maintenance is in progress.
+ type: string
+ scheduled_description:
+ description: The description shown when the maintenance is scheduled.
+ type: string
+ start_date:
+ description: Timestamp of when the maintenance is scheduled to start.
+ format: date-time
+ type: string
+ title:
+ description: The title of the maintenance.
+ example: API Maintenance
+ type: string
+ required:
+ - components_affected
+ - title
+ type: object
+ CreateMaintenanceRequestDataAttributesComponentsAffectedItems:
+ properties:
+ id:
+ description: The ID of the component. Must be a component of type `component`.
+ example: 1234abcd-12ab-34cd-56ef-123456abcdef
+ format: uuid
+ type: string
+ name:
+ description: The name of the component.
+ readOnly: true
+ type: string
+ status:
+ $ref: '#/components/schemas/PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus'
+ required:
+ - id
+ - status
+ type: object
CreateNotificationChannelAttributes:
description: Attributes for creating an on-call notification channel.
properties:
@@ -19894,7 +19976,7 @@ components:
description: The included related resources of a degradation. Client must
explicitly request these resources by name in the `include` query parameter.
items:
- $ref: '#/components/schemas/DegradationArrayIncluded'
+ $ref: '#/components/schemas/DegradationIncluded'
type: array
type: object
DegradationArray:
@@ -19907,17 +19989,13 @@ components:
description: The included related resources of a degradation. Client must
explicitly request these resources by name in the `include` query parameter.
items:
- $ref: '#/components/schemas/DegradationArrayIncluded'
+ $ref: '#/components/schemas/DegradationIncluded'
type: array
meta:
$ref: '#/components/schemas/StatusPagesResponseMeta'
required:
- data
type: object
- DegradationArrayIncluded:
- oneOf:
- - $ref: '#/components/schemas/StatusPagesUser'
- - $ref: '#/components/schemas/StatusPageAsIncluded'
DegradationData:
properties:
attributes:
@@ -20097,6 +20175,10 @@ components:
- type
- id
type: object
+ DegradationIncluded:
+ oneOf:
+ - $ref: '#/components/schemas/StatusPagesUser'
+ - $ref: '#/components/schemas/StatusPageAsIncluded'
DeleteAppResponse:
description: The response object after an app is successfully deleted.
properties:
@@ -32179,53 +32261,6 @@ components:
type: string
type: array
type: object
- Integration:
- description: Integration resource object.
- properties:
- attributes:
- $ref: '#/components/schemas/IntegrationAttributes'
- id:
- description: The unique identifier of the integration.
- example: calico
- type: string
- links:
- $ref: '#/components/schemas/IntegrationLinks'
- type:
- $ref: '#/components/schemas/IntegrationType'
- required:
- - type
- - id
- - attributes
- type: object
- IntegrationAttributes:
- description: Attributes for an integration.
- properties:
- categories:
- description: List of categories associated with the integration.
- example:
- - Category::Kubernetes
- - Category::Log Collection
- items:
- type: string
- type: array
- description:
- description: A description of the integration.
- example: Calico is a networking and network security solution for containers.
- type: string
- installed:
- description: Whether the integration is installed.
- example: true
- type: boolean
- title:
- description: The name of the integration.
- example: calico
- type: string
- required:
- - title
- - description
- - categories
- - installed
- type: object
IntegrationIncident:
description: Incident integration settings
properties:
@@ -32331,14 +32366,6 @@ components:
value:
$ref: '#/components/schemas/AnyValue'
type: object
- IntegrationLinks:
- description: Links for the integration resource.
- properties:
- self:
- description: Link to the integration resource.
- example: /integrations?integrationId=calico
- type: string
- type: object
IntegrationMonitor:
description: Monitor integration settings
properties:
@@ -32440,15 +32467,6 @@ components:
type: string
type: object
type: object
- IntegrationType:
- default: integration
- description: Integration resource type.
- enum:
- - integration
- example: integration
- type: string
- x-enum-varnames:
- - INTEGRATION
InterfaceAttributes:
description: The interface attributes
properties:
@@ -34840,17 +34858,6 @@ components:
- data
- meta
type: object
- ListIntegrationsResponse:
- description: Response containing information about multiple integrations.
- properties:
- data:
- description: Array of integration objects.
- items:
- $ref: '#/components/schemas/Integration'
- type: array
- required:
- - data
- type: object
ListInterfaceTagsResponse:
description: Response for listing interface tags.
properties:
@@ -36327,6 +36334,248 @@ components:
- ms_channel_name
- redirect_url
type: object
+ Maintenance:
+ properties:
+ data:
+ $ref: '#/components/schemas/MaintenanceData'
+ included:
+ description: The included related resources of a maintenance. Client must
+ explicitly request these resources by name in the `include` query parameter.
+ items:
+ $ref: '#/components/schemas/DegradationIncluded'
+ type: array
+ type: object
+ MaintenanceArray:
+ properties:
+ data:
+ items:
+ $ref: '#/components/schemas/MaintenanceData'
+ type: array
+ included:
+ description: The included related resources of a maintenance. Client must
+ explicitly request these resources by name in the `include` query parameter.
+ items:
+ $ref: '#/components/schemas/DegradationIncluded'
+ type: array
+ meta:
+ $ref: '#/components/schemas/PaginationMeta'
+ required:
+ - data
+ type: object
+ MaintenanceData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/MaintenanceDataAttributes'
+ id:
+ description: The ID of the maintenance.
+ format: uuid
+ type: string
+ relationships:
+ $ref: '#/components/schemas/MaintenanceDataRelationships'
+ type:
+ $ref: '#/components/schemas/PatchMaintenanceRequestDataType'
+ required:
+ - type
+ type: object
+ MaintenanceDataAttributes:
+ description: The attributes of a maintenance.
+ properties:
+ completed_date:
+ description: Timestamp of when the maintenance was completed.
+ format: date-time
+ type: string
+ completed_description:
+ description: The description shown when the maintenance is completed.
+ type: string
+ components_affected:
+ description: Components affected by the maintenance.
+ items:
+ $ref: '#/components/schemas/MaintenanceDataAttributesComponentsAffectedItems'
+ type: array
+ in_progress_description:
+ description: The description shown while the maintenance is in progress.
+ type: string
+ modified_at:
+ description: Timestamp of when the maintenance was last modified.
+ format: date-time
+ type: string
+ published_date:
+ description: Timestamp of when the maintenance was published.
+ format: date-time
+ type: string
+ scheduled_description:
+ description: The description shown when the maintenance is scheduled.
+ type: string
+ start_date:
+ description: Timestamp of when the maintenance is scheduled to start.
+ format: date-time
+ type: string
+ status:
+ $ref: '#/components/schemas/MaintenanceDataAttributesStatus'
+ description: The status of the maintenance.
+ title:
+ description: Title of the maintenance.
+ type: string
+ updates:
+ description: Past updates made to the maintenance.
+ items:
+ $ref: '#/components/schemas/MaintenanceDataAttributesUpdatesItems'
+ type: array
+ type: object
+ MaintenanceDataAttributesComponentsAffectedItems:
+ properties:
+ id:
+ description: The ID of the component. Must be a component of type `component`.
+ example: 1234abcd-12ab-34cd-56ef-123456abcdef
+ format: uuid
+ type: string
+ name:
+ description: The name of the component.
+ readOnly: true
+ type: string
+ status:
+ $ref: '#/components/schemas/PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus'
+ required:
+ - id
+ - status
+ type: object
+ MaintenanceDataAttributesStatus:
+ description: The status of the maintenance.
+ enum:
+ - scheduled
+ - in_progress
+ - completed
+ - canceled
+ type: string
+ x-enum-varnames:
+ - SCHEDULED
+ - IN_PROGRESS
+ - COMPLETED
+ - CANCELED
+ MaintenanceDataAttributesUpdatesItems:
+ properties:
+ components_affected:
+ description: The components affected at the time of the update.
+ items:
+ $ref: '#/components/schemas/MaintenanceDataAttributesUpdatesItemsComponentsAffectedItems'
+ type: array
+ created_at:
+ description: Timestamp of when the update was created.
+ format: date-time
+ readOnly: true
+ type: string
+ description:
+ description: Description of the update.
+ type: string
+ id:
+ description: Identifier of the update.
+ format: uuid
+ readOnly: true
+ type: string
+ manual_transition:
+ readOnly: true
+ type: boolean
+ modified_at:
+ description: Timestamp of when the update was last modified.
+ format: date-time
+ readOnly: true
+ type: string
+ started_at:
+ description: Timestamp of when the update started.
+ format: date-time
+ type: string
+ status:
+ description: The status of the update.
+ type: string
+ type: object
+ MaintenanceDataAttributesUpdatesItemsComponentsAffectedItems:
+ properties:
+ id:
+ description: Identifier of the component affected at the time of the update.
+ example: 1234abcd-12ab-34cd-56ef-123456abcdef
+ format: uuid
+ type: string
+ name:
+ description: The name of the component affected at the time of the update.
+ readOnly: true
+ type: string
+ status:
+ $ref: '#/components/schemas/PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus'
+ description: The status of the component affected at the time of the update.
+ required:
+ - id
+ - status
+ type: object
+ MaintenanceDataRelationships:
+ description: The relationships of a maintenance.
+ properties:
+ created_by_user:
+ $ref: '#/components/schemas/MaintenanceDataRelationshipsCreatedByUser'
+ description: The Datadog user who created the maintenance.
+ last_modified_by_user:
+ $ref: '#/components/schemas/MaintenanceDataRelationshipsLastModifiedByUser'
+ description: The Datadog user who last modified the maintenance.
+ status_page:
+ $ref: '#/components/schemas/MaintenanceDataRelationshipsStatusPage'
+ description: The status page the maintenance belongs to.
+ type: object
+ MaintenanceDataRelationshipsCreatedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/MaintenanceDataRelationshipsCreatedByUserData'
+ required:
+ - data
+ type: object
+ MaintenanceDataRelationshipsCreatedByUserData:
+ properties:
+ id:
+ example: ''
+ format: uuid
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ MaintenanceDataRelationshipsLastModifiedByUser:
+ properties:
+ data:
+ $ref: '#/components/schemas/MaintenanceDataRelationshipsLastModifiedByUserData'
+ required:
+ - data
+ type: object
+ MaintenanceDataRelationshipsLastModifiedByUserData:
+ properties:
+ id:
+ example: ''
+ format: uuid
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPagesUserType'
+ required:
+ - type
+ - id
+ type: object
+ MaintenanceDataRelationshipsStatusPage:
+ properties:
+ data:
+ $ref: '#/components/schemas/MaintenanceDataRelationshipsStatusPageData'
+ required:
+ - data
+ type: object
+ MaintenanceDataRelationshipsStatusPageData:
+ properties:
+ id:
+ example: ''
+ format: uuid
+ type: string
+ type:
+ $ref: '#/components/schemas/StatusPageDataType'
+ required:
+ - type
+ - id
+ type: object
MemberTeam:
description: A member team
properties:
@@ -45856,6 +46105,41 @@ components:
format: int64
type: integer
type: object
+ PaginationMeta:
+ properties:
+ page:
+ $ref: '#/components/schemas/PaginationMetaPage'
+ type: object
+ PaginationMetaPage:
+ properties:
+ first_offset:
+ format: int64
+ type: integer
+ last_offset:
+ format: int64
+ nullable: true
+ type: integer
+ limit:
+ format: int64
+ type: integer
+ next_offset:
+ format: int64
+ nullable: true
+ type: integer
+ offset:
+ format: int64
+ type: integer
+ prev_offset:
+ format: int64
+ nullable: true
+ type: integer
+ total:
+ format: int64
+ nullable: true
+ type: integer
+ type:
+ type: string
+ type: object
Parameter:
description: The definition of `Parameter` object.
properties:
@@ -46163,6 +46447,107 @@ components:
required:
- data
type: object
+ PatchMaintenanceRequest:
+ example:
+ data:
+ attributes:
+ completed_date: '2026-02-18T20:01:13.332360075Z'
+ in_progress_description: We are currently performing maintenance on the
+ API to improve performance for 40 minutes.
+ scheduled_description: We will be performing maintenance on the API to
+ improve performance for 40 minutes.
+ start_date: '2026-02-18T19:21:13.332360075Z'
+ title: null
+ id: 00000000-0000-0000-0000-000000000000
+ type: maintenances
+ properties:
+ data:
+ $ref: '#/components/schemas/PatchMaintenanceRequestData'
+ type: object
+ PatchMaintenanceRequestData:
+ properties:
+ attributes:
+ $ref: '#/components/schemas/PatchMaintenanceRequestDataAttributes'
+ id:
+ description: The ID of the maintenance.
+ example: 1234abcd-12ab-34cd-56ef-123456abcdef
+ format: uuid
+ type: string
+ type:
+ $ref: '#/components/schemas/PatchMaintenanceRequestDataType'
+ required:
+ - attributes
+ - type
+ - id
+ type: object
+ PatchMaintenanceRequestDataAttributes:
+ description: The supported attributes for updating a maintenance.
+ properties:
+ completed_date:
+ description: Timestamp of when the maintenance was completed.
+ format: date-time
+ type: string
+ completed_description:
+ description: The description shown when the maintenance is completed.
+ type: string
+ components_affected:
+ description: The components affected by the maintenance.
+ items:
+ $ref: '#/components/schemas/PatchMaintenanceRequestDataAttributesComponentsAffectedItems'
+ type: array
+ in_progress_description:
+ description: The description shown while the maintenance is in progress.
+ type: string
+ scheduled_description:
+ description: The description shown when the maintenance is scheduled.
+ type: string
+ start_date:
+ description: Timestamp of when the maintenance is scheduled to start.
+ format: date-time
+ type: string
+ status:
+ $ref: '#/components/schemas/MaintenanceDataAttributesStatus'
+ description: The status of the maintenance.
+ title:
+ description: The title of the maintenance.
+ type: string
+ type: object
+ PatchMaintenanceRequestDataAttributesComponentsAffectedItems:
+ properties:
+ id:
+ description: The ID of the component. Must be a component of type `component`.
+ example: 1234abcd-12ab-34cd-56ef-123456abcdef
+ format: uuid
+ type: string
+ name:
+ description: The name of the component.
+ readOnly: true
+ type: string
+ status:
+ $ref: '#/components/schemas/PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus'
+ required:
+ - id
+ - status
+ type: object
+ PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus:
+ description: The status of the component.
+ enum:
+ - operational
+ - maintenance
+ example: operational
+ type: string
+ x-enum-varnames:
+ - OPERATIONAL
+ - MAINTENANCE
+ PatchMaintenanceRequestDataType:
+ default: maintenances
+ description: Maintenances resource type.
+ enum:
+ - maintenances
+ example: maintenances
+ type: string
+ x-enum-varnames:
+ - MAINTENANCES
PatchNotificationRuleParameters:
description: Body of the notification rule patch request.
properties:
@@ -84280,24 +84665,6 @@ paths:
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
- /api/v2/integrations:
- get:
- operationId: ListIntegrations
- responses:
- '200':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ListIntegrationsResponse'
- description: Successful Response.
- '429':
- $ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- summary: List Integrations
- tags:
- - Integrations
/api/v2/integrations/cloudflare/accounts:
get:
description: List Cloudflare accounts.
@@ -101376,6 +101743,12 @@ paths:
name: filter[status]
schema:
type: string
+ - description: 'Sort order. Prefix with ''-'' for descending. Supported values:
+ created_at, -created_at, modified_at, -modified_at.'
+ in: query
+ name: sort
+ schema:
+ type: string
responses:
'200':
content:
@@ -101396,6 +101769,67 @@ paths:
operator: AND
permissions:
- status_pages_settings_read
+ /api/v2/statuspages/maintenances:
+ get:
+ description: Lists all maintenances for the organization. Optionally filter
+ by status and page.
+ operationId: ListMaintenances
+ parameters:
+ - description: Optional page id filter.
+ in: query
+ name: filter[page_id]
+ schema:
+ type: string
+ - description: Offset to use as the start of the page.
+ in: query
+ name: page[offset]
+ schema:
+ default: 0
+ type: integer
+ - description: The number of maintenances to return per page.
+ in: query
+ name: page[limit]
+ schema:
+ default: 50
+ type: integer
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page.'
+ in: query
+ name: include
+ schema:
+ type: string
+ - description: 'Optional maintenance status filter. Supported values: scheduled,
+ in_progress, completed, canceled.'
+ in: query
+ name: filter[status]
+ schema:
+ type: string
+ - description: 'Sort order. Prefix with ''-'' for descending. Supported values:
+ created_at, -created_at, start_date, -start_date.'
+ in: query
+ name: sort
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MaintenanceArray'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: List maintenances
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_read
/api/v2/statuspages/{page_id}:
delete:
description: Deletes a status page by its ID.
@@ -101924,6 +102358,157 @@ paths:
operator: AND
permissions:
- status_pages_incident_write
+ /api/v2/statuspages/{page_id}/maintenances:
+ post:
+ description: Creates a new maintenance.
+ operationId: CreateMaintenance
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: Whether to notify page subscribers of the maintenance.
+ in: query
+ name: notify_subscribers
+ schema:
+ default: true
+ type: boolean
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page.'
+ in: query
+ name: include
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateMaintenanceRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Maintenance'
+ description: Created
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Create maintenance
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_incident_write
+ /api/v2/statuspages/{page_id}/maintenances/{maintenance_id}:
+ get:
+ description: Retrieves a specific maintenance by its ID.
+ operationId: GetMaintenance
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: The ID of the maintenance.
+ in: path
+ name: maintenance_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page.'
+ in: query
+ name: include
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Maintenance'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Get maintenance
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_settings_read
+ patch:
+ description: Updates an existing maintenance's attributes.
+ operationId: UpdateMaintenance
+ parameters:
+ - description: The ID of the status page.
+ in: path
+ name: page_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: Whether to notify page subscribers of the maintenance.
+ in: query
+ name: notify_subscribers
+ schema:
+ default: true
+ type: boolean
+ - description: The ID of the maintenance.
+ in: path
+ name: maintenance_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ - description: 'Comma-separated list of resources to include. Supported values:
+ created_by_user, last_modified_by_user, status_page.'
+ in: query
+ name: include
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PatchMaintenanceRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Maintenance'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Update maintenance
+ tags:
+ - Status Pages
+ x-permission:
+ operator: AND
+ permissions:
+ - status_pages_incident_write
/api/v2/synthetics/settings/on_demand_concurrency_cap:
get:
description: Get the on-demand concurrency cap.
@@ -106381,10 +106966,6 @@ tags:
and todos. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/)
for more information.
name: Incidents
-- description: 'The Integrations API is used to list available integrations
-
- and retrieve information about their installation status.'
- name: Integrations
- description: Manage your Jira Integration. Atlassian Jira is a project management
and issue tracking tool for teams to coordinate work and handle tasks efficiently.
name: Jira Integration
diff --git a/examples/v2/status-pages/CreateMaintenance.java b/examples/v2/status-pages/CreateMaintenance.java
new file mode 100644
index 00000000000..99a7a868fbd
--- /dev/null
+++ b/examples/v2/status-pages/CreateMaintenance.java
@@ -0,0 +1,75 @@
+// Create maintenance returns "Created" response
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.CreateMaintenanceRequest;
+import com.datadog.api.client.v2.model.CreateMaintenanceRequestData;
+import com.datadog.api.client.v2.model.CreateMaintenanceRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateMaintenanceRequestDataAttributesComponentsAffectedItems;
+import com.datadog.api.client.v2.model.Maintenance;
+import com.datadog.api.client.v2.model.PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus;
+import com.datadog.api.client.v2.model.PatchMaintenanceRequestDataType;
+import java.time.OffsetDateTime;
+import java.util.Collections;
+import java.util.UUID;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ UUID STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID = null;
+ try {
+ STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID =
+ UUID.fromString(
+ System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID"));
+ } catch (IllegalArgumentException e) {
+ System.err.println("Error parsing UUID: " + e.getMessage());
+ }
+ UUID STATUS_PAGE_DATA_ID = null;
+ try {
+ STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
+ } catch (IllegalArgumentException e) {
+ System.err.println("Error parsing UUID: " + e.getMessage());
+ }
+
+ CreateMaintenanceRequest body =
+ new CreateMaintenanceRequest()
+ .data(
+ new CreateMaintenanceRequestData()
+ .attributes(
+ new CreateMaintenanceRequestDataAttributes()
+ .title("API Maintenance")
+ .scheduledDescription(
+ "We will be performing maintenance on the API to improve"
+ + " performance.")
+ .inProgressDescription(
+ "We are currently performing maintenance on the API to improve"
+ + " performance.")
+ .completedDescription(
+ "We have completed maintenance on the API to improve performance.")
+ .startDate(OffsetDateTime.now().plusHours(1))
+ .completedDate(OffsetDateTime.now().plusHours(2))
+ .componentsAffected(
+ Collections.singletonList(
+ new CreateMaintenanceRequestDataAttributesComponentsAffectedItems()
+ .id(
+ STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID)
+ .status(
+ PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus
+ .OPERATIONAL))))
+ .type(PatchMaintenanceRequestDataType.MAINTENANCES));
+
+ try {
+ Maintenance result = apiInstance.createMaintenance(STATUS_PAGE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#createMaintenance");
+ 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/status-pages/GetMaintenance.java b/examples/v2/status-pages/GetMaintenance.java
new file mode 100644
index 00000000000..de9ba809ee0
--- /dev/null
+++ b/examples/v2/status-pages/GetMaintenance.java
@@ -0,0 +1,41 @@
+// Get maintenance returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.Maintenance;
+import java.util.UUID;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ UUID STATUS_PAGE_DATA_ID = null;
+ try {
+ STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
+ } catch (IllegalArgumentException e) {
+ System.err.println("Error parsing UUID: " + e.getMessage());
+ }
+
+ // there is a valid "maintenance" in the system
+ UUID MAINTENANCE_DATA_ID = null;
+ try {
+ MAINTENANCE_DATA_ID = UUID.fromString(System.getenv("MAINTENANCE_DATA_ID"));
+ } catch (IllegalArgumentException e) {
+ System.err.println("Error parsing UUID: " + e.getMessage());
+ }
+
+ try {
+ Maintenance result = apiInstance.getMaintenance(STATUS_PAGE_DATA_ID, MAINTENANCE_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#getMaintenance");
+ 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/integrations/ListIntegrations.java b/examples/v2/status-pages/ListMaintenances.java
similarity index 56%
rename from examples/v2/integrations/ListIntegrations.java
rename to examples/v2/status-pages/ListMaintenances.java
index f7479dc81b7..1cdadfa2e53 100644
--- a/examples/v2/integrations/ListIntegrations.java
+++ b/examples/v2/status-pages/ListMaintenances.java
@@ -1,20 +1,20 @@
-// List Integrations returns "Successful Response." response
+// List maintenances returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
-import com.datadog.api.client.v2.api.IntegrationsApi;
-import com.datadog.api.client.v2.model.ListIntegrationsResponse;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.MaintenanceArray;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
- IntegrationsApi apiInstance = new IntegrationsApi(defaultClient);
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
try {
- ListIntegrationsResponse result = apiInstance.listIntegrations();
+ MaintenanceArray result = apiInstance.listMaintenances();
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling IntegrationsApi#listIntegrations");
+ System.err.println("Exception when calling StatusPagesApi#listMaintenances");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
diff --git a/examples/v2/status-pages/UpdateMaintenance.java b/examples/v2/status-pages/UpdateMaintenance.java
new file mode 100644
index 00000000000..2f01752cf05
--- /dev/null
+++ b/examples/v2/status-pages/UpdateMaintenance.java
@@ -0,0 +1,61 @@
+// Update maintenance returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.StatusPagesApi;
+import com.datadog.api.client.v2.model.Maintenance;
+import com.datadog.api.client.v2.model.PatchMaintenanceRequest;
+import com.datadog.api.client.v2.model.PatchMaintenanceRequestData;
+import com.datadog.api.client.v2.model.PatchMaintenanceRequestDataAttributes;
+import com.datadog.api.client.v2.model.PatchMaintenanceRequestDataType;
+import java.util.UUID;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
+
+ // there is a valid "status_page" in the system
+ UUID STATUS_PAGE_DATA_ID = null;
+ try {
+ STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
+ } catch (IllegalArgumentException e) {
+ System.err.println("Error parsing UUID: " + e.getMessage());
+ }
+
+ // there is a valid "maintenance" in the system
+ UUID MAINTENANCE_DATA_ID = null;
+ try {
+ MAINTENANCE_DATA_ID = UUID.fromString(System.getenv("MAINTENANCE_DATA_ID"));
+ } catch (IllegalArgumentException e) {
+ System.err.println("Error parsing UUID: " + e.getMessage());
+ }
+
+ PatchMaintenanceRequest body =
+ new PatchMaintenanceRequest()
+ .data(
+ new PatchMaintenanceRequestData()
+ .attributes(
+ new PatchMaintenanceRequestDataAttributes()
+ .scheduledDescription(
+ "We will be performing maintenance on the API to improve"
+ + " performance for 40 minutes.")
+ .inProgressDescription(
+ "We are currently performing maintenance on the API to improve"
+ + " performance for 40 minutes."))
+ .id(MAINTENANCE_DATA_ID)
+ .type(PatchMaintenanceRequestDataType.MAINTENANCES));
+
+ try {
+ Maintenance result =
+ apiInstance.updateMaintenance(STATUS_PAGE_DATA_ID, MAINTENANCE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StatusPagesApi#updateMaintenance");
+ 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/v2/api/IntegrationsApi.java b/src/main/java/com/datadog/api/client/v2/api/IntegrationsApi.java
deleted file mode 100644
index 55c9065a368..00000000000
--- a/src/main/java/com/datadog/api/client/v2/api/IntegrationsApi.java
+++ /dev/null
@@ -1,152 +0,0 @@
-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.ListIntegrationsResponse;
-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 IntegrationsApi {
- private ApiClient apiClient;
-
- public IntegrationsApi() {
- this(ApiClient.getDefaultApiClient());
- }
-
- public IntegrationsApi(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;
- }
-
- /**
- * List Integrations.
- *
- *
See {@link #listIntegrationsWithHttpInfo}.
- *
- * @return ListIntegrationsResponse
- * @throws ApiException if fails to make API call
- */
- public ListIntegrationsResponse listIntegrations() throws ApiException {
- return listIntegrationsWithHttpInfo().getData();
- }
-
- /**
- * List Integrations.
- *
- *
See {@link #listIntegrationsWithHttpInfoAsync}.
- *
- * @return CompletableFuture<ListIntegrationsResponse>
- */
- public CompletableFuture listIntegrationsAsync() {
- return listIntegrationsWithHttpInfoAsync()
- .thenApply(
- response -> {
- return response.getData();
- });
- }
-
- /**
- * @return ApiResponse<ListIntegrationsResponse>
- * @throws ApiException if fails to make API call
- * @http.response.details
- *
- * Response details
- * | Status Code | Description | Response Headers |
- * | 200 | Successful Response. | - |
- * | 429 | Too many requests | - |
- *
- */
- public ApiResponse listIntegrationsWithHttpInfo() throws ApiException {
- Object localVarPostBody = null;
- // create path and map variables
- String localVarPath = "/api/v2/integrations";
-
- Map localVarHeaderParams = new HashMap();
-
- Invocation.Builder builder =
- apiClient.createBuilder(
- "v2.IntegrationsApi.listIntegrations",
- localVarPath,
- new ArrayList(),
- localVarHeaderParams,
- new HashMap(),
- new String[] {"application/json"},
- new String[] {"apiKeyAuth", "appKeyAuth"});
- return apiClient.invokeAPI(
- "GET",
- builder,
- localVarHeaderParams,
- new String[] {},
- localVarPostBody,
- new HashMap(),
- false,
- new GenericType() {});
- }
-
- /**
- * List Integrations.
- *
- * See {@link #listIntegrationsWithHttpInfo}.
- *
- * @return CompletableFuture<ApiResponse<ListIntegrationsResponse>>
- */
- public CompletableFuture>
- listIntegrationsWithHttpInfoAsync() {
- Object localVarPostBody = null;
- // create path and map variables
- String localVarPath = "/api/v2/integrations";
-
- Map localVarHeaderParams = new HashMap();
-
- Invocation.Builder builder;
- try {
- builder =
- apiClient.createBuilder(
- "v2.IntegrationsApi.listIntegrations",
- localVarPath,
- new ArrayList(),
- localVarHeaderParams,
- new HashMap(),
- new String[] {"application/json"},
- new String[] {"apiKeyAuth", "appKeyAuth"});
- } catch (ApiException ex) {
- CompletableFuture> result = new CompletableFuture<>();
- result.completeExceptionally(ex);
- return result;
- }
- return apiClient.invokeAPIAsync(
- "GET",
- builder,
- localVarHeaderParams,
- new String[] {},
- localVarPostBody,
- new HashMap(),
- false,
- new GenericType() {});
- }
-}
diff --git a/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java b/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java
index 11e3520d1b1..9de474a5581 100644
--- a/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java
+++ b/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java
@@ -6,11 +6,15 @@
import com.datadog.api.client.Pair;
import com.datadog.api.client.v2.model.CreateComponentRequest;
import com.datadog.api.client.v2.model.CreateDegradationRequest;
+import com.datadog.api.client.v2.model.CreateMaintenanceRequest;
import com.datadog.api.client.v2.model.CreateStatusPageRequest;
import com.datadog.api.client.v2.model.Degradation;
import com.datadog.api.client.v2.model.DegradationArray;
+import com.datadog.api.client.v2.model.Maintenance;
+import com.datadog.api.client.v2.model.MaintenanceArray;
import com.datadog.api.client.v2.model.PatchComponentRequest;
import com.datadog.api.client.v2.model.PatchDegradationRequest;
+import com.datadog.api.client.v2.model.PatchMaintenanceRequest;
import com.datadog.api.client.v2.model.PatchStatusPageRequest;
import com.datadog.api.client.v2.model.StatusPage;
import com.datadog.api.client.v2.model.StatusPageArray;
@@ -514,6 +518,245 @@ public CompletableFuture> createDegradationWithHttpInfo
new GenericType() {});
}
+ /** Manage optional parameters to createMaintenance. */
+ public static class CreateMaintenanceOptionalParameters {
+ private Boolean notifySubscribers;
+ private String include;
+
+ /**
+ * Set notifySubscribers.
+ *
+ * @param notifySubscribers Whether to notify page subscribers of the maintenance. (optional,
+ * default to true)
+ * @return CreateMaintenanceOptionalParameters
+ */
+ public CreateMaintenanceOptionalParameters notifySubscribers(Boolean notifySubscribers) {
+ this.notifySubscribers = notifySubscribers;
+ return this;
+ }
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user, status_page. (optional)
+ * @return CreateMaintenanceOptionalParameters
+ */
+ public CreateMaintenanceOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * Create maintenance.
+ *
+ * See {@link #createMaintenanceWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @return Maintenance
+ * @throws ApiException if fails to make API call
+ */
+ public Maintenance createMaintenance(UUID pageId, CreateMaintenanceRequest body)
+ throws ApiException {
+ return createMaintenanceWithHttpInfo(pageId, body, new CreateMaintenanceOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * Create maintenance.
+ *
+ *
See {@link #createMaintenanceWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @return CompletableFuture<Maintenance>
+ */
+ public CompletableFuture createMaintenanceAsync(
+ UUID pageId, CreateMaintenanceRequest body) {
+ return createMaintenanceWithHttpInfoAsync(
+ pageId, body, new CreateMaintenanceOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create maintenance.
+ *
+ * See {@link #createMaintenanceWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return Maintenance
+ * @throws ApiException if fails to make API call
+ */
+ public Maintenance createMaintenance(
+ UUID pageId, CreateMaintenanceRequest body, CreateMaintenanceOptionalParameters parameters)
+ throws ApiException {
+ return createMaintenanceWithHttpInfo(pageId, body, parameters).getData();
+ }
+
+ /**
+ * Create maintenance.
+ *
+ *
See {@link #createMaintenanceWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<Maintenance>
+ */
+ public CompletableFuture createMaintenanceAsync(
+ UUID pageId, CreateMaintenanceRequest body, CreateMaintenanceOptionalParameters parameters) {
+ return createMaintenanceWithHttpInfoAsync(pageId, body, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Creates a new maintenance.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<Maintenance>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | Created | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createMaintenanceWithHttpInfo(
+ UUID pageId, CreateMaintenanceRequest body, CreateMaintenanceOptionalParameters parameters)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling createMaintenance");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createMaintenance");
+ }
+ Boolean notifySubscribers = parameters.notifySubscribers;
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/maintenances"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "notify_subscribers", notifySubscribers));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.createMaintenance",
+ localVarPath,
+ localVarQueryParams,
+ 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 maintenance.
+ *
+ * See {@link #createMaintenanceWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<Maintenance>>
+ */
+ public CompletableFuture> createMaintenanceWithHttpInfoAsync(
+ UUID pageId, CreateMaintenanceRequest body, CreateMaintenanceOptionalParameters parameters) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling createMaintenance"));
+ 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 createMaintenance"));
+ return result;
+ }
+ Boolean notifySubscribers = parameters.notifySubscribers;
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/maintenances"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "notify_subscribers", notifySubscribers));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.createMaintenance",
+ localVarPath,
+ localVarQueryParams,
+ 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() {});
+ }
+
/** Manage optional parameters to createStatusPage. */
public static class CreateStatusPageOptionalParameters {
private String include;
@@ -1589,46 +1832,50 @@ public CompletableFuture> getDegradationWithHttpInfoAsy
new GenericType() {});
}
- /** Manage optional parameters to getStatusPage. */
- public static class GetStatusPageOptionalParameters {
+ /** Manage optional parameters to getMaintenance. */
+ public static class GetMaintenanceOptionalParameters {
private String include;
/**
* Set include.
*
* @param include Comma-separated list of resources to include. Supported values:
- * created_by_user, last_modified_by_user. (optional)
- * @return GetStatusPageOptionalParameters
+ * created_by_user, last_modified_by_user, status_page. (optional)
+ * @return GetMaintenanceOptionalParameters
*/
- public GetStatusPageOptionalParameters include(String include) {
+ public GetMaintenanceOptionalParameters include(String include) {
this.include = include;
return this;
}
}
/**
- * Get status page.
+ * Get maintenance.
*
- * See {@link #getStatusPageWithHttpInfo}.
+ *
See {@link #getMaintenanceWithHttpInfo}.
*
* @param pageId The ID of the status page. (required)
- * @return StatusPage
+ * @param maintenanceId The ID of the maintenance. (required)
+ * @return Maintenance
* @throws ApiException if fails to make API call
*/
- public StatusPage getStatusPage(UUID pageId) throws ApiException {
- return getStatusPageWithHttpInfo(pageId, new GetStatusPageOptionalParameters()).getData();
+ public Maintenance getMaintenance(UUID pageId, UUID maintenanceId) throws ApiException {
+ return getMaintenanceWithHttpInfo(pageId, maintenanceId, new GetMaintenanceOptionalParameters())
+ .getData();
}
/**
- * Get status page.
+ * Get maintenance.
*
- *
See {@link #getStatusPageWithHttpInfoAsync}.
+ *
See {@link #getMaintenanceWithHttpInfoAsync}.
*
* @param pageId The ID of the status page. (required)
- * @return CompletableFuture<StatusPage>
+ * @param maintenanceId The ID of the maintenance. (required)
+ * @return CompletableFuture<Maintenance>
*/
- public CompletableFuture getStatusPageAsync(UUID pageId) {
- return getStatusPageWithHttpInfoAsync(pageId, new GetStatusPageOptionalParameters())
+ public CompletableFuture getMaintenanceAsync(UUID pageId, UUID maintenanceId) {
+ return getMaintenanceWithHttpInfoAsync(
+ pageId, maintenanceId, new GetMaintenanceOptionalParameters())
.thenApply(
response -> {
return response.getData();
@@ -1636,32 +1883,35 @@ public CompletableFuture getStatusPageAsync(UUID pageId) {
}
/**
- * Get status page.
+ * Get maintenance.
*
- * See {@link #getStatusPageWithHttpInfo}.
+ *
See {@link #getMaintenanceWithHttpInfo}.
*
* @param pageId The ID of the status page. (required)
+ * @param maintenanceId The ID of the maintenance. (required)
* @param parameters Optional parameters for the request.
- * @return StatusPage
+ * @return Maintenance
* @throws ApiException if fails to make API call
*/
- public StatusPage getStatusPage(UUID pageId, GetStatusPageOptionalParameters parameters)
+ public Maintenance getMaintenance(
+ UUID pageId, UUID maintenanceId, GetMaintenanceOptionalParameters parameters)
throws ApiException {
- return getStatusPageWithHttpInfo(pageId, parameters).getData();
+ return getMaintenanceWithHttpInfo(pageId, maintenanceId, parameters).getData();
}
/**
- * Get status page.
+ * Get maintenance.
*
- *
See {@link #getStatusPageWithHttpInfoAsync}.
+ *
See {@link #getMaintenanceWithHttpInfoAsync}.
*
* @param pageId The ID of the status page. (required)
+ * @param maintenanceId The ID of the maintenance. (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<StatusPage>
+ * @return CompletableFuture<Maintenance>
*/
- public CompletableFuture getStatusPageAsync(
- UUID pageId, GetStatusPageOptionalParameters parameters) {
- return getStatusPageWithHttpInfoAsync(pageId, parameters)
+ public CompletableFuture getMaintenanceAsync(
+ UUID pageId, UUID maintenanceId, GetMaintenanceOptionalParameters parameters) {
+ return getMaintenanceWithHttpInfoAsync(pageId, maintenanceId, parameters)
.thenApply(
response -> {
return response.getData();
@@ -1669,11 +1919,12 @@ public CompletableFuture getStatusPageAsync(
}
/**
- * Retrieves a specific status page by its ID.
+ * Retrieves a specific maintenance by its ID.
*
* @param pageId The ID of the status page. (required)
+ * @param maintenanceId The ID of the maintenance. (required)
* @param parameters Optional parameters for the request.
- * @return ApiResponse<StatusPage>
+ * @return ApiResponse<Maintenance>
* @throws ApiException if fails to make API call
* @http.response.details
*
@@ -1683,20 +1934,29 @@ public CompletableFuture getStatusPageAsync(
* | 429 | Too many requests | - |
*
*/
- public ApiResponse getStatusPageWithHttpInfo(
- UUID pageId, GetStatusPageOptionalParameters parameters) throws ApiException {
+ public ApiResponse getMaintenanceWithHttpInfo(
+ UUID pageId, UUID maintenanceId, GetMaintenanceOptionalParameters parameters)
+ throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'pageId' is set
if (pageId == null) {
throw new ApiException(
- 400, "Missing the required parameter 'pageId' when calling getStatusPage");
+ 400, "Missing the required parameter 'pageId' when calling getMaintenance");
+ }
+
+ // verify the required parameter 'maintenanceId' is set
+ if (maintenanceId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'maintenanceId' when calling getMaintenance");
}
String include = parameters.include;
// create path and map variables
String localVarPath =
- "/api/v2/statuspages/{page_id}"
- .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+ "/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "maintenance_id" + "\\}", apiClient.escapeString(maintenanceId.toString()));
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
@@ -1705,7 +1965,7 @@ public ApiResponse getStatusPageWithHttpInfo(
Invocation.Builder builder =
apiClient.createBuilder(
- "v2.StatusPagesApi.getStatusPage",
+ "v2.StatusPagesApi.getMaintenance",
localVarPath,
localVarQueryParams,
localVarHeaderParams,
@@ -1720,35 +1980,47 @@ public ApiResponse getStatusPageWithHttpInfo(
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
- * Get status page.
+ * Get maintenance.
*
- * See {@link #getStatusPageWithHttpInfo}.
+ *
See {@link #getMaintenanceWithHttpInfo}.
*
* @param pageId The ID of the status page. (required)
+ * @param maintenanceId The ID of the maintenance. (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<ApiResponse<StatusPage>>
+ * @return CompletableFuture<ApiResponse<Maintenance>>
*/
- public CompletableFuture> getStatusPageWithHttpInfoAsync(
- UUID pageId, GetStatusPageOptionalParameters parameters) {
+ public CompletableFuture> getMaintenanceWithHttpInfoAsync(
+ UUID pageId, UUID maintenanceId, GetMaintenanceOptionalParameters parameters) {
Object localVarPostBody = null;
// verify the required parameter 'pageId' is set
if (pageId == null) {
- CompletableFuture> result = new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
- 400, "Missing the required parameter 'pageId' when calling getStatusPage"));
+ 400, "Missing the required parameter 'pageId' when calling getMaintenance"));
+ return result;
+ }
+
+ // verify the required parameter 'maintenanceId' is set
+ if (maintenanceId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'maintenanceId' when calling getMaintenance"));
return result;
}
String include = parameters.include;
// create path and map variables
String localVarPath =
- "/api/v2/statuspages/{page_id}"
- .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+ "/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "maintenance_id" + "\\}", apiClient.escapeString(maintenanceId.toString()));
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
@@ -1759,7 +2031,7 @@ public CompletableFuture> getStatusPageWithHttpInfoAsync
try {
builder =
apiClient.createBuilder(
- "v2.StatusPagesApi.getStatusPage",
+ "v2.StatusPagesApi.getMaintenance",
localVarPath,
localVarQueryParams,
localVarHeaderParams,
@@ -1767,7 +2039,7 @@ public CompletableFuture> getStatusPageWithHttpInfoAsync
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
- CompletableFuture> result = new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
@@ -1779,19 +2051,212 @@ public CompletableFuture> getStatusPageWithHttpInfoAsync
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
- /** Manage optional parameters to listComponents. */
- public static class ListComponentsOptionalParameters {
+ /** Manage optional parameters to getStatusPage. */
+ public static class GetStatusPageOptionalParameters {
private String include;
/**
* Set include.
*
* @param include Comma-separated list of resources to include. Supported values:
- * created_by_user, last_modified_by_user, status_page, group. (optional)
- * @return ListComponentsOptionalParameters
+ * created_by_user, last_modified_by_user. (optional)
+ * @return GetStatusPageOptionalParameters
+ */
+ public GetStatusPageOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * Get status page.
+ *
+ * See {@link #getStatusPageWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @return StatusPage
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPage getStatusPage(UUID pageId) throws ApiException {
+ return getStatusPageWithHttpInfo(pageId, new GetStatusPageOptionalParameters()).getData();
+ }
+
+ /**
+ * Get status page.
+ *
+ *
See {@link #getStatusPageWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @return CompletableFuture<StatusPage>
+ */
+ public CompletableFuture getStatusPageAsync(UUID pageId) {
+ return getStatusPageWithHttpInfoAsync(pageId, new GetStatusPageOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get status page.
+ *
+ * See {@link #getStatusPageWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return StatusPage
+ * @throws ApiException if fails to make API call
+ */
+ public StatusPage getStatusPage(UUID pageId, GetStatusPageOptionalParameters parameters)
+ throws ApiException {
+ return getStatusPageWithHttpInfo(pageId, parameters).getData();
+ }
+
+ /**
+ * Get status page.
+ *
+ *
See {@link #getStatusPageWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<StatusPage>
+ */
+ public CompletableFuture getStatusPageAsync(
+ UUID pageId, GetStatusPageOptionalParameters parameters) {
+ return getStatusPageWithHttpInfoAsync(pageId, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Retrieves a specific status page by its ID.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<StatusPage>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getStatusPageWithHttpInfo(
+ UUID pageId, GetStatusPageOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling getStatusPage");
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.getStatusPage",
+ localVarPath,
+ localVarQueryParams,
+ 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 status page.
+ *
+ * See {@link #getStatusPageWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<StatusPage>>
+ */
+ public CompletableFuture> getStatusPageWithHttpInfoAsync(
+ UUID pageId, GetStatusPageOptionalParameters parameters) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling getStatusPage"));
+ return result;
+ }
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.getStatusPage",
+ localVarPath,
+ localVarQueryParams,
+ 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() {});
+ }
+
+ /** Manage optional parameters to listComponents. */
+ public static class ListComponentsOptionalParameters {
+ private String include;
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user, status_page, group. (optional)
+ * @return ListComponentsOptionalParameters
*/
public ListComponentsOptionalParameters include(String include) {
this.include = include;
@@ -1982,14 +2447,265 @@ public static class ListDegradationsOptionalParameters {
private Integer pageLimit;
private String include;
private String filterStatus;
+ private String sort;
+
+ /**
+ * Set filterPageId.
+ *
+ * @param filterPageId Optional page id filter. (optional)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters filterPageId(String filterPageId) {
+ this.filterPageId = filterPageId;
+ return this;
+ }
+
+ /**
+ * Set pageOffset.
+ *
+ * @param pageOffset Offset to use as the start of the page. (optional, default to 0)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters pageOffset(Integer pageOffset) {
+ this.pageOffset = pageOffset;
+ return this;
+ }
+
+ /**
+ * Set pageLimit.
+ *
+ * @param pageLimit The number of degradations to return per page. (optional, default to 50)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters pageLimit(Integer pageLimit) {
+ this.pageLimit = pageLimit;
+ return this;
+ }
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user, status_page. (optional)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+
+ /**
+ * Set filterStatus.
+ *
+ * @param filterStatus Optional degradation status filter. Supported values: investigating,
+ * identified, monitoring, resolved. (optional)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters filterStatus(String filterStatus) {
+ this.filterStatus = filterStatus;
+ return this;
+ }
+
+ /**
+ * Set sort.
+ *
+ * @param sort Sort order. Prefix with '-' for descending. Supported values: created_at,
+ * -created_at, modified_at, -modified_at. (optional)
+ * @return ListDegradationsOptionalParameters
+ */
+ public ListDegradationsOptionalParameters sort(String sort) {
+ this.sort = sort;
+ return this;
+ }
+ }
+
+ /**
+ * List degradations.
+ *
+ * See {@link #listDegradationsWithHttpInfo}.
+ *
+ * @return DegradationArray
+ * @throws ApiException if fails to make API call
+ */
+ public DegradationArray listDegradations() throws ApiException {
+ return listDegradationsWithHttpInfo(new ListDegradationsOptionalParameters()).getData();
+ }
+
+ /**
+ * List degradations.
+ *
+ *
See {@link #listDegradationsWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<DegradationArray>
+ */
+ public CompletableFuture listDegradationsAsync() {
+ return listDegradationsWithHttpInfoAsync(new ListDegradationsOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List degradations.
+ *
+ * See {@link #listDegradationsWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return DegradationArray
+ * @throws ApiException if fails to make API call
+ */
+ public DegradationArray listDegradations(ListDegradationsOptionalParameters parameters)
+ throws ApiException {
+ return listDegradationsWithHttpInfo(parameters).getData();
+ }
+
+ /**
+ * List degradations.
+ *
+ *
See {@link #listDegradationsWithHttpInfoAsync}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<DegradationArray>
+ */
+ public CompletableFuture listDegradationsAsync(
+ ListDegradationsOptionalParameters parameters) {
+ return listDegradationsWithHttpInfoAsync(parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Lists all degradations for the organization. Optionally filter by status and page.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<DegradationArray>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listDegradationsWithHttpInfo(
+ ListDegradationsOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+ String filterPageId = parameters.filterPageId;
+ Integer pageOffset = parameters.pageOffset;
+ Integer pageLimit = parameters.pageLimit;
+ String include = parameters.include;
+ String filterStatus = parameters.filterStatus;
+ String sort = parameters.sort;
+ // create path and map variables
+ String localVarPath = "/api/v2/statuspages/degradations";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[page_id]", filterPageId));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.listDegradations",
+ localVarPath,
+ localVarQueryParams,
+ 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() {});
+ }
+
+ /**
+ * List degradations.
+ *
+ * See {@link #listDegradationsWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<DegradationArray>>
+ */
+ public CompletableFuture> listDegradationsWithHttpInfoAsync(
+ ListDegradationsOptionalParameters parameters) {
+ Object localVarPostBody = null;
+ String filterPageId = parameters.filterPageId;
+ Integer pageOffset = parameters.pageOffset;
+ Integer pageLimit = parameters.pageLimit;
+ String include = parameters.include;
+ String filterStatus = parameters.filterStatus;
+ String sort = parameters.sort;
+ // create path and map variables
+ String localVarPath = "/api/v2/statuspages/degradations";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[page_id]", filterPageId));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.listDegradations",
+ localVarPath,
+ localVarQueryParams,
+ 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() {});
+ }
+
+ /** Manage optional parameters to listMaintenances. */
+ public static class ListMaintenancesOptionalParameters {
+ private String filterPageId;
+ private Integer pageOffset;
+ private Integer pageLimit;
+ private String include;
+ private String filterStatus;
+ private String sort;
/**
* Set filterPageId.
*
* @param filterPageId Optional page id filter. (optional)
- * @return ListDegradationsOptionalParameters
+ * @return ListMaintenancesOptionalParameters
*/
- public ListDegradationsOptionalParameters filterPageId(String filterPageId) {
+ public ListMaintenancesOptionalParameters filterPageId(String filterPageId) {
this.filterPageId = filterPageId;
return this;
}
@@ -1998,9 +2714,9 @@ public ListDegradationsOptionalParameters filterPageId(String filterPageId) {
* Set pageOffset.
*
* @param pageOffset Offset to use as the start of the page. (optional, default to 0)
- * @return ListDegradationsOptionalParameters
+ * @return ListMaintenancesOptionalParameters
*/
- public ListDegradationsOptionalParameters pageOffset(Integer pageOffset) {
+ public ListMaintenancesOptionalParameters pageOffset(Integer pageOffset) {
this.pageOffset = pageOffset;
return this;
}
@@ -2008,10 +2724,10 @@ public ListDegradationsOptionalParameters pageOffset(Integer pageOffset) {
/**
* Set pageLimit.
*
- * @param pageLimit The number of degradations to return per page. (optional, default to 50)
- * @return ListDegradationsOptionalParameters
+ * @param pageLimit The number of maintenances to return per page. (optional, default to 50)
+ * @return ListMaintenancesOptionalParameters
*/
- public ListDegradationsOptionalParameters pageLimit(Integer pageLimit) {
+ public ListMaintenancesOptionalParameters pageLimit(Integer pageLimit) {
this.pageLimit = pageLimit;
return this;
}
@@ -2021,9 +2737,9 @@ public ListDegradationsOptionalParameters pageLimit(Integer pageLimit) {
*
* @param include Comma-separated list of resources to include. Supported values:
* created_by_user, last_modified_by_user, status_page. (optional)
- * @return ListDegradationsOptionalParameters
+ * @return ListMaintenancesOptionalParameters
*/
- public ListDegradationsOptionalParameters include(String include) {
+ public ListMaintenancesOptionalParameters include(String include) {
this.include = include;
return this;
}
@@ -2031,37 +2747,49 @@ public ListDegradationsOptionalParameters include(String include) {
/**
* Set filterStatus.
*
- * @param filterStatus Optional degradation status filter. Supported values: investigating,
- * identified, monitoring, resolved. (optional)
- * @return ListDegradationsOptionalParameters
+ * @param filterStatus Optional maintenance status filter. Supported values: scheduled,
+ * in_progress, completed, canceled. (optional)
+ * @return ListMaintenancesOptionalParameters
*/
- public ListDegradationsOptionalParameters filterStatus(String filterStatus) {
+ public ListMaintenancesOptionalParameters filterStatus(String filterStatus) {
this.filterStatus = filterStatus;
return this;
}
+
+ /**
+ * Set sort.
+ *
+ * @param sort Sort order. Prefix with '-' for descending. Supported values: created_at,
+ * -created_at, start_date, -start_date. (optional)
+ * @return ListMaintenancesOptionalParameters
+ */
+ public ListMaintenancesOptionalParameters sort(String sort) {
+ this.sort = sort;
+ return this;
+ }
}
/**
- * List degradations.
+ * List maintenances.
*
- * See {@link #listDegradationsWithHttpInfo}.
+ *
See {@link #listMaintenancesWithHttpInfo}.
*
- * @return DegradationArray
+ * @return MaintenanceArray
* @throws ApiException if fails to make API call
*/
- public DegradationArray listDegradations() throws ApiException {
- return listDegradationsWithHttpInfo(new ListDegradationsOptionalParameters()).getData();
+ public MaintenanceArray listMaintenances() throws ApiException {
+ return listMaintenancesWithHttpInfo(new ListMaintenancesOptionalParameters()).getData();
}
/**
- * List degradations.
+ * List maintenances.
*
- *
See {@link #listDegradationsWithHttpInfoAsync}.
+ *
See {@link #listMaintenancesWithHttpInfoAsync}.
*
- * @return CompletableFuture<DegradationArray>
+ * @return CompletableFuture<MaintenanceArray>
*/
- public CompletableFuture listDegradationsAsync() {
- return listDegradationsWithHttpInfoAsync(new ListDegradationsOptionalParameters())
+ public CompletableFuture listMaintenancesAsync() {
+ return listMaintenancesWithHttpInfoAsync(new ListMaintenancesOptionalParameters())
.thenApply(
response -> {
return response.getData();
@@ -2069,30 +2797,30 @@ public CompletableFuture listDegradationsAsync() {
}
/**
- * List degradations.
+ * List maintenances.
*
- * See {@link #listDegradationsWithHttpInfo}.
+ *
See {@link #listMaintenancesWithHttpInfo}.
*
* @param parameters Optional parameters for the request.
- * @return DegradationArray
+ * @return MaintenanceArray
* @throws ApiException if fails to make API call
*/
- public DegradationArray listDegradations(ListDegradationsOptionalParameters parameters)
+ public MaintenanceArray listMaintenances(ListMaintenancesOptionalParameters parameters)
throws ApiException {
- return listDegradationsWithHttpInfo(parameters).getData();
+ return listMaintenancesWithHttpInfo(parameters).getData();
}
/**
- * List degradations.
+ * List maintenances.
*
- *
See {@link #listDegradationsWithHttpInfoAsync}.
+ *
See {@link #listMaintenancesWithHttpInfoAsync}.
*
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<DegradationArray>
+ * @return CompletableFuture<MaintenanceArray>
*/
- public CompletableFuture listDegradationsAsync(
- ListDegradationsOptionalParameters parameters) {
- return listDegradationsWithHttpInfoAsync(parameters)
+ public CompletableFuture listMaintenancesAsync(
+ ListMaintenancesOptionalParameters parameters) {
+ return listMaintenancesWithHttpInfoAsync(parameters)
.thenApply(
response -> {
return response.getData();
@@ -2100,10 +2828,10 @@ public CompletableFuture listDegradationsAsync(
}
/**
- * Lists all degradations for the organization. Optionally filter by status and page.
+ * Lists all maintenances for the organization. Optionally filter by status and page.
*
* @param parameters Optional parameters for the request.
- * @return ApiResponse<DegradationArray>
+ * @return ApiResponse<MaintenanceArray>
* @throws ApiException if fails to make API call
* @http.response.details
*
@@ -2113,16 +2841,17 @@ public CompletableFuture listDegradationsAsync(
* | 429 | Too many requests | - |
*
*/
- public ApiResponse listDegradationsWithHttpInfo(
- ListDegradationsOptionalParameters parameters) throws ApiException {
+ public ApiResponse listMaintenancesWithHttpInfo(
+ ListMaintenancesOptionalParameters parameters) throws ApiException {
Object localVarPostBody = null;
String filterPageId = parameters.filterPageId;
Integer pageOffset = parameters.pageOffset;
Integer pageLimit = parameters.pageLimit;
String include = parameters.include;
String filterStatus = parameters.filterStatus;
+ String sort = parameters.sort;
// create path and map variables
- String localVarPath = "/api/v2/statuspages/degradations";
+ String localVarPath = "/api/v2/statuspages/maintenances";
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
@@ -2132,10 +2861,11 @@ public ApiResponse listDegradationsWithHttpInfo(
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
Invocation.Builder builder =
apiClient.createBuilder(
- "v2.StatusPagesApi.listDegradations",
+ "v2.StatusPagesApi.listMaintenances",
localVarPath,
localVarQueryParams,
localVarHeaderParams,
@@ -2150,27 +2880,28 @@ public ApiResponse listDegradationsWithHttpInfo(
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/**
- * List degradations.
+ * List maintenances.
*
- * See {@link #listDegradationsWithHttpInfo}.
+ *
See {@link #listMaintenancesWithHttpInfo}.
*
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<ApiResponse<DegradationArray>>
+ * @return CompletableFuture<ApiResponse<MaintenanceArray>>
*/
- public CompletableFuture> listDegradationsWithHttpInfoAsync(
- ListDegradationsOptionalParameters parameters) {
+ public CompletableFuture> listMaintenancesWithHttpInfoAsync(
+ ListMaintenancesOptionalParameters parameters) {
Object localVarPostBody = null;
String filterPageId = parameters.filterPageId;
Integer pageOffset = parameters.pageOffset;
Integer pageLimit = parameters.pageLimit;
String include = parameters.include;
String filterStatus = parameters.filterStatus;
+ String sort = parameters.sort;
// create path and map variables
- String localVarPath = "/api/v2/statuspages/degradations";
+ String localVarPath = "/api/v2/statuspages/maintenances";
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
@@ -2180,12 +2911,13 @@ public CompletableFuture> listDegradationsWithHttp
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
- "v2.StatusPagesApi.listDegradations",
+ "v2.StatusPagesApi.listMaintenances",
localVarPath,
localVarQueryParams,
localVarHeaderParams,
@@ -2193,7 +2925,7 @@ public CompletableFuture> listDegradationsWithHttp
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
- CompletableFuture> result = new CompletableFuture<>();
+ CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
@@ -2205,7 +2937,7 @@ public CompletableFuture> listDegradationsWithHttp
localVarPostBody,
new HashMap(),
false,
- new GenericType() {});
+ new GenericType() {});
}
/** Manage optional parameters to listStatusPages. */
@@ -2944,6 +3676,284 @@ public CompletableFuture> updateDegradationWithHttpInfo
new GenericType() {});
}
+ /** Manage optional parameters to updateMaintenance. */
+ public static class UpdateMaintenanceOptionalParameters {
+ private Boolean notifySubscribers;
+ private String include;
+
+ /**
+ * Set notifySubscribers.
+ *
+ * @param notifySubscribers Whether to notify page subscribers of the maintenance. (optional,
+ * default to true)
+ * @return UpdateMaintenanceOptionalParameters
+ */
+ public UpdateMaintenanceOptionalParameters notifySubscribers(Boolean notifySubscribers) {
+ this.notifySubscribers = notifySubscribers;
+ return this;
+ }
+
+ /**
+ * Set include.
+ *
+ * @param include Comma-separated list of resources to include. Supported values:
+ * created_by_user, last_modified_by_user, status_page. (optional)
+ * @return UpdateMaintenanceOptionalParameters
+ */
+ public UpdateMaintenanceOptionalParameters include(String include) {
+ this.include = include;
+ return this;
+ }
+ }
+
+ /**
+ * Update maintenance.
+ *
+ * See {@link #updateMaintenanceWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param maintenanceId The ID of the maintenance. (required)
+ * @param body (required)
+ * @return Maintenance
+ * @throws ApiException if fails to make API call
+ */
+ public Maintenance updateMaintenance(
+ UUID pageId, UUID maintenanceId, PatchMaintenanceRequest body) throws ApiException {
+ return updateMaintenanceWithHttpInfo(
+ pageId, maintenanceId, body, new UpdateMaintenanceOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * Update maintenance.
+ *
+ *
See {@link #updateMaintenanceWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param maintenanceId The ID of the maintenance. (required)
+ * @param body (required)
+ * @return CompletableFuture<Maintenance>
+ */
+ public CompletableFuture updateMaintenanceAsync(
+ UUID pageId, UUID maintenanceId, PatchMaintenanceRequest body) {
+ return updateMaintenanceWithHttpInfoAsync(
+ pageId, maintenanceId, body, new UpdateMaintenanceOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update maintenance.
+ *
+ * See {@link #updateMaintenanceWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param maintenanceId The ID of the maintenance. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return Maintenance
+ * @throws ApiException if fails to make API call
+ */
+ public Maintenance updateMaintenance(
+ UUID pageId,
+ UUID maintenanceId,
+ PatchMaintenanceRequest body,
+ UpdateMaintenanceOptionalParameters parameters)
+ throws ApiException {
+ return updateMaintenanceWithHttpInfo(pageId, maintenanceId, body, parameters).getData();
+ }
+
+ /**
+ * Update maintenance.
+ *
+ *
See {@link #updateMaintenanceWithHttpInfoAsync}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param maintenanceId The ID of the maintenance. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<Maintenance>
+ */
+ public CompletableFuture updateMaintenanceAsync(
+ UUID pageId,
+ UUID maintenanceId,
+ PatchMaintenanceRequest body,
+ UpdateMaintenanceOptionalParameters parameters) {
+ return updateMaintenanceWithHttpInfoAsync(pageId, maintenanceId, body, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Updates an existing maintenance's attributes.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param maintenanceId The ID of the maintenance. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<Maintenance>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateMaintenanceWithHttpInfo(
+ UUID pageId,
+ UUID maintenanceId,
+ PatchMaintenanceRequest body,
+ UpdateMaintenanceOptionalParameters parameters)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling updateMaintenance");
+ }
+
+ // verify the required parameter 'maintenanceId' is set
+ if (maintenanceId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'maintenanceId' when calling updateMaintenance");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateMaintenance");
+ }
+ Boolean notifySubscribers = parameters.notifySubscribers;
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "maintenance_id" + "\\}", apiClient.escapeString(maintenanceId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "notify_subscribers", notifySubscribers));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.updateMaintenance",
+ localVarPath,
+ localVarQueryParams,
+ 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 maintenance.
+ *
+ * See {@link #updateMaintenanceWithHttpInfo}.
+ *
+ * @param pageId The ID of the status page. (required)
+ * @param maintenanceId The ID of the maintenance. (required)
+ * @param body (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<Maintenance>>
+ */
+ public CompletableFuture> updateMaintenanceWithHttpInfoAsync(
+ UUID pageId,
+ UUID maintenanceId,
+ PatchMaintenanceRequest body,
+ UpdateMaintenanceOptionalParameters parameters) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'pageId' is set
+ if (pageId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'pageId' when calling updateMaintenance"));
+ return result;
+ }
+
+ // verify the required parameter 'maintenanceId' is set
+ if (maintenanceId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'maintenanceId' when calling updateMaintenance"));
+ 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 updateMaintenance"));
+ return result;
+ }
+ Boolean notifySubscribers = parameters.notifySubscribers;
+ String include = parameters.include;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}"
+ .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString()))
+ .replaceAll(
+ "\\{" + "maintenance_id" + "\\}", apiClient.escapeString(maintenanceId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(
+ apiClient.parameterToPairs("", "notify_subscribers", notifySubscribers));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.StatusPagesApi.updateMaintenance",
+ localVarPath,
+ localVarQueryParams,
+ 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() {});
+ }
+
/** Manage optional parameters to updateStatusPage. */
public static class UpdateStatusPageOptionalParameters {
private Boolean deleteSubscribers;
diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequest.java
new file mode 100644
index 00000000000..39c181db2d7
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequest.java
@@ -0,0 +1,136 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** */
+@JsonPropertyOrder({CreateMaintenanceRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateMaintenanceRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private CreateMaintenanceRequestData data;
+
+ public CreateMaintenanceRequest data(CreateMaintenanceRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Getdata
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public CreateMaintenanceRequestData getData() {
+ return data;
+ }
+
+ public void setData(CreateMaintenanceRequestData 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 CreateMaintenanceRequest
+ */
+ @JsonAnySetter
+ public CreateMaintenanceRequest 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 CreateMaintenanceRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateMaintenanceRequest createMaintenanceRequest = (CreateMaintenanceRequest) o;
+ return Objects.equals(this.data, createMaintenanceRequest.data)
+ && Objects.equals(this.additionalProperties, createMaintenanceRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateMaintenanceRequest {\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/CreateMaintenanceRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestData.java
new file mode 100644
index 00000000000..b7af09a99d2
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestData.java
@@ -0,0 +1,184 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** */
+@JsonPropertyOrder({
+ CreateMaintenanceRequestData.JSON_PROPERTY_ATTRIBUTES,
+ CreateMaintenanceRequestData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateMaintenanceRequestData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private CreateMaintenanceRequestDataAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private PatchMaintenanceRequestDataType type = PatchMaintenanceRequestDataType.MAINTENANCES;
+
+ public CreateMaintenanceRequestData() {}
+
+ @JsonCreator
+ public CreateMaintenanceRequestData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ CreateMaintenanceRequestDataAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ PatchMaintenanceRequestDataType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public CreateMaintenanceRequestData attributes(
+ CreateMaintenanceRequestDataAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * The supported attributes for creating a maintenance.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public CreateMaintenanceRequestDataAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(CreateMaintenanceRequestDataAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public CreateMaintenanceRequestData type(PatchMaintenanceRequestDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Maintenances resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public PatchMaintenanceRequestDataType getType() {
+ return type;
+ }
+
+ public void setType(PatchMaintenanceRequestDataType 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 CreateMaintenanceRequestData
+ */
+ @JsonAnySetter
+ public CreateMaintenanceRequestData 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 CreateMaintenanceRequestData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateMaintenanceRequestData createMaintenanceRequestData = (CreateMaintenanceRequestData) o;
+ return Objects.equals(this.attributes, createMaintenanceRequestData.attributes)
+ && Objects.equals(this.type, createMaintenanceRequestData.type)
+ && Objects.equals(
+ this.additionalProperties, createMaintenanceRequestData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateMaintenanceRequestData {\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/CreateMaintenanceRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributes.java
new file mode 100644
index 00000000000..ac6c9612d2c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributes.java
@@ -0,0 +1,348 @@
+/*
+ * 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;
+
+/** The supported attributes for creating a maintenance. */
+@JsonPropertyOrder({
+ CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_COMPLETED_DATE,
+ CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_COMPLETED_DESCRIPTION,
+ CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_COMPONENTS_AFFECTED,
+ CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_IN_PROGRESS_DESCRIPTION,
+ CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_SCHEDULED_DESCRIPTION,
+ CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_START_DATE,
+ CreateMaintenanceRequestDataAttributes.JSON_PROPERTY_TITLE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateMaintenanceRequestDataAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_COMPLETED_DATE = "completed_date";
+ private OffsetDateTime completedDate;
+
+ public static final String JSON_PROPERTY_COMPLETED_DESCRIPTION = "completed_description";
+ private String completedDescription;
+
+ public static final String JSON_PROPERTY_COMPONENTS_AFFECTED = "components_affected";
+ private List componentsAffected =
+ new ArrayList<>();
+
+ public static final String JSON_PROPERTY_IN_PROGRESS_DESCRIPTION = "in_progress_description";
+ private String inProgressDescription;
+
+ public static final String JSON_PROPERTY_SCHEDULED_DESCRIPTION = "scheduled_description";
+ private String scheduledDescription;
+
+ 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 CreateMaintenanceRequestDataAttributes() {}
+
+ @JsonCreator
+ public CreateMaintenanceRequestDataAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_COMPONENTS_AFFECTED)
+ List componentsAffected,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) {
+ this.componentsAffected = componentsAffected;
+ this.title = title;
+ }
+
+ public CreateMaintenanceRequestDataAttributes completedDate(OffsetDateTime completedDate) {
+ this.completedDate = completedDate;
+ return this;
+ }
+
+ /**
+ * Timestamp of when the maintenance was completed.
+ *
+ * @return completedDate
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_COMPLETED_DATE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OffsetDateTime getCompletedDate() {
+ return completedDate;
+ }
+
+ public void setCompletedDate(OffsetDateTime completedDate) {
+ this.completedDate = completedDate;
+ }
+
+ public CreateMaintenanceRequestDataAttributes completedDescription(String completedDescription) {
+ this.completedDescription = completedDescription;
+ return this;
+ }
+
+ /**
+ * The description shown when the maintenance is completed.
+ *
+ * @return completedDescription
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_COMPLETED_DESCRIPTION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getCompletedDescription() {
+ return completedDescription;
+ }
+
+ public void setCompletedDescription(String completedDescription) {
+ this.completedDescription = completedDescription;
+ }
+
+ public CreateMaintenanceRequestDataAttributes componentsAffected(
+ List componentsAffected) {
+ this.componentsAffected = componentsAffected;
+ for (CreateMaintenanceRequestDataAttributesComponentsAffectedItems item : componentsAffected) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public CreateMaintenanceRequestDataAttributes addComponentsAffectedItem(
+ CreateMaintenanceRequestDataAttributesComponentsAffectedItems componentsAffectedItem) {
+ this.componentsAffected.add(componentsAffectedItem);
+ this.unparsed |= componentsAffectedItem.unparsed;
+ return this;
+ }
+
+ /**
+ * The components affected by the maintenance.
+ *
+ * @return componentsAffected
+ */
+ @JsonProperty(JSON_PROPERTY_COMPONENTS_AFFECTED)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List
+ getComponentsAffected() {
+ return componentsAffected;
+ }
+
+ public void setComponentsAffected(
+ List componentsAffected) {
+ this.componentsAffected = componentsAffected;
+ }
+
+ public CreateMaintenanceRequestDataAttributes inProgressDescription(
+ String inProgressDescription) {
+ this.inProgressDescription = inProgressDescription;
+ return this;
+ }
+
+ /**
+ * The description shown while the maintenance is in progress.
+ *
+ * @return inProgressDescription
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_IN_PROGRESS_DESCRIPTION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getInProgressDescription() {
+ return inProgressDescription;
+ }
+
+ public void setInProgressDescription(String inProgressDescription) {
+ this.inProgressDescription = inProgressDescription;
+ }
+
+ public CreateMaintenanceRequestDataAttributes scheduledDescription(String scheduledDescription) {
+ this.scheduledDescription = scheduledDescription;
+ return this;
+ }
+
+ /**
+ * The description shown when the maintenance is scheduled.
+ *
+ * @return scheduledDescription
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_SCHEDULED_DESCRIPTION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getScheduledDescription() {
+ return scheduledDescription;
+ }
+
+ public void setScheduledDescription(String scheduledDescription) {
+ this.scheduledDescription = scheduledDescription;
+ }
+
+ public CreateMaintenanceRequestDataAttributes startDate(OffsetDateTime startDate) {
+ this.startDate = startDate;
+ return this;
+ }
+
+ /**
+ * Timestamp of when the maintenance is scheduled to start.
+ *
+ * @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 CreateMaintenanceRequestDataAttributes title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * The title of the maintenance.
+ *
+ * @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 CreateMaintenanceRequestDataAttributes
+ */
+ @JsonAnySetter
+ public CreateMaintenanceRequestDataAttributes 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 CreateMaintenanceRequestDataAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateMaintenanceRequestDataAttributes createMaintenanceRequestDataAttributes =
+ (CreateMaintenanceRequestDataAttributes) o;
+ return Objects.equals(this.completedDate, createMaintenanceRequestDataAttributes.completedDate)
+ && Objects.equals(
+ this.completedDescription, createMaintenanceRequestDataAttributes.completedDescription)
+ && Objects.equals(
+ this.componentsAffected, createMaintenanceRequestDataAttributes.componentsAffected)
+ && Objects.equals(
+ this.inProgressDescription,
+ createMaintenanceRequestDataAttributes.inProgressDescription)
+ && Objects.equals(
+ this.scheduledDescription, createMaintenanceRequestDataAttributes.scheduledDescription)
+ && Objects.equals(this.startDate, createMaintenanceRequestDataAttributes.startDate)
+ && Objects.equals(this.title, createMaintenanceRequestDataAttributes.title)
+ && Objects.equals(
+ this.additionalProperties, createMaintenanceRequestDataAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ completedDate,
+ completedDescription,
+ componentsAffected,
+ inProgressDescription,
+ scheduledDescription,
+ startDate,
+ title,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateMaintenanceRequestDataAttributes {\n");
+ sb.append(" completedDate: ").append(toIndentedString(completedDate)).append("\n");
+ sb.append(" completedDescription: ")
+ .append(toIndentedString(completedDescription))
+ .append("\n");
+ sb.append(" componentsAffected: ").append(toIndentedString(componentsAffected)).append("\n");
+ sb.append(" inProgressDescription: ")
+ .append(toIndentedString(inProgressDescription))
+ .append("\n");
+ sb.append(" scheduledDescription: ")
+ .append(toIndentedString(scheduledDescription))
+ .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/CreateMaintenanceRequestDataAttributesComponentsAffectedItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributesComponentsAffectedItems.java
new file mode 100644
index 00000000000..46eef88218a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/CreateMaintenanceRequestDataAttributesComponentsAffectedItems.java
@@ -0,0 +1,209 @@
+/*
+ * 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;
+import java.util.UUID;
+
+/** */
+@JsonPropertyOrder({
+ CreateMaintenanceRequestDataAttributesComponentsAffectedItems.JSON_PROPERTY_ID,
+ CreateMaintenanceRequestDataAttributesComponentsAffectedItems.JSON_PROPERTY_NAME,
+ CreateMaintenanceRequestDataAttributesComponentsAffectedItems.JSON_PROPERTY_STATUS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class CreateMaintenanceRequestDataAttributesComponentsAffectedItems {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ID = "id";
+ private UUID id;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public static final String JSON_PROPERTY_STATUS = "status";
+ private PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus status;
+
+ public CreateMaintenanceRequestDataAttributesComponentsAffectedItems() {}
+
+ @JsonCreator
+ public CreateMaintenanceRequestDataAttributesComponentsAffectedItems(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_STATUS)
+ PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus status) {
+ this.id = id;
+ this.status = status;
+ this.unparsed |= !status.isValid();
+ }
+
+ public CreateMaintenanceRequestDataAttributesComponentsAffectedItems id(UUID id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The ID of the component. Must be a component of type component.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public UUID getId() {
+ return id;
+ }
+
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+ /**
+ * The name of the component.
+ *
+ * @return name
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getName() {
+ return name;
+ }
+
+ public CreateMaintenanceRequestDataAttributesComponentsAffectedItems status(
+ PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus status) {
+ this.status = status;
+ this.unparsed |= !status.isValid();
+ return this;
+ }
+
+ /**
+ * The status of the component.
+ *
+ * @return status
+ */
+ @JsonProperty(JSON_PROPERTY_STATUS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus status) {
+ if (!status.isValid()) {
+ this.unparsed = true;
+ }
+ this.status = status;
+ }
+
+ /**
+ * 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 CreateMaintenanceRequestDataAttributesComponentsAffectedItems
+ */
+ @JsonAnySetter
+ public CreateMaintenanceRequestDataAttributesComponentsAffectedItems 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 CreateMaintenanceRequestDataAttributesComponentsAffectedItems object is
+ * equal to o.
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateMaintenanceRequestDataAttributesComponentsAffectedItems
+ createMaintenanceRequestDataAttributesComponentsAffectedItems =
+ (CreateMaintenanceRequestDataAttributesComponentsAffectedItems) o;
+ return Objects.equals(this.id, createMaintenanceRequestDataAttributesComponentsAffectedItems.id)
+ && Objects.equals(
+ this.name, createMaintenanceRequestDataAttributesComponentsAffectedItems.name)
+ && Objects.equals(
+ this.status, createMaintenanceRequestDataAttributesComponentsAffectedItems.status)
+ && Objects.equals(
+ this.additionalProperties,
+ createMaintenanceRequestDataAttributesComponentsAffectedItems.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name, status, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateMaintenanceRequestDataAttributesComponentsAffectedItems {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).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/Degradation.java b/src/main/java/com/datadog/api/client/v2/model/Degradation.java
index c3ce3e7fd8a..903c53052a4 100644
--- a/src/main/java/com/datadog/api/client/v2/model/Degradation.java
+++ b/src/main/java/com/datadog/api/client/v2/model/Degradation.java
@@ -28,7 +28,7 @@ public class Degradation {
private DegradationData data;
public static final String JSON_PROPERTY_INCLUDED = "included";
- private List included = null;
+ private List included = null;
public Degradation data(DegradationData data) {
this.data = data;
@@ -52,15 +52,15 @@ public void setData(DegradationData data) {
this.data = data;
}
- public Degradation included(List included) {
+ public Degradation included(List included) {
this.included = included;
- for (DegradationArrayIncluded item : included) {
+ for (DegradationIncluded item : included) {
this.unparsed |= item.unparsed;
}
return this;
}
- public Degradation addIncludedItem(DegradationArrayIncluded includedItem) {
+ public Degradation addIncludedItem(DegradationIncluded includedItem) {
if (this.included == null) {
this.included = new ArrayList<>();
}
@@ -78,11 +78,11 @@ public Degradation addIncludedItem(DegradationArrayIncluded includedItem) {
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INCLUDED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getIncluded() {
+ public List getIncluded() {
return included;
}
- public void setIncluded(List included) {
+ public void setIncluded(List included) {
this.included = included;
}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DegradationArray.java b/src/main/java/com/datadog/api/client/v2/model/DegradationArray.java
index 7927cc7917f..a5e06eaba21 100644
--- a/src/main/java/com/datadog/api/client/v2/model/DegradationArray.java
+++ b/src/main/java/com/datadog/api/client/v2/model/DegradationArray.java
@@ -33,7 +33,7 @@ public class DegradationArray {
private List data = new ArrayList<>();
public static final String JSON_PROPERTY_INCLUDED = "included";
- private List included = null;
+ private List included = null;
public static final String JSON_PROPERTY_META = "meta";
private StatusPagesResponseMeta meta;
@@ -75,15 +75,15 @@ public void setData(List data) {
this.data = data;
}
- public DegradationArray included(List included) {
+ public DegradationArray included(List included) {
this.included = included;
- for (DegradationArrayIncluded item : included) {
+ for (DegradationIncluded item : included) {
this.unparsed |= item.unparsed;
}
return this;
}
- public DegradationArray addIncludedItem(DegradationArrayIncluded includedItem) {
+ public DegradationArray addIncludedItem(DegradationIncluded includedItem) {
if (this.included == null) {
this.included = new ArrayList<>();
}
@@ -101,11 +101,11 @@ public DegradationArray addIncludedItem(DegradationArrayIncluded includedItem) {
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INCLUDED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getIncluded() {
+ public List getIncluded() {
return included;
}
- public void setIncluded(List included) {
+ public void setIncluded(List included) {
this.included = included;
}
diff --git a/src/main/java/com/datadog/api/client/v2/model/DegradationArrayIncluded.java b/src/main/java/com/datadog/api/client/v2/model/DegradationIncluded.java
similarity index 87%
rename from src/main/java/com/datadog/api/client/v2/model/DegradationArrayIncluded.java
rename to src/main/java/com/datadog/api/client/v2/model/DegradationIncluded.java
index ba9d26e414c..594f9dcd9ad 100644
--- a/src/main/java/com/datadog/api/client/v2/model/DegradationArrayIncluded.java
+++ b/src/main/java/com/datadog/api/client/v2/model/DegradationIncluded.java
@@ -36,43 +36,41 @@
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
-@JsonDeserialize(using = DegradationArrayIncluded.DegradationArrayIncludedDeserializer.class)
-@JsonSerialize(using = DegradationArrayIncluded.DegradationArrayIncludedSerializer.class)
-public class DegradationArrayIncluded extends AbstractOpenApiSchema {
- private static final Logger log = Logger.getLogger(DegradationArrayIncluded.class.getName());
+@JsonDeserialize(using = DegradationIncluded.DegradationIncludedDeserializer.class)
+@JsonSerialize(using = DegradationIncluded.DegradationIncludedSerializer.class)
+public class DegradationIncluded extends AbstractOpenApiSchema {
+ private static final Logger log = Logger.getLogger(DegradationIncluded.class.getName());
@JsonIgnore public boolean unparsed = false;
- public static class DegradationArrayIncludedSerializer
- extends StdSerializer {
- public DegradationArrayIncludedSerializer(Class t) {
+ public static class DegradationIncludedSerializer extends StdSerializer {
+ public DegradationIncludedSerializer(Class t) {
super(t);
}
- public DegradationArrayIncludedSerializer() {
+ public DegradationIncludedSerializer() {
this(null);
}
@Override
public void serialize(
- DegradationArrayIncluded value, JsonGenerator jgen, SerializerProvider provider)
+ DegradationIncluded value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonProcessingException {
jgen.writeObject(value.getActualInstance());
}
}
- public static class DegradationArrayIncludedDeserializer
- extends StdDeserializer {
- public DegradationArrayIncludedDeserializer() {
- this(DegradationArrayIncluded.class);
+ public static class DegradationIncludedDeserializer extends StdDeserializer {
+ public DegradationIncludedDeserializer() {
+ this(DegradationIncluded.class);
}
- public DegradationArrayIncludedDeserializer(Class> vc) {
+ public DegradationIncludedDeserializer(Class> vc) {
super(vc);
}
@Override
- public DegradationArrayIncluded deserialize(JsonParser jp, DeserializationContext ctxt)
+ public DegradationIncluded deserialize(JsonParser jp, DeserializationContext ctxt)
throws IOException, JsonProcessingException {
JsonNode tree = jp.readValueAsTree();
Object deserialized = null;
@@ -169,7 +167,7 @@ public DegradationArrayIncluded deserialize(JsonParser jp, DeserializationContex
log.log(Level.FINER, "Input data does not match schema 'StatusPageAsIncluded'", e);
}
- DegradationArrayIncluded ret = new DegradationArrayIncluded();
+ DegradationIncluded ret = new DegradationIncluded();
if (match == 1) {
ret.setActualInstance(deserialized);
} else {
@@ -185,25 +183,25 @@ public DegradationArrayIncluded deserialize(JsonParser jp, DeserializationContex
/** Handle deserialization of the 'null' value. */
@Override
- public DegradationArrayIncluded getNullValue(DeserializationContext ctxt)
+ public DegradationIncluded getNullValue(DeserializationContext ctxt)
throws JsonMappingException {
- throw new JsonMappingException(ctxt.getParser(), "DegradationArrayIncluded cannot be null");
+ throw new JsonMappingException(ctxt.getParser(), "DegradationIncluded cannot be null");
}
}
// store a list of schema names defined in oneOf
public static final Map schemas = new HashMap();
- public DegradationArrayIncluded() {
+ public DegradationIncluded() {
super("oneOf", Boolean.FALSE);
}
- public DegradationArrayIncluded(StatusPagesUser o) {
+ public DegradationIncluded(StatusPagesUser o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
- public DegradationArrayIncluded(StatusPageAsIncluded o) {
+ public DegradationIncluded(StatusPageAsIncluded o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
@@ -211,12 +209,12 @@ public DegradationArrayIncluded(StatusPageAsIncluded o) {
static {
schemas.put("StatusPagesUser", new GenericType() {});
schemas.put("StatusPageAsIncluded", new GenericType() {});
- JSON.registerDescendants(DegradationArrayIncluded.class, Collections.unmodifiableMap(schemas));
+ JSON.registerDescendants(DegradationIncluded.class, Collections.unmodifiableMap(schemas));
}
@Override
public Map getSchemas() {
- return DegradationArrayIncluded.schemas;
+ return DegradationIncluded.schemas;
}
/**
diff --git a/src/main/java/com/datadog/api/client/v2/model/IntegrationAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationAttributes.java
deleted file mode 100644
index 20e8e1b34a5..00000000000
--- a/src/main/java/com/datadog/api/client/v2/model/IntegrationAttributes.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * 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;
-
-/** Attributes for an integration. */
-@JsonPropertyOrder({
- IntegrationAttributes.JSON_PROPERTY_CATEGORIES,
- IntegrationAttributes.JSON_PROPERTY_DESCRIPTION,
- IntegrationAttributes.JSON_PROPERTY_INSTALLED,
- IntegrationAttributes.JSON_PROPERTY_TITLE
-})
-@jakarta.annotation.Generated(
- value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
-public class IntegrationAttributes {
- @JsonIgnore public boolean unparsed = false;
- public static final String JSON_PROPERTY_CATEGORIES = "categories";
- private List categories = new ArrayList<>();
-
- public static final String JSON_PROPERTY_DESCRIPTION = "description";
- private String description;
-
- public static final String JSON_PROPERTY_INSTALLED = "installed";
- private Boolean installed;
-
- public static final String JSON_PROPERTY_TITLE = "title";
- private String title;
-
- public IntegrationAttributes() {}
-
- @JsonCreator
- public IntegrationAttributes(
- @JsonProperty(required = true, value = JSON_PROPERTY_CATEGORIES) List categories,
- @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description,
- @JsonProperty(required = true, value = JSON_PROPERTY_INSTALLED) Boolean installed,
- @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) {
- this.categories = categories;
- this.description = description;
- this.installed = installed;
- this.title = title;
- }
-
- public IntegrationAttributes categories(List categories) {
- this.categories = categories;
- return this;
- }
-
- public IntegrationAttributes addCategoriesItem(String categoriesItem) {
- this.categories.add(categoriesItem);
- return this;
- }
-
- /**
- * List of categories associated with the integration.
- *
- * @return categories
- */
- @JsonProperty(JSON_PROPERTY_CATEGORIES)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public List getCategories() {
- return categories;
- }
-
- public void setCategories(List categories) {
- this.categories = categories;
- }
-
- public IntegrationAttributes description(String description) {
- this.description = description;
- return this;
- }
-
- /**
- * A description of the integration.
- *
- * @return description
- */
- @JsonProperty(JSON_PROPERTY_DESCRIPTION)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public IntegrationAttributes installed(Boolean installed) {
- this.installed = installed;
- return this;
- }
-
- /**
- * Whether the integration is installed.
- *
- * @return installed
- */
- @JsonProperty(JSON_PROPERTY_INSTALLED)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public Boolean getInstalled() {
- return installed;
- }
-
- public void setInstalled(Boolean installed) {
- this.installed = installed;
- }
-
- public IntegrationAttributes title(String title) {
- this.title = title;
- return this;
- }
-
- /**
- * The name of the integration.
- *
- * @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 IntegrationAttributes
- */
- @JsonAnySetter
- public IntegrationAttributes 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 IntegrationAttributes object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- IntegrationAttributes integrationAttributes = (IntegrationAttributes) o;
- return Objects.equals(this.categories, integrationAttributes.categories)
- && Objects.equals(this.description, integrationAttributes.description)
- && Objects.equals(this.installed, integrationAttributes.installed)
- && Objects.equals(this.title, integrationAttributes.title)
- && Objects.equals(this.additionalProperties, integrationAttributes.additionalProperties);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(categories, description, installed, title, additionalProperties);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class IntegrationAttributes {\n");
- sb.append(" categories: ").append(toIndentedString(categories)).append("\n");
- sb.append(" description: ").append(toIndentedString(description)).append("\n");
- sb.append(" installed: ").append(toIndentedString(installed)).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/Maintenance.java b/src/main/java/com/datadog/api/client/v2/model/Maintenance.java
new file mode 100644
index 00000000000..e6609ea80f1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/Maintenance.java
@@ -0,0 +1,177 @@
+/*
+ * 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.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** */
+@JsonPropertyOrder({Maintenance.JSON_PROPERTY_DATA, Maintenance.JSON_PROPERTY_INCLUDED})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class Maintenance {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private MaintenanceData data;
+
+ public static final String JSON_PROPERTY_INCLUDED = "included";
+ private List included = null;
+
+ public Maintenance data(MaintenanceData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Getdata
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public MaintenanceData getData() {
+ return data;
+ }
+
+ public void setData(MaintenanceData data) {
+ this.data = data;
+ }
+
+ public Maintenance included(List included) {
+ this.included = included;
+ for (DegradationIncluded item : included) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public Maintenance addIncludedItem(DegradationIncluded includedItem) {
+ if (this.included == null) {
+ this.included = new ArrayList<>();
+ }
+ this.included.add(includedItem);
+ this.unparsed |= includedItem.unparsed;
+ return this;
+ }
+
+ /**
+ * The included related resources of a maintenance. Client must explicitly request these resources
+ * by name in the include query parameter.
+ *
+ * @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 Maintenance
+ */
+ @JsonAnySetter
+ public Maintenance 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 Maintenance object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Maintenance maintenance = (Maintenance) o;
+ return Objects.equals(this.data, maintenance.data)
+ && Objects.equals(this.included, maintenance.included)
+ && Objects.equals(this.additionalProperties, maintenance.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, included, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Maintenance {\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/MaintenanceArray.java b/src/main/java/com/datadog/api/client/v2/model/MaintenanceArray.java
new file mode 100644
index 00000000000..848857b392e
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/MaintenanceArray.java
@@ -0,0 +1,224 @@
+/*
+ * 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;
+
+/** */
+@JsonPropertyOrder({
+ MaintenanceArray.JSON_PROPERTY_DATA,
+ MaintenanceArray.JSON_PROPERTY_INCLUDED,
+ MaintenanceArray.JSON_PROPERTY_META
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class MaintenanceArray {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private List data = new ArrayList<>();
+
+ public static final String JSON_PROPERTY_INCLUDED = "included";
+ private List included = null;
+
+ public static final String JSON_PROPERTY_META = "meta";
+ private PaginationMeta meta;
+
+ public MaintenanceArray() {}
+
+ @JsonCreator
+ public MaintenanceArray(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) {
+ this.data = data;
+ }
+
+ public MaintenanceArray data(List