diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index edf52001413..8ac61c056a5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -13103,6 +13103,100 @@ components: - findings - project type: object + CreateComponentRequest: + example: + data: + attributes: + name: Metrics Intake + position: 0 + type: component + relationships: + group: + data: null + type: components + properties: + data: + $ref: '#/components/schemas/CreateComponentRequestData' + type: object + CreateComponentRequestData: + properties: + attributes: + $ref: '#/components/schemas/CreateComponentRequestDataAttributes' + relationships: + $ref: '#/components/schemas/CreateComponentRequestDataRelationships' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + type: object + CreateComponentRequestDataAttributes: + properties: + components: + items: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesComponentsItems' + type: array + name: + example: '' + type: string + position: + example: 0 + format: int64 + type: integer + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + required: + - name + - position + - type + type: object + CreateComponentRequestDataAttributesComponentsItems: + properties: + name: + example: '' + type: string + position: + example: 0 + format: int64 + type: integer + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + required: + - name + - position + - type + type: object + CreateComponentRequestDataAttributesType: + enum: + - component + - group + example: component + type: string + x-enum-varnames: + - COMPONENT + - GROUP + CreateComponentRequestDataRelationships: + properties: + group: + $ref: '#/components/schemas/CreateComponentRequestDataRelationshipsGroup' + type: object + CreateComponentRequestDataRelationshipsGroup: + properties: + data: + $ref: '#/components/schemas/CreateComponentRequestDataRelationshipsGroupData' + required: + - data + type: object + CreateComponentRequestDataRelationshipsGroupData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + - id + type: object CreateConnectionRequest: example: data: @@ -13273,6 +13367,76 @@ components: meta: $ref: '#/components/schemas/DataDeletionResponseMeta' type: object + CreateDegradationRequest: + example: + data: + attributes: + components_affected: + - id: 1234abcd-12ab-34cd-56ef-123456abcdef + status: degraded + description: Our API is experiencing elevated latency. We are investigating + the issue. + status: investigating + title: Elevated API Latency + type: degradations + properties: + data: + $ref: '#/components/schemas/CreateDegradationRequestData' + type: object + CreateDegradationRequestData: + properties: + attributes: + $ref: '#/components/schemas/CreateDegradationRequestDataAttributes' + type: + $ref: '#/components/schemas/PatchDegradationRequestDataType' + required: + - type + type: object + CreateDegradationRequestDataAttributes: + properties: + components_affected: + items: + $ref: '#/components/schemas/CreateDegradationRequestDataAttributesComponentsAffectedItems' + type: array + description: + type: string + status: + $ref: '#/components/schemas/CreateDegradationRequestDataAttributesStatus' + title: + example: '' + type: string + required: + - components_affected + - status + - title + type: object + CreateDegradationRequestDataAttributesComponentsAffectedItems: + properties: + id: + example: '' + type: string + name: + readOnly: true + type: string + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + required: + - id + - status + type: object + CreateDegradationRequestDataAttributesStatus: + enum: + - investigating + - identified + - monitoring + - resolved + example: investigating + type: string + x-enum-varnames: + - INVESTIGATING + - IDENTIFIED + - MONITORING + - RESOLVED CreateDeploymentGateParams: description: Parameters for creating a deployment gate. properties: @@ -13926,6 +14090,138 @@ components: type: string x-enum-varnames: - CREATE_RULESET + CreateStatusPageRequest: + example: + data: + attributes: + company_logo: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAIKMMMM + components: + - name: API + position: 0 + type: component + - components: + - name: Login + position: 0 + type: component + - name: Settings + position: 1 + type: component + name: Web App + position: 1 + type: group + - name: Webhooks + position: 2 + type: component + domain_prefix: status-page-us1 + email_header_image: data:image/png;base64,pQSLAw0KGgoAAAANSUhEUgAAAQ4AASJKFF + enabled: true + favicon: data:image/png;base64,kWMRNw0KGgoAAAANSUhEUgAAAEAAAABACA + name: Status Page US1 + subscriptions_enabled: true + type: public + visualization_type: bars_and_uptime_percentage + type: status_pages + properties: + data: + $ref: '#/components/schemas/CreateStatusPageRequestData' + type: object + CreateStatusPageRequestData: + properties: + attributes: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributes' + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + type: object + CreateStatusPageRequestDataAttributes: + properties: + company_logo: + type: string + components: + items: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesComponentsItems' + type: array + domain_prefix: + example: '' + type: string + email_header_image: + type: string + enabled: + example: false + type: boolean + favicon: + type: string + name: + example: '' + type: string + subscriptions_enabled: + type: boolean + type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType' + visualization_type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType' + required: + - domain_prefix + - enabled + - name + - type + - visualization_type + type: object + CreateStatusPageRequestDataAttributesComponentsItems: + properties: + components: + items: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems' + type: array + id: + readOnly: true + type: string + name: + type: string + position: + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + type: object + CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems: + properties: + id: + readOnly: true + type: string + name: + type: string + position: + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + type: object + CreateStatusPageRequestDataAttributesType: + enum: + - public + - internal + example: public + type: string + x-enum-varnames: + - PUBLIC + - INTERNAL + CreateStatusPageRequestDataAttributesVisualizationType: + enum: + - bars_and_uptime_percentage + - bars_only + - component_name_only + example: bars_and_uptime_percentage + type: string + x-enum-varnames: + - BARS_AND_UPTIME_PERCENTAGE + - BARS_ONLY + - COMPONENT_NAME_ONLY CreateTableRequest: description: Request body for creating a new reference table from a local file or cloud storage. @@ -17319,6 +17615,184 @@ components: example: 1722439510282 format: int64 type: integer + Degradation: + properties: + data: + $ref: '#/components/schemas/DegradationData' + included: + items: + $ref: '#/components/schemas/DegradationArrayIncluded' + type: array + type: object + DegradationArray: + properties: + data: + items: + $ref: '#/components/schemas/DegradationData' + type: array + included: + items: + $ref: '#/components/schemas/DegradationArrayIncluded' + type: array + required: + - data + type: object + DegradationArrayIncluded: + oneOf: + - $ref: '#/components/schemas/StatusPagesUser' + - $ref: '#/components/schemas/StatusPageAsIncluded' + DegradationData: + properties: + attributes: + $ref: '#/components/schemas/DegradationDataAttributes' + id: + type: string + relationships: + $ref: '#/components/schemas/DegradationDataRelationships' + type: + $ref: '#/components/schemas/PatchDegradationRequestDataType' + required: + - type + type: object + DegradationDataAttributes: + properties: + components_affected: + items: + $ref: '#/components/schemas/DegradationDataAttributesComponentsAffectedItems' + type: array + created_at: + format: date-time + type: string + description: + type: string + modified_at: + format: date-time + type: string + status: + $ref: '#/components/schemas/CreateDegradationRequestDataAttributesStatus' + title: + type: string + updates: + items: + $ref: '#/components/schemas/DegradationDataAttributesUpdatesItems' + type: array + type: object + DegradationDataAttributesComponentsAffectedItems: + properties: + id: + example: '' + type: string + name: + readOnly: true + type: string + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + required: + - id + - status + type: object + DegradationDataAttributesUpdatesItems: + properties: + components_affected: + items: + $ref: '#/components/schemas/DegradationDataAttributesUpdatesItemsComponentsAffectedItems' + type: array + created_at: + format: date-time + readOnly: true + type: string + description: + type: string + id: + readOnly: true + type: string + modified_at: + format: date-time + readOnly: true + type: string + started_at: + format: date-time + type: string + status: + $ref: '#/components/schemas/CreateDegradationRequestDataAttributesStatus' + type: object + DegradationDataAttributesUpdatesItemsComponentsAffectedItems: + properties: + id: + example: '' + type: string + name: + readOnly: true + type: string + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + required: + - id + - status + type: object + DegradationDataRelationships: + properties: + created_by_user: + $ref: '#/components/schemas/DegradationDataRelationshipsCreatedByUser' + last_modified_by_user: + $ref: '#/components/schemas/DegradationDataRelationshipsLastModifiedByUser' + status_page: + $ref: '#/components/schemas/DegradationDataRelationshipsStatusPage' + type: object + DegradationDataRelationshipsCreatedByUser: + properties: + data: + $ref: '#/components/schemas/DegradationDataRelationshipsCreatedByUserData' + required: + - data + type: object + DegradationDataRelationshipsCreatedByUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + DegradationDataRelationshipsLastModifiedByUser: + properties: + data: + $ref: '#/components/schemas/DegradationDataRelationshipsLastModifiedByUserData' + required: + - data + type: object + DegradationDataRelationshipsLastModifiedByUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + DegradationDataRelationshipsStatusPage: + properties: + data: + $ref: '#/components/schemas/DegradationDataRelationshipsStatusPageData' + required: + - data + type: object + DegradationDataRelationshipsStatusPageData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + - id + type: object DeleteAppResponse: description: The response object after an app is successfully deleted. properties: @@ -40597,6 +41071,114 @@ components: title: type: string type: object + PatchComponentRequest: + example: + data: + attributes: + name: Metrics Intake Service + position: 4 + id: 1234abcd-12ab-34cd-56ef-123456abcdef + type: components + properties: + data: + $ref: '#/components/schemas/PatchComponentRequestData' + type: object + PatchComponentRequestData: + properties: + attributes: + $ref: '#/components/schemas/PatchComponentRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + type: object + PatchComponentRequestDataAttributes: + properties: + name: + type: string + position: + format: int64 + type: integer + type: object + PatchDegradationRequest: + example: + data: + attributes: + components_affected: + - id: 1234abcd-12ab-34cd-56ef-123456abcdef + status: operational + description: We've deployed a fix and latency has returned to normal. + This issue has been resolved. + status: resolved + id: 1234abcd-12ab-34cd-56ef-123456abcdef + type: degradations + properties: + data: + $ref: '#/components/schemas/PatchDegradationRequestData' + type: object + PatchDegradationRequestData: + properties: + attributes: + $ref: '#/components/schemas/PatchDegradationRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/PatchDegradationRequestDataType' + required: + - type + type: object + PatchDegradationRequestDataAttributes: + properties: + components_affected: + items: + $ref: '#/components/schemas/PatchDegradationRequestDataAttributesComponentsAffectedItems' + type: array + description: + type: string + status: + $ref: '#/components/schemas/PatchDegradationRequestDataAttributesStatus' + title: + $ref: '#/components/schemas/PatchDegradationRequestDataAttributesTitle' + type: object + PatchDegradationRequestDataAttributesComponentsAffectedItems: + properties: + id: + example: '' + type: string + name: + readOnly: true + type: string + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + required: + - id + - status + type: object + PatchDegradationRequestDataAttributesStatus: + enum: + - investigating + - identified + - monitoring + - resolved + type: string + x-enum-varnames: + - INVESTIGATING + - IDENTIFIED + - MONITORING + - RESOLVED + PatchDegradationRequestDataAttributesTitle: + type: string + PatchDegradationRequestDataType: + default: degradations + description: Degradations resource type. + enum: + - degradations + example: degradations + type: string + x-enum-varnames: + - DEGRADATIONS PatchIncidentNotificationTemplateRequest: description: Update request for a notification template. properties: @@ -40643,6 +41225,63 @@ components: version: $ref: '#/components/schemas/Version' type: object + PatchStatusPageRequest: + example: + data: + attributes: + company_logo: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAIKMMMM + domain_prefix: status-page-us1-east + email_header_image: data:image/png;base64,pQSLAw0KGgoAAAANSUhEUgAAAQ4AASJKFF + enabled: false + favicon: data:image/png;base64,kWMRNw0KGgoAAAANSUhEUgAAAEAAAABACA + name: Status Page US1 East + subscriptions_enabled: false + type: internal + visualization_type: bars_only + id: 1234abcd-12ab-34cd-56ef-123456abcdef + type: status_pages + properties: + data: + $ref: '#/components/schemas/PatchStatusPageRequestData' + type: object + PatchStatusPageRequestData: + properties: + attributes: + $ref: '#/components/schemas/PatchStatusPageRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + type: object + PatchStatusPageRequestDataAttributes: + properties: + company_logo: + $ref: '#/components/schemas/PatchStatusPageRequestDataAttributesCompanyLogo' + domain_prefix: + type: string + email_header_image: + $ref: '#/components/schemas/PatchStatusPageRequestDataAttributesEmailHeaderImage' + enabled: + type: boolean + favicon: + $ref: '#/components/schemas/PatchStatusPageRequestDataAttributesFavicon' + name: + type: string + subscriptions_enabled: + type: boolean + type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType' + visualization_type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType' + type: object + PatchStatusPageRequestDataAttributesCompanyLogo: + type: string + PatchStatusPageRequestDataAttributesEmailHeaderImage: + type: string + PatchStatusPageRequestDataAttributesFavicon: + type: string PatchTableRequest: description: Request body for updating an existing reference table. example: @@ -53709,6 +54348,666 @@ components: required: - type type: object + StatusPage: + properties: + data: + $ref: '#/components/schemas/StatusPageData' + included: + items: + $ref: '#/components/schemas/StatusPageArrayIncluded' + type: array + type: object + StatusPageArray: + properties: + data: + items: + $ref: '#/components/schemas/StatusPageData' + type: array + included: + items: + $ref: '#/components/schemas/StatusPageArrayIncluded' + type: array + required: + - data + type: object + StatusPageArrayIncluded: + oneOf: + - $ref: '#/components/schemas/StatusPagesUser' + StatusPageAsIncluded: + properties: + attributes: + $ref: '#/components/schemas/StatusPageAsIncludedAttributes' + id: + type: string + relationships: + $ref: '#/components/schemas/StatusPageAsIncludedRelationships' + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + type: object + StatusPageAsIncludedAttributes: + properties: + company_logo: + type: string + components: + items: + $ref: '#/components/schemas/StatusPageAsIncludedAttributesComponentsItems' + type: array + created_at: + format: date-time + type: string + custom_domain: + type: string + custom_domain_enabled: + type: boolean + domain_prefix: + type: string + email_header_image: + type: string + enabled: + type: boolean + favicon: + type: string + modified_at: + format: date-time + type: string + name: + type: string + page_url: + type: string + subscriptions_enabled: + type: boolean + type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType' + visualization_type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType' + type: object + StatusPageAsIncludedAttributesComponentsItems: + properties: + components: + items: + $ref: '#/components/schemas/StatusPageAsIncludedAttributesComponentsItemsComponentsItems' + type: array + id: + readOnly: true + type: string + name: + type: string + position: + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + type: object + StatusPageAsIncludedAttributesComponentsItemsComponentsItems: + properties: + id: + readOnly: true + type: string + name: + type: string + position: + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + type: object + StatusPageAsIncludedRelationships: + properties: + created_by_user: + $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsCreatedByUser' + last_modified_by_user: + $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsLastModifiedByUser' + type: object + StatusPageAsIncludedRelationshipsCreatedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsCreatedByUserData' + required: + - data + type: object + StatusPageAsIncludedRelationshipsCreatedByUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPageAsIncludedRelationshipsLastModifiedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsLastModifiedByUserData' + required: + - data + type: object + StatusPageAsIncludedRelationshipsLastModifiedByUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPageData: + properties: + attributes: + $ref: '#/components/schemas/StatusPageDataAttributes' + id: + type: string + relationships: + $ref: '#/components/schemas/StatusPageDataRelationships' + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + type: object + StatusPageDataAttributes: + properties: + company_logo: + type: string + components: + items: + $ref: '#/components/schemas/StatusPageDataAttributesComponentsItems' + type: array + created_at: + format: date-time + type: string + custom_domain: + type: string + custom_domain_enabled: + type: boolean + domain_prefix: + type: string + email_header_image: + type: string + enabled: + type: boolean + favicon: + type: string + modified_at: + format: date-time + type: string + name: + type: string + page_url: + type: string + subscriptions_enabled: + type: boolean + type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType' + visualization_type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType' + type: object + StatusPageDataAttributesComponentsItems: + properties: + components: + items: + $ref: '#/components/schemas/StatusPageDataAttributesComponentsItemsComponentsItems' + type: array + id: + readOnly: true + type: string + name: + type: string + position: + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + type: object + StatusPageDataAttributesComponentsItemsComponentsItems: + properties: + id: + readOnly: true + type: string + name: + type: string + position: + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + type: object + StatusPageDataRelationships: + properties: + created_by_user: + $ref: '#/components/schemas/StatusPageDataRelationshipsCreatedByUser' + last_modified_by_user: + $ref: '#/components/schemas/StatusPageDataRelationshipsLastModifiedByUser' + type: object + StatusPageDataRelationshipsCreatedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPageDataRelationshipsCreatedByUserData' + required: + - data + type: object + StatusPageDataRelationshipsCreatedByUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPageDataRelationshipsLastModifiedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPageDataRelationshipsLastModifiedByUserData' + required: + - data + type: object + StatusPageDataRelationshipsLastModifiedByUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPageDataType: + default: status_pages + description: Status pages resource type. + enum: + - status_pages + example: status_pages + type: string + x-enum-varnames: + - STATUS_PAGES + StatusPagesComponent: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentData' + included: + items: + $ref: '#/components/schemas/StatusPagesComponentArrayIncluded' + type: array + type: object + StatusPagesComponentArray: + properties: + data: + items: + $ref: '#/components/schemas/StatusPagesComponentData' + type: array + included: + items: + $ref: '#/components/schemas/StatusPagesComponentArrayIncluded' + type: array + required: + - data + type: object + StatusPagesComponentArrayIncluded: + oneOf: + - $ref: '#/components/schemas/StatusPagesUser' + - $ref: '#/components/schemas/StatusPageAsIncluded' + - $ref: '#/components/schemas/StatusPagesComponentGroup' + StatusPagesComponentData: + properties: + attributes: + $ref: '#/components/schemas/StatusPagesComponentDataAttributes' + id: + type: string + relationships: + $ref: '#/components/schemas/StatusPagesComponentDataRelationships' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + type: object + StatusPagesComponentDataAttributes: + properties: + components: + items: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesComponentsItems' + type: array + created_at: + format: date-time + type: string + modified_at: + format: date-time + type: string + name: + type: string + position: + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + required: + - type + type: object + StatusPagesComponentDataAttributesComponentsItems: + properties: + id: + readOnly: true + type: string + name: + type: string + position: + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + type: object + StatusPagesComponentDataAttributesStatus: + enum: + - operational + - degraded + - partial_outage + - major_outage + example: operational + type: string + x-enum-varnames: + - OPERATIONAL + - DEGRADED + - PARTIAL_OUTAGE + - MAJOR_OUTAGE + StatusPagesComponentDataRelationships: + properties: + created_by_user: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsCreatedByUser' + group: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsGroup' + last_modified_by_user: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsLastModifiedByUser' + status_page: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsStatusPage' + type: object + StatusPagesComponentDataRelationshipsCreatedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsCreatedByUserData' + required: + - data + type: object + StatusPagesComponentDataRelationshipsCreatedByUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPagesComponentDataRelationshipsGroup: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsGroupData' + required: + - data + type: object + StatusPagesComponentDataRelationshipsGroupData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + - id + type: object + StatusPagesComponentDataRelationshipsLastModifiedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsLastModifiedByUserData' + required: + - data + type: object + StatusPagesComponentDataRelationshipsLastModifiedByUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPagesComponentDataRelationshipsStatusPage: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsStatusPageData' + required: + - data + type: object + StatusPagesComponentDataRelationshipsStatusPageData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + - id + type: object + StatusPagesComponentGroup: + properties: + attributes: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributes' + id: + type: string + relationships: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationships' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + type: object + StatusPagesComponentGroupAttributes: + properties: + components: + items: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItems' + type: array + created_at: + format: date-time + type: string + modified_at: + format: date-time + type: string + name: + type: string + position: + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + required: + - type + type: object + StatusPagesComponentGroupAttributesComponentsItems: + properties: + id: + readOnly: true + type: string + name: + type: string + position: + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + type: object + StatusPagesComponentGroupAttributesComponentsItemsStatus: + enum: + - operational + - degraded + - partial_outage + - major_outage + readOnly: true + type: string + x-enum-varnames: + - OPERATIONAL + - DEGRADED + - PARTIAL_OUTAGE + - MAJOR_OUTAGE + StatusPagesComponentGroupAttributesComponentsItemsType: + enum: + - component + example: component + type: string + x-enum-varnames: + - COMPONENT + StatusPagesComponentGroupRelationships: + properties: + created_by_user: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsCreatedByUser' + group: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsGroup' + last_modified_by_user: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsLastModifiedByUser' + status_page: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsStatusPage' + type: object + StatusPagesComponentGroupRelationshipsCreatedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsCreatedByUserData' + required: + - data + type: object + StatusPagesComponentGroupRelationshipsCreatedByUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPagesComponentGroupRelationshipsGroup: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsGroupData' + required: + - data + type: object + StatusPagesComponentGroupRelationshipsGroupData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + - id + type: object + StatusPagesComponentGroupRelationshipsLastModifiedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsLastModifiedByUserData' + required: + - data + type: object + StatusPagesComponentGroupRelationshipsLastModifiedByUserData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPagesComponentGroupRelationshipsStatusPage: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsStatusPageData' + required: + - data + type: object + StatusPagesComponentGroupRelationshipsStatusPageData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + - id + type: object + StatusPagesComponentGroupType: + default: components + description: Components resource type. + enum: + - components + example: components + type: string + x-enum-varnames: + - COMPONENTS + StatusPagesUser: + properties: + attributes: + $ref: '#/components/schemas/StatusPagesUserAttributes' + id: + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + type: object + StatusPagesUserAttributes: + properties: + email: + type: string + handle: + type: string + icon: + type: string + name: + type: string + uuid: + type: string + type: object + StatusPagesUserType: + default: users + description: Users resource type. + enum: + - users + example: users + type: string + x-enum-varnames: + - USERS Step: description: A Step is a sub-component of a workflow. Each Step performs an action. @@ -86683,6 +87982,650 @@ paths: tags: - Security Monitoring x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/statuspages: + get: + description: Lists all status pages for the organization. + operationId: ListStatusPages + parameters: + - description: Offset to use as the start of the page. + in: query + name: page[offset] + schema: + default: 0 + type: integer + - description: The number of status pages 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.' + in: query + name: include + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/StatusPageArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List status pages + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_read + post: + description: Creates a new status page. + operationId: CreateStatusPage + parameters: + - description: 'Comma-separated list of resources to include. Supported values: + created_by_user, last_modified_by_user.' + in: query + name: include + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateStatusPageRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/StatusPage' + description: Created + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create status page + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_write + /api/v2/statuspages/degradations: + get: + description: Lists all degradations for the organization. Optionally filter + by status and page. + operationId: ListDegradations + 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 degradations 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 degradation status filter. Supported values: investigating, + identified, monitoring, resolved.' + in: query + name: filter[status] + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DegradationArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List degradations + 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. + operationId: DeleteStatusPage + parameters: + - description: The ID of the status page. + in: path + name: page_id + required: true + schema: + format: uuid + type: string + responses: + '204': + description: No Content + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Delete status page + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_write + get: + description: Retrieves a specific status page by its ID. + operationId: GetStatusPage + parameters: + - description: The ID of the status page. + in: path + name: page_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.' + in: query + name: include + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/StatusPage' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get status page + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_read + patch: + description: Updates an existing status page's attributes. + operationId: UpdateStatusPage + parameters: + - description: Whether to delete existing subscribers when updating a status + page's type. + in: query + name: delete_subscribers + schema: + default: false + type: boolean + - description: The ID of the status page. + in: path + name: page_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.' + in: query + name: include + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchStatusPageRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/StatusPage' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Update status page + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_write + /api/v2/statuspages/{page_id}/components: + get: + description: Lists all components for a status page. + operationId: ListComponents + parameters: + - description: The ID of the status page. + in: path + name: page_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, group.' + in: query + name: include + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/StatusPagesComponentArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List components + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_read + post: + description: Creates a new component. + operationId: CreateComponent + parameters: + - description: The ID of the status page. + in: path + name: page_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, group.' + in: query + name: include + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateComponentRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/StatusPagesComponent' + description: Created + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create component + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_write + /api/v2/statuspages/{page_id}/components/{component_id}: + delete: + description: Deletes a component by its ID. + operationId: DeleteComponent + 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 component. + in: path + name: component_id + required: true + schema: + format: uuid + type: string + responses: + '204': + description: No Content + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Delete component + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_write + get: + description: Retrieves a specific component by its ID. + operationId: GetComponent + 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 component. + in: path + name: component_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, group.' + in: query + name: include + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/StatusPagesComponent' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get component + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_read + patch: + description: Updates an existing component's attributes. + operationId: UpdateComponent + 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 component. + in: path + name: component_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, group.' + in: query + name: include + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchComponentRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/StatusPagesComponent' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Update component + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_write + /api/v2/statuspages/{page_id}/degradations: + post: + description: Creates a new degradation. + operationId: CreateDegradation + 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 degradation or 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/CreateDegradationRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Degradation' + description: Created + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create degradation + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_incident_write + /api/v2/statuspages/{page_id}/degradations/{degradation_id}: + delete: + description: Deletes a degradation by its ID. + operationId: DeleteDegradation + 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 degradation. + in: path + name: degradation_id + required: true + schema: + format: uuid + type: string + responses: + '204': + description: No Content + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Delete degradation + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_incident_write + get: + description: Retrieves a specific degradation by its ID. + operationId: GetDegradation + 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 degradation. + in: path + name: degradation_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/Degradation' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get degradation + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_read + patch: + description: Updates an existing degradation's attributes. + operationId: UpdateDegradation + 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 degradation or maintenance. + in: query + name: notify_subscribers + schema: + default: true + type: boolean + - description: The ID of the degradation. + in: path + name: degradation_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/PatchDegradationRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Degradation' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Update degradation + 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. @@ -90955,6 +92898,8 @@ tags: name: Spans Metrics - description: API for static analysis name: Static Analysis +- description: Auto-generated tag Status Pages + name: Status Pages - description: "Datadog Synthetics uses simulated user requests and browser rendering to help you ensure uptime,\nidentify regional issues, and track your application performance. Datadog Synthetics tests come in\ntwo different flavors, [API tests](https://docs.datadoghq.com/synthetics/api_tests/)\nand diff --git a/examples/v2/status-pages/CreateComponent.java b/examples/v2/status-pages/CreateComponent.java new file mode 100644 index 00000000000..8004d3f4df6 --- /dev/null +++ b/examples/v2/status-pages/CreateComponent.java @@ -0,0 +1,43 @@ +// Create component 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.CreateComponentRequest; +import com.datadog.api.client.v2.model.CreateComponentRequestData; +import com.datadog.api.client.v2.model.CreateComponentRequestDataAttributes; +import com.datadog.api.client.v2.model.CreateComponentRequestDataAttributesType; +import com.datadog.api.client.v2.model.StatusPagesComponent; +import com.datadog.api.client.v2.model.StatusPagesComponentGroupType; + +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 + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + CreateComponentRequest body = + new CreateComponentRequest() + .data( + new CreateComponentRequestData() + .attributes( + new CreateComponentRequestDataAttributes() + .name("5e2fd69be33e79aa") + .position(0L) + .type(CreateComponentRequestDataAttributesType.COMPONENT)) + .type(StatusPagesComponentGroupType.COMPONENTS)); + + try { + StatusPagesComponent result = apiInstance.createComponent(STATUS_PAGE_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#createComponent"); + 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/CreateDegradation.java b/examples/v2/status-pages/CreateDegradation.java new file mode 100644 index 00000000000..eb97de1a4a0 --- /dev/null +++ b/examples/v2/status-pages/CreateDegradation.java @@ -0,0 +1,54 @@ +// Create degradation 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.CreateDegradationRequest; +import com.datadog.api.client.v2.model.CreateDegradationRequestData; +import com.datadog.api.client.v2.model.CreateDegradationRequestDataAttributes; +import com.datadog.api.client.v2.model.CreateDegradationRequestDataAttributesComponentsAffectedItems; +import com.datadog.api.client.v2.model.CreateDegradationRequestDataAttributesStatus; +import com.datadog.api.client.v2.model.Degradation; +import com.datadog.api.client.v2.model.PatchDegradationRequestDataType; +import com.datadog.api.client.v2.model.StatusPagesComponentDataAttributesStatus; +import java.util.Collections; + +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 + String STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = + System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"); + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + CreateDegradationRequest body = + new CreateDegradationRequest() + .data( + new CreateDegradationRequestData() + .attributes( + new CreateDegradationRequestDataAttributes() + .componentsAffected( + Collections.singletonList( + new CreateDegradationRequestDataAttributesComponentsAffectedItems() + .id(STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID) + .status( + StatusPagesComponentDataAttributesStatus.MAJOR_OUTAGE))) + .description("5e2fd69be33e79aa") + .status(CreateDegradationRequestDataAttributesStatus.INVESTIGATING) + .title("5e2fd69be33e79aa")) + .type(PatchDegradationRequestDataType.DEGRADATIONS)); + + try { + Degradation result = apiInstance.createDegradation(STATUS_PAGE_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#createDegradation"); + 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/CreateStatusPage.java b/examples/v2/status-pages/CreateStatusPage.java new file mode 100644 index 00000000000..2d92e34bf44 --- /dev/null +++ b/examples/v2/status-pages/CreateStatusPage.java @@ -0,0 +1,45 @@ +// Create status page 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.CreateStatusPageRequest; +import com.datadog.api.client.v2.model.CreateStatusPageRequestData; +import com.datadog.api.client.v2.model.CreateStatusPageRequestDataAttributes; +import com.datadog.api.client.v2.model.CreateStatusPageRequestDataAttributesType; +import com.datadog.api.client.v2.model.CreateStatusPageRequestDataAttributesVisualizationType; +import com.datadog.api.client.v2.model.StatusPage; +import com.datadog.api.client.v2.model.StatusPageDataType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + StatusPagesApi apiInstance = new StatusPagesApi(defaultClient); + + CreateStatusPageRequest body = + new CreateStatusPageRequest() + .data( + new CreateStatusPageRequestData() + .attributes( + new CreateStatusPageRequestDataAttributes() + .name("[DD Integration Tests] 5e2fd69be33e79aa") + .domainPrefix("dd-integrations-tests-5e2fd69be33e79aa") + .enabled(true) + .type(CreateStatusPageRequestDataAttributesType.INTERNAL) + .visualizationType( + CreateStatusPageRequestDataAttributesVisualizationType + .BARS_AND_UPTIME_PERCENTAGE)) + .type(StatusPageDataType.STATUS_PAGES)); + + try { + StatusPage result = apiInstance.createStatusPage(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#createStatusPage"); + 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/DeleteComponent.java b/examples/v2/status-pages/DeleteComponent.java new file mode 100644 index 00000000000..853b8893a2c --- /dev/null +++ b/examples/v2/status-pages/DeleteComponent.java @@ -0,0 +1,27 @@ +// Delete component returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.StatusPagesApi; + +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 + String STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = + System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"); + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + try { + apiInstance.deleteComponent(STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#deleteComponent"); + 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/DeleteDegradation.java b/examples/v2/status-pages/DeleteDegradation.java new file mode 100644 index 00000000000..218be955c0f --- /dev/null +++ b/examples/v2/status-pages/DeleteDegradation.java @@ -0,0 +1,28 @@ +// Delete degradation returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.StatusPagesApi; + +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 + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + // there is a valid "degradation" in the system + String DEGRADATION_DATA_ID = System.getenv("DEGRADATION_DATA_ID"); + + try { + apiInstance.deleteDegradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#deleteDegradation"); + 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/DeleteStatusPage.java b/examples/v2/status-pages/DeleteStatusPage.java new file mode 100644 index 00000000000..64fc1ba1795 --- /dev/null +++ b/examples/v2/status-pages/DeleteStatusPage.java @@ -0,0 +1,25 @@ +// Delete status page returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.StatusPagesApi; + +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 + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + try { + apiInstance.deleteStatusPage(STATUS_PAGE_DATA_ID); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#deleteStatusPage"); + 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/GetComponent.java b/examples/v2/status-pages/GetComponent.java new file mode 100644 index 00000000000..3fc37cdac99 --- /dev/null +++ b/examples/v2/status-pages/GetComponent.java @@ -0,0 +1,31 @@ +// Get component 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.StatusPagesComponent; + +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 + String STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = + System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"); + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + try { + StatusPagesComponent result = + apiInstance.getComponent( + STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#getComponent"); + 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/GetDegradation.java b/examples/v2/status-pages/GetDegradation.java new file mode 100644 index 00000000000..1c3e0d3358d --- /dev/null +++ b/examples/v2/status-pages/GetDegradation.java @@ -0,0 +1,30 @@ +// Get degradation 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.Degradation; + +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 + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + // there is a valid "degradation" in the system + String DEGRADATION_DATA_ID = System.getenv("DEGRADATION_DATA_ID"); + + try { + Degradation result = apiInstance.getDegradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#getDegradation"); + 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/GetStatusPage.java b/examples/v2/status-pages/GetStatusPage.java new file mode 100644 index 00000000000..1020195792b --- /dev/null +++ b/examples/v2/status-pages/GetStatusPage.java @@ -0,0 +1,27 @@ +// Get status page 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.StatusPage; + +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 + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + try { + StatusPage result = apiInstance.getStatusPage(STATUS_PAGE_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#getStatusPage"); + 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/ListComponents.java b/examples/v2/status-pages/ListComponents.java new file mode 100644 index 00000000000..7571b6d107a --- /dev/null +++ b/examples/v2/status-pages/ListComponents.java @@ -0,0 +1,27 @@ +// List components 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.StatusPagesComponentArray; + +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 + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + try { + StatusPagesComponentArray result = apiInstance.listComponents(STATUS_PAGE_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#listComponents"); + 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/ListDegradations.java b/examples/v2/status-pages/ListDegradations.java new file mode 100644 index 00000000000..259bc3b6739 --- /dev/null +++ b/examples/v2/status-pages/ListDegradations.java @@ -0,0 +1,24 @@ +// List degradations 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.DegradationArray; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + StatusPagesApi apiInstance = new StatusPagesApi(defaultClient); + + try { + DegradationArray result = apiInstance.listDegradations(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#listDegradations"); + 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/ListStatusPages.java b/examples/v2/status-pages/ListStatusPages.java new file mode 100644 index 00000000000..f4081f8d476 --- /dev/null +++ b/examples/v2/status-pages/ListStatusPages.java @@ -0,0 +1,24 @@ +// List status pages 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.StatusPageArray; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + StatusPagesApi apiInstance = new StatusPagesApi(defaultClient); + + try { + StatusPageArray result = apiInstance.listStatusPages(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#listStatusPages"); + 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/UpdateComponent.java b/examples/v2/status-pages/UpdateComponent.java new file mode 100644 index 00000000000..6aebba1d299 --- /dev/null +++ b/examples/v2/status-pages/UpdateComponent.java @@ -0,0 +1,43 @@ +// Update component 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.PatchComponentRequest; +import com.datadog.api.client.v2.model.PatchComponentRequestData; +import com.datadog.api.client.v2.model.PatchComponentRequestDataAttributes; +import com.datadog.api.client.v2.model.StatusPagesComponent; +import com.datadog.api.client.v2.model.StatusPagesComponentGroupType; + +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 + String STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = + System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"); + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + PatchComponentRequest body = + new PatchComponentRequest() + .data( + new PatchComponentRequestData() + .attributes(new PatchComponentRequestDataAttributes().name("5e2fd69be33e79aa")) + .id(STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID) + .type(StatusPagesComponentGroupType.COMPONENTS)); + + try { + StatusPagesComponent result = + apiInstance.updateComponent( + STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#updateComponent"); + 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/UpdateDegradation.java b/examples/v2/status-pages/UpdateDegradation.java new file mode 100644 index 00000000000..e56a5cd0b7f --- /dev/null +++ b/examples/v2/status-pages/UpdateDegradation.java @@ -0,0 +1,44 @@ +// Update degradation 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.Degradation; +import com.datadog.api.client.v2.model.PatchDegradationRequest; +import com.datadog.api.client.v2.model.PatchDegradationRequestData; +import com.datadog.api.client.v2.model.PatchDegradationRequestDataAttributes; +import com.datadog.api.client.v2.model.PatchDegradationRequestDataType; + +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 + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + // there is a valid "degradation" in the system + String DEGRADATION_DATA_ID = System.getenv("DEGRADATION_DATA_ID"); + + PatchDegradationRequest body = + new PatchDegradationRequest() + .data( + new PatchDegradationRequestData() + .attributes( + new PatchDegradationRequestDataAttributes().title("5e2fd69be33e79aa")) + .id(DEGRADATION_DATA_ID) + .type(PatchDegradationRequestDataType.DEGRADATIONS)); + + try { + Degradation result = + apiInstance.updateDegradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#updateDegradation"); + 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/UpdateStatusPage.java b/examples/v2/status-pages/UpdateStatusPage.java new file mode 100644 index 00000000000..ec80f05d89c --- /dev/null +++ b/examples/v2/status-pages/UpdateStatusPage.java @@ -0,0 +1,41 @@ +// Update status page 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.PatchStatusPageRequest; +import com.datadog.api.client.v2.model.PatchStatusPageRequestData; +import com.datadog.api.client.v2.model.PatchStatusPageRequestDataAttributes; +import com.datadog.api.client.v2.model.StatusPage; +import com.datadog.api.client.v2.model.StatusPageDataType; + +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 + String STATUS_PAGE_DATA_ID = System.getenv("STATUS_PAGE_DATA_ID"); + + PatchStatusPageRequest body = + new PatchStatusPageRequest() + .data( + new PatchStatusPageRequestData() + .attributes( + new PatchStatusPageRequestDataAttributes() + .name("[DD Integration Tests] 5e2fd69be33e79aa")) + .id(STATUS_PAGE_DATA_ID) + .type(StatusPageDataType.STATUS_PAGES)); + + try { + StatusPage result = apiInstance.updateStatusPage(STATUS_PAGE_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#updateStatusPage"); + 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/StatusPagesApi.java b/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java new file mode 100644 index 00000000000..734446cf34d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java @@ -0,0 +1,3183 @@ +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.CreateComponentRequest; +import com.datadog.api.client.v2.model.CreateDegradationRequest; +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.PatchComponentRequest; +import com.datadog.api.client.v2.model.PatchDegradationRequest; +import com.datadog.api.client.v2.model.PatchStatusPageRequest; +import com.datadog.api.client.v2.model.StatusPage; +import com.datadog.api.client.v2.model.StatusPageArray; +import com.datadog.api.client.v2.model.StatusPagesComponent; +import com.datadog.api.client.v2.model.StatusPagesComponentArray; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesApi { + private ApiClient apiClient; + + public StatusPagesApi() { + this(ApiClient.getDefaultApiClient()); + } + + public StatusPagesApi(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; + } + + /** Manage optional parameters to createComponent. */ + public static class CreateComponentOptionalParameters { + 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 CreateComponentOptionalParameters + */ + public CreateComponentOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Create component. + * + *

See {@link #createComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @return StatusPagesComponent + * @throws ApiException if fails to make API call + */ + public StatusPagesComponent createComponent(UUID pageId, CreateComponentRequest body) + throws ApiException { + return createComponentWithHttpInfo(pageId, body, new CreateComponentOptionalParameters()) + .getData(); + } + + /** + * Create component. + * + *

See {@link #createComponentWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @return CompletableFuture<StatusPagesComponent> + */ + public CompletableFuture createComponentAsync( + UUID pageId, CreateComponentRequest body) { + return createComponentWithHttpInfoAsync(pageId, body, new CreateComponentOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create component. + * + *

See {@link #createComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return StatusPagesComponent + * @throws ApiException if fails to make API call + */ + public StatusPagesComponent createComponent( + UUID pageId, CreateComponentRequest body, CreateComponentOptionalParameters parameters) + throws ApiException { + return createComponentWithHttpInfo(pageId, body, parameters).getData(); + } + + /** + * Create component. + * + *

See {@link #createComponentWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<StatusPagesComponent> + */ + public CompletableFuture createComponentAsync( + UUID pageId, CreateComponentRequest body, CreateComponentOptionalParameters parameters) { + return createComponentWithHttpInfoAsync(pageId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Creates a new component. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<StatusPagesComponent> + * @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 createComponentWithHttpInfo( + UUID pageId, CreateComponentRequest body, CreateComponentOptionalParameters 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 createComponent"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createComponent"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/components" + .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.createComponent", + 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 component. + * + *

See {@link #createComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<StatusPagesComponent>> + */ + public CompletableFuture> createComponentWithHttpInfoAsync( + UUID pageId, CreateComponentRequest body, CreateComponentOptionalParameters 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 createComponent")); + 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 createComponent")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/components" + .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.createComponent", + 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 createDegradation. */ + public static class CreateDegradationOptionalParameters { + private Boolean notifySubscribers; + private String include; + + /** + * Set notifySubscribers. + * + * @param notifySubscribers Whether to notify page subscribers of the degradation or + * maintenance. (optional, default to true) + * @return CreateDegradationOptionalParameters + */ + public CreateDegradationOptionalParameters 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 CreateDegradationOptionalParameters + */ + public CreateDegradationOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Create degradation. + * + *

See {@link #createDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @return Degradation + * @throws ApiException if fails to make API call + */ + public Degradation createDegradation(UUID pageId, CreateDegradationRequest body) + throws ApiException { + return createDegradationWithHttpInfo(pageId, body, new CreateDegradationOptionalParameters()) + .getData(); + } + + /** + * Create degradation. + * + *

See {@link #createDegradationWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @return CompletableFuture<Degradation> + */ + public CompletableFuture createDegradationAsync( + UUID pageId, CreateDegradationRequest body) { + return createDegradationWithHttpInfoAsync( + pageId, body, new CreateDegradationOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create degradation. + * + *

See {@link #createDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return Degradation + * @throws ApiException if fails to make API call + */ + public Degradation createDegradation( + UUID pageId, CreateDegradationRequest body, CreateDegradationOptionalParameters parameters) + throws ApiException { + return createDegradationWithHttpInfo(pageId, body, parameters).getData(); + } + + /** + * Create degradation. + * + *

See {@link #createDegradationWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<Degradation> + */ + public CompletableFuture createDegradationAsync( + UUID pageId, CreateDegradationRequest body, CreateDegradationOptionalParameters parameters) { + return createDegradationWithHttpInfoAsync(pageId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Creates a new degradation. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<Degradation> + * @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 createDegradationWithHttpInfo( + UUID pageId, CreateDegradationRequest body, CreateDegradationOptionalParameters 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 createDegradation"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createDegradation"); + } + Boolean notifySubscribers = parameters.notifySubscribers; + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/degradations" + .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.createDegradation", + 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 degradation. + * + *

See {@link #createDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Degradation>> + */ + public CompletableFuture> createDegradationWithHttpInfoAsync( + UUID pageId, CreateDegradationRequest body, CreateDegradationOptionalParameters 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 createDegradation")); + 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 createDegradation")); + return result; + } + Boolean notifySubscribers = parameters.notifySubscribers; + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/degradations" + .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.createDegradation", + 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; + + /** + * Set include. + * + * @param include Comma-separated list of resources to include. Supported values: + * created_by_user, last_modified_by_user. (optional) + * @return CreateStatusPageOptionalParameters + */ + public CreateStatusPageOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Create status page. + * + *

See {@link #createStatusPageWithHttpInfo}. + * + * @param body (required) + * @return StatusPage + * @throws ApiException if fails to make API call + */ + public StatusPage createStatusPage(CreateStatusPageRequest body) throws ApiException { + return createStatusPageWithHttpInfo(body, new CreateStatusPageOptionalParameters()).getData(); + } + + /** + * Create status page. + * + *

See {@link #createStatusPageWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<StatusPage> + */ + public CompletableFuture createStatusPageAsync(CreateStatusPageRequest body) { + return createStatusPageWithHttpInfoAsync(body, new CreateStatusPageOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create status page. + * + *

See {@link #createStatusPageWithHttpInfo}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return StatusPage + * @throws ApiException if fails to make API call + */ + public StatusPage createStatusPage( + CreateStatusPageRequest body, CreateStatusPageOptionalParameters parameters) + throws ApiException { + return createStatusPageWithHttpInfo(body, parameters).getData(); + } + + /** + * Create status page. + * + *

See {@link #createStatusPageWithHttpInfoAsync}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<StatusPage> + */ + public CompletableFuture createStatusPageAsync( + CreateStatusPageRequest body, CreateStatusPageOptionalParameters parameters) { + return createStatusPageWithHttpInfoAsync(body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Creates a new status page. + * + * @param body (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
201 Created -
429 Too many requests -
+ */ + public ApiResponse createStatusPageWithHttpInfo( + CreateStatusPageRequest body, CreateStatusPageOptionalParameters parameters) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createStatusPage"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/statuspages"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.createStatusPage", + 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 status page. + * + *

See {@link #createStatusPageWithHttpInfo}. + * + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<StatusPage>> + */ + public CompletableFuture> createStatusPageWithHttpInfoAsync( + CreateStatusPageRequest body, CreateStatusPageOptionalParameters parameters) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createStatusPage")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/statuspages"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.createStatusPage", + 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() {}); + } + + /** + * Delete component. + * + *

See {@link #deleteComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @throws ApiException if fails to make API call + */ + public void deleteComponent(UUID pageId, UUID componentId) throws ApiException { + deleteComponentWithHttpInfo(pageId, componentId); + } + + /** + * Delete component. + * + *

See {@link #deleteComponentWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteComponentAsync(UUID pageId, UUID componentId) { + return deleteComponentWithHttpInfoAsync(pageId, componentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Deletes a component by its ID. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
429 Too many requests -
+ */ + public ApiResponse deleteComponentWithHttpInfo(UUID pageId, UUID componentId) + 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 deleteComponent"); + } + + // verify the required parameter 'componentId' is set + if (componentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'componentId' when calling deleteComponent"); + } + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/components/{component_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "component_id" + "\\}", apiClient.escapeString(componentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.deleteComponent", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete component. + * + *

See {@link #deleteComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteComponentWithHttpInfoAsync( + UUID pageId, UUID componentId) { + 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 deleteComponent")); + return result; + } + + // verify the required parameter 'componentId' is set + if (componentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'componentId' when calling deleteComponent")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/components/{component_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "component_id" + "\\}", apiClient.escapeString(componentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.deleteComponent", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete degradation. + * + *

See {@link #deleteDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @throws ApiException if fails to make API call + */ + public void deleteDegradation(UUID pageId, UUID degradationId) throws ApiException { + deleteDegradationWithHttpInfo(pageId, degradationId); + } + + /** + * Delete degradation. + * + *

See {@link #deleteDegradationWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteDegradationAsync(UUID pageId, UUID degradationId) { + return deleteDegradationWithHttpInfoAsync(pageId, degradationId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Deletes a degradation by its ID. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
429 Too many requests -
+ */ + public ApiResponse deleteDegradationWithHttpInfo(UUID pageId, UUID degradationId) + 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 deleteDegradation"); + } + + // verify the required parameter 'degradationId' is set + if (degradationId == null) { + throw new ApiException( + 400, "Missing the required parameter 'degradationId' when calling deleteDegradation"); + } + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/degradations/{degradation_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "degradation_id" + "\\}", apiClient.escapeString(degradationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.deleteDegradation", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete degradation. + * + *

See {@link #deleteDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteDegradationWithHttpInfoAsync( + UUID pageId, UUID degradationId) { + 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 deleteDegradation")); + return result; + } + + // verify the required parameter 'degradationId' is set + if (degradationId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'degradationId' when calling deleteDegradation")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/degradations/{degradation_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "degradation_id" + "\\}", apiClient.escapeString(degradationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.deleteDegradation", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete status page. + * + *

See {@link #deleteStatusPageWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @throws ApiException if fails to make API call + */ + public void deleteStatusPage(UUID pageId) throws ApiException { + deleteStatusPageWithHttpInfo(pageId); + } + + /** + * Delete status page. + * + *

See {@link #deleteStatusPageWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteStatusPageAsync(UUID pageId) { + return deleteStatusPageWithHttpInfoAsync(pageId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Deletes a status page by its ID. + * + * @param pageId The ID of the status page. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
429 Too many requests -
+ */ + public ApiResponse deleteStatusPageWithHttpInfo(UUID pageId) 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 deleteStatusPage"); + } + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.deleteStatusPage", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete status page. + * + *

See {@link #deleteStatusPageWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteStatusPageWithHttpInfoAsync(UUID pageId) { + 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 deleteStatusPage")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.deleteStatusPage", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** Manage optional parameters to getComponent. */ + public static class GetComponentOptionalParameters { + 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 GetComponentOptionalParameters + */ + public GetComponentOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Get component. + * + *

See {@link #getComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @return StatusPagesComponent + * @throws ApiException if fails to make API call + */ + public StatusPagesComponent getComponent(UUID pageId, UUID componentId) throws ApiException { + return getComponentWithHttpInfo(pageId, componentId, new GetComponentOptionalParameters()) + .getData(); + } + + /** + * Get component. + * + *

See {@link #getComponentWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @return CompletableFuture<StatusPagesComponent> + */ + public CompletableFuture getComponentAsync(UUID pageId, UUID componentId) { + return getComponentWithHttpInfoAsync(pageId, componentId, new GetComponentOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get component. + * + *

See {@link #getComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @param parameters Optional parameters for the request. + * @return StatusPagesComponent + * @throws ApiException if fails to make API call + */ + public StatusPagesComponent getComponent( + UUID pageId, UUID componentId, GetComponentOptionalParameters parameters) + throws ApiException { + return getComponentWithHttpInfo(pageId, componentId, parameters).getData(); + } + + /** + * Get component. + * + *

See {@link #getComponentWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<StatusPagesComponent> + */ + public CompletableFuture getComponentAsync( + UUID pageId, UUID componentId, GetComponentOptionalParameters parameters) { + return getComponentWithHttpInfoAsync(pageId, componentId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieves a specific component by its ID. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<StatusPagesComponent> + * @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 getComponentWithHttpInfo( + UUID pageId, UUID componentId, GetComponentOptionalParameters 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 getComponent"); + } + + // verify the required parameter 'componentId' is set + if (componentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'componentId' when calling getComponent"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/components/{component_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "component_id" + "\\}", apiClient.escapeString(componentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.getComponent", + 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 component. + * + *

See {@link #getComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<StatusPagesComponent>> + */ + public CompletableFuture> getComponentWithHttpInfoAsync( + UUID pageId, UUID componentId, GetComponentOptionalParameters 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 getComponent")); + return result; + } + + // verify the required parameter 'componentId' is set + if (componentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'componentId' when calling getComponent")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/components/{component_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "component_id" + "\\}", apiClient.escapeString(componentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.getComponent", + 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 getDegradation. */ + public static class GetDegradationOptionalParameters { + 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. (optional) + * @return GetDegradationOptionalParameters + */ + public GetDegradationOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Get degradation. + * + *

See {@link #getDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @return Degradation + * @throws ApiException if fails to make API call + */ + public Degradation getDegradation(UUID pageId, UUID degradationId) throws ApiException { + return getDegradationWithHttpInfo(pageId, degradationId, new GetDegradationOptionalParameters()) + .getData(); + } + + /** + * Get degradation. + * + *

See {@link #getDegradationWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @return CompletableFuture<Degradation> + */ + public CompletableFuture getDegradationAsync(UUID pageId, UUID degradationId) { + return getDegradationWithHttpInfoAsync( + pageId, degradationId, new GetDegradationOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get degradation. + * + *

See {@link #getDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @param parameters Optional parameters for the request. + * @return Degradation + * @throws ApiException if fails to make API call + */ + public Degradation getDegradation( + UUID pageId, UUID degradationId, GetDegradationOptionalParameters parameters) + throws ApiException { + return getDegradationWithHttpInfo(pageId, degradationId, parameters).getData(); + } + + /** + * Get degradation. + * + *

See {@link #getDegradationWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<Degradation> + */ + public CompletableFuture getDegradationAsync( + UUID pageId, UUID degradationId, GetDegradationOptionalParameters parameters) { + return getDegradationWithHttpInfoAsync(pageId, degradationId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieves a specific degradation by its ID. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<Degradation> + * @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 getDegradationWithHttpInfo( + UUID pageId, UUID degradationId, GetDegradationOptionalParameters 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 getDegradation"); + } + + // verify the required parameter 'degradationId' is set + if (degradationId == null) { + throw new ApiException( + 400, "Missing the required parameter 'degradationId' when calling getDegradation"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/degradations/{degradation_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "degradation_id" + "\\}", apiClient.escapeString(degradationId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.getDegradation", + 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 degradation. + * + *

See {@link #getDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Degradation>> + */ + public CompletableFuture> getDegradationWithHttpInfoAsync( + UUID pageId, UUID degradationId, GetDegradationOptionalParameters 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 getDegradation")); + return result; + } + + // verify the required parameter 'degradationId' is set + if (degradationId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'degradationId' when calling getDegradation")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/degradations/{degradation_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "degradation_id" + "\\}", apiClient.escapeString(degradationId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.getDegradation", + 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 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. (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; + return this; + } + } + + /** + * List components. + * + *

See {@link #listComponentsWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @return StatusPagesComponentArray + * @throws ApiException if fails to make API call + */ + public StatusPagesComponentArray listComponents(UUID pageId) throws ApiException { + return listComponentsWithHttpInfo(pageId, new ListComponentsOptionalParameters()).getData(); + } + + /** + * List components. + * + *

See {@link #listComponentsWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @return CompletableFuture<StatusPagesComponentArray> + */ + public CompletableFuture listComponentsAsync(UUID pageId) { + return listComponentsWithHttpInfoAsync(pageId, new ListComponentsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List components. + * + *

See {@link #listComponentsWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param parameters Optional parameters for the request. + * @return StatusPagesComponentArray + * @throws ApiException if fails to make API call + */ + public StatusPagesComponentArray listComponents( + UUID pageId, ListComponentsOptionalParameters parameters) throws ApiException { + return listComponentsWithHttpInfo(pageId, parameters).getData(); + } + + /** + * List components. + * + *

See {@link #listComponentsWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<StatusPagesComponentArray> + */ + public CompletableFuture listComponentsAsync( + UUID pageId, ListComponentsOptionalParameters parameters) { + return listComponentsWithHttpInfoAsync(pageId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Lists all components for a status page. + * + * @param pageId The ID of the status page. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<StatusPagesComponentArray> + * @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 listComponentsWithHttpInfo( + UUID pageId, ListComponentsOptionalParameters 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 listComponents"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/components" + .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.listComponents", + 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 components. + * + *

See {@link #listComponentsWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<StatusPagesComponentArray>> + */ + public CompletableFuture> listComponentsWithHttpInfoAsync( + UUID pageId, ListComponentsOptionalParameters 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 listComponents")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/components" + .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.listComponents", + 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 listDegradations. */ + public static class ListDegradationsOptionalParameters { + private String filterPageId; + private Integer pageOffset; + private Integer pageLimit; + private String include; + private String filterStatus; + + /** + * 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; + } + } + + /** + * 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; + // 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)); + + 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; + // 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)); + + 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 listStatusPages. */ + public static class ListStatusPagesOptionalParameters { + private Integer pageOffset; + private Integer pageLimit; + private String include; + + /** + * Set pageOffset. + * + * @param pageOffset Offset to use as the start of the page. (optional, default to 0) + * @return ListStatusPagesOptionalParameters + */ + public ListStatusPagesOptionalParameters pageOffset(Integer pageOffset) { + this.pageOffset = pageOffset; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit The number of status pages to return per page. (optional, default to 50) + * @return ListStatusPagesOptionalParameters + */ + public ListStatusPagesOptionalParameters 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. (optional) + * @return ListStatusPagesOptionalParameters + */ + public ListStatusPagesOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * List status pages. + * + *

See {@link #listStatusPagesWithHttpInfo}. + * + * @return StatusPageArray + * @throws ApiException if fails to make API call + */ + public StatusPageArray listStatusPages() throws ApiException { + return listStatusPagesWithHttpInfo(new ListStatusPagesOptionalParameters()).getData(); + } + + /** + * List status pages. + * + *

See {@link #listStatusPagesWithHttpInfoAsync}. + * + * @return CompletableFuture<StatusPageArray> + */ + public CompletableFuture listStatusPagesAsync() { + return listStatusPagesWithHttpInfoAsync(new ListStatusPagesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List status pages. + * + *

See {@link #listStatusPagesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return StatusPageArray + * @throws ApiException if fails to make API call + */ + public StatusPageArray listStatusPages(ListStatusPagesOptionalParameters parameters) + throws ApiException { + return listStatusPagesWithHttpInfo(parameters).getData(); + } + + /** + * List status pages. + * + *

See {@link #listStatusPagesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<StatusPageArray> + */ + public CompletableFuture listStatusPagesAsync( + ListStatusPagesOptionalParameters parameters) { + return listStatusPagesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Lists all status pages for the organization. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<StatusPageArray> + * @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 listStatusPagesWithHttpInfo( + ListStatusPagesOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + Integer pageOffset = parameters.pageOffset; + Integer pageLimit = parameters.pageLimit; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/statuspages"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.listStatusPages", + 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 status pages. + * + *

See {@link #listStatusPagesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<StatusPageArray>> + */ + public CompletableFuture> listStatusPagesWithHttpInfoAsync( + ListStatusPagesOptionalParameters parameters) { + Object localVarPostBody = null; + Integer pageOffset = parameters.pageOffset; + Integer pageLimit = parameters.pageLimit; + String include = parameters.include; + // create path and map variables + String localVarPath = "/api/v2/statuspages"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.listStatusPages", + 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 updateComponent. */ + public static class UpdateComponentOptionalParameters { + 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 UpdateComponentOptionalParameters + */ + public UpdateComponentOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Update component. + * + *

See {@link #updateComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @param body (required) + * @return StatusPagesComponent + * @throws ApiException if fails to make API call + */ + public StatusPagesComponent updateComponent( + UUID pageId, UUID componentId, PatchComponentRequest body) throws ApiException { + return updateComponentWithHttpInfo( + pageId, componentId, body, new UpdateComponentOptionalParameters()) + .getData(); + } + + /** + * Update component. + * + *

See {@link #updateComponentWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @param body (required) + * @return CompletableFuture<StatusPagesComponent> + */ + public CompletableFuture updateComponentAsync( + UUID pageId, UUID componentId, PatchComponentRequest body) { + return updateComponentWithHttpInfoAsync( + pageId, componentId, body, new UpdateComponentOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update component. + * + *

See {@link #updateComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return StatusPagesComponent + * @throws ApiException if fails to make API call + */ + public StatusPagesComponent updateComponent( + UUID pageId, + UUID componentId, + PatchComponentRequest body, + UpdateComponentOptionalParameters parameters) + throws ApiException { + return updateComponentWithHttpInfo(pageId, componentId, body, parameters).getData(); + } + + /** + * Update component. + * + *

See {@link #updateComponentWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<StatusPagesComponent> + */ + public CompletableFuture updateComponentAsync( + UUID pageId, + UUID componentId, + PatchComponentRequest body, + UpdateComponentOptionalParameters parameters) { + return updateComponentWithHttpInfoAsync(pageId, componentId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Updates an existing component's attributes. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<StatusPagesComponent> + * @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 updateComponentWithHttpInfo( + UUID pageId, + UUID componentId, + PatchComponentRequest body, + UpdateComponentOptionalParameters 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 updateComponent"); + } + + // verify the required parameter 'componentId' is set + if (componentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'componentId' when calling updateComponent"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateComponent"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/components/{component_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "component_id" + "\\}", apiClient.escapeString(componentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.updateComponent", + 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 component. + * + *

See {@link #updateComponentWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param componentId The ID of the component. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<StatusPagesComponent>> + */ + public CompletableFuture> updateComponentWithHttpInfoAsync( + UUID pageId, + UUID componentId, + PatchComponentRequest body, + UpdateComponentOptionalParameters 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 updateComponent")); + return result; + } + + // verify the required parameter 'componentId' is set + if (componentId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'componentId' when calling updateComponent")); + 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 updateComponent")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/components/{component_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "component_id" + "\\}", apiClient.escapeString(componentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.updateComponent", + 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 updateDegradation. */ + public static class UpdateDegradationOptionalParameters { + private Boolean notifySubscribers; + private String include; + + /** + * Set notifySubscribers. + * + * @param notifySubscribers Whether to notify page subscribers of the degradation or + * maintenance. (optional, default to true) + * @return UpdateDegradationOptionalParameters + */ + public UpdateDegradationOptionalParameters 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 UpdateDegradationOptionalParameters + */ + public UpdateDegradationOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Update degradation. + * + *

See {@link #updateDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @param body (required) + * @return Degradation + * @throws ApiException if fails to make API call + */ + public Degradation updateDegradation( + UUID pageId, UUID degradationId, PatchDegradationRequest body) throws ApiException { + return updateDegradationWithHttpInfo( + pageId, degradationId, body, new UpdateDegradationOptionalParameters()) + .getData(); + } + + /** + * Update degradation. + * + *

See {@link #updateDegradationWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @param body (required) + * @return CompletableFuture<Degradation> + */ + public CompletableFuture updateDegradationAsync( + UUID pageId, UUID degradationId, PatchDegradationRequest body) { + return updateDegradationWithHttpInfoAsync( + pageId, degradationId, body, new UpdateDegradationOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update degradation. + * + *

See {@link #updateDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return Degradation + * @throws ApiException if fails to make API call + */ + public Degradation updateDegradation( + UUID pageId, + UUID degradationId, + PatchDegradationRequest body, + UpdateDegradationOptionalParameters parameters) + throws ApiException { + return updateDegradationWithHttpInfo(pageId, degradationId, body, parameters).getData(); + } + + /** + * Update degradation. + * + *

See {@link #updateDegradationWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<Degradation> + */ + public CompletableFuture updateDegradationAsync( + UUID pageId, + UUID degradationId, + PatchDegradationRequest body, + UpdateDegradationOptionalParameters parameters) { + return updateDegradationWithHttpInfoAsync(pageId, degradationId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Updates an existing degradation's attributes. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<Degradation> + * @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 updateDegradationWithHttpInfo( + UUID pageId, + UUID degradationId, + PatchDegradationRequest body, + UpdateDegradationOptionalParameters 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 updateDegradation"); + } + + // verify the required parameter 'degradationId' is set + if (degradationId == null) { + throw new ApiException( + 400, "Missing the required parameter 'degradationId' when calling updateDegradation"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateDegradation"); + } + Boolean notifySubscribers = parameters.notifySubscribers; + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/degradations/{degradation_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "degradation_id" + "\\}", apiClient.escapeString(degradationId.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.updateDegradation", + 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 degradation. + * + *

See {@link #updateDegradationWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param degradationId The ID of the degradation. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Degradation>> + */ + public CompletableFuture> updateDegradationWithHttpInfoAsync( + UUID pageId, + UUID degradationId, + PatchDegradationRequest body, + UpdateDegradationOptionalParameters 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 updateDegradation")); + return result; + } + + // verify the required parameter 'degradationId' is set + if (degradationId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'degradationId' when calling updateDegradation")); + 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 updateDegradation")); + return result; + } + Boolean notifySubscribers = parameters.notifySubscribers; + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/degradations/{degradation_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll( + "\\{" + "degradation_id" + "\\}", apiClient.escapeString(degradationId.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.updateDegradation", + 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; + private String include; + + /** + * Set deleteSubscribers. + * + * @param deleteSubscribers Whether to delete existing subscribers when updating a status page's + * type. (optional, default to false) + * @return UpdateStatusPageOptionalParameters + */ + public UpdateStatusPageOptionalParameters deleteSubscribers(Boolean deleteSubscribers) { + this.deleteSubscribers = deleteSubscribers; + return this; + } + + /** + * Set include. + * + * @param include Comma-separated list of resources to include. Supported values: + * created_by_user, last_modified_by_user. (optional) + * @return UpdateStatusPageOptionalParameters + */ + public UpdateStatusPageOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Update status page. + * + *

See {@link #updateStatusPageWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @return StatusPage + * @throws ApiException if fails to make API call + */ + public StatusPage updateStatusPage(UUID pageId, PatchStatusPageRequest body) throws ApiException { + return updateStatusPageWithHttpInfo(pageId, body, new UpdateStatusPageOptionalParameters()) + .getData(); + } + + /** + * Update status page. + * + *

See {@link #updateStatusPageWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @return CompletableFuture<StatusPage> + */ + public CompletableFuture updateStatusPageAsync( + UUID pageId, PatchStatusPageRequest body) { + return updateStatusPageWithHttpInfoAsync(pageId, body, new UpdateStatusPageOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update status page. + * + *

See {@link #updateStatusPageWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return StatusPage + * @throws ApiException if fails to make API call + */ + public StatusPage updateStatusPage( + UUID pageId, PatchStatusPageRequest body, UpdateStatusPageOptionalParameters parameters) + throws ApiException { + return updateStatusPageWithHttpInfo(pageId, body, parameters).getData(); + } + + /** + * Update status page. + * + *

See {@link #updateStatusPageWithHttpInfoAsync}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<StatusPage> + */ + public CompletableFuture updateStatusPageAsync( + UUID pageId, PatchStatusPageRequest body, UpdateStatusPageOptionalParameters parameters) { + return updateStatusPageWithHttpInfoAsync(pageId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Updates an existing status page's attributes. + * + * @param pageId The ID of the status page. (required) + * @param body (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 updateStatusPageWithHttpInfo( + UUID pageId, PatchStatusPageRequest body, UpdateStatusPageOptionalParameters 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 updateStatusPage"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateStatusPage"); + } + Boolean deleteSubscribers = parameters.deleteSubscribers; + 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("", "delete_subscribers", deleteSubscribers)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.updateStatusPage", + 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 status page. + * + *

See {@link #updateStatusPageWithHttpInfo}. + * + * @param pageId The ID of the status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<StatusPage>> + */ + public CompletableFuture> updateStatusPageWithHttpInfoAsync( + UUID pageId, PatchStatusPageRequest body, UpdateStatusPageOptionalParameters 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 updateStatusPage")); + 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 updateStatusPage")); + return result; + } + Boolean deleteSubscribers = parameters.deleteSubscribers; + 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("", "delete_subscribers", deleteSubscribers)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.updateStatusPage", + 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() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequest.java new file mode 100644 index 00000000000..6539ce6914e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequest.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({CreateComponentRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateComponentRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CreateComponentRequestData data; + + public CreateComponentRequest data(CreateComponentRequestData 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 CreateComponentRequestData getData() { + return data; + } + + public void setData(CreateComponentRequestData 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 CreateComponentRequest + */ + @JsonAnySetter + public CreateComponentRequest 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 CreateComponentRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateComponentRequest createComponentRequest = (CreateComponentRequest) o; + return Objects.equals(this.data, createComponentRequest.data) + && Objects.equals(this.additionalProperties, createComponentRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateComponentRequest {\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/CreateComponentRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestData.java new file mode 100644 index 00000000000..80d9ab4d703 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestData.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; + +/** */ +@JsonPropertyOrder({ + CreateComponentRequestData.JSON_PROPERTY_ATTRIBUTES, + CreateComponentRequestData.JSON_PROPERTY_RELATIONSHIPS, + CreateComponentRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateComponentRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateComponentRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateComponentRequestDataRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupType type = StatusPagesComponentGroupType.COMPONENTS; + + public CreateComponentRequestData() {} + + @JsonCreator + public CreateComponentRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateComponentRequestData attributes(CreateComponentRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateComponentRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CreateComponentRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public CreateComponentRequestData relationships( + CreateComponentRequestDataRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Getrelationships + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateComponentRequestDataRelationships getRelationships() { + return relationships; + } + + public void setRelationships(CreateComponentRequestDataRelationships relationships) { + this.relationships = relationships; + } + + public CreateComponentRequestData type(StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Components resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupType 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 CreateComponentRequestData + */ + @JsonAnySetter + public CreateComponentRequestData 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 CreateComponentRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateComponentRequestData createComponentRequestData = (CreateComponentRequestData) o; + return Objects.equals(this.attributes, createComponentRequestData.attributes) + && Objects.equals(this.relationships, createComponentRequestData.relationships) + && Objects.equals(this.type, createComponentRequestData.type) + && Objects.equals( + this.additionalProperties, createComponentRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateComponentRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataAttributes.java new file mode 100644 index 00000000000..5379df592d1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataAttributes.java @@ -0,0 +1,252 @@ +/* + * 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({ + CreateComponentRequestDataAttributes.JSON_PROPERTY_COMPONENTS, + CreateComponentRequestDataAttributes.JSON_PROPERTY_NAME, + CreateComponentRequestDataAttributes.JSON_PROPERTY_POSITION, + CreateComponentRequestDataAttributes.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateComponentRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components = null; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateComponentRequestDataAttributesType type; + + public CreateComponentRequestDataAttributes() {} + + @JsonCreator + public CreateComponentRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_POSITION) Long position, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + CreateComponentRequestDataAttributesType type) { + this.name = name; + this.position = position; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateComponentRequestDataAttributes components( + List components) { + this.components = components; + for (CreateComponentRequestDataAttributesComponentsItems item : components) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CreateComponentRequestDataAttributes addComponentsItem( + CreateComponentRequestDataAttributesComponentsItems componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + this.unparsed |= componentsItem.unparsed; + return this; + } + + /** + * Getcomponents + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + public void setComponents(List components) { + this.components = components; + } + + public CreateComponentRequestDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateComponentRequestDataAttributes position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + public CreateComponentRequestDataAttributes type(CreateComponentRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateComponentRequestDataAttributesType getType() { + return type; + } + + public void setType(CreateComponentRequestDataAttributesType 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 CreateComponentRequestDataAttributes + */ + @JsonAnySetter + public CreateComponentRequestDataAttributes 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 CreateComponentRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateComponentRequestDataAttributes createComponentRequestDataAttributes = + (CreateComponentRequestDataAttributes) o; + return Objects.equals(this.components, createComponentRequestDataAttributes.components) + && Objects.equals(this.name, createComponentRequestDataAttributes.name) + && Objects.equals(this.position, createComponentRequestDataAttributes.position) + && Objects.equals(this.type, createComponentRequestDataAttributes.type) + && Objects.equals( + this.additionalProperties, createComponentRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(components, name, position, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateComponentRequestDataAttributes {\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).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/CreateComponentRequestDataAttributesComponentsItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataAttributesComponentsItems.java new file mode 100644 index 00000000000..84bb6cd4176 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataAttributesComponentsItems.java @@ -0,0 +1,216 @@ +/* + * 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({ + CreateComponentRequestDataAttributesComponentsItems.JSON_PROPERTY_NAME, + CreateComponentRequestDataAttributesComponentsItems.JSON_PROPERTY_POSITION, + CreateComponentRequestDataAttributesComponentsItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateComponentRequestDataAttributesComponentsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupAttributesComponentsItemsType type; + + public CreateComponentRequestDataAttributesComponentsItems() {} + + @JsonCreator + public CreateComponentRequestDataAttributesComponentsItems( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_POSITION) Long position, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + StatusPagesComponentGroupAttributesComponentsItemsType type) { + this.name = name; + this.position = position; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateComponentRequestDataAttributesComponentsItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateComponentRequestDataAttributesComponentsItems position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + public CreateComponentRequestDataAttributesComponentsItems type( + StatusPagesComponentGroupAttributesComponentsItemsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupAttributesComponentsItemsType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupAttributesComponentsItemsType 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 CreateComponentRequestDataAttributesComponentsItems + */ + @JsonAnySetter + public CreateComponentRequestDataAttributesComponentsItems 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 CreateComponentRequestDataAttributesComponentsItems object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateComponentRequestDataAttributesComponentsItems + createComponentRequestDataAttributesComponentsItems = + (CreateComponentRequestDataAttributesComponentsItems) o; + return Objects.equals(this.name, createComponentRequestDataAttributesComponentsItems.name) + && Objects.equals( + this.position, createComponentRequestDataAttributesComponentsItems.position) + && Objects.equals(this.type, createComponentRequestDataAttributesComponentsItems.type) + && Objects.equals( + this.additionalProperties, + createComponentRequestDataAttributesComponentsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, position, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateComponentRequestDataAttributesComponentsItems {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).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/CreateComponentRequestDataAttributesType.java b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataAttributesType.java new file mode 100644 index 00000000000..14765348fa1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataAttributesType.java @@ -0,0 +1,65 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize( + using = + CreateComponentRequestDataAttributesType.CreateComponentRequestDataAttributesTypeSerializer + .class) +public class CreateComponentRequestDataAttributesType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("component", "group")); + + public static final CreateComponentRequestDataAttributesType COMPONENT = + new CreateComponentRequestDataAttributesType("component"); + public static final CreateComponentRequestDataAttributesType GROUP = + new CreateComponentRequestDataAttributesType("group"); + + CreateComponentRequestDataAttributesType(String value) { + super(value, allowedValues); + } + + public static class CreateComponentRequestDataAttributesTypeSerializer + extends StdSerializer { + public CreateComponentRequestDataAttributesTypeSerializer( + Class t) { + super(t); + } + + public CreateComponentRequestDataAttributesTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CreateComponentRequestDataAttributesType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CreateComponentRequestDataAttributesType fromValue(String value) { + return new CreateComponentRequestDataAttributesType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataRelationships.java new file mode 100644 index 00000000000..ef5efab55d4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataRelationships.java @@ -0,0 +1,140 @@ +/* + * 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({CreateComponentRequestDataRelationships.JSON_PROPERTY_GROUP}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateComponentRequestDataRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_GROUP = "group"; + private CreateComponentRequestDataRelationshipsGroup group; + + public CreateComponentRequestDataRelationships group( + CreateComponentRequestDataRelationshipsGroup group) { + this.group = group; + this.unparsed |= group.unparsed; + return this; + } + + /** + * Getgroup + * + * @return group + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateComponentRequestDataRelationshipsGroup getGroup() { + return group; + } + + public void setGroup(CreateComponentRequestDataRelationshipsGroup group) { + this.group = group; + } + + /** + * 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 CreateComponentRequestDataRelationships + */ + @JsonAnySetter + public CreateComponentRequestDataRelationships 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 CreateComponentRequestDataRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateComponentRequestDataRelationships createComponentRequestDataRelationships = + (CreateComponentRequestDataRelationships) o; + return Objects.equals(this.group, createComponentRequestDataRelationships.group) + && Objects.equals( + this.additionalProperties, + createComponentRequestDataRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(group, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateComponentRequestDataRelationships {\n"); + sb.append(" group: ").append(toIndentedString(group)).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/CreateComponentRequestDataRelationshipsGroup.java b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataRelationshipsGroup.java new file mode 100644 index 00000000000..9b2e20f5e41 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataRelationshipsGroup.java @@ -0,0 +1,151 @@ +/* + * 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({CreateComponentRequestDataRelationshipsGroup.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateComponentRequestDataRelationshipsGroup { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CreateComponentRequestDataRelationshipsGroupData data; + + public CreateComponentRequestDataRelationshipsGroup() {} + + @JsonCreator + public CreateComponentRequestDataRelationshipsGroup( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + CreateComponentRequestDataRelationshipsGroupData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CreateComponentRequestDataRelationshipsGroup data( + CreateComponentRequestDataRelationshipsGroupData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateComponentRequestDataRelationshipsGroupData getData() { + return data; + } + + public void setData(CreateComponentRequestDataRelationshipsGroupData 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 CreateComponentRequestDataRelationshipsGroup + */ + @JsonAnySetter + public CreateComponentRequestDataRelationshipsGroup 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 CreateComponentRequestDataRelationshipsGroup object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateComponentRequestDataRelationshipsGroup createComponentRequestDataRelationshipsGroup = + (CreateComponentRequestDataRelationshipsGroup) o; + return Objects.equals(this.data, createComponentRequestDataRelationshipsGroup.data) + && Objects.equals( + this.additionalProperties, + createComponentRequestDataRelationshipsGroup.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateComponentRequestDataRelationshipsGroup {\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/CreateComponentRequestDataRelationshipsGroupData.java b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataRelationshipsGroupData.java new file mode 100644 index 00000000000..2bc6ae43e6f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateComponentRequestDataRelationshipsGroupData.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({ + CreateComponentRequestDataRelationshipsGroupData.JSON_PROPERTY_ID, + CreateComponentRequestDataRelationshipsGroupData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateComponentRequestDataRelationshipsGroupData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupType type = StatusPagesComponentGroupType.COMPONENTS; + + public CreateComponentRequestDataRelationshipsGroupData() {} + + @JsonCreator + public CreateComponentRequestDataRelationshipsGroupData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + StatusPagesComponentGroupType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateComponentRequestDataRelationshipsGroupData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public CreateComponentRequestDataRelationshipsGroupData type(StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Components resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupType 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 CreateComponentRequestDataRelationshipsGroupData + */ + @JsonAnySetter + public CreateComponentRequestDataRelationshipsGroupData 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 CreateComponentRequestDataRelationshipsGroupData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateComponentRequestDataRelationshipsGroupData + createComponentRequestDataRelationshipsGroupData = + (CreateComponentRequestDataRelationshipsGroupData) o; + return Objects.equals(this.id, createComponentRequestDataRelationshipsGroupData.id) + && Objects.equals(this.type, createComponentRequestDataRelationshipsGroupData.type) + && Objects.equals( + this.additionalProperties, + createComponentRequestDataRelationshipsGroupData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateComponentRequestDataRelationshipsGroupData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequest.java new file mode 100644 index 00000000000..584ff91e69f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequest.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({CreateDegradationRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateDegradationRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CreateDegradationRequestData data; + + public CreateDegradationRequest data(CreateDegradationRequestData 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 CreateDegradationRequestData getData() { + return data; + } + + public void setData(CreateDegradationRequestData 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 CreateDegradationRequest + */ + @JsonAnySetter + public CreateDegradationRequest 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 CreateDegradationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDegradationRequest createDegradationRequest = (CreateDegradationRequest) o; + return Objects.equals(this.data, createDegradationRequest.data) + && Objects.equals(this.additionalProperties, createDegradationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateDegradationRequest {\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/CreateDegradationRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestData.java new file mode 100644 index 00000000000..9906a290cb9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestData.java @@ -0,0 +1,181 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + CreateDegradationRequestData.JSON_PROPERTY_ATTRIBUTES, + CreateDegradationRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateDegradationRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateDegradationRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private PatchDegradationRequestDataType type = PatchDegradationRequestDataType.DEGRADATIONS; + + public CreateDegradationRequestData() {} + + @JsonCreator + public CreateDegradationRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + PatchDegradationRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateDegradationRequestData attributes( + CreateDegradationRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateDegradationRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CreateDegradationRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public CreateDegradationRequestData type(PatchDegradationRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Degradations resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PatchDegradationRequestDataType getType() { + return type; + } + + public void setType(PatchDegradationRequestDataType 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 CreateDegradationRequestData + */ + @JsonAnySetter + public CreateDegradationRequestData 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 CreateDegradationRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDegradationRequestData createDegradationRequestData = (CreateDegradationRequestData) o; + return Objects.equals(this.attributes, createDegradationRequestData.attributes) + && Objects.equals(this.type, createDegradationRequestData.type) + && Objects.equals( + this.additionalProperties, createDegradationRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateDegradationRequestData {\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/CreateDegradationRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributes.java new file mode 100644 index 00000000000..120eabc9a30 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributes.java @@ -0,0 +1,255 @@ +/* + * 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({ + CreateDegradationRequestDataAttributes.JSON_PROPERTY_COMPONENTS_AFFECTED, + CreateDegradationRequestDataAttributes.JSON_PROPERTY_DESCRIPTION, + CreateDegradationRequestDataAttributes.JSON_PROPERTY_STATUS, + CreateDegradationRequestDataAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateDegradationRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS_AFFECTED = "components_affected"; + private List componentsAffected = + new ArrayList<>(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_STATUS = "status"; + private CreateDegradationRequestDataAttributesStatus status; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public CreateDegradationRequestDataAttributes() {} + + @JsonCreator + public CreateDegradationRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_COMPONENTS_AFFECTED) + List componentsAffected, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + CreateDegradationRequestDataAttributesStatus status, + @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { + this.componentsAffected = componentsAffected; + this.status = status; + this.unparsed |= !status.isValid(); + this.title = title; + } + + public CreateDegradationRequestDataAttributes componentsAffected( + List componentsAffected) { + this.componentsAffected = componentsAffected; + for (CreateDegradationRequestDataAttributesComponentsAffectedItems item : componentsAffected) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CreateDegradationRequestDataAttributes addComponentsAffectedItem( + CreateDegradationRequestDataAttributesComponentsAffectedItems componentsAffectedItem) { + this.componentsAffected.add(componentsAffectedItem); + this.unparsed |= componentsAffectedItem.unparsed; + return this; + } + + /** + * GetcomponentsAffected + * + * @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 CreateDegradationRequestDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public CreateDegradationRequestDataAttributes status( + CreateDegradationRequestDataAttributesStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Getstatus + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateDegradationRequestDataAttributesStatus getStatus() { + return status; + } + + public void setStatus(CreateDegradationRequestDataAttributesStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public CreateDegradationRequestDataAttributes title(String title) { + this.title = title; + return this; + } + + /** + * Gettitle + * + * @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 CreateDegradationRequestDataAttributes + */ + @JsonAnySetter + public CreateDegradationRequestDataAttributes 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 CreateDegradationRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDegradationRequestDataAttributes createDegradationRequestDataAttributes = + (CreateDegradationRequestDataAttributes) o; + return Objects.equals( + this.componentsAffected, createDegradationRequestDataAttributes.componentsAffected) + && Objects.equals(this.description, createDegradationRequestDataAttributes.description) + && Objects.equals(this.status, createDegradationRequestDataAttributes.status) + && Objects.equals(this.title, createDegradationRequestDataAttributes.title) + && Objects.equals( + this.additionalProperties, createDegradationRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(componentsAffected, description, status, title, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateDegradationRequestDataAttributes {\n"); + sb.append(" componentsAffected: ").append(toIndentedString(componentsAffected)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/CreateDegradationRequestDataAttributesComponentsAffectedItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributesComponentsAffectedItems.java new file mode 100644 index 00000000000..9ec4ea025ca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributesComponentsAffectedItems.java @@ -0,0 +1,208 @@ +/* + * 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({ + CreateDegradationRequestDataAttributesComponentsAffectedItems.JSON_PROPERTY_ID, + CreateDegradationRequestDataAttributesComponentsAffectedItems.JSON_PROPERTY_NAME, + CreateDegradationRequestDataAttributesComponentsAffectedItems.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateDegradationRequestDataAttributesComponentsAffectedItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentDataAttributesStatus status; + + public CreateDegradationRequestDataAttributesComponentsAffectedItems() {} + + @JsonCreator + public CreateDegradationRequestDataAttributesComponentsAffectedItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + StatusPagesComponentDataAttributesStatus status) { + this.id = id; + this.status = status; + this.unparsed |= !status.isValid(); + } + + public CreateDegradationRequestDataAttributesComponentsAffectedItems id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public CreateDegradationRequestDataAttributesComponentsAffectedItems status( + StatusPagesComponentDataAttributesStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Getstatus + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentDataAttributesStatus getStatus() { + return status; + } + + public void setStatus(StatusPagesComponentDataAttributesStatus 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 CreateDegradationRequestDataAttributesComponentsAffectedItems + */ + @JsonAnySetter + public CreateDegradationRequestDataAttributesComponentsAffectedItems 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 CreateDegradationRequestDataAttributesComponentsAffectedItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateDegradationRequestDataAttributesComponentsAffectedItems + createDegradationRequestDataAttributesComponentsAffectedItems = + (CreateDegradationRequestDataAttributesComponentsAffectedItems) o; + return Objects.equals(this.id, createDegradationRequestDataAttributesComponentsAffectedItems.id) + && Objects.equals( + this.name, createDegradationRequestDataAttributesComponentsAffectedItems.name) + && Objects.equals( + this.status, createDegradationRequestDataAttributesComponentsAffectedItems.status) + && Objects.equals( + this.additionalProperties, + createDegradationRequestDataAttributesComponentsAffectedItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateDegradationRequestDataAttributesComponentsAffectedItems {\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/CreateDegradationRequestDataAttributesStatus.java b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributesStatus.java new file mode 100644 index 00000000000..305d61c8855 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateDegradationRequestDataAttributesStatus.java @@ -0,0 +1,69 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize( + using = + CreateDegradationRequestDataAttributesStatus + .CreateDegradationRequestDataAttributesStatusSerializer.class) +public class CreateDegradationRequestDataAttributesStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("investigating", "identified", "monitoring", "resolved")); + + public static final CreateDegradationRequestDataAttributesStatus INVESTIGATING = + new CreateDegradationRequestDataAttributesStatus("investigating"); + public static final CreateDegradationRequestDataAttributesStatus IDENTIFIED = + new CreateDegradationRequestDataAttributesStatus("identified"); + public static final CreateDegradationRequestDataAttributesStatus MONITORING = + new CreateDegradationRequestDataAttributesStatus("monitoring"); + public static final CreateDegradationRequestDataAttributesStatus RESOLVED = + new CreateDegradationRequestDataAttributesStatus("resolved"); + + CreateDegradationRequestDataAttributesStatus(String value) { + super(value, allowedValues); + } + + public static class CreateDegradationRequestDataAttributesStatusSerializer + extends StdSerializer { + public CreateDegradationRequestDataAttributesStatusSerializer( + Class t) { + super(t); + } + + public CreateDegradationRequestDataAttributesStatusSerializer() { + this(null); + } + + @Override + public void serialize( + CreateDegradationRequestDataAttributesStatus value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CreateDegradationRequestDataAttributesStatus fromValue(String value) { + return new CreateDegradationRequestDataAttributesStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequest.java new file mode 100644 index 00000000000..8d06a0e5e00 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequest.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({CreateStatusPageRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateStatusPageRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CreateStatusPageRequestData data; + + public CreateStatusPageRequest data(CreateStatusPageRequestData 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 CreateStatusPageRequestData getData() { + return data; + } + + public void setData(CreateStatusPageRequestData 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 CreateStatusPageRequest + */ + @JsonAnySetter + public CreateStatusPageRequest 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 CreateStatusPageRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStatusPageRequest createStatusPageRequest = (CreateStatusPageRequest) o; + return Objects.equals(this.data, createStatusPageRequest.data) + && Objects.equals(this.additionalProperties, createStatusPageRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStatusPageRequest {\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/CreateStatusPageRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestData.java new file mode 100644 index 00000000000..4c3a0cb7b93 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestData.java @@ -0,0 +1,179 @@ +/* + * 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({ + CreateStatusPageRequestData.JSON_PROPERTY_ATTRIBUTES, + CreateStatusPageRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateStatusPageRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateStatusPageRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPageDataType type = StatusPageDataType.STATUS_PAGES; + + public CreateStatusPageRequestData() {} + + @JsonCreator + public CreateStatusPageRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateStatusPageRequestData attributes(CreateStatusPageRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateStatusPageRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CreateStatusPageRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public CreateStatusPageRequestData type(StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Status pages resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageDataType getType() { + return type; + } + + public void setType(StatusPageDataType 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 CreateStatusPageRequestData + */ + @JsonAnySetter + public CreateStatusPageRequestData 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 CreateStatusPageRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStatusPageRequestData createStatusPageRequestData = (CreateStatusPageRequestData) o; + return Objects.equals(this.attributes, createStatusPageRequestData.attributes) + && Objects.equals(this.type, createStatusPageRequestData.type) + && Objects.equals( + this.additionalProperties, createStatusPageRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStatusPageRequestData {\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/CreateStatusPageRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributes.java new file mode 100644 index 00000000000..68c289cd6aa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributes.java @@ -0,0 +1,441 @@ +/* + * 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({ + CreateStatusPageRequestDataAttributes.JSON_PROPERTY_COMPANY_LOGO, + CreateStatusPageRequestDataAttributes.JSON_PROPERTY_COMPONENTS, + CreateStatusPageRequestDataAttributes.JSON_PROPERTY_DOMAIN_PREFIX, + CreateStatusPageRequestDataAttributes.JSON_PROPERTY_EMAIL_HEADER_IMAGE, + CreateStatusPageRequestDataAttributes.JSON_PROPERTY_ENABLED, + CreateStatusPageRequestDataAttributes.JSON_PROPERTY_FAVICON, + CreateStatusPageRequestDataAttributes.JSON_PROPERTY_NAME, + CreateStatusPageRequestDataAttributes.JSON_PROPERTY_SUBSCRIPTIONS_ENABLED, + CreateStatusPageRequestDataAttributes.JSON_PROPERTY_TYPE, + CreateStatusPageRequestDataAttributes.JSON_PROPERTY_VISUALIZATION_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateStatusPageRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPANY_LOGO = "company_logo"; + private String companyLogo; + + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components = null; + + public static final String JSON_PROPERTY_DOMAIN_PREFIX = "domain_prefix"; + private String domainPrefix; + + public static final String JSON_PROPERTY_EMAIL_HEADER_IMAGE = "email_header_image"; + private String emailHeaderImage; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_FAVICON = "favicon"; + private String favicon; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SUBSCRIPTIONS_ENABLED = "subscriptions_enabled"; + private Boolean subscriptionsEnabled; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateStatusPageRequestDataAttributesType type; + + public static final String JSON_PROPERTY_VISUALIZATION_TYPE = "visualization_type"; + private CreateStatusPageRequestDataAttributesVisualizationType visualizationType; + + public CreateStatusPageRequestDataAttributes() {} + + @JsonCreator + public CreateStatusPageRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOMAIN_PREFIX) String domainPrefix, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + CreateStatusPageRequestDataAttributesType type, + @JsonProperty(required = true, value = JSON_PROPERTY_VISUALIZATION_TYPE) + CreateStatusPageRequestDataAttributesVisualizationType visualizationType) { + this.domainPrefix = domainPrefix; + this.enabled = enabled; + this.name = name; + this.type = type; + this.unparsed |= !type.isValid(); + this.visualizationType = visualizationType; + this.unparsed |= !visualizationType.isValid(); + } + + public CreateStatusPageRequestDataAttributes companyLogo(String companyLogo) { + this.companyLogo = companyLogo; + return this; + } + + /** + * GetcompanyLogo + * + * @return companyLogo + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPANY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCompanyLogo() { + return companyLogo; + } + + public void setCompanyLogo(String companyLogo) { + this.companyLogo = companyLogo; + } + + public CreateStatusPageRequestDataAttributes components( + List components) { + this.components = components; + for (CreateStatusPageRequestDataAttributesComponentsItems item : components) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CreateStatusPageRequestDataAttributes addComponentsItem( + CreateStatusPageRequestDataAttributesComponentsItems componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + this.unparsed |= componentsItem.unparsed; + return this; + } + + /** + * Getcomponents + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + public void setComponents(List components) { + this.components = components; + } + + public CreateStatusPageRequestDataAttributes domainPrefix(String domainPrefix) { + this.domainPrefix = domainPrefix; + return this; + } + + /** + * GetdomainPrefix + * + * @return domainPrefix + */ + @JsonProperty(JSON_PROPERTY_DOMAIN_PREFIX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDomainPrefix() { + return domainPrefix; + } + + public void setDomainPrefix(String domainPrefix) { + this.domainPrefix = domainPrefix; + } + + public CreateStatusPageRequestDataAttributes emailHeaderImage(String emailHeaderImage) { + this.emailHeaderImage = emailHeaderImage; + return this; + } + + /** + * GetemailHeaderImage + * + * @return emailHeaderImage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL_HEADER_IMAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmailHeaderImage() { + return emailHeaderImage; + } + + public void setEmailHeaderImage(String emailHeaderImage) { + this.emailHeaderImage = emailHeaderImage; + } + + public CreateStatusPageRequestDataAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Getenabled + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public CreateStatusPageRequestDataAttributes favicon(String favicon) { + this.favicon = favicon; + return this; + } + + /** + * Getfavicon + * + * @return favicon + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAVICON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFavicon() { + return favicon; + } + + public void setFavicon(String favicon) { + this.favicon = favicon; + } + + public CreateStatusPageRequestDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateStatusPageRequestDataAttributes subscriptionsEnabled(Boolean subscriptionsEnabled) { + this.subscriptionsEnabled = subscriptionsEnabled; + return this; + } + + /** + * GetsubscriptionsEnabled + * + * @return subscriptionsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTIONS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSubscriptionsEnabled() { + return subscriptionsEnabled; + } + + public void setSubscriptionsEnabled(Boolean subscriptionsEnabled) { + this.subscriptionsEnabled = subscriptionsEnabled; + } + + public CreateStatusPageRequestDataAttributes type( + CreateStatusPageRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateStatusPageRequestDataAttributesType getType() { + return type; + } + + public void setType(CreateStatusPageRequestDataAttributesType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + public CreateStatusPageRequestDataAttributes visualizationType( + CreateStatusPageRequestDataAttributesVisualizationType visualizationType) { + this.visualizationType = visualizationType; + this.unparsed |= !visualizationType.isValid(); + return this; + } + + /** + * GetvisualizationType + * + * @return visualizationType + */ + @JsonProperty(JSON_PROPERTY_VISUALIZATION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateStatusPageRequestDataAttributesVisualizationType getVisualizationType() { + return visualizationType; + } + + public void setVisualizationType( + CreateStatusPageRequestDataAttributesVisualizationType visualizationType) { + if (!visualizationType.isValid()) { + this.unparsed = true; + } + this.visualizationType = visualizationType; + } + + /** + * 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 CreateStatusPageRequestDataAttributes + */ + @JsonAnySetter + public CreateStatusPageRequestDataAttributes 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 CreateStatusPageRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStatusPageRequestDataAttributes createStatusPageRequestDataAttributes = + (CreateStatusPageRequestDataAttributes) o; + return Objects.equals(this.companyLogo, createStatusPageRequestDataAttributes.companyLogo) + && Objects.equals(this.components, createStatusPageRequestDataAttributes.components) + && Objects.equals(this.domainPrefix, createStatusPageRequestDataAttributes.domainPrefix) + && Objects.equals( + this.emailHeaderImage, createStatusPageRequestDataAttributes.emailHeaderImage) + && Objects.equals(this.enabled, createStatusPageRequestDataAttributes.enabled) + && Objects.equals(this.favicon, createStatusPageRequestDataAttributes.favicon) + && Objects.equals(this.name, createStatusPageRequestDataAttributes.name) + && Objects.equals( + this.subscriptionsEnabled, createStatusPageRequestDataAttributes.subscriptionsEnabled) + && Objects.equals(this.type, createStatusPageRequestDataAttributes.type) + && Objects.equals( + this.visualizationType, createStatusPageRequestDataAttributes.visualizationType) + && Objects.equals( + this.additionalProperties, createStatusPageRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + companyLogo, + components, + domainPrefix, + emailHeaderImage, + enabled, + favicon, + name, + subscriptionsEnabled, + type, + visualizationType, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStatusPageRequestDataAttributes {\n"); + sb.append(" companyLogo: ").append(toIndentedString(companyLogo)).append("\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" domainPrefix: ").append(toIndentedString(domainPrefix)).append("\n"); + sb.append(" emailHeaderImage: ").append(toIndentedString(emailHeaderImage)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" favicon: ").append(toIndentedString(favicon)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" subscriptionsEnabled: ") + .append(toIndentedString(subscriptionsEnabled)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" visualizationType: ").append(toIndentedString(visualizationType)).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/CreateStatusPageRequestDataAttributesComponentsItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesComponentsItems.java new file mode 100644 index 00000000000..0032b7ff168 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesComponentsItems.java @@ -0,0 +1,286 @@ +/* + * 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({ + CreateStatusPageRequestDataAttributesComponentsItems.JSON_PROPERTY_COMPONENTS, + CreateStatusPageRequestDataAttributesComponentsItems.JSON_PROPERTY_ID, + CreateStatusPageRequestDataAttributesComponentsItems.JSON_PROPERTY_NAME, + CreateStatusPageRequestDataAttributesComponentsItems.JSON_PROPERTY_POSITION, + CreateStatusPageRequestDataAttributesComponentsItems.JSON_PROPERTY_STATUS, + CreateStatusPageRequestDataAttributesComponentsItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateStatusPageRequestDataAttributesComponentsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components = + null; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentGroupAttributesComponentsItemsStatus status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateComponentRequestDataAttributesType type; + + public CreateStatusPageRequestDataAttributesComponentsItems components( + List components) { + this.components = components; + for (CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems item : components) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CreateStatusPageRequestDataAttributesComponentsItems addComponentsItem( + CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + this.unparsed |= componentsItem.unparsed; + return this; + } + + /** + * Getcomponents + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + public void setComponents( + List components) { + this.components = components; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public CreateStatusPageRequestDataAttributesComponentsItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateStatusPageRequestDataAttributesComponentsItems position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsStatus getStatus() { + return status; + } + + public CreateStatusPageRequestDataAttributesComponentsItems type( + CreateComponentRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateComponentRequestDataAttributesType getType() { + return type; + } + + public void setType(CreateComponentRequestDataAttributesType 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 CreateStatusPageRequestDataAttributesComponentsItems + */ + @JsonAnySetter + public CreateStatusPageRequestDataAttributesComponentsItems 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 CreateStatusPageRequestDataAttributesComponentsItems object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStatusPageRequestDataAttributesComponentsItems + createStatusPageRequestDataAttributesComponentsItems = + (CreateStatusPageRequestDataAttributesComponentsItems) o; + return Objects.equals( + this.components, createStatusPageRequestDataAttributesComponentsItems.components) + && Objects.equals(this.id, createStatusPageRequestDataAttributesComponentsItems.id) + && Objects.equals(this.name, createStatusPageRequestDataAttributesComponentsItems.name) + && Objects.equals( + this.position, createStatusPageRequestDataAttributesComponentsItems.position) + && Objects.equals(this.status, createStatusPageRequestDataAttributesComponentsItems.status) + && Objects.equals(this.type, createStatusPageRequestDataAttributesComponentsItems.type) + && Objects.equals( + this.additionalProperties, + createStatusPageRequestDataAttributesComponentsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(components, id, name, position, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStatusPageRequestDataAttributesComponentsItems {\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems.java new file mode 100644 index 00000000000..e5a84194877 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems.java @@ -0,0 +1,248 @@ +/* + * 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({ + CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems.JSON_PROPERTY_ID, + CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems.JSON_PROPERTY_NAME, + CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems.JSON_PROPERTY_POSITION, + CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems.JSON_PROPERTY_STATUS, + CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentGroupAttributesComponentsItemsStatus status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupAttributesComponentsItemsType type; + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems position( + Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsStatus getStatus() { + return status; + } + + public CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems type( + StatusPagesComponentGroupAttributesComponentsItemsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupAttributesComponentsItemsType 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 CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems + */ + @JsonAnySetter + public CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems 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 CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems + createStatusPageRequestDataAttributesComponentsItemsComponentsItems = + (CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems) o; + return Objects.equals( + this.id, createStatusPageRequestDataAttributesComponentsItemsComponentsItems.id) + && Objects.equals( + this.name, createStatusPageRequestDataAttributesComponentsItemsComponentsItems.name) + && Objects.equals( + this.position, + createStatusPageRequestDataAttributesComponentsItemsComponentsItems.position) + && Objects.equals( + this.status, createStatusPageRequestDataAttributesComponentsItemsComponentsItems.status) + && Objects.equals( + this.type, createStatusPageRequestDataAttributesComponentsItemsComponentsItems.type) + && Objects.equals( + this.additionalProperties, + createStatusPageRequestDataAttributesComponentsItemsComponentsItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, position, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/CreateStatusPageRequestDataAttributesType.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesType.java new file mode 100644 index 00000000000..7564c793927 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesType.java @@ -0,0 +1,65 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize( + using = + CreateStatusPageRequestDataAttributesType + .CreateStatusPageRequestDataAttributesTypeSerializer.class) +public class CreateStatusPageRequestDataAttributesType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("public", "internal")); + + public static final CreateStatusPageRequestDataAttributesType PUBLIC = + new CreateStatusPageRequestDataAttributesType("public"); + public static final CreateStatusPageRequestDataAttributesType INTERNAL = + new CreateStatusPageRequestDataAttributesType("internal"); + + CreateStatusPageRequestDataAttributesType(String value) { + super(value, allowedValues); + } + + public static class CreateStatusPageRequestDataAttributesTypeSerializer + extends StdSerializer { + public CreateStatusPageRequestDataAttributesTypeSerializer( + Class t) { + super(t); + } + + public CreateStatusPageRequestDataAttributesTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CreateStatusPageRequestDataAttributesType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CreateStatusPageRequestDataAttributesType fromValue(String value) { + return new CreateStatusPageRequestDataAttributesType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesVisualizationType.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesVisualizationType.java new file mode 100644 index 00000000000..8483620fb1a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesVisualizationType.java @@ -0,0 +1,69 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize( + using = + CreateStatusPageRequestDataAttributesVisualizationType + .CreateStatusPageRequestDataAttributesVisualizationTypeSerializer.class) +public class CreateStatusPageRequestDataAttributesVisualizationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("bars_and_uptime_percentage", "bars_only", "component_name_only")); + + public static final CreateStatusPageRequestDataAttributesVisualizationType + BARS_AND_UPTIME_PERCENTAGE = + new CreateStatusPageRequestDataAttributesVisualizationType("bars_and_uptime_percentage"); + public static final CreateStatusPageRequestDataAttributesVisualizationType BARS_ONLY = + new CreateStatusPageRequestDataAttributesVisualizationType("bars_only"); + public static final CreateStatusPageRequestDataAttributesVisualizationType COMPONENT_NAME_ONLY = + new CreateStatusPageRequestDataAttributesVisualizationType("component_name_only"); + + CreateStatusPageRequestDataAttributesVisualizationType(String value) { + super(value, allowedValues); + } + + public static class CreateStatusPageRequestDataAttributesVisualizationTypeSerializer + extends StdSerializer { + public CreateStatusPageRequestDataAttributesVisualizationTypeSerializer( + Class t) { + super(t); + } + + public CreateStatusPageRequestDataAttributesVisualizationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CreateStatusPageRequestDataAttributesVisualizationType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CreateStatusPageRequestDataAttributesVisualizationType fromValue(String value) { + return new CreateStatusPageRequestDataAttributesVisualizationType(value); + } +} 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 new file mode 100644 index 00000000000..eb8d1663f58 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/Degradation.java @@ -0,0 +1,176 @@ +/* + * 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({Degradation.JSON_PROPERTY_DATA, Degradation.JSON_PROPERTY_INCLUDED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class Degradation { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DegradationData data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public Degradation data(DegradationData 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 DegradationData getData() { + return data; + } + + public void setData(DegradationData data) { + this.data = data; + } + + public Degradation included(List included) { + this.included = included; + for (DegradationArrayIncluded item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public Degradation addIncludedItem(DegradationArrayIncluded includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Getincluded + * + * @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 Degradation + */ + @JsonAnySetter + public Degradation 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 Degradation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Degradation degradation = (Degradation) o; + return Objects.equals(this.data, degradation.data) + && Objects.equals(this.included, degradation.included) + && Objects.equals(this.additionalProperties, degradation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Degradation {\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/DegradationArray.java b/src/main/java/com/datadog/api/client/v2/model/DegradationArray.java new file mode 100644 index 00000000000..9f13f26aebc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationArray.java @@ -0,0 +1,192 @@ +/* + * 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({DegradationArray.JSON_PROPERTY_DATA, DegradationArray.JSON_PROPERTY_INCLUDED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationArray { + @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 DegradationArray() {} + + @JsonCreator + public DegradationArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public DegradationArray data(List data) { + this.data = data; + for (DegradationData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DegradationArray addDataItem(DegradationData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public DegradationArray included(List included) { + this.included = included; + for (DegradationArrayIncluded item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DegradationArray addIncludedItem(DegradationArrayIncluded includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Getincluded + * + * @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 DegradationArray + */ + @JsonAnySetter + public DegradationArray 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 DegradationArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationArray degradationArray = (DegradationArray) o; + return Objects.equals(this.data, degradationArray.data) + && Objects.equals(this.included, degradationArray.included) + && Objects.equals(this.additionalProperties, degradationArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationArray {\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/DegradationArrayIncluded.java b/src/main/java/com/datadog/api/client/v2/model/DegradationArrayIncluded.java new file mode 100644 index 00000000000..ba9d26e414c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationArrayIncluded.java @@ -0,0 +1,279 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = DegradationArrayIncluded.DegradationArrayIncludedDeserializer.class) +@JsonSerialize(using = DegradationArrayIncluded.DegradationArrayIncludedSerializer.class) +public class DegradationArrayIncluded extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(DegradationArrayIncluded.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class DegradationArrayIncludedSerializer + extends StdSerializer { + public DegradationArrayIncludedSerializer(Class t) { + super(t); + } + + public DegradationArrayIncludedSerializer() { + this(null); + } + + @Override + public void serialize( + DegradationArrayIncluded value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class DegradationArrayIncludedDeserializer + extends StdDeserializer { + public DegradationArrayIncludedDeserializer() { + this(DegradationArrayIncluded.class); + } + + public DegradationArrayIncludedDeserializer(Class vc) { + super(vc); + } + + @Override + public DegradationArrayIncluded deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize StatusPagesUser + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (StatusPagesUser.class.equals(Integer.class) + || StatusPagesUser.class.equals(Long.class) + || StatusPagesUser.class.equals(Float.class) + || StatusPagesUser.class.equals(Double.class) + || StatusPagesUser.class.equals(Boolean.class) + || StatusPagesUser.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((StatusPagesUser.class.equals(Integer.class) + || StatusPagesUser.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((StatusPagesUser.class.equals(Float.class) + || StatusPagesUser.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (StatusPagesUser.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (StatusPagesUser.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(StatusPagesUser.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((StatusPagesUser) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'StatusPagesUser'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'StatusPagesUser'", e); + } + + // deserialize StatusPageAsIncluded + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (StatusPageAsIncluded.class.equals(Integer.class) + || StatusPageAsIncluded.class.equals(Long.class) + || StatusPageAsIncluded.class.equals(Float.class) + || StatusPageAsIncluded.class.equals(Double.class) + || StatusPageAsIncluded.class.equals(Boolean.class) + || StatusPageAsIncluded.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((StatusPageAsIncluded.class.equals(Integer.class) + || StatusPageAsIncluded.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((StatusPageAsIncluded.class.equals(Float.class) + || StatusPageAsIncluded.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (StatusPageAsIncluded.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (StatusPageAsIncluded.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(StatusPageAsIncluded.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((StatusPageAsIncluded) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'StatusPageAsIncluded'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'StatusPageAsIncluded'", e); + } + + DegradationArrayIncluded ret = new DegradationArrayIncluded(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public DegradationArrayIncluded getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "DegradationArrayIncluded cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public DegradationArrayIncluded() { + super("oneOf", Boolean.FALSE); + } + + public DegradationArrayIncluded(StatusPagesUser o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DegradationArrayIncluded(StatusPageAsIncluded o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("StatusPagesUser", new GenericType() {}); + schemas.put("StatusPageAsIncluded", new GenericType() {}); + JSON.registerDescendants(DegradationArrayIncluded.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return DegradationArrayIncluded.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: StatusPagesUser, StatusPageAsIncluded + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(StatusPagesUser.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(StatusPageAsIncluded.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be StatusPagesUser, StatusPageAsIncluded"); + } + + /** + * Get the actual instance, which can be the following: StatusPagesUser, StatusPageAsIncluded + * + * @return The actual instance (StatusPagesUser, StatusPageAsIncluded) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `StatusPagesUser`. If the actual instance is not `StatusPagesUser`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `StatusPagesUser` + * @throws ClassCastException if the instance is not `StatusPagesUser` + */ + public StatusPagesUser getStatusPagesUser() throws ClassCastException { + return (StatusPagesUser) super.getActualInstance(); + } + + /** + * Get the actual instance of `StatusPageAsIncluded`. If the actual instance is not + * `StatusPageAsIncluded`, the ClassCastException will be thrown. + * + * @return The actual instance of `StatusPageAsIncluded` + * @throws ClassCastException if the instance is not `StatusPageAsIncluded` + */ + public StatusPageAsIncluded getStatusPageAsIncluded() throws ClassCastException { + return (StatusPageAsIncluded) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DegradationData.java b/src/main/java/com/datadog/api/client/v2/model/DegradationData.java new file mode 100644 index 00000000000..3021c04bf62 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationData.java @@ -0,0 +1,234 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DegradationData.JSON_PROPERTY_ATTRIBUTES, + DegradationData.JSON_PROPERTY_ID, + DegradationData.JSON_PROPERTY_RELATIONSHIPS, + DegradationData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DegradationDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private DegradationDataRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private PatchDegradationRequestDataType type = PatchDegradationRequestDataType.DEGRADATIONS; + + public DegradationData() {} + + @JsonCreator + public DegradationData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + PatchDegradationRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DegradationData attributes(DegradationDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DegradationDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DegradationDataAttributes attributes) { + this.attributes = attributes; + } + + public DegradationData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DegradationData relationships(DegradationDataRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Getrelationships + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DegradationDataRelationships getRelationships() { + return relationships; + } + + public void setRelationships(DegradationDataRelationships relationships) { + this.relationships = relationships; + } + + public DegradationData type(PatchDegradationRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Degradations resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PatchDegradationRequestDataType getType() { + return type; + } + + public void setType(PatchDegradationRequestDataType 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 DegradationData + */ + @JsonAnySetter + public DegradationData 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 DegradationData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationData degradationData = (DegradationData) o; + return Objects.equals(this.attributes, degradationData.attributes) + && Objects.equals(this.id, degradationData.id) + && Objects.equals(this.relationships, degradationData.relationships) + && Objects.equals(this.type, degradationData.type) + && Objects.equals(this.additionalProperties, degradationData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributes.java new file mode 100644 index 00000000000..970fc8810a7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributes.java @@ -0,0 +1,343 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DegradationDataAttributes.JSON_PROPERTY_COMPONENTS_AFFECTED, + DegradationDataAttributes.JSON_PROPERTY_CREATED_AT, + DegradationDataAttributes.JSON_PROPERTY_DESCRIPTION, + DegradationDataAttributes.JSON_PROPERTY_MODIFIED_AT, + DegradationDataAttributes.JSON_PROPERTY_STATUS, + DegradationDataAttributes.JSON_PROPERTY_TITLE, + DegradationDataAttributes.JSON_PROPERTY_UPDATES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS_AFFECTED = "components_affected"; + private List componentsAffected = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_STATUS = "status"; + private CreateDegradationRequestDataAttributesStatus status; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_UPDATES = "updates"; + private List updates = null; + + public DegradationDataAttributes componentsAffected( + List componentsAffected) { + this.componentsAffected = componentsAffected; + for (DegradationDataAttributesComponentsAffectedItems item : componentsAffected) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DegradationDataAttributes addComponentsAffectedItem( + DegradationDataAttributesComponentsAffectedItems componentsAffectedItem) { + if (this.componentsAffected == null) { + this.componentsAffected = new ArrayList<>(); + } + this.componentsAffected.add(componentsAffectedItem); + this.unparsed |= componentsAffectedItem.unparsed; + return this; + } + + /** + * GetcomponentsAffected + * + * @return componentsAffected + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS_AFFECTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponentsAffected() { + return componentsAffected; + } + + public void setComponentsAffected( + List componentsAffected) { + this.componentsAffected = componentsAffected; + } + + public DegradationDataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * GetcreatedAt + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public DegradationDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public DegradationDataAttributes modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * GetmodifiedAt + * + * @return modifiedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public DegradationDataAttributes status(CreateDegradationRequestDataAttributesStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateDegradationRequestDataAttributesStatus getStatus() { + return status; + } + + public void setStatus(CreateDegradationRequestDataAttributesStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public DegradationDataAttributes title(String title) { + this.title = title; + return this; + } + + /** + * Gettitle + * + * @return title + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public DegradationDataAttributes updates(List updates) { + this.updates = updates; + for (DegradationDataAttributesUpdatesItems item : updates) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DegradationDataAttributes addUpdatesItem( + DegradationDataAttributesUpdatesItems updatesItem) { + if (this.updates == null) { + this.updates = new ArrayList<>(); + } + this.updates.add(updatesItem); + this.unparsed |= updatesItem.unparsed; + return this; + } + + /** + * Getupdates + * + * @return updates + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getUpdates() { + return updates; + } + + public void setUpdates(List updates) { + this.updates = updates; + } + + /** + * 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 DegradationDataAttributes + */ + @JsonAnySetter + public DegradationDataAttributes 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 DegradationDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataAttributes degradationDataAttributes = (DegradationDataAttributes) o; + return Objects.equals(this.componentsAffected, degradationDataAttributes.componentsAffected) + && Objects.equals(this.createdAt, degradationDataAttributes.createdAt) + && Objects.equals(this.description, degradationDataAttributes.description) + && Objects.equals(this.modifiedAt, degradationDataAttributes.modifiedAt) + && Objects.equals(this.status, degradationDataAttributes.status) + && Objects.equals(this.title, degradationDataAttributes.title) + && Objects.equals(this.updates, degradationDataAttributes.updates) + && Objects.equals( + this.additionalProperties, degradationDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + componentsAffected, + createdAt, + description, + modifiedAt, + status, + title, + updates, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataAttributes {\n"); + sb.append(" componentsAffected: ").append(toIndentedString(componentsAffected)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" updates: ").append(toIndentedString(updates)).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/DegradationDataAttributesComponentsAffectedItems.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributesComponentsAffectedItems.java new file mode 100644 index 00000000000..b7837b5059f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributesComponentsAffectedItems.java @@ -0,0 +1,203 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DegradationDataAttributesComponentsAffectedItems.JSON_PROPERTY_ID, + DegradationDataAttributesComponentsAffectedItems.JSON_PROPERTY_NAME, + DegradationDataAttributesComponentsAffectedItems.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataAttributesComponentsAffectedItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentDataAttributesStatus status; + + public DegradationDataAttributesComponentsAffectedItems() {} + + @JsonCreator + public DegradationDataAttributesComponentsAffectedItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + StatusPagesComponentDataAttributesStatus status) { + this.id = id; + this.status = status; + this.unparsed |= !status.isValid(); + } + + public DegradationDataAttributesComponentsAffectedItems id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public DegradationDataAttributesComponentsAffectedItems status( + StatusPagesComponentDataAttributesStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Getstatus + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentDataAttributesStatus getStatus() { + return status; + } + + public void setStatus(StatusPagesComponentDataAttributesStatus 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 DegradationDataAttributesComponentsAffectedItems + */ + @JsonAnySetter + public DegradationDataAttributesComponentsAffectedItems 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 DegradationDataAttributesComponentsAffectedItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataAttributesComponentsAffectedItems + degradationDataAttributesComponentsAffectedItems = + (DegradationDataAttributesComponentsAffectedItems) o; + return Objects.equals(this.id, degradationDataAttributesComponentsAffectedItems.id) + && Objects.equals(this.name, degradationDataAttributesComponentsAffectedItems.name) + && Objects.equals(this.status, degradationDataAttributesComponentsAffectedItems.status) + && Objects.equals( + this.additionalProperties, + degradationDataAttributesComponentsAffectedItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataAttributesComponentsAffectedItems {\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/DegradationDataAttributesUpdatesItems.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributesUpdatesItems.java new file mode 100644 index 00000000000..134d7e625d3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributesUpdatesItems.java @@ -0,0 +1,308 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** */ +@JsonPropertyOrder({ + DegradationDataAttributesUpdatesItems.JSON_PROPERTY_COMPONENTS_AFFECTED, + DegradationDataAttributesUpdatesItems.JSON_PROPERTY_CREATED_AT, + DegradationDataAttributesUpdatesItems.JSON_PROPERTY_DESCRIPTION, + DegradationDataAttributesUpdatesItems.JSON_PROPERTY_ID, + DegradationDataAttributesUpdatesItems.JSON_PROPERTY_MODIFIED_AT, + DegradationDataAttributesUpdatesItems.JSON_PROPERTY_STARTED_AT, + DegradationDataAttributesUpdatesItems.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataAttributesUpdatesItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS_AFFECTED = "components_affected"; + private List componentsAffected = + null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private OffsetDateTime startedAt; + + public static final String JSON_PROPERTY_STATUS = "status"; + private CreateDegradationRequestDataAttributesStatus status; + + public DegradationDataAttributesUpdatesItems componentsAffected( + List componentsAffected) { + this.componentsAffected = componentsAffected; + for (DegradationDataAttributesUpdatesItemsComponentsAffectedItems item : componentsAffected) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DegradationDataAttributesUpdatesItems addComponentsAffectedItem( + DegradationDataAttributesUpdatesItemsComponentsAffectedItems componentsAffectedItem) { + if (this.componentsAffected == null) { + this.componentsAffected = new ArrayList<>(); + } + this.componentsAffected.add(componentsAffectedItem); + this.unparsed |= componentsAffectedItem.unparsed; + return this; + } + + /** + * GetcomponentsAffected + * + * @return componentsAffected + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS_AFFECTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List + getComponentsAffected() { + return componentsAffected; + } + + public void setComponentsAffected( + List componentsAffected) { + this.componentsAffected = componentsAffected; + } + + /** + * GetcreatedAt + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public DegradationDataAttributesUpdatesItems description(String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * GetmodifiedAt + * + * @return modifiedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public DegradationDataAttributesUpdatesItems startedAt(OffsetDateTime startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * GetstartedAt + * + * @return startedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getStartedAt() { + return startedAt; + } + + public void setStartedAt(OffsetDateTime startedAt) { + this.startedAt = startedAt; + } + + public DegradationDataAttributesUpdatesItems status( + CreateDegradationRequestDataAttributesStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateDegradationRequestDataAttributesStatus getStatus() { + return status; + } + + public void setStatus(CreateDegradationRequestDataAttributesStatus 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 DegradationDataAttributesUpdatesItems + */ + @JsonAnySetter + public DegradationDataAttributesUpdatesItems 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 DegradationDataAttributesUpdatesItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataAttributesUpdatesItems degradationDataAttributesUpdatesItems = + (DegradationDataAttributesUpdatesItems) o; + return Objects.equals( + this.componentsAffected, degradationDataAttributesUpdatesItems.componentsAffected) + && Objects.equals(this.createdAt, degradationDataAttributesUpdatesItems.createdAt) + && Objects.equals(this.description, degradationDataAttributesUpdatesItems.description) + && Objects.equals(this.id, degradationDataAttributesUpdatesItems.id) + && Objects.equals(this.modifiedAt, degradationDataAttributesUpdatesItems.modifiedAt) + && Objects.equals(this.startedAt, degradationDataAttributesUpdatesItems.startedAt) + && Objects.equals(this.status, degradationDataAttributesUpdatesItems.status) + && Objects.equals( + this.additionalProperties, degradationDataAttributesUpdatesItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + componentsAffected, + createdAt, + description, + id, + modifiedAt, + startedAt, + status, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataAttributesUpdatesItems {\n"); + sb.append(" componentsAffected: ").append(toIndentedString(componentsAffected)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).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/DegradationDataAttributesUpdatesItemsComponentsAffectedItems.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributesUpdatesItemsComponentsAffectedItems.java new file mode 100644 index 00000000000..0e33c21357c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataAttributesUpdatesItemsComponentsAffectedItems.java @@ -0,0 +1,208 @@ +/* + * 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({ + DegradationDataAttributesUpdatesItemsComponentsAffectedItems.JSON_PROPERTY_ID, + DegradationDataAttributesUpdatesItemsComponentsAffectedItems.JSON_PROPERTY_NAME, + DegradationDataAttributesUpdatesItemsComponentsAffectedItems.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataAttributesUpdatesItemsComponentsAffectedItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentDataAttributesStatus status; + + public DegradationDataAttributesUpdatesItemsComponentsAffectedItems() {} + + @JsonCreator + public DegradationDataAttributesUpdatesItemsComponentsAffectedItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + StatusPagesComponentDataAttributesStatus status) { + this.id = id; + this.status = status; + this.unparsed |= !status.isValid(); + } + + public DegradationDataAttributesUpdatesItemsComponentsAffectedItems id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public DegradationDataAttributesUpdatesItemsComponentsAffectedItems status( + StatusPagesComponentDataAttributesStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Getstatus + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentDataAttributesStatus getStatus() { + return status; + } + + public void setStatus(StatusPagesComponentDataAttributesStatus 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 DegradationDataAttributesUpdatesItemsComponentsAffectedItems + */ + @JsonAnySetter + public DegradationDataAttributesUpdatesItemsComponentsAffectedItems 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 DegradationDataAttributesUpdatesItemsComponentsAffectedItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataAttributesUpdatesItemsComponentsAffectedItems + degradationDataAttributesUpdatesItemsComponentsAffectedItems = + (DegradationDataAttributesUpdatesItemsComponentsAffectedItems) o; + return Objects.equals(this.id, degradationDataAttributesUpdatesItemsComponentsAffectedItems.id) + && Objects.equals( + this.name, degradationDataAttributesUpdatesItemsComponentsAffectedItems.name) + && Objects.equals( + this.status, degradationDataAttributesUpdatesItemsComponentsAffectedItems.status) + && Objects.equals( + this.additionalProperties, + degradationDataAttributesUpdatesItemsComponentsAffectedItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataAttributesUpdatesItemsComponentsAffectedItems {\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/DegradationDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationships.java new file mode 100644 index 00000000000..66dc52b6340 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationships.java @@ -0,0 +1,199 @@ +/* + * 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({ + DegradationDataRelationships.JSON_PROPERTY_CREATED_BY_USER, + DegradationDataRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER, + DegradationDataRelationships.JSON_PROPERTY_STATUS_PAGE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private DegradationDataRelationshipsCreatedByUser createdByUser; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private DegradationDataRelationshipsLastModifiedByUser lastModifiedByUser; + + public static final String JSON_PROPERTY_STATUS_PAGE = "status_page"; + private DegradationDataRelationshipsStatusPage statusPage; + + public DegradationDataRelationships createdByUser( + DegradationDataRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * GetcreatedByUser + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DegradationDataRelationshipsCreatedByUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(DegradationDataRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + } + + public DegradationDataRelationships lastModifiedByUser( + DegradationDataRelationshipsLastModifiedByUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * GetlastModifiedByUser + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DegradationDataRelationshipsLastModifiedByUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser( + DegradationDataRelationshipsLastModifiedByUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + public DegradationDataRelationships statusPage( + DegradationDataRelationshipsStatusPage statusPage) { + this.statusPage = statusPage; + this.unparsed |= statusPage.unparsed; + return this; + } + + /** + * GetstatusPage + * + * @return statusPage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DegradationDataRelationshipsStatusPage getStatusPage() { + return statusPage; + } + + public void setStatusPage(DegradationDataRelationshipsStatusPage statusPage) { + this.statusPage = statusPage; + } + + /** + * 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 DegradationDataRelationships + */ + @JsonAnySetter + public DegradationDataRelationships 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 DegradationDataRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataRelationships degradationDataRelationships = (DegradationDataRelationships) o; + return Objects.equals(this.createdByUser, degradationDataRelationships.createdByUser) + && Objects.equals(this.lastModifiedByUser, degradationDataRelationships.lastModifiedByUser) + && Objects.equals(this.statusPage, degradationDataRelationships.statusPage) + && Objects.equals( + this.additionalProperties, degradationDataRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, lastModifiedByUser, statusPage, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).append("\n"); + sb.append(" statusPage: ").append(toIndentedString(statusPage)).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/DegradationDataRelationshipsCreatedByUser.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsCreatedByUser.java new file mode 100644 index 00000000000..221441a4d4f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsCreatedByUser.java @@ -0,0 +1,150 @@ +/* + * 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({DegradationDataRelationshipsCreatedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataRelationshipsCreatedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DegradationDataRelationshipsCreatedByUserData data; + + public DegradationDataRelationshipsCreatedByUser() {} + + @JsonCreator + public DegradationDataRelationshipsCreatedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + DegradationDataRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DegradationDataRelationshipsCreatedByUser data( + DegradationDataRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DegradationDataRelationshipsCreatedByUserData getData() { + return data; + } + + public void setData(DegradationDataRelationshipsCreatedByUserData 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 DegradationDataRelationshipsCreatedByUser + */ + @JsonAnySetter + public DegradationDataRelationshipsCreatedByUser 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 DegradationDataRelationshipsCreatedByUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataRelationshipsCreatedByUser degradationDataRelationshipsCreatedByUser = + (DegradationDataRelationshipsCreatedByUser) o; + return Objects.equals(this.data, degradationDataRelationshipsCreatedByUser.data) + && Objects.equals( + this.additionalProperties, + degradationDataRelationshipsCreatedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataRelationshipsCreatedByUser {\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/DegradationDataRelationshipsCreatedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsCreatedByUserData.java new file mode 100644 index 00000000000..941cc6cdfff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsCreatedByUserData.java @@ -0,0 +1,182 @@ +/* + * 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({ + DegradationDataRelationshipsCreatedByUserData.JSON_PROPERTY_ID, + DegradationDataRelationshipsCreatedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataRelationshipsCreatedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public DegradationDataRelationshipsCreatedByUserData() {} + + @JsonCreator + public DegradationDataRelationshipsCreatedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DegradationDataRelationshipsCreatedByUserData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DegradationDataRelationshipsCreatedByUserData type(StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 DegradationDataRelationshipsCreatedByUserData + */ + @JsonAnySetter + public DegradationDataRelationshipsCreatedByUserData 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 DegradationDataRelationshipsCreatedByUserData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataRelationshipsCreatedByUserData degradationDataRelationshipsCreatedByUserData = + (DegradationDataRelationshipsCreatedByUserData) o; + return Objects.equals(this.id, degradationDataRelationshipsCreatedByUserData.id) + && Objects.equals(this.type, degradationDataRelationshipsCreatedByUserData.type) + && Objects.equals( + this.additionalProperties, + degradationDataRelationshipsCreatedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataRelationshipsCreatedByUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsLastModifiedByUser.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsLastModifiedByUser.java new file mode 100644 index 00000000000..e4513a83401 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsLastModifiedByUser.java @@ -0,0 +1,151 @@ +/* + * 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({DegradationDataRelationshipsLastModifiedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataRelationshipsLastModifiedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DegradationDataRelationshipsLastModifiedByUserData data; + + public DegradationDataRelationshipsLastModifiedByUser() {} + + @JsonCreator + public DegradationDataRelationshipsLastModifiedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + DegradationDataRelationshipsLastModifiedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DegradationDataRelationshipsLastModifiedByUser data( + DegradationDataRelationshipsLastModifiedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DegradationDataRelationshipsLastModifiedByUserData getData() { + return data; + } + + public void setData(DegradationDataRelationshipsLastModifiedByUserData 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 DegradationDataRelationshipsLastModifiedByUser + */ + @JsonAnySetter + public DegradationDataRelationshipsLastModifiedByUser 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 DegradationDataRelationshipsLastModifiedByUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataRelationshipsLastModifiedByUser degradationDataRelationshipsLastModifiedByUser = + (DegradationDataRelationshipsLastModifiedByUser) o; + return Objects.equals(this.data, degradationDataRelationshipsLastModifiedByUser.data) + && Objects.equals( + this.additionalProperties, + degradationDataRelationshipsLastModifiedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataRelationshipsLastModifiedByUser {\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/DegradationDataRelationshipsLastModifiedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsLastModifiedByUserData.java new file mode 100644 index 00000000000..196b118080b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsLastModifiedByUserData.java @@ -0,0 +1,185 @@ +/* + * 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({ + DegradationDataRelationshipsLastModifiedByUserData.JSON_PROPERTY_ID, + DegradationDataRelationshipsLastModifiedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataRelationshipsLastModifiedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public DegradationDataRelationshipsLastModifiedByUserData() {} + + @JsonCreator + public DegradationDataRelationshipsLastModifiedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DegradationDataRelationshipsLastModifiedByUserData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DegradationDataRelationshipsLastModifiedByUserData type(StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 DegradationDataRelationshipsLastModifiedByUserData + */ + @JsonAnySetter + public DegradationDataRelationshipsLastModifiedByUserData 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 DegradationDataRelationshipsLastModifiedByUserData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataRelationshipsLastModifiedByUserData + degradationDataRelationshipsLastModifiedByUserData = + (DegradationDataRelationshipsLastModifiedByUserData) o; + return Objects.equals(this.id, degradationDataRelationshipsLastModifiedByUserData.id) + && Objects.equals(this.type, degradationDataRelationshipsLastModifiedByUserData.type) + && Objects.equals( + this.additionalProperties, + degradationDataRelationshipsLastModifiedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataRelationshipsLastModifiedByUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsStatusPage.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsStatusPage.java new file mode 100644 index 00000000000..e97f94d6506 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsStatusPage.java @@ -0,0 +1,149 @@ +/* + * 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({DegradationDataRelationshipsStatusPage.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataRelationshipsStatusPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DegradationDataRelationshipsStatusPageData data; + + public DegradationDataRelationshipsStatusPage() {} + + @JsonCreator + public DegradationDataRelationshipsStatusPage( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + DegradationDataRelationshipsStatusPageData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DegradationDataRelationshipsStatusPage data( + DegradationDataRelationshipsStatusPageData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DegradationDataRelationshipsStatusPageData getData() { + return data; + } + + public void setData(DegradationDataRelationshipsStatusPageData 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 DegradationDataRelationshipsStatusPage + */ + @JsonAnySetter + public DegradationDataRelationshipsStatusPage 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 DegradationDataRelationshipsStatusPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataRelationshipsStatusPage degradationDataRelationshipsStatusPage = + (DegradationDataRelationshipsStatusPage) o; + return Objects.equals(this.data, degradationDataRelationshipsStatusPage.data) + && Objects.equals( + this.additionalProperties, degradationDataRelationshipsStatusPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataRelationshipsStatusPage {\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/DegradationDataRelationshipsStatusPageData.java b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsStatusPageData.java new file mode 100644 index 00000000000..48a6b77a777 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DegradationDataRelationshipsStatusPageData.java @@ -0,0 +1,182 @@ +/* + * 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({ + DegradationDataRelationshipsStatusPageData.JSON_PROPERTY_ID, + DegradationDataRelationshipsStatusPageData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DegradationDataRelationshipsStatusPageData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPageDataType type = StatusPageDataType.STATUS_PAGES; + + public DegradationDataRelationshipsStatusPageData() {} + + @JsonCreator + public DegradationDataRelationshipsStatusPageData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPageDataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DegradationDataRelationshipsStatusPageData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DegradationDataRelationshipsStatusPageData type(StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Status pages resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageDataType getType() { + return type; + } + + public void setType(StatusPageDataType 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 DegradationDataRelationshipsStatusPageData + */ + @JsonAnySetter + public DegradationDataRelationshipsStatusPageData 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 DegradationDataRelationshipsStatusPageData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DegradationDataRelationshipsStatusPageData degradationDataRelationshipsStatusPageData = + (DegradationDataRelationshipsStatusPageData) o; + return Objects.equals(this.id, degradationDataRelationshipsStatusPageData.id) + && Objects.equals(this.type, degradationDataRelationshipsStatusPageData.type) + && Objects.equals( + this.additionalProperties, + degradationDataRelationshipsStatusPageData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DegradationDataRelationshipsStatusPageData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PatchComponentRequest.java b/src/main/java/com/datadog/api/client/v2/model/PatchComponentRequest.java new file mode 100644 index 00000000000..723d8726a1b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchComponentRequest.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({PatchComponentRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PatchComponentRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private PatchComponentRequestData data; + + public PatchComponentRequest data(PatchComponentRequestData 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 PatchComponentRequestData getData() { + return data; + } + + public void setData(PatchComponentRequestData 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 PatchComponentRequest + */ + @JsonAnySetter + public PatchComponentRequest 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 PatchComponentRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchComponentRequest patchComponentRequest = (PatchComponentRequest) o; + return Objects.equals(this.data, patchComponentRequest.data) + && Objects.equals(this.additionalProperties, patchComponentRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchComponentRequest {\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/PatchComponentRequestData.java b/src/main/java/com/datadog/api/client/v2/model/PatchComponentRequestData.java new file mode 100644 index 00000000000..90a5faf91d2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchComponentRequestData.java @@ -0,0 +1,207 @@ +/* + * 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({ + PatchComponentRequestData.JSON_PROPERTY_ATTRIBUTES, + PatchComponentRequestData.JSON_PROPERTY_ID, + PatchComponentRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PatchComponentRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchComponentRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupType type = StatusPagesComponentGroupType.COMPONENTS; + + public PatchComponentRequestData() {} + + @JsonCreator + public PatchComponentRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public PatchComponentRequestData attributes(PatchComponentRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PatchComponentRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(PatchComponentRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public PatchComponentRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PatchComponentRequestData type(StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Components resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupType 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 PatchComponentRequestData + */ + @JsonAnySetter + public PatchComponentRequestData 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 PatchComponentRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchComponentRequestData patchComponentRequestData = (PatchComponentRequestData) o; + return Objects.equals(this.attributes, patchComponentRequestData.attributes) + && Objects.equals(this.id, patchComponentRequestData.id) + && Objects.equals(this.type, patchComponentRequestData.type) + && Objects.equals( + this.additionalProperties, patchComponentRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchComponentRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PatchComponentRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PatchComponentRequestDataAttributes.java new file mode 100644 index 00000000000..679132c698b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchComponentRequestDataAttributes.java @@ -0,0 +1,166 @@ +/* + * 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({ + PatchComponentRequestDataAttributes.JSON_PROPERTY_NAME, + PatchComponentRequestDataAttributes.JSON_PROPERTY_POSITION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PatchComponentRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public PatchComponentRequestDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PatchComponentRequestDataAttributes position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + /** + * 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 PatchComponentRequestDataAttributes + */ + @JsonAnySetter + public PatchComponentRequestDataAttributes 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 PatchComponentRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchComponentRequestDataAttributes patchComponentRequestDataAttributes = + (PatchComponentRequestDataAttributes) o; + return Objects.equals(this.name, patchComponentRequestDataAttributes.name) + && Objects.equals(this.position, patchComponentRequestDataAttributes.position) + && Objects.equals( + this.additionalProperties, patchComponentRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, position, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchComponentRequestDataAttributes {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).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/PatchDegradationRequest.java b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequest.java new file mode 100644 index 00000000000..f1b3d0f8f43 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequest.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({PatchDegradationRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PatchDegradationRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private PatchDegradationRequestData data; + + public PatchDegradationRequest data(PatchDegradationRequestData 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 PatchDegradationRequestData getData() { + return data; + } + + public void setData(PatchDegradationRequestData 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 PatchDegradationRequest + */ + @JsonAnySetter + public PatchDegradationRequest 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 PatchDegradationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchDegradationRequest patchDegradationRequest = (PatchDegradationRequest) o; + return Objects.equals(this.data, patchDegradationRequest.data) + && Objects.equals(this.additionalProperties, patchDegradationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchDegradationRequest {\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/PatchDegradationRequestData.java b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestData.java new file mode 100644 index 00000000000..c4c2d7c8a5f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestData.java @@ -0,0 +1,207 @@ +/* + * 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({ + PatchDegradationRequestData.JSON_PROPERTY_ATTRIBUTES, + PatchDegradationRequestData.JSON_PROPERTY_ID, + PatchDegradationRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PatchDegradationRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchDegradationRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private PatchDegradationRequestDataType type = PatchDegradationRequestDataType.DEGRADATIONS; + + public PatchDegradationRequestData() {} + + @JsonCreator + public PatchDegradationRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + PatchDegradationRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public PatchDegradationRequestData attributes(PatchDegradationRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PatchDegradationRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(PatchDegradationRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public PatchDegradationRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PatchDegradationRequestData type(PatchDegradationRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Degradations resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PatchDegradationRequestDataType getType() { + return type; + } + + public void setType(PatchDegradationRequestDataType 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 PatchDegradationRequestData + */ + @JsonAnySetter + public PatchDegradationRequestData 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 PatchDegradationRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchDegradationRequestData patchDegradationRequestData = (PatchDegradationRequestData) o; + return Objects.equals(this.attributes, patchDegradationRequestData.attributes) + && Objects.equals(this.id, patchDegradationRequestData.id) + && Objects.equals(this.type, patchDegradationRequestData.type) + && Objects.equals( + this.additionalProperties, patchDegradationRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchDegradationRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestDataAttributes.java new file mode 100644 index 00000000000..24a9a30f7a3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestDataAttributes.java @@ -0,0 +1,245 @@ +/* + * 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({ + PatchDegradationRequestDataAttributes.JSON_PROPERTY_COMPONENTS_AFFECTED, + PatchDegradationRequestDataAttributes.JSON_PROPERTY_DESCRIPTION, + PatchDegradationRequestDataAttributes.JSON_PROPERTY_STATUS, + PatchDegradationRequestDataAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PatchDegradationRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS_AFFECTED = "components_affected"; + private List componentsAffected = + null; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_STATUS = "status"; + private PatchDegradationRequestDataAttributesStatus status; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public PatchDegradationRequestDataAttributes componentsAffected( + List componentsAffected) { + this.componentsAffected = componentsAffected; + for (PatchDegradationRequestDataAttributesComponentsAffectedItems item : componentsAffected) { + this.unparsed |= item.unparsed; + } + return this; + } + + public PatchDegradationRequestDataAttributes addComponentsAffectedItem( + PatchDegradationRequestDataAttributesComponentsAffectedItems componentsAffectedItem) { + if (this.componentsAffected == null) { + this.componentsAffected = new ArrayList<>(); + } + this.componentsAffected.add(componentsAffectedItem); + this.unparsed |= componentsAffectedItem.unparsed; + return this; + } + + /** + * GetcomponentsAffected + * + * @return componentsAffected + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS_AFFECTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List + getComponentsAffected() { + return componentsAffected; + } + + public void setComponentsAffected( + List componentsAffected) { + this.componentsAffected = componentsAffected; + } + + public PatchDegradationRequestDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public PatchDegradationRequestDataAttributes status( + PatchDegradationRequestDataAttributesStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PatchDegradationRequestDataAttributesStatus getStatus() { + return status; + } + + public void setStatus(PatchDegradationRequestDataAttributesStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public PatchDegradationRequestDataAttributes title(String title) { + this.title = title; + return this; + } + + /** + * Gettitle + * + * @return title + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + 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 PatchDegradationRequestDataAttributes + */ + @JsonAnySetter + public PatchDegradationRequestDataAttributes 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 PatchDegradationRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchDegradationRequestDataAttributes patchDegradationRequestDataAttributes = + (PatchDegradationRequestDataAttributes) o; + return Objects.equals( + this.componentsAffected, patchDegradationRequestDataAttributes.componentsAffected) + && Objects.equals(this.description, patchDegradationRequestDataAttributes.description) + && Objects.equals(this.status, patchDegradationRequestDataAttributes.status) + && Objects.equals(this.title, patchDegradationRequestDataAttributes.title) + && Objects.equals( + this.additionalProperties, patchDegradationRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(componentsAffected, description, status, title, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchDegradationRequestDataAttributes {\n"); + sb.append(" componentsAffected: ").append(toIndentedString(componentsAffected)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/PatchDegradationRequestDataAttributesComponentsAffectedItems.java b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestDataAttributesComponentsAffectedItems.java new file mode 100644 index 00000000000..f7b84ebd48c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestDataAttributesComponentsAffectedItems.java @@ -0,0 +1,208 @@ +/* + * 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({ + PatchDegradationRequestDataAttributesComponentsAffectedItems.JSON_PROPERTY_ID, + PatchDegradationRequestDataAttributesComponentsAffectedItems.JSON_PROPERTY_NAME, + PatchDegradationRequestDataAttributesComponentsAffectedItems.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PatchDegradationRequestDataAttributesComponentsAffectedItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentDataAttributesStatus status; + + public PatchDegradationRequestDataAttributesComponentsAffectedItems() {} + + @JsonCreator + public PatchDegradationRequestDataAttributesComponentsAffectedItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + StatusPagesComponentDataAttributesStatus status) { + this.id = id; + this.status = status; + this.unparsed |= !status.isValid(); + } + + public PatchDegradationRequestDataAttributesComponentsAffectedItems id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public PatchDegradationRequestDataAttributesComponentsAffectedItems status( + StatusPagesComponentDataAttributesStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Getstatus + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentDataAttributesStatus getStatus() { + return status; + } + + public void setStatus(StatusPagesComponentDataAttributesStatus 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 PatchDegradationRequestDataAttributesComponentsAffectedItems + */ + @JsonAnySetter + public PatchDegradationRequestDataAttributesComponentsAffectedItems 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 PatchDegradationRequestDataAttributesComponentsAffectedItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchDegradationRequestDataAttributesComponentsAffectedItems + patchDegradationRequestDataAttributesComponentsAffectedItems = + (PatchDegradationRequestDataAttributesComponentsAffectedItems) o; + return Objects.equals(this.id, patchDegradationRequestDataAttributesComponentsAffectedItems.id) + && Objects.equals( + this.name, patchDegradationRequestDataAttributesComponentsAffectedItems.name) + && Objects.equals( + this.status, patchDegradationRequestDataAttributesComponentsAffectedItems.status) + && Objects.equals( + this.additionalProperties, + patchDegradationRequestDataAttributesComponentsAffectedItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchDegradationRequestDataAttributesComponentsAffectedItems {\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/PatchDegradationRequestDataAttributesStatus.java b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestDataAttributesStatus.java new file mode 100644 index 00000000000..1bd64b02d06 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestDataAttributesStatus.java @@ -0,0 +1,69 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize( + using = + PatchDegradationRequestDataAttributesStatus + .PatchDegradationRequestDataAttributesStatusSerializer.class) +public class PatchDegradationRequestDataAttributesStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("investigating", "identified", "monitoring", "resolved")); + + public static final PatchDegradationRequestDataAttributesStatus INVESTIGATING = + new PatchDegradationRequestDataAttributesStatus("investigating"); + public static final PatchDegradationRequestDataAttributesStatus IDENTIFIED = + new PatchDegradationRequestDataAttributesStatus("identified"); + public static final PatchDegradationRequestDataAttributesStatus MONITORING = + new PatchDegradationRequestDataAttributesStatus("monitoring"); + public static final PatchDegradationRequestDataAttributesStatus RESOLVED = + new PatchDegradationRequestDataAttributesStatus("resolved"); + + PatchDegradationRequestDataAttributesStatus(String value) { + super(value, allowedValues); + } + + public static class PatchDegradationRequestDataAttributesStatusSerializer + extends StdSerializer { + public PatchDegradationRequestDataAttributesStatusSerializer( + Class t) { + super(t); + } + + public PatchDegradationRequestDataAttributesStatusSerializer() { + this(null); + } + + @Override + public void serialize( + PatchDegradationRequestDataAttributesStatus value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static PatchDegradationRequestDataAttributesStatus fromValue(String value) { + return new PatchDegradationRequestDataAttributesStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestDataType.java new file mode 100644 index 00000000000..a17bfb0c074 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchDegradationRequestDataType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Degradations resource type. */ +@JsonSerialize( + using = PatchDegradationRequestDataType.PatchDegradationRequestDataTypeSerializer.class) +public class PatchDegradationRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("degradations")); + + public static final PatchDegradationRequestDataType DEGRADATIONS = + new PatchDegradationRequestDataType("degradations"); + + PatchDegradationRequestDataType(String value) { + super(value, allowedValues); + } + + public static class PatchDegradationRequestDataTypeSerializer + extends StdSerializer { + public PatchDegradationRequestDataTypeSerializer(Class t) { + super(t); + } + + public PatchDegradationRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + PatchDegradationRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static PatchDegradationRequestDataType fromValue(String value) { + return new PatchDegradationRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequest.java b/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequest.java new file mode 100644 index 00000000000..d6515145ff2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequest.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({PatchStatusPageRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PatchStatusPageRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private PatchStatusPageRequestData data; + + public PatchStatusPageRequest data(PatchStatusPageRequestData 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 PatchStatusPageRequestData getData() { + return data; + } + + public void setData(PatchStatusPageRequestData 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 PatchStatusPageRequest + */ + @JsonAnySetter + public PatchStatusPageRequest 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 PatchStatusPageRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchStatusPageRequest patchStatusPageRequest = (PatchStatusPageRequest) o; + return Objects.equals(this.data, patchStatusPageRequest.data) + && Objects.equals(this.additionalProperties, patchStatusPageRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchStatusPageRequest {\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/PatchStatusPageRequestData.java b/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequestData.java new file mode 100644 index 00000000000..1b99a3b9060 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequestData.java @@ -0,0 +1,206 @@ +/* + * 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({ + PatchStatusPageRequestData.JSON_PROPERTY_ATTRIBUTES, + PatchStatusPageRequestData.JSON_PROPERTY_ID, + PatchStatusPageRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PatchStatusPageRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PatchStatusPageRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPageDataType type = StatusPageDataType.STATUS_PAGES; + + public PatchStatusPageRequestData() {} + + @JsonCreator + public PatchStatusPageRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public PatchStatusPageRequestData attributes(PatchStatusPageRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PatchStatusPageRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(PatchStatusPageRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public PatchStatusPageRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PatchStatusPageRequestData type(StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Status pages resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageDataType getType() { + return type; + } + + public void setType(StatusPageDataType 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 PatchStatusPageRequestData + */ + @JsonAnySetter + public PatchStatusPageRequestData 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 PatchStatusPageRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchStatusPageRequestData patchStatusPageRequestData = (PatchStatusPageRequestData) o; + return Objects.equals(this.attributes, patchStatusPageRequestData.attributes) + && Objects.equals(this.id, patchStatusPageRequestData.id) + && Objects.equals(this.type, patchStatusPageRequestData.type) + && Objects.equals( + this.additionalProperties, patchStatusPageRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchStatusPageRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequestDataAttributes.java new file mode 100644 index 00000000000..2b8d2a45776 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequestDataAttributes.java @@ -0,0 +1,380 @@ +/* + * 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({ + PatchStatusPageRequestDataAttributes.JSON_PROPERTY_COMPANY_LOGO, + PatchStatusPageRequestDataAttributes.JSON_PROPERTY_DOMAIN_PREFIX, + PatchStatusPageRequestDataAttributes.JSON_PROPERTY_EMAIL_HEADER_IMAGE, + PatchStatusPageRequestDataAttributes.JSON_PROPERTY_ENABLED, + PatchStatusPageRequestDataAttributes.JSON_PROPERTY_FAVICON, + PatchStatusPageRequestDataAttributes.JSON_PROPERTY_NAME, + PatchStatusPageRequestDataAttributes.JSON_PROPERTY_SUBSCRIPTIONS_ENABLED, + PatchStatusPageRequestDataAttributes.JSON_PROPERTY_TYPE, + PatchStatusPageRequestDataAttributes.JSON_PROPERTY_VISUALIZATION_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PatchStatusPageRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPANY_LOGO = "company_logo"; + private String companyLogo; + + public static final String JSON_PROPERTY_DOMAIN_PREFIX = "domain_prefix"; + private String domainPrefix; + + public static final String JSON_PROPERTY_EMAIL_HEADER_IMAGE = "email_header_image"; + private String emailHeaderImage; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_FAVICON = "favicon"; + private String favicon; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SUBSCRIPTIONS_ENABLED = "subscriptions_enabled"; + private Boolean subscriptionsEnabled; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateStatusPageRequestDataAttributesType type; + + public static final String JSON_PROPERTY_VISUALIZATION_TYPE = "visualization_type"; + private CreateStatusPageRequestDataAttributesVisualizationType visualizationType; + + public PatchStatusPageRequestDataAttributes companyLogo(String companyLogo) { + this.companyLogo = companyLogo; + return this; + } + + /** + * GetcompanyLogo + * + * @return companyLogo + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPANY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCompanyLogo() { + return companyLogo; + } + + public void setCompanyLogo(String companyLogo) { + this.companyLogo = companyLogo; + } + + public PatchStatusPageRequestDataAttributes domainPrefix(String domainPrefix) { + this.domainPrefix = domainPrefix; + return this; + } + + /** + * GetdomainPrefix + * + * @return domainPrefix + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomainPrefix() { + return domainPrefix; + } + + public void setDomainPrefix(String domainPrefix) { + this.domainPrefix = domainPrefix; + } + + public PatchStatusPageRequestDataAttributes emailHeaderImage(String emailHeaderImage) { + this.emailHeaderImage = emailHeaderImage; + return this; + } + + /** + * GetemailHeaderImage + * + * @return emailHeaderImage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL_HEADER_IMAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmailHeaderImage() { + return emailHeaderImage; + } + + public void setEmailHeaderImage(String emailHeaderImage) { + this.emailHeaderImage = emailHeaderImage; + } + + public PatchStatusPageRequestDataAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Getenabled + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public PatchStatusPageRequestDataAttributes favicon(String favicon) { + this.favicon = favicon; + return this; + } + + /** + * Getfavicon + * + * @return favicon + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAVICON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFavicon() { + return favicon; + } + + public void setFavicon(String favicon) { + this.favicon = favicon; + } + + public PatchStatusPageRequestDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PatchStatusPageRequestDataAttributes subscriptionsEnabled(Boolean subscriptionsEnabled) { + this.subscriptionsEnabled = subscriptionsEnabled; + return this; + } + + /** + * GetsubscriptionsEnabled + * + * @return subscriptionsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTIONS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSubscriptionsEnabled() { + return subscriptionsEnabled; + } + + public void setSubscriptionsEnabled(Boolean subscriptionsEnabled) { + this.subscriptionsEnabled = subscriptionsEnabled; + } + + public PatchStatusPageRequestDataAttributes type(CreateStatusPageRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateStatusPageRequestDataAttributesType getType() { + return type; + } + + public void setType(CreateStatusPageRequestDataAttributesType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + public PatchStatusPageRequestDataAttributes visualizationType( + CreateStatusPageRequestDataAttributesVisualizationType visualizationType) { + this.visualizationType = visualizationType; + this.unparsed |= !visualizationType.isValid(); + return this; + } + + /** + * GetvisualizationType + * + * @return visualizationType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VISUALIZATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateStatusPageRequestDataAttributesVisualizationType getVisualizationType() { + return visualizationType; + } + + public void setVisualizationType( + CreateStatusPageRequestDataAttributesVisualizationType visualizationType) { + if (!visualizationType.isValid()) { + this.unparsed = true; + } + this.visualizationType = visualizationType; + } + + /** + * 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 PatchStatusPageRequestDataAttributes + */ + @JsonAnySetter + public PatchStatusPageRequestDataAttributes 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 PatchStatusPageRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchStatusPageRequestDataAttributes patchStatusPageRequestDataAttributes = + (PatchStatusPageRequestDataAttributes) o; + return Objects.equals(this.companyLogo, patchStatusPageRequestDataAttributes.companyLogo) + && Objects.equals(this.domainPrefix, patchStatusPageRequestDataAttributes.domainPrefix) + && Objects.equals( + this.emailHeaderImage, patchStatusPageRequestDataAttributes.emailHeaderImage) + && Objects.equals(this.enabled, patchStatusPageRequestDataAttributes.enabled) + && Objects.equals(this.favicon, patchStatusPageRequestDataAttributes.favicon) + && Objects.equals(this.name, patchStatusPageRequestDataAttributes.name) + && Objects.equals( + this.subscriptionsEnabled, patchStatusPageRequestDataAttributes.subscriptionsEnabled) + && Objects.equals(this.type, patchStatusPageRequestDataAttributes.type) + && Objects.equals( + this.visualizationType, patchStatusPageRequestDataAttributes.visualizationType) + && Objects.equals( + this.additionalProperties, patchStatusPageRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + companyLogo, + domainPrefix, + emailHeaderImage, + enabled, + favicon, + name, + subscriptionsEnabled, + type, + visualizationType, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchStatusPageRequestDataAttributes {\n"); + sb.append(" companyLogo: ").append(toIndentedString(companyLogo)).append("\n"); + sb.append(" domainPrefix: ").append(toIndentedString(domainPrefix)).append("\n"); + sb.append(" emailHeaderImage: ").append(toIndentedString(emailHeaderImage)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" favicon: ").append(toIndentedString(favicon)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" subscriptionsEnabled: ") + .append(toIndentedString(subscriptionsEnabled)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" visualizationType: ").append(toIndentedString(visualizationType)).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/StatusPage.java b/src/main/java/com/datadog/api/client/v2/model/StatusPage.java new file mode 100644 index 00000000000..e6add481376 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPage.java @@ -0,0 +1,176 @@ +/* + * 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({StatusPage.JSON_PROPERTY_DATA, StatusPage.JSON_PROPERTY_INCLUDED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPageData data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public StatusPage data(StatusPageData 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 StatusPageData getData() { + return data; + } + + public void setData(StatusPageData data) { + this.data = data; + } + + public StatusPage included(List included) { + this.included = included; + for (StatusPageArrayIncluded item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPage addIncludedItem(StatusPageArrayIncluded includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Getincluded + * + * @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 StatusPage + */ + @JsonAnySetter + public StatusPage 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 StatusPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPage statusPage = (StatusPage) o; + return Objects.equals(this.data, statusPage.data) + && Objects.equals(this.included, statusPage.included) + && Objects.equals(this.additionalProperties, statusPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPage {\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/StatusPageArray.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageArray.java new file mode 100644 index 00000000000..af6c6014e13 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageArray.java @@ -0,0 +1,192 @@ +/* + * 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({StatusPageArray.JSON_PROPERTY_DATA, StatusPageArray.JSON_PROPERTY_INCLUDED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageArray { + @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 StatusPageArray() {} + + @JsonCreator + public StatusPageArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public StatusPageArray data(List data) { + this.data = data; + for (StatusPageData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPageArray addDataItem(StatusPageData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public StatusPageArray included(List included) { + this.included = included; + for (StatusPageArrayIncluded item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPageArray addIncludedItem(StatusPageArrayIncluded includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Getincluded + * + * @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 StatusPageArray + */ + @JsonAnySetter + public StatusPageArray 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 StatusPageArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageArray statusPageArray = (StatusPageArray) o; + return Objects.equals(this.data, statusPageArray.data) + && Objects.equals(this.included, statusPageArray.included) + && Objects.equals(this.additionalProperties, statusPageArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageArray {\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/StatusPageArrayIncluded.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageArrayIncluded.java new file mode 100644 index 00000000000..2938744873f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageArrayIncluded.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = StatusPageArrayIncluded.StatusPageArrayIncludedDeserializer.class) +@JsonSerialize(using = StatusPageArrayIncluded.StatusPageArrayIncludedSerializer.class) +public class StatusPageArrayIncluded extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(StatusPageArrayIncluded.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class StatusPageArrayIncludedSerializer + extends StdSerializer { + public StatusPageArrayIncludedSerializer(Class t) { + super(t); + } + + public StatusPageArrayIncludedSerializer() { + this(null); + } + + @Override + public void serialize( + StatusPageArrayIncluded value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class StatusPageArrayIncludedDeserializer + extends StdDeserializer { + public StatusPageArrayIncludedDeserializer() { + this(StatusPageArrayIncluded.class); + } + + public StatusPageArrayIncludedDeserializer(Class vc) { + super(vc); + } + + @Override + public StatusPageArrayIncluded deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize StatusPagesUser + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (StatusPagesUser.class.equals(Integer.class) + || StatusPagesUser.class.equals(Long.class) + || StatusPagesUser.class.equals(Float.class) + || StatusPagesUser.class.equals(Double.class) + || StatusPagesUser.class.equals(Boolean.class) + || StatusPagesUser.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((StatusPagesUser.class.equals(Integer.class) + || StatusPagesUser.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((StatusPagesUser.class.equals(Float.class) + || StatusPagesUser.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (StatusPagesUser.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (StatusPagesUser.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(StatusPagesUser.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((StatusPagesUser) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'StatusPagesUser'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'StatusPagesUser'", e); + } + + StatusPageArrayIncluded ret = new StatusPageArrayIncluded(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public StatusPageArrayIncluded getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "StatusPageArrayIncluded cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public StatusPageArrayIncluded() { + super("oneOf", Boolean.FALSE); + } + + public StatusPageArrayIncluded(StatusPagesUser o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("StatusPagesUser", new GenericType() {}); + JSON.registerDescendants(StatusPageArrayIncluded.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return StatusPageArrayIncluded.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: StatusPagesUser + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(StatusPagesUser.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be StatusPagesUser"); + } + + /** + * Get the actual instance, which can be the following: StatusPagesUser + * + * @return The actual instance (StatusPagesUser) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `StatusPagesUser`. If the actual instance is not `StatusPagesUser`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `StatusPagesUser` + * @throws ClassCastException if the instance is not `StatusPagesUser` + */ + public StatusPagesUser getStatusPagesUser() throws ClassCastException { + return (StatusPagesUser) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncluded.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncluded.java new file mode 100644 index 00000000000..16553373175 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncluded.java @@ -0,0 +1,233 @@ +/* + * 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({ + StatusPageAsIncluded.JSON_PROPERTY_ATTRIBUTES, + StatusPageAsIncluded.JSON_PROPERTY_ID, + StatusPageAsIncluded.JSON_PROPERTY_RELATIONSHIPS, + StatusPageAsIncluded.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageAsIncluded { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private StatusPageAsIncludedAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private StatusPageAsIncludedRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPageDataType type = StatusPageDataType.STATUS_PAGES; + + public StatusPageAsIncluded() {} + + @JsonCreator + public StatusPageAsIncluded( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPageAsIncluded attributes(StatusPageAsIncludedAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPageAsIncludedAttributes getAttributes() { + return attributes; + } + + public void setAttributes(StatusPageAsIncludedAttributes attributes) { + this.attributes = attributes; + } + + public StatusPageAsIncluded id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPageAsIncluded relationships(StatusPageAsIncludedRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Getrelationships + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPageAsIncludedRelationships getRelationships() { + return relationships; + } + + public void setRelationships(StatusPageAsIncludedRelationships relationships) { + this.relationships = relationships; + } + + public StatusPageAsIncluded type(StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Status pages resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageDataType getType() { + return type; + } + + public void setType(StatusPageDataType 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 StatusPageAsIncluded + */ + @JsonAnySetter + public StatusPageAsIncluded 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 StatusPageAsIncluded object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageAsIncluded statusPageAsIncluded = (StatusPageAsIncluded) o; + return Objects.equals(this.attributes, statusPageAsIncluded.attributes) + && Objects.equals(this.id, statusPageAsIncluded.id) + && Objects.equals(this.relationships, statusPageAsIncluded.relationships) + && Objects.equals(this.type, statusPageAsIncluded.type) + && Objects.equals(this.additionalProperties, statusPageAsIncluded.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageAsIncluded {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributes.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributes.java new file mode 100644 index 00000000000..455ba19bdf4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributes.java @@ -0,0 +1,566 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + StatusPageAsIncludedAttributes.JSON_PROPERTY_COMPANY_LOGO, + StatusPageAsIncludedAttributes.JSON_PROPERTY_COMPONENTS, + StatusPageAsIncludedAttributes.JSON_PROPERTY_CREATED_AT, + StatusPageAsIncludedAttributes.JSON_PROPERTY_CUSTOM_DOMAIN, + StatusPageAsIncludedAttributes.JSON_PROPERTY_CUSTOM_DOMAIN_ENABLED, + StatusPageAsIncludedAttributes.JSON_PROPERTY_DOMAIN_PREFIX, + StatusPageAsIncludedAttributes.JSON_PROPERTY_EMAIL_HEADER_IMAGE, + StatusPageAsIncludedAttributes.JSON_PROPERTY_ENABLED, + StatusPageAsIncludedAttributes.JSON_PROPERTY_FAVICON, + StatusPageAsIncludedAttributes.JSON_PROPERTY_MODIFIED_AT, + StatusPageAsIncludedAttributes.JSON_PROPERTY_NAME, + StatusPageAsIncludedAttributes.JSON_PROPERTY_PAGE_URL, + StatusPageAsIncludedAttributes.JSON_PROPERTY_SUBSCRIPTIONS_ENABLED, + StatusPageAsIncludedAttributes.JSON_PROPERTY_TYPE, + StatusPageAsIncludedAttributes.JSON_PROPERTY_VISUALIZATION_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageAsIncludedAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPANY_LOGO = "company_logo"; + private String companyLogo; + + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CUSTOM_DOMAIN = "custom_domain"; + private String customDomain; + + public static final String JSON_PROPERTY_CUSTOM_DOMAIN_ENABLED = "custom_domain_enabled"; + private Boolean customDomainEnabled; + + public static final String JSON_PROPERTY_DOMAIN_PREFIX = "domain_prefix"; + private String domainPrefix; + + public static final String JSON_PROPERTY_EMAIL_HEADER_IMAGE = "email_header_image"; + private String emailHeaderImage; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_FAVICON = "favicon"; + private String favicon; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PAGE_URL = "page_url"; + private String pageUrl; + + public static final String JSON_PROPERTY_SUBSCRIPTIONS_ENABLED = "subscriptions_enabled"; + private Boolean subscriptionsEnabled; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateStatusPageRequestDataAttributesType type; + + public static final String JSON_PROPERTY_VISUALIZATION_TYPE = "visualization_type"; + private CreateStatusPageRequestDataAttributesVisualizationType visualizationType; + + public StatusPageAsIncludedAttributes companyLogo(String companyLogo) { + this.companyLogo = companyLogo; + return this; + } + + /** + * GetcompanyLogo + * + * @return companyLogo + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPANY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCompanyLogo() { + return companyLogo; + } + + public void setCompanyLogo(String companyLogo) { + this.companyLogo = companyLogo; + } + + public StatusPageAsIncludedAttributes components( + List components) { + this.components = components; + for (StatusPageAsIncludedAttributesComponentsItems item : components) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPageAsIncludedAttributes addComponentsItem( + StatusPageAsIncludedAttributesComponentsItems componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + this.unparsed |= componentsItem.unparsed; + return this; + } + + /** + * Getcomponents + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + public void setComponents(List components) { + this.components = components; + } + + public StatusPageAsIncludedAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * GetcreatedAt + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public StatusPageAsIncludedAttributes customDomain(String customDomain) { + this.customDomain = customDomain; + return this; + } + + /** + * GetcustomDomain + * + * @return customDomain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_DOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomDomain() { + return customDomain; + } + + public void setCustomDomain(String customDomain) { + this.customDomain = customDomain; + } + + public StatusPageAsIncludedAttributes customDomainEnabled(Boolean customDomainEnabled) { + this.customDomainEnabled = customDomainEnabled; + return this; + } + + /** + * GetcustomDomainEnabled + * + * @return customDomainEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_DOMAIN_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCustomDomainEnabled() { + return customDomainEnabled; + } + + public void setCustomDomainEnabled(Boolean customDomainEnabled) { + this.customDomainEnabled = customDomainEnabled; + } + + public StatusPageAsIncludedAttributes domainPrefix(String domainPrefix) { + this.domainPrefix = domainPrefix; + return this; + } + + /** + * GetdomainPrefix + * + * @return domainPrefix + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomainPrefix() { + return domainPrefix; + } + + public void setDomainPrefix(String domainPrefix) { + this.domainPrefix = domainPrefix; + } + + public StatusPageAsIncludedAttributes emailHeaderImage(String emailHeaderImage) { + this.emailHeaderImage = emailHeaderImage; + return this; + } + + /** + * GetemailHeaderImage + * + * @return emailHeaderImage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL_HEADER_IMAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmailHeaderImage() { + return emailHeaderImage; + } + + public void setEmailHeaderImage(String emailHeaderImage) { + this.emailHeaderImage = emailHeaderImage; + } + + public StatusPageAsIncludedAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Getenabled + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public StatusPageAsIncludedAttributes favicon(String favicon) { + this.favicon = favicon; + return this; + } + + /** + * Getfavicon + * + * @return favicon + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAVICON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFavicon() { + return favicon; + } + + public void setFavicon(String favicon) { + this.favicon = favicon; + } + + public StatusPageAsIncludedAttributes modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * GetmodifiedAt + * + * @return modifiedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public StatusPageAsIncludedAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPageAsIncludedAttributes pageUrl(String pageUrl) { + this.pageUrl = pageUrl; + return this; + } + + /** + * GetpageUrl + * + * @return pageUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPageUrl() { + return pageUrl; + } + + public void setPageUrl(String pageUrl) { + this.pageUrl = pageUrl; + } + + public StatusPageAsIncludedAttributes subscriptionsEnabled(Boolean subscriptionsEnabled) { + this.subscriptionsEnabled = subscriptionsEnabled; + return this; + } + + /** + * GetsubscriptionsEnabled + * + * @return subscriptionsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTIONS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSubscriptionsEnabled() { + return subscriptionsEnabled; + } + + public void setSubscriptionsEnabled(Boolean subscriptionsEnabled) { + this.subscriptionsEnabled = subscriptionsEnabled; + } + + public StatusPageAsIncludedAttributes type(CreateStatusPageRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateStatusPageRequestDataAttributesType getType() { + return type; + } + + public void setType(CreateStatusPageRequestDataAttributesType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + public StatusPageAsIncludedAttributes visualizationType( + CreateStatusPageRequestDataAttributesVisualizationType visualizationType) { + this.visualizationType = visualizationType; + this.unparsed |= !visualizationType.isValid(); + return this; + } + + /** + * GetvisualizationType + * + * @return visualizationType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VISUALIZATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateStatusPageRequestDataAttributesVisualizationType getVisualizationType() { + return visualizationType; + } + + public void setVisualizationType( + CreateStatusPageRequestDataAttributesVisualizationType visualizationType) { + if (!visualizationType.isValid()) { + this.unparsed = true; + } + this.visualizationType = visualizationType; + } + + /** + * 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 StatusPageAsIncludedAttributes + */ + @JsonAnySetter + public StatusPageAsIncludedAttributes 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 StatusPageAsIncludedAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageAsIncludedAttributes statusPageAsIncludedAttributes = + (StatusPageAsIncludedAttributes) o; + return Objects.equals(this.companyLogo, statusPageAsIncludedAttributes.companyLogo) + && Objects.equals(this.components, statusPageAsIncludedAttributes.components) + && Objects.equals(this.createdAt, statusPageAsIncludedAttributes.createdAt) + && Objects.equals(this.customDomain, statusPageAsIncludedAttributes.customDomain) + && Objects.equals( + this.customDomainEnabled, statusPageAsIncludedAttributes.customDomainEnabled) + && Objects.equals(this.domainPrefix, statusPageAsIncludedAttributes.domainPrefix) + && Objects.equals(this.emailHeaderImage, statusPageAsIncludedAttributes.emailHeaderImage) + && Objects.equals(this.enabled, statusPageAsIncludedAttributes.enabled) + && Objects.equals(this.favicon, statusPageAsIncludedAttributes.favicon) + && Objects.equals(this.modifiedAt, statusPageAsIncludedAttributes.modifiedAt) + && Objects.equals(this.name, statusPageAsIncludedAttributes.name) + && Objects.equals(this.pageUrl, statusPageAsIncludedAttributes.pageUrl) + && Objects.equals( + this.subscriptionsEnabled, statusPageAsIncludedAttributes.subscriptionsEnabled) + && Objects.equals(this.type, statusPageAsIncludedAttributes.type) + && Objects.equals(this.visualizationType, statusPageAsIncludedAttributes.visualizationType) + && Objects.equals( + this.additionalProperties, statusPageAsIncludedAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + companyLogo, + components, + createdAt, + customDomain, + customDomainEnabled, + domainPrefix, + emailHeaderImage, + enabled, + favicon, + modifiedAt, + name, + pageUrl, + subscriptionsEnabled, + type, + visualizationType, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageAsIncludedAttributes {\n"); + sb.append(" companyLogo: ").append(toIndentedString(companyLogo)).append("\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" customDomain: ").append(toIndentedString(customDomain)).append("\n"); + sb.append(" customDomainEnabled: ") + .append(toIndentedString(customDomainEnabled)) + .append("\n"); + sb.append(" domainPrefix: ").append(toIndentedString(domainPrefix)).append("\n"); + sb.append(" emailHeaderImage: ").append(toIndentedString(emailHeaderImage)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" favicon: ").append(toIndentedString(favicon)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" pageUrl: ").append(toIndentedString(pageUrl)).append("\n"); + sb.append(" subscriptionsEnabled: ") + .append(toIndentedString(subscriptionsEnabled)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" visualizationType: ").append(toIndentedString(visualizationType)).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/StatusPageAsIncludedAttributesComponentsItems.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributesComponentsItems.java new file mode 100644 index 00000000000..0251aaf6913 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributesComponentsItems.java @@ -0,0 +1,280 @@ +/* + * 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({ + StatusPageAsIncludedAttributesComponentsItems.JSON_PROPERTY_COMPONENTS, + StatusPageAsIncludedAttributesComponentsItems.JSON_PROPERTY_ID, + StatusPageAsIncludedAttributesComponentsItems.JSON_PROPERTY_NAME, + StatusPageAsIncludedAttributesComponentsItems.JSON_PROPERTY_POSITION, + StatusPageAsIncludedAttributesComponentsItems.JSON_PROPERTY_STATUS, + StatusPageAsIncludedAttributesComponentsItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageAsIncludedAttributesComponentsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components = null; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentGroupAttributesComponentsItemsStatus status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateComponentRequestDataAttributesType type; + + public StatusPageAsIncludedAttributesComponentsItems components( + List components) { + this.components = components; + for (StatusPageAsIncludedAttributesComponentsItemsComponentsItems item : components) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPageAsIncludedAttributesComponentsItems addComponentsItem( + StatusPageAsIncludedAttributesComponentsItemsComponentsItems componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + this.unparsed |= componentsItem.unparsed; + return this; + } + + /** + * Getcomponents + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + public void setComponents( + List components) { + this.components = components; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public StatusPageAsIncludedAttributesComponentsItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPageAsIncludedAttributesComponentsItems position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsStatus getStatus() { + return status; + } + + public StatusPageAsIncludedAttributesComponentsItems type( + CreateComponentRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateComponentRequestDataAttributesType getType() { + return type; + } + + public void setType(CreateComponentRequestDataAttributesType 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 StatusPageAsIncludedAttributesComponentsItems + */ + @JsonAnySetter + public StatusPageAsIncludedAttributesComponentsItems 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 StatusPageAsIncludedAttributesComponentsItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageAsIncludedAttributesComponentsItems statusPageAsIncludedAttributesComponentsItems = + (StatusPageAsIncludedAttributesComponentsItems) o; + return Objects.equals(this.components, statusPageAsIncludedAttributesComponentsItems.components) + && Objects.equals(this.id, statusPageAsIncludedAttributesComponentsItems.id) + && Objects.equals(this.name, statusPageAsIncludedAttributesComponentsItems.name) + && Objects.equals(this.position, statusPageAsIncludedAttributesComponentsItems.position) + && Objects.equals(this.status, statusPageAsIncludedAttributesComponentsItems.status) + && Objects.equals(this.type, statusPageAsIncludedAttributesComponentsItems.type) + && Objects.equals( + this.additionalProperties, + statusPageAsIncludedAttributesComponentsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(components, id, name, position, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageAsIncludedAttributesComponentsItems {\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/StatusPageAsIncludedAttributesComponentsItemsComponentsItems.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributesComponentsItemsComponentsItems.java new file mode 100644 index 00000000000..dad5ccf993c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributesComponentsItemsComponentsItems.java @@ -0,0 +1,244 @@ +/* + * 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({ + StatusPageAsIncludedAttributesComponentsItemsComponentsItems.JSON_PROPERTY_ID, + StatusPageAsIncludedAttributesComponentsItemsComponentsItems.JSON_PROPERTY_NAME, + StatusPageAsIncludedAttributesComponentsItemsComponentsItems.JSON_PROPERTY_POSITION, + StatusPageAsIncludedAttributesComponentsItemsComponentsItems.JSON_PROPERTY_STATUS, + StatusPageAsIncludedAttributesComponentsItemsComponentsItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageAsIncludedAttributesComponentsItemsComponentsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentGroupAttributesComponentsItemsStatus status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupAttributesComponentsItemsType type; + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public StatusPageAsIncludedAttributesComponentsItemsComponentsItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPageAsIncludedAttributesComponentsItemsComponentsItems position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsStatus getStatus() { + return status; + } + + public StatusPageAsIncludedAttributesComponentsItemsComponentsItems type( + StatusPagesComponentGroupAttributesComponentsItemsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupAttributesComponentsItemsType 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 StatusPageAsIncludedAttributesComponentsItemsComponentsItems + */ + @JsonAnySetter + public StatusPageAsIncludedAttributesComponentsItemsComponentsItems 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 StatusPageAsIncludedAttributesComponentsItemsComponentsItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageAsIncludedAttributesComponentsItemsComponentsItems + statusPageAsIncludedAttributesComponentsItemsComponentsItems = + (StatusPageAsIncludedAttributesComponentsItemsComponentsItems) o; + return Objects.equals(this.id, statusPageAsIncludedAttributesComponentsItemsComponentsItems.id) + && Objects.equals( + this.name, statusPageAsIncludedAttributesComponentsItemsComponentsItems.name) + && Objects.equals( + this.position, statusPageAsIncludedAttributesComponentsItemsComponentsItems.position) + && Objects.equals( + this.status, statusPageAsIncludedAttributesComponentsItemsComponentsItems.status) + && Objects.equals( + this.type, statusPageAsIncludedAttributesComponentsItemsComponentsItems.type) + && Objects.equals( + this.additionalProperties, + statusPageAsIncludedAttributesComponentsItemsComponentsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, position, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageAsIncludedAttributesComponentsItemsComponentsItems {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/StatusPageAsIncludedRelationships.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationships.java new file mode 100644 index 00000000000..bdfe44efe5c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationships.java @@ -0,0 +1,172 @@ +/* + * 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({ + StatusPageAsIncludedRelationships.JSON_PROPERTY_CREATED_BY_USER, + StatusPageAsIncludedRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageAsIncludedRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private StatusPageAsIncludedRelationshipsCreatedByUser createdByUser; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private StatusPageAsIncludedRelationshipsLastModifiedByUser lastModifiedByUser; + + public StatusPageAsIncludedRelationships createdByUser( + StatusPageAsIncludedRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * GetcreatedByUser + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPageAsIncludedRelationshipsCreatedByUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(StatusPageAsIncludedRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + } + + public StatusPageAsIncludedRelationships lastModifiedByUser( + StatusPageAsIncludedRelationshipsLastModifiedByUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * GetlastModifiedByUser + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPageAsIncludedRelationshipsLastModifiedByUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser( + StatusPageAsIncludedRelationshipsLastModifiedByUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + /** + * 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 StatusPageAsIncludedRelationships + */ + @JsonAnySetter + public StatusPageAsIncludedRelationships 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 StatusPageAsIncludedRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageAsIncludedRelationships statusPageAsIncludedRelationships = + (StatusPageAsIncludedRelationships) o; + return Objects.equals(this.createdByUser, statusPageAsIncludedRelationships.createdByUser) + && Objects.equals( + this.lastModifiedByUser, statusPageAsIncludedRelationships.lastModifiedByUser) + && Objects.equals( + this.additionalProperties, statusPageAsIncludedRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, lastModifiedByUser, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageAsIncludedRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).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/StatusPageAsIncludedRelationshipsCreatedByUser.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationshipsCreatedByUser.java new file mode 100644 index 00000000000..68a7194d52e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationshipsCreatedByUser.java @@ -0,0 +1,151 @@ +/* + * 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({StatusPageAsIncludedRelationshipsCreatedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageAsIncludedRelationshipsCreatedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPageAsIncludedRelationshipsCreatedByUserData data; + + public StatusPageAsIncludedRelationshipsCreatedByUser() {} + + @JsonCreator + public StatusPageAsIncludedRelationshipsCreatedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPageAsIncludedRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPageAsIncludedRelationshipsCreatedByUser data( + StatusPageAsIncludedRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageAsIncludedRelationshipsCreatedByUserData getData() { + return data; + } + + public void setData(StatusPageAsIncludedRelationshipsCreatedByUserData 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 StatusPageAsIncludedRelationshipsCreatedByUser + */ + @JsonAnySetter + public StatusPageAsIncludedRelationshipsCreatedByUser 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 StatusPageAsIncludedRelationshipsCreatedByUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageAsIncludedRelationshipsCreatedByUser statusPageAsIncludedRelationshipsCreatedByUser = + (StatusPageAsIncludedRelationshipsCreatedByUser) o; + return Objects.equals(this.data, statusPageAsIncludedRelationshipsCreatedByUser.data) + && Objects.equals( + this.additionalProperties, + statusPageAsIncludedRelationshipsCreatedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageAsIncludedRelationshipsCreatedByUser {\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/StatusPageAsIncludedRelationshipsCreatedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationshipsCreatedByUserData.java new file mode 100644 index 00000000000..b347a2505f4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationshipsCreatedByUserData.java @@ -0,0 +1,185 @@ +/* + * 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({ + StatusPageAsIncludedRelationshipsCreatedByUserData.JSON_PROPERTY_ID, + StatusPageAsIncludedRelationshipsCreatedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageAsIncludedRelationshipsCreatedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public StatusPageAsIncludedRelationshipsCreatedByUserData() {} + + @JsonCreator + public StatusPageAsIncludedRelationshipsCreatedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPageAsIncludedRelationshipsCreatedByUserData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPageAsIncludedRelationshipsCreatedByUserData type(StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 StatusPageAsIncludedRelationshipsCreatedByUserData + */ + @JsonAnySetter + public StatusPageAsIncludedRelationshipsCreatedByUserData 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 StatusPageAsIncludedRelationshipsCreatedByUserData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageAsIncludedRelationshipsCreatedByUserData + statusPageAsIncludedRelationshipsCreatedByUserData = + (StatusPageAsIncludedRelationshipsCreatedByUserData) o; + return Objects.equals(this.id, statusPageAsIncludedRelationshipsCreatedByUserData.id) + && Objects.equals(this.type, statusPageAsIncludedRelationshipsCreatedByUserData.type) + && Objects.equals( + this.additionalProperties, + statusPageAsIncludedRelationshipsCreatedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageAsIncludedRelationshipsCreatedByUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationshipsLastModifiedByUser.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationshipsLastModifiedByUser.java new file mode 100644 index 00000000000..43fb1d35f7c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationshipsLastModifiedByUser.java @@ -0,0 +1,154 @@ +/* + * 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({StatusPageAsIncludedRelationshipsLastModifiedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageAsIncludedRelationshipsLastModifiedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPageAsIncludedRelationshipsLastModifiedByUserData data; + + public StatusPageAsIncludedRelationshipsLastModifiedByUser() {} + + @JsonCreator + public StatusPageAsIncludedRelationshipsLastModifiedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPageAsIncludedRelationshipsLastModifiedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPageAsIncludedRelationshipsLastModifiedByUser data( + StatusPageAsIncludedRelationshipsLastModifiedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageAsIncludedRelationshipsLastModifiedByUserData getData() { + return data; + } + + public void setData(StatusPageAsIncludedRelationshipsLastModifiedByUserData 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 StatusPageAsIncludedRelationshipsLastModifiedByUser + */ + @JsonAnySetter + public StatusPageAsIncludedRelationshipsLastModifiedByUser 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 StatusPageAsIncludedRelationshipsLastModifiedByUser object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageAsIncludedRelationshipsLastModifiedByUser + statusPageAsIncludedRelationshipsLastModifiedByUser = + (StatusPageAsIncludedRelationshipsLastModifiedByUser) o; + return Objects.equals(this.data, statusPageAsIncludedRelationshipsLastModifiedByUser.data) + && Objects.equals( + this.additionalProperties, + statusPageAsIncludedRelationshipsLastModifiedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageAsIncludedRelationshipsLastModifiedByUser {\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/StatusPageAsIncludedRelationshipsLastModifiedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationshipsLastModifiedByUserData.java new file mode 100644 index 00000000000..7358f270ba8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedRelationshipsLastModifiedByUserData.java @@ -0,0 +1,186 @@ +/* + * 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({ + StatusPageAsIncludedRelationshipsLastModifiedByUserData.JSON_PROPERTY_ID, + StatusPageAsIncludedRelationshipsLastModifiedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageAsIncludedRelationshipsLastModifiedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public StatusPageAsIncludedRelationshipsLastModifiedByUserData() {} + + @JsonCreator + public StatusPageAsIncludedRelationshipsLastModifiedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPageAsIncludedRelationshipsLastModifiedByUserData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPageAsIncludedRelationshipsLastModifiedByUserData type(StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 StatusPageAsIncludedRelationshipsLastModifiedByUserData + */ + @JsonAnySetter + public StatusPageAsIncludedRelationshipsLastModifiedByUserData 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 StatusPageAsIncludedRelationshipsLastModifiedByUserData object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageAsIncludedRelationshipsLastModifiedByUserData + statusPageAsIncludedRelationshipsLastModifiedByUserData = + (StatusPageAsIncludedRelationshipsLastModifiedByUserData) o; + return Objects.equals(this.id, statusPageAsIncludedRelationshipsLastModifiedByUserData.id) + && Objects.equals(this.type, statusPageAsIncludedRelationshipsLastModifiedByUserData.type) + && Objects.equals( + this.additionalProperties, + statusPageAsIncludedRelationshipsLastModifiedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageAsIncludedRelationshipsLastModifiedByUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageData.java new file mode 100644 index 00000000000..eb3e6fbac2a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageData.java @@ -0,0 +1,233 @@ +/* + * 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({ + StatusPageData.JSON_PROPERTY_ATTRIBUTES, + StatusPageData.JSON_PROPERTY_ID, + StatusPageData.JSON_PROPERTY_RELATIONSHIPS, + StatusPageData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private StatusPageDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private StatusPageDataRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPageDataType type = StatusPageDataType.STATUS_PAGES; + + public StatusPageData() {} + + @JsonCreator + public StatusPageData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPageData attributes(StatusPageDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPageDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(StatusPageDataAttributes attributes) { + this.attributes = attributes; + } + + public StatusPageData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPageData relationships(StatusPageDataRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Getrelationships + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPageDataRelationships getRelationships() { + return relationships; + } + + public void setRelationships(StatusPageDataRelationships relationships) { + this.relationships = relationships; + } + + public StatusPageData type(StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Status pages resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageDataType getType() { + return type; + } + + public void setType(StatusPageDataType 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 StatusPageData + */ + @JsonAnySetter + public StatusPageData 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 StatusPageData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageData statusPageData = (StatusPageData) o; + return Objects.equals(this.attributes, statusPageData.attributes) + && Objects.equals(this.id, statusPageData.id) + && Objects.equals(this.relationships, statusPageData.relationships) + && Objects.equals(this.type, statusPageData.type) + && Objects.equals(this.additionalProperties, statusPageData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributes.java new file mode 100644 index 00000000000..a93fae94a1e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributes.java @@ -0,0 +1,562 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + StatusPageDataAttributes.JSON_PROPERTY_COMPANY_LOGO, + StatusPageDataAttributes.JSON_PROPERTY_COMPONENTS, + StatusPageDataAttributes.JSON_PROPERTY_CREATED_AT, + StatusPageDataAttributes.JSON_PROPERTY_CUSTOM_DOMAIN, + StatusPageDataAttributes.JSON_PROPERTY_CUSTOM_DOMAIN_ENABLED, + StatusPageDataAttributes.JSON_PROPERTY_DOMAIN_PREFIX, + StatusPageDataAttributes.JSON_PROPERTY_EMAIL_HEADER_IMAGE, + StatusPageDataAttributes.JSON_PROPERTY_ENABLED, + StatusPageDataAttributes.JSON_PROPERTY_FAVICON, + StatusPageDataAttributes.JSON_PROPERTY_MODIFIED_AT, + StatusPageDataAttributes.JSON_PROPERTY_NAME, + StatusPageDataAttributes.JSON_PROPERTY_PAGE_URL, + StatusPageDataAttributes.JSON_PROPERTY_SUBSCRIPTIONS_ENABLED, + StatusPageDataAttributes.JSON_PROPERTY_TYPE, + StatusPageDataAttributes.JSON_PROPERTY_VISUALIZATION_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPANY_LOGO = "company_logo"; + private String companyLogo; + + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CUSTOM_DOMAIN = "custom_domain"; + private String customDomain; + + public static final String JSON_PROPERTY_CUSTOM_DOMAIN_ENABLED = "custom_domain_enabled"; + private Boolean customDomainEnabled; + + public static final String JSON_PROPERTY_DOMAIN_PREFIX = "domain_prefix"; + private String domainPrefix; + + public static final String JSON_PROPERTY_EMAIL_HEADER_IMAGE = "email_header_image"; + private String emailHeaderImage; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_FAVICON = "favicon"; + private String favicon; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PAGE_URL = "page_url"; + private String pageUrl; + + public static final String JSON_PROPERTY_SUBSCRIPTIONS_ENABLED = "subscriptions_enabled"; + private Boolean subscriptionsEnabled; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateStatusPageRequestDataAttributesType type; + + public static final String JSON_PROPERTY_VISUALIZATION_TYPE = "visualization_type"; + private CreateStatusPageRequestDataAttributesVisualizationType visualizationType; + + public StatusPageDataAttributes companyLogo(String companyLogo) { + this.companyLogo = companyLogo; + return this; + } + + /** + * GetcompanyLogo + * + * @return companyLogo + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPANY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCompanyLogo() { + return companyLogo; + } + + public void setCompanyLogo(String companyLogo) { + this.companyLogo = companyLogo; + } + + public StatusPageDataAttributes components( + List components) { + this.components = components; + for (StatusPageDataAttributesComponentsItems item : components) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPageDataAttributes addComponentsItem( + StatusPageDataAttributesComponentsItems componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + this.unparsed |= componentsItem.unparsed; + return this; + } + + /** + * Getcomponents + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + public void setComponents(List components) { + this.components = components; + } + + public StatusPageDataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * GetcreatedAt + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public StatusPageDataAttributes customDomain(String customDomain) { + this.customDomain = customDomain; + return this; + } + + /** + * GetcustomDomain + * + * @return customDomain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_DOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomDomain() { + return customDomain; + } + + public void setCustomDomain(String customDomain) { + this.customDomain = customDomain; + } + + public StatusPageDataAttributes customDomainEnabled(Boolean customDomainEnabled) { + this.customDomainEnabled = customDomainEnabled; + return this; + } + + /** + * GetcustomDomainEnabled + * + * @return customDomainEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_DOMAIN_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCustomDomainEnabled() { + return customDomainEnabled; + } + + public void setCustomDomainEnabled(Boolean customDomainEnabled) { + this.customDomainEnabled = customDomainEnabled; + } + + public StatusPageDataAttributes domainPrefix(String domainPrefix) { + this.domainPrefix = domainPrefix; + return this; + } + + /** + * GetdomainPrefix + * + * @return domainPrefix + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomainPrefix() { + return domainPrefix; + } + + public void setDomainPrefix(String domainPrefix) { + this.domainPrefix = domainPrefix; + } + + public StatusPageDataAttributes emailHeaderImage(String emailHeaderImage) { + this.emailHeaderImage = emailHeaderImage; + return this; + } + + /** + * GetemailHeaderImage + * + * @return emailHeaderImage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL_HEADER_IMAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmailHeaderImage() { + return emailHeaderImage; + } + + public void setEmailHeaderImage(String emailHeaderImage) { + this.emailHeaderImage = emailHeaderImage; + } + + public StatusPageDataAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Getenabled + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public StatusPageDataAttributes favicon(String favicon) { + this.favicon = favicon; + return this; + } + + /** + * Getfavicon + * + * @return favicon + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAVICON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFavicon() { + return favicon; + } + + public void setFavicon(String favicon) { + this.favicon = favicon; + } + + public StatusPageDataAttributes modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * GetmodifiedAt + * + * @return modifiedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public StatusPageDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPageDataAttributes pageUrl(String pageUrl) { + this.pageUrl = pageUrl; + return this; + } + + /** + * GetpageUrl + * + * @return pageUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPageUrl() { + return pageUrl; + } + + public void setPageUrl(String pageUrl) { + this.pageUrl = pageUrl; + } + + public StatusPageDataAttributes subscriptionsEnabled(Boolean subscriptionsEnabled) { + this.subscriptionsEnabled = subscriptionsEnabled; + return this; + } + + /** + * GetsubscriptionsEnabled + * + * @return subscriptionsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTIONS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSubscriptionsEnabled() { + return subscriptionsEnabled; + } + + public void setSubscriptionsEnabled(Boolean subscriptionsEnabled) { + this.subscriptionsEnabled = subscriptionsEnabled; + } + + public StatusPageDataAttributes type(CreateStatusPageRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateStatusPageRequestDataAttributesType getType() { + return type; + } + + public void setType(CreateStatusPageRequestDataAttributesType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + public StatusPageDataAttributes visualizationType( + CreateStatusPageRequestDataAttributesVisualizationType visualizationType) { + this.visualizationType = visualizationType; + this.unparsed |= !visualizationType.isValid(); + return this; + } + + /** + * GetvisualizationType + * + * @return visualizationType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VISUALIZATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateStatusPageRequestDataAttributesVisualizationType getVisualizationType() { + return visualizationType; + } + + public void setVisualizationType( + CreateStatusPageRequestDataAttributesVisualizationType visualizationType) { + if (!visualizationType.isValid()) { + this.unparsed = true; + } + this.visualizationType = visualizationType; + } + + /** + * 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 StatusPageDataAttributes + */ + @JsonAnySetter + public StatusPageDataAttributes 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 StatusPageDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageDataAttributes statusPageDataAttributes = (StatusPageDataAttributes) o; + return Objects.equals(this.companyLogo, statusPageDataAttributes.companyLogo) + && Objects.equals(this.components, statusPageDataAttributes.components) + && Objects.equals(this.createdAt, statusPageDataAttributes.createdAt) + && Objects.equals(this.customDomain, statusPageDataAttributes.customDomain) + && Objects.equals(this.customDomainEnabled, statusPageDataAttributes.customDomainEnabled) + && Objects.equals(this.domainPrefix, statusPageDataAttributes.domainPrefix) + && Objects.equals(this.emailHeaderImage, statusPageDataAttributes.emailHeaderImage) + && Objects.equals(this.enabled, statusPageDataAttributes.enabled) + && Objects.equals(this.favicon, statusPageDataAttributes.favicon) + && Objects.equals(this.modifiedAt, statusPageDataAttributes.modifiedAt) + && Objects.equals(this.name, statusPageDataAttributes.name) + && Objects.equals(this.pageUrl, statusPageDataAttributes.pageUrl) + && Objects.equals(this.subscriptionsEnabled, statusPageDataAttributes.subscriptionsEnabled) + && Objects.equals(this.type, statusPageDataAttributes.type) + && Objects.equals(this.visualizationType, statusPageDataAttributes.visualizationType) + && Objects.equals(this.additionalProperties, statusPageDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + companyLogo, + components, + createdAt, + customDomain, + customDomainEnabled, + domainPrefix, + emailHeaderImage, + enabled, + favicon, + modifiedAt, + name, + pageUrl, + subscriptionsEnabled, + type, + visualizationType, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageDataAttributes {\n"); + sb.append(" companyLogo: ").append(toIndentedString(companyLogo)).append("\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" customDomain: ").append(toIndentedString(customDomain)).append("\n"); + sb.append(" customDomainEnabled: ") + .append(toIndentedString(customDomainEnabled)) + .append("\n"); + sb.append(" domainPrefix: ").append(toIndentedString(domainPrefix)).append("\n"); + sb.append(" emailHeaderImage: ").append(toIndentedString(emailHeaderImage)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" favicon: ").append(toIndentedString(favicon)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" pageUrl: ").append(toIndentedString(pageUrl)).append("\n"); + sb.append(" subscriptionsEnabled: ") + .append(toIndentedString(subscriptionsEnabled)) + .append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" visualizationType: ").append(toIndentedString(visualizationType)).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/StatusPageDataAttributesComponentsItems.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributesComponentsItems.java new file mode 100644 index 00000000000..875def1e729 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributesComponentsItems.java @@ -0,0 +1,279 @@ +/* + * 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({ + StatusPageDataAttributesComponentsItems.JSON_PROPERTY_COMPONENTS, + StatusPageDataAttributesComponentsItems.JSON_PROPERTY_ID, + StatusPageDataAttributesComponentsItems.JSON_PROPERTY_NAME, + StatusPageDataAttributesComponentsItems.JSON_PROPERTY_POSITION, + StatusPageDataAttributesComponentsItems.JSON_PROPERTY_STATUS, + StatusPageDataAttributesComponentsItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageDataAttributesComponentsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components = null; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentGroupAttributesComponentsItemsStatus status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateComponentRequestDataAttributesType type; + + public StatusPageDataAttributesComponentsItems components( + List components) { + this.components = components; + for (StatusPageDataAttributesComponentsItemsComponentsItems item : components) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPageDataAttributesComponentsItems addComponentsItem( + StatusPageDataAttributesComponentsItemsComponentsItems componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + this.unparsed |= componentsItem.unparsed; + return this; + } + + /** + * Getcomponents + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + public void setComponents( + List components) { + this.components = components; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public StatusPageDataAttributesComponentsItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPageDataAttributesComponentsItems position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsStatus getStatus() { + return status; + } + + public StatusPageDataAttributesComponentsItems type( + CreateComponentRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateComponentRequestDataAttributesType getType() { + return type; + } + + public void setType(CreateComponentRequestDataAttributesType 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 StatusPageDataAttributesComponentsItems + */ + @JsonAnySetter + public StatusPageDataAttributesComponentsItems 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 StatusPageDataAttributesComponentsItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageDataAttributesComponentsItems statusPageDataAttributesComponentsItems = + (StatusPageDataAttributesComponentsItems) o; + return Objects.equals(this.components, statusPageDataAttributesComponentsItems.components) + && Objects.equals(this.id, statusPageDataAttributesComponentsItems.id) + && Objects.equals(this.name, statusPageDataAttributesComponentsItems.name) + && Objects.equals(this.position, statusPageDataAttributesComponentsItems.position) + && Objects.equals(this.status, statusPageDataAttributesComponentsItems.status) + && Objects.equals(this.type, statusPageDataAttributesComponentsItems.type) + && Objects.equals( + this.additionalProperties, + statusPageDataAttributesComponentsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(components, id, name, position, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageDataAttributesComponentsItems {\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/StatusPageDataAttributesComponentsItemsComponentsItems.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributesComponentsItemsComponentsItems.java new file mode 100644 index 00000000000..a82aae29bcc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributesComponentsItemsComponentsItems.java @@ -0,0 +1,242 @@ +/* + * 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({ + StatusPageDataAttributesComponentsItemsComponentsItems.JSON_PROPERTY_ID, + StatusPageDataAttributesComponentsItemsComponentsItems.JSON_PROPERTY_NAME, + StatusPageDataAttributesComponentsItemsComponentsItems.JSON_PROPERTY_POSITION, + StatusPageDataAttributesComponentsItemsComponentsItems.JSON_PROPERTY_STATUS, + StatusPageDataAttributesComponentsItemsComponentsItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageDataAttributesComponentsItemsComponentsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentGroupAttributesComponentsItemsStatus status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupAttributesComponentsItemsType type; + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public StatusPageDataAttributesComponentsItemsComponentsItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPageDataAttributesComponentsItemsComponentsItems position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsStatus getStatus() { + return status; + } + + public StatusPageDataAttributesComponentsItemsComponentsItems type( + StatusPagesComponentGroupAttributesComponentsItemsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupAttributesComponentsItemsType 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 StatusPageDataAttributesComponentsItemsComponentsItems + */ + @JsonAnySetter + public StatusPageDataAttributesComponentsItemsComponentsItems 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 StatusPageDataAttributesComponentsItemsComponentsItems object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageDataAttributesComponentsItemsComponentsItems + statusPageDataAttributesComponentsItemsComponentsItems = + (StatusPageDataAttributesComponentsItemsComponentsItems) o; + return Objects.equals(this.id, statusPageDataAttributesComponentsItemsComponentsItems.id) + && Objects.equals(this.name, statusPageDataAttributesComponentsItemsComponentsItems.name) + && Objects.equals( + this.position, statusPageDataAttributesComponentsItemsComponentsItems.position) + && Objects.equals( + this.status, statusPageDataAttributesComponentsItemsComponentsItems.status) + && Objects.equals(this.type, statusPageDataAttributesComponentsItemsComponentsItems.type) + && Objects.equals( + this.additionalProperties, + statusPageDataAttributesComponentsItemsComponentsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, position, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageDataAttributesComponentsItemsComponentsItems {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/StatusPageDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationships.java new file mode 100644 index 00000000000..cdde6d72ba6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationships.java @@ -0,0 +1,170 @@ +/* + * 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({ + StatusPageDataRelationships.JSON_PROPERTY_CREATED_BY_USER, + StatusPageDataRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageDataRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private StatusPageDataRelationshipsCreatedByUser createdByUser; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private StatusPageDataRelationshipsLastModifiedByUser lastModifiedByUser; + + public StatusPageDataRelationships createdByUser( + StatusPageDataRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * GetcreatedByUser + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPageDataRelationshipsCreatedByUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(StatusPageDataRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + } + + public StatusPageDataRelationships lastModifiedByUser( + StatusPageDataRelationshipsLastModifiedByUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * GetlastModifiedByUser + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPageDataRelationshipsLastModifiedByUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser( + StatusPageDataRelationshipsLastModifiedByUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + /** + * 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 StatusPageDataRelationships + */ + @JsonAnySetter + public StatusPageDataRelationships 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 StatusPageDataRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageDataRelationships statusPageDataRelationships = (StatusPageDataRelationships) o; + return Objects.equals(this.createdByUser, statusPageDataRelationships.createdByUser) + && Objects.equals(this.lastModifiedByUser, statusPageDataRelationships.lastModifiedByUser) + && Objects.equals( + this.additionalProperties, statusPageDataRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, lastModifiedByUser, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageDataRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).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/StatusPageDataRelationshipsCreatedByUser.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationshipsCreatedByUser.java new file mode 100644 index 00000000000..717540a6403 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationshipsCreatedByUser.java @@ -0,0 +1,150 @@ +/* + * 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({StatusPageDataRelationshipsCreatedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageDataRelationshipsCreatedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPageDataRelationshipsCreatedByUserData data; + + public StatusPageDataRelationshipsCreatedByUser() {} + + @JsonCreator + public StatusPageDataRelationshipsCreatedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPageDataRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPageDataRelationshipsCreatedByUser data( + StatusPageDataRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageDataRelationshipsCreatedByUserData getData() { + return data; + } + + public void setData(StatusPageDataRelationshipsCreatedByUserData 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 StatusPageDataRelationshipsCreatedByUser + */ + @JsonAnySetter + public StatusPageDataRelationshipsCreatedByUser 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 StatusPageDataRelationshipsCreatedByUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageDataRelationshipsCreatedByUser statusPageDataRelationshipsCreatedByUser = + (StatusPageDataRelationshipsCreatedByUser) o; + return Objects.equals(this.data, statusPageDataRelationshipsCreatedByUser.data) + && Objects.equals( + this.additionalProperties, + statusPageDataRelationshipsCreatedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageDataRelationshipsCreatedByUser {\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/StatusPageDataRelationshipsCreatedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationshipsCreatedByUserData.java new file mode 100644 index 00000000000..8aafeab0109 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationshipsCreatedByUserData.java @@ -0,0 +1,182 @@ +/* + * 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({ + StatusPageDataRelationshipsCreatedByUserData.JSON_PROPERTY_ID, + StatusPageDataRelationshipsCreatedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageDataRelationshipsCreatedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public StatusPageDataRelationshipsCreatedByUserData() {} + + @JsonCreator + public StatusPageDataRelationshipsCreatedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPageDataRelationshipsCreatedByUserData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPageDataRelationshipsCreatedByUserData type(StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 StatusPageDataRelationshipsCreatedByUserData + */ + @JsonAnySetter + public StatusPageDataRelationshipsCreatedByUserData 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 StatusPageDataRelationshipsCreatedByUserData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageDataRelationshipsCreatedByUserData statusPageDataRelationshipsCreatedByUserData = + (StatusPageDataRelationshipsCreatedByUserData) o; + return Objects.equals(this.id, statusPageDataRelationshipsCreatedByUserData.id) + && Objects.equals(this.type, statusPageDataRelationshipsCreatedByUserData.type) + && Objects.equals( + this.additionalProperties, + statusPageDataRelationshipsCreatedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageDataRelationshipsCreatedByUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationshipsLastModifiedByUser.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationshipsLastModifiedByUser.java new file mode 100644 index 00000000000..b9150af89fd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationshipsLastModifiedByUser.java @@ -0,0 +1,151 @@ +/* + * 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({StatusPageDataRelationshipsLastModifiedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageDataRelationshipsLastModifiedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPageDataRelationshipsLastModifiedByUserData data; + + public StatusPageDataRelationshipsLastModifiedByUser() {} + + @JsonCreator + public StatusPageDataRelationshipsLastModifiedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPageDataRelationshipsLastModifiedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPageDataRelationshipsLastModifiedByUser data( + StatusPageDataRelationshipsLastModifiedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageDataRelationshipsLastModifiedByUserData getData() { + return data; + } + + public void setData(StatusPageDataRelationshipsLastModifiedByUserData 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 StatusPageDataRelationshipsLastModifiedByUser + */ + @JsonAnySetter + public StatusPageDataRelationshipsLastModifiedByUser 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 StatusPageDataRelationshipsLastModifiedByUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageDataRelationshipsLastModifiedByUser statusPageDataRelationshipsLastModifiedByUser = + (StatusPageDataRelationshipsLastModifiedByUser) o; + return Objects.equals(this.data, statusPageDataRelationshipsLastModifiedByUser.data) + && Objects.equals( + this.additionalProperties, + statusPageDataRelationshipsLastModifiedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageDataRelationshipsLastModifiedByUser {\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/StatusPageDataRelationshipsLastModifiedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationshipsLastModifiedByUserData.java new file mode 100644 index 00000000000..31c9bc7e3ed --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataRelationshipsLastModifiedByUserData.java @@ -0,0 +1,183 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + StatusPageDataRelationshipsLastModifiedByUserData.JSON_PROPERTY_ID, + StatusPageDataRelationshipsLastModifiedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageDataRelationshipsLastModifiedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public StatusPageDataRelationshipsLastModifiedByUserData() {} + + @JsonCreator + public StatusPageDataRelationshipsLastModifiedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPageDataRelationshipsLastModifiedByUserData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPageDataRelationshipsLastModifiedByUserData type(StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 StatusPageDataRelationshipsLastModifiedByUserData + */ + @JsonAnySetter + public StatusPageDataRelationshipsLastModifiedByUserData 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 StatusPageDataRelationshipsLastModifiedByUserData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageDataRelationshipsLastModifiedByUserData + statusPageDataRelationshipsLastModifiedByUserData = + (StatusPageDataRelationshipsLastModifiedByUserData) o; + return Objects.equals(this.id, statusPageDataRelationshipsLastModifiedByUserData.id) + && Objects.equals(this.type, statusPageDataRelationshipsLastModifiedByUserData.type) + && Objects.equals( + this.additionalProperties, + statusPageDataRelationshipsLastModifiedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageDataRelationshipsLastModifiedByUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageDataType.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataType.java new file mode 100644 index 00000000000..2ddd4b853c2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Status pages resource type. */ +@JsonSerialize(using = StatusPageDataType.StatusPageDataTypeSerializer.class) +public class StatusPageDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("status_pages")); + + public static final StatusPageDataType STATUS_PAGES = new StatusPageDataType("status_pages"); + + StatusPageDataType(String value) { + super(value, allowedValues); + } + + public static class StatusPageDataTypeSerializer extends StdSerializer { + public StatusPageDataTypeSerializer(Class t) { + super(t); + } + + public StatusPageDataTypeSerializer() { + this(null); + } + + @Override + public void serialize(StatusPageDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static StatusPageDataType fromValue(String value) { + return new StatusPageDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponent.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponent.java new file mode 100644 index 00000000000..94217d4b9b3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponent.java @@ -0,0 +1,179 @@ +/* + * 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({ + StatusPagesComponent.JSON_PROPERTY_DATA, + StatusPagesComponent.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponent { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPagesComponentData data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public StatusPagesComponent data(StatusPagesComponentData 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 StatusPagesComponentData getData() { + return data; + } + + public void setData(StatusPagesComponentData data) { + this.data = data; + } + + public StatusPagesComponent included(List included) { + this.included = included; + for (StatusPagesComponentArrayIncluded item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPagesComponent addIncludedItem(StatusPagesComponentArrayIncluded includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Getincluded + * + * @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 StatusPagesComponent + */ + @JsonAnySetter + public StatusPagesComponent 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 StatusPagesComponent object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponent statusPagesComponent = (StatusPagesComponent) o; + return Objects.equals(this.data, statusPagesComponent.data) + && Objects.equals(this.included, statusPagesComponent.included) + && Objects.equals(this.additionalProperties, statusPagesComponent.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponent {\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/StatusPagesComponentArray.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentArray.java new file mode 100644 index 00000000000..de17e568849 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentArray.java @@ -0,0 +1,197 @@ +/* + * 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({ + StatusPagesComponentArray.JSON_PROPERTY_DATA, + StatusPagesComponentArray.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentArray { + @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 StatusPagesComponentArray() {} + + @JsonCreator + public StatusPagesComponentArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public StatusPagesComponentArray data(List data) { + this.data = data; + for (StatusPagesComponentData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPagesComponentArray addDataItem(StatusPagesComponentData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public StatusPagesComponentArray included(List included) { + this.included = included; + for (StatusPagesComponentArrayIncluded item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPagesComponentArray addIncludedItem(StatusPagesComponentArrayIncluded includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Getincluded + * + * @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 StatusPagesComponentArray + */ + @JsonAnySetter + public StatusPagesComponentArray 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 StatusPagesComponentArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentArray statusPagesComponentArray = (StatusPagesComponentArray) o; + return Objects.equals(this.data, statusPagesComponentArray.data) + && Objects.equals(this.included, statusPagesComponentArray.included) + && Objects.equals( + this.additionalProperties, statusPagesComponentArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentArray {\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/StatusPagesComponentArrayIncluded.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentArrayIncluded.java new file mode 100644 index 00000000000..5f12d5338a1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentArrayIncluded.java @@ -0,0 +1,353 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = StatusPagesComponentArrayIncluded.StatusPagesComponentArrayIncludedDeserializer.class) +@JsonSerialize( + using = StatusPagesComponentArrayIncluded.StatusPagesComponentArrayIncludedSerializer.class) +public class StatusPagesComponentArrayIncluded extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(StatusPagesComponentArrayIncluded.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class StatusPagesComponentArrayIncludedSerializer + extends StdSerializer { + public StatusPagesComponentArrayIncludedSerializer(Class t) { + super(t); + } + + public StatusPagesComponentArrayIncludedSerializer() { + this(null); + } + + @Override + public void serialize( + StatusPagesComponentArrayIncluded value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class StatusPagesComponentArrayIncludedDeserializer + extends StdDeserializer { + public StatusPagesComponentArrayIncludedDeserializer() { + this(StatusPagesComponentArrayIncluded.class); + } + + public StatusPagesComponentArrayIncludedDeserializer(Class vc) { + super(vc); + } + + @Override + public StatusPagesComponentArrayIncluded deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize StatusPagesUser + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (StatusPagesUser.class.equals(Integer.class) + || StatusPagesUser.class.equals(Long.class) + || StatusPagesUser.class.equals(Float.class) + || StatusPagesUser.class.equals(Double.class) + || StatusPagesUser.class.equals(Boolean.class) + || StatusPagesUser.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((StatusPagesUser.class.equals(Integer.class) + || StatusPagesUser.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((StatusPagesUser.class.equals(Float.class) + || StatusPagesUser.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (StatusPagesUser.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (StatusPagesUser.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(StatusPagesUser.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((StatusPagesUser) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'StatusPagesUser'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'StatusPagesUser'", e); + } + + // deserialize StatusPageAsIncluded + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (StatusPageAsIncluded.class.equals(Integer.class) + || StatusPageAsIncluded.class.equals(Long.class) + || StatusPageAsIncluded.class.equals(Float.class) + || StatusPageAsIncluded.class.equals(Double.class) + || StatusPageAsIncluded.class.equals(Boolean.class) + || StatusPageAsIncluded.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((StatusPageAsIncluded.class.equals(Integer.class) + || StatusPageAsIncluded.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((StatusPageAsIncluded.class.equals(Float.class) + || StatusPageAsIncluded.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (StatusPageAsIncluded.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (StatusPageAsIncluded.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(StatusPageAsIncluded.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((StatusPageAsIncluded) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'StatusPageAsIncluded'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'StatusPageAsIncluded'", e); + } + + // deserialize StatusPagesComponentGroup + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (StatusPagesComponentGroup.class.equals(Integer.class) + || StatusPagesComponentGroup.class.equals(Long.class) + || StatusPagesComponentGroup.class.equals(Float.class) + || StatusPagesComponentGroup.class.equals(Double.class) + || StatusPagesComponentGroup.class.equals(Boolean.class) + || StatusPagesComponentGroup.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((StatusPagesComponentGroup.class.equals(Integer.class) + || StatusPagesComponentGroup.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((StatusPagesComponentGroup.class.equals(Float.class) + || StatusPagesComponentGroup.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (StatusPagesComponentGroup.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (StatusPagesComponentGroup.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(StatusPagesComponentGroup.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((StatusPagesComponentGroup) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'StatusPagesComponentGroup'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'StatusPagesComponentGroup'", e); + } + + StatusPagesComponentArrayIncluded ret = new StatusPagesComponentArrayIncluded(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public StatusPagesComponentArrayIncluded getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "StatusPagesComponentArrayIncluded cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public StatusPagesComponentArrayIncluded() { + super("oneOf", Boolean.FALSE); + } + + public StatusPagesComponentArrayIncluded(StatusPagesUser o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public StatusPagesComponentArrayIncluded(StatusPageAsIncluded o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public StatusPagesComponentArrayIncluded(StatusPagesComponentGroup o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("StatusPagesUser", new GenericType() {}); + schemas.put("StatusPageAsIncluded", new GenericType() {}); + schemas.put("StatusPagesComponentGroup", new GenericType() {}); + JSON.registerDescendants( + StatusPagesComponentArrayIncluded.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return StatusPagesComponentArrayIncluded.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: StatusPagesUser, StatusPageAsIncluded, + * StatusPagesComponentGroup + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(StatusPagesUser.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(StatusPageAsIncluded.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(StatusPagesComponentGroup.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be StatusPagesUser, StatusPageAsIncluded," + + " StatusPagesComponentGroup"); + } + + /** + * Get the actual instance, which can be the following: StatusPagesUser, StatusPageAsIncluded, + * StatusPagesComponentGroup + * + * @return The actual instance (StatusPagesUser, StatusPageAsIncluded, StatusPagesComponentGroup) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `StatusPagesUser`. If the actual instance is not `StatusPagesUser`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `StatusPagesUser` + * @throws ClassCastException if the instance is not `StatusPagesUser` + */ + public StatusPagesUser getStatusPagesUser() throws ClassCastException { + return (StatusPagesUser) super.getActualInstance(); + } + + /** + * Get the actual instance of `StatusPageAsIncluded`. If the actual instance is not + * `StatusPageAsIncluded`, the ClassCastException will be thrown. + * + * @return The actual instance of `StatusPageAsIncluded` + * @throws ClassCastException if the instance is not `StatusPageAsIncluded` + */ + public StatusPageAsIncluded getStatusPageAsIncluded() throws ClassCastException { + return (StatusPageAsIncluded) super.getActualInstance(); + } + + /** + * Get the actual instance of `StatusPagesComponentGroup`. If the actual instance is not + * `StatusPagesComponentGroup`, the ClassCastException will be thrown. + * + * @return The actual instance of `StatusPagesComponentGroup` + * @throws ClassCastException if the instance is not `StatusPagesComponentGroup` + */ + public StatusPagesComponentGroup getStatusPagesComponentGroup() throws ClassCastException { + return (StatusPagesComponentGroup) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentData.java new file mode 100644 index 00000000000..1bb626b34d8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentData.java @@ -0,0 +1,235 @@ +/* + * 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({ + StatusPagesComponentData.JSON_PROPERTY_ATTRIBUTES, + StatusPagesComponentData.JSON_PROPERTY_ID, + StatusPagesComponentData.JSON_PROPERTY_RELATIONSHIPS, + StatusPagesComponentData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private StatusPagesComponentDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private StatusPagesComponentDataRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupType type = StatusPagesComponentGroupType.COMPONENTS; + + public StatusPagesComponentData() {} + + @JsonCreator + public StatusPagesComponentData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentData attributes(StatusPagesComponentDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(StatusPagesComponentDataAttributes attributes) { + this.attributes = attributes; + } + + public StatusPagesComponentData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesComponentData relationships( + StatusPagesComponentDataRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Getrelationships + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentDataRelationships getRelationships() { + return relationships; + } + + public void setRelationships(StatusPagesComponentDataRelationships relationships) { + this.relationships = relationships; + } + + public StatusPagesComponentData type(StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Components resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupType 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 StatusPagesComponentData + */ + @JsonAnySetter + public StatusPagesComponentData 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 StatusPagesComponentData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentData statusPagesComponentData = (StatusPagesComponentData) o; + return Objects.equals(this.attributes, statusPagesComponentData.attributes) + && Objects.equals(this.id, statusPagesComponentData.id) + && Objects.equals(this.relationships, statusPagesComponentData.relationships) + && Objects.equals(this.type, statusPagesComponentData.type) + && Objects.equals(this.additionalProperties, statusPagesComponentData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataAttributes.java new file mode 100644 index 00000000000..13ac3917d62 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataAttributes.java @@ -0,0 +1,338 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + StatusPagesComponentDataAttributes.JSON_PROPERTY_COMPONENTS, + StatusPagesComponentDataAttributes.JSON_PROPERTY_CREATED_AT, + StatusPagesComponentDataAttributes.JSON_PROPERTY_MODIFIED_AT, + StatusPagesComponentDataAttributes.JSON_PROPERTY_NAME, + StatusPagesComponentDataAttributes.JSON_PROPERTY_POSITION, + StatusPagesComponentDataAttributes.JSON_PROPERTY_STATUS, + StatusPagesComponentDataAttributes.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentDataAttributesStatus status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateComponentRequestDataAttributesType type; + + public StatusPagesComponentDataAttributes() {} + + @JsonCreator + public StatusPagesComponentDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + CreateComponentRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentDataAttributes components( + List components) { + this.components = components; + for (StatusPagesComponentDataAttributesComponentsItems item : components) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPagesComponentDataAttributes addComponentsItem( + StatusPagesComponentDataAttributesComponentsItems componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + this.unparsed |= componentsItem.unparsed; + return this; + } + + /** + * Getcomponents + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + public void setComponents(List components) { + this.components = components; + } + + public StatusPagesComponentDataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * GetcreatedAt + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public StatusPagesComponentDataAttributes modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * GetmodifiedAt + * + * @return modifiedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public StatusPagesComponentDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPagesComponentDataAttributes position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + public StatusPagesComponentDataAttributes status( + StatusPagesComponentDataAttributesStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentDataAttributesStatus getStatus() { + return status; + } + + public void setStatus(StatusPagesComponentDataAttributesStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public StatusPagesComponentDataAttributes type(CreateComponentRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateComponentRequestDataAttributesType getType() { + return type; + } + + public void setType(CreateComponentRequestDataAttributesType 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 StatusPagesComponentDataAttributes + */ + @JsonAnySetter + public StatusPagesComponentDataAttributes 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 StatusPagesComponentDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataAttributes statusPagesComponentDataAttributes = + (StatusPagesComponentDataAttributes) o; + return Objects.equals(this.components, statusPagesComponentDataAttributes.components) + && Objects.equals(this.createdAt, statusPagesComponentDataAttributes.createdAt) + && Objects.equals(this.modifiedAt, statusPagesComponentDataAttributes.modifiedAt) + && Objects.equals(this.name, statusPagesComponentDataAttributes.name) + && Objects.equals(this.position, statusPagesComponentDataAttributes.position) + && Objects.equals(this.status, statusPagesComponentDataAttributes.status) + && Objects.equals(this.type, statusPagesComponentDataAttributes.type) + && Objects.equals( + this.additionalProperties, statusPagesComponentDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + components, createdAt, modifiedAt, name, position, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataAttributes {\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/StatusPagesComponentDataAttributesComponentsItems.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataAttributesComponentsItems.java new file mode 100644 index 00000000000..3e27001eec8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataAttributesComponentsItems.java @@ -0,0 +1,237 @@ +/* + * 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({ + StatusPagesComponentDataAttributesComponentsItems.JSON_PROPERTY_ID, + StatusPagesComponentDataAttributesComponentsItems.JSON_PROPERTY_NAME, + StatusPagesComponentDataAttributesComponentsItems.JSON_PROPERTY_POSITION, + StatusPagesComponentDataAttributesComponentsItems.JSON_PROPERTY_STATUS, + StatusPagesComponentDataAttributesComponentsItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataAttributesComponentsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentGroupAttributesComponentsItemsStatus status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupAttributesComponentsItemsType type; + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public StatusPagesComponentDataAttributesComponentsItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPagesComponentDataAttributesComponentsItems position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsStatus getStatus() { + return status; + } + + public StatusPagesComponentDataAttributesComponentsItems type( + StatusPagesComponentGroupAttributesComponentsItemsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupAttributesComponentsItemsType 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 StatusPagesComponentDataAttributesComponentsItems + */ + @JsonAnySetter + public StatusPagesComponentDataAttributesComponentsItems 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 StatusPagesComponentDataAttributesComponentsItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataAttributesComponentsItems + statusPagesComponentDataAttributesComponentsItems = + (StatusPagesComponentDataAttributesComponentsItems) o; + return Objects.equals(this.id, statusPagesComponentDataAttributesComponentsItems.id) + && Objects.equals(this.name, statusPagesComponentDataAttributesComponentsItems.name) + && Objects.equals(this.position, statusPagesComponentDataAttributesComponentsItems.position) + && Objects.equals(this.status, statusPagesComponentDataAttributesComponentsItems.status) + && Objects.equals(this.type, statusPagesComponentDataAttributesComponentsItems.type) + && Objects.equals( + this.additionalProperties, + statusPagesComponentDataAttributesComponentsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, position, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataAttributesComponentsItems {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/StatusPagesComponentDataAttributesStatus.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataAttributesStatus.java new file mode 100644 index 00000000000..53f65efbc06 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataAttributesStatus.java @@ -0,0 +1,70 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize( + using = + StatusPagesComponentDataAttributesStatus.StatusPagesComponentDataAttributesStatusSerializer + .class) +public class StatusPagesComponentDataAttributesStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("operational", "degraded", "partial_outage", "major_outage")); + + public static final StatusPagesComponentDataAttributesStatus OPERATIONAL = + new StatusPagesComponentDataAttributesStatus("operational"); + public static final StatusPagesComponentDataAttributesStatus DEGRADED = + new StatusPagesComponentDataAttributesStatus("degraded"); + public static final StatusPagesComponentDataAttributesStatus PARTIAL_OUTAGE = + new StatusPagesComponentDataAttributesStatus("partial_outage"); + public static final StatusPagesComponentDataAttributesStatus MAJOR_OUTAGE = + new StatusPagesComponentDataAttributesStatus("major_outage"); + + StatusPagesComponentDataAttributesStatus(String value) { + super(value, allowedValues); + } + + public static class StatusPagesComponentDataAttributesStatusSerializer + extends StdSerializer { + public StatusPagesComponentDataAttributesStatusSerializer( + Class t) { + super(t); + } + + public StatusPagesComponentDataAttributesStatusSerializer() { + this(null); + } + + @Override + public void serialize( + StatusPagesComponentDataAttributesStatus value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static StatusPagesComponentDataAttributesStatus fromValue(String value) { + return new StatusPagesComponentDataAttributesStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationships.java new file mode 100644 index 00000000000..8ac185fba5b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationships.java @@ -0,0 +1,230 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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({ + StatusPagesComponentDataRelationships.JSON_PROPERTY_CREATED_BY_USER, + StatusPagesComponentDataRelationships.JSON_PROPERTY_GROUP, + StatusPagesComponentDataRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER, + StatusPagesComponentDataRelationships.JSON_PROPERTY_STATUS_PAGE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private StatusPagesComponentDataRelationshipsCreatedByUser createdByUser; + + public static final String JSON_PROPERTY_GROUP = "group"; + private StatusPagesComponentDataRelationshipsGroup group; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private StatusPagesComponentDataRelationshipsLastModifiedByUser lastModifiedByUser; + + public static final String JSON_PROPERTY_STATUS_PAGE = "status_page"; + private StatusPagesComponentDataRelationshipsStatusPage statusPage; + + public StatusPagesComponentDataRelationships createdByUser( + StatusPagesComponentDataRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * GetcreatedByUser + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentDataRelationshipsCreatedByUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(StatusPagesComponentDataRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + } + + public StatusPagesComponentDataRelationships group( + StatusPagesComponentDataRelationshipsGroup group) { + this.group = group; + this.unparsed |= group.unparsed; + return this; + } + + /** + * Getgroup + * + * @return group + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentDataRelationshipsGroup getGroup() { + return group; + } + + public void setGroup(StatusPagesComponentDataRelationshipsGroup group) { + this.group = group; + } + + public StatusPagesComponentDataRelationships lastModifiedByUser( + StatusPagesComponentDataRelationshipsLastModifiedByUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * GetlastModifiedByUser + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentDataRelationshipsLastModifiedByUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser( + StatusPagesComponentDataRelationshipsLastModifiedByUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + public StatusPagesComponentDataRelationships statusPage( + StatusPagesComponentDataRelationshipsStatusPage statusPage) { + this.statusPage = statusPage; + this.unparsed |= statusPage.unparsed; + return this; + } + + /** + * GetstatusPage + * + * @return statusPage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentDataRelationshipsStatusPage getStatusPage() { + return statusPage; + } + + public void setStatusPage(StatusPagesComponentDataRelationshipsStatusPage statusPage) { + this.statusPage = statusPage; + } + + /** + * 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 StatusPagesComponentDataRelationships + */ + @JsonAnySetter + public StatusPagesComponentDataRelationships 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 StatusPagesComponentDataRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataRelationships statusPagesComponentDataRelationships = + (StatusPagesComponentDataRelationships) o; + return Objects.equals(this.createdByUser, statusPagesComponentDataRelationships.createdByUser) + && Objects.equals(this.group, statusPagesComponentDataRelationships.group) + && Objects.equals( + this.lastModifiedByUser, statusPagesComponentDataRelationships.lastModifiedByUser) + && Objects.equals(this.statusPage, statusPagesComponentDataRelationships.statusPage) + && Objects.equals( + this.additionalProperties, statusPagesComponentDataRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, group, lastModifiedByUser, statusPage, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).append("\n"); + sb.append(" statusPage: ").append(toIndentedString(statusPage)).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/StatusPagesComponentDataRelationshipsCreatedByUser.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsCreatedByUser.java new file mode 100644 index 00000000000..e86a5e9d59b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsCreatedByUser.java @@ -0,0 +1,154 @@ +/* + * 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({StatusPagesComponentDataRelationshipsCreatedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataRelationshipsCreatedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPagesComponentDataRelationshipsCreatedByUserData data; + + public StatusPagesComponentDataRelationshipsCreatedByUser() {} + + @JsonCreator + public StatusPagesComponentDataRelationshipsCreatedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPagesComponentDataRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPagesComponentDataRelationshipsCreatedByUser data( + StatusPagesComponentDataRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentDataRelationshipsCreatedByUserData getData() { + return data; + } + + public void setData(StatusPagesComponentDataRelationshipsCreatedByUserData 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 StatusPagesComponentDataRelationshipsCreatedByUser + */ + @JsonAnySetter + public StatusPagesComponentDataRelationshipsCreatedByUser 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 StatusPagesComponentDataRelationshipsCreatedByUser object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataRelationshipsCreatedByUser + statusPagesComponentDataRelationshipsCreatedByUser = + (StatusPagesComponentDataRelationshipsCreatedByUser) o; + return Objects.equals(this.data, statusPagesComponentDataRelationshipsCreatedByUser.data) + && Objects.equals( + this.additionalProperties, + statusPagesComponentDataRelationshipsCreatedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataRelationshipsCreatedByUser {\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/StatusPagesComponentDataRelationshipsCreatedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsCreatedByUserData.java new file mode 100644 index 00000000000..fab6c2cea29 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsCreatedByUserData.java @@ -0,0 +1,186 @@ +/* + * 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({ + StatusPagesComponentDataRelationshipsCreatedByUserData.JSON_PROPERTY_ID, + StatusPagesComponentDataRelationshipsCreatedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataRelationshipsCreatedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public StatusPagesComponentDataRelationshipsCreatedByUserData() {} + + @JsonCreator + public StatusPagesComponentDataRelationshipsCreatedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentDataRelationshipsCreatedByUserData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesComponentDataRelationshipsCreatedByUserData type(StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 StatusPagesComponentDataRelationshipsCreatedByUserData + */ + @JsonAnySetter + public StatusPagesComponentDataRelationshipsCreatedByUserData 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 StatusPagesComponentDataRelationshipsCreatedByUserData object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataRelationshipsCreatedByUserData + statusPagesComponentDataRelationshipsCreatedByUserData = + (StatusPagesComponentDataRelationshipsCreatedByUserData) o; + return Objects.equals(this.id, statusPagesComponentDataRelationshipsCreatedByUserData.id) + && Objects.equals(this.type, statusPagesComponentDataRelationshipsCreatedByUserData.type) + && Objects.equals( + this.additionalProperties, + statusPagesComponentDataRelationshipsCreatedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataRelationshipsCreatedByUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsGroup.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsGroup.java new file mode 100644 index 00000000000..ac089cd5fe0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsGroup.java @@ -0,0 +1,151 @@ +/* + * 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({StatusPagesComponentDataRelationshipsGroup.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataRelationshipsGroup { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPagesComponentDataRelationshipsGroupData data; + + public StatusPagesComponentDataRelationshipsGroup() {} + + @JsonCreator + public StatusPagesComponentDataRelationshipsGroup( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPagesComponentDataRelationshipsGroupData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPagesComponentDataRelationshipsGroup data( + StatusPagesComponentDataRelationshipsGroupData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentDataRelationshipsGroupData getData() { + return data; + } + + public void setData(StatusPagesComponentDataRelationshipsGroupData 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 StatusPagesComponentDataRelationshipsGroup + */ + @JsonAnySetter + public StatusPagesComponentDataRelationshipsGroup 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 StatusPagesComponentDataRelationshipsGroup object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataRelationshipsGroup statusPagesComponentDataRelationshipsGroup = + (StatusPagesComponentDataRelationshipsGroup) o; + return Objects.equals(this.data, statusPagesComponentDataRelationshipsGroup.data) + && Objects.equals( + this.additionalProperties, + statusPagesComponentDataRelationshipsGroup.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataRelationshipsGroup {\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/StatusPagesComponentDataRelationshipsGroupData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsGroupData.java new file mode 100644 index 00000000000..701967ce648 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsGroupData.java @@ -0,0 +1,183 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + StatusPagesComponentDataRelationshipsGroupData.JSON_PROPERTY_ID, + StatusPagesComponentDataRelationshipsGroupData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataRelationshipsGroupData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupType type = StatusPagesComponentGroupType.COMPONENTS; + + public StatusPagesComponentDataRelationshipsGroupData() {} + + @JsonCreator + public StatusPagesComponentDataRelationshipsGroupData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + StatusPagesComponentGroupType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentDataRelationshipsGroupData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesComponentDataRelationshipsGroupData type(StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Components resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupType 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 StatusPagesComponentDataRelationshipsGroupData + */ + @JsonAnySetter + public StatusPagesComponentDataRelationshipsGroupData 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 StatusPagesComponentDataRelationshipsGroupData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataRelationshipsGroupData statusPagesComponentDataRelationshipsGroupData = + (StatusPagesComponentDataRelationshipsGroupData) o; + return Objects.equals(this.id, statusPagesComponentDataRelationshipsGroupData.id) + && Objects.equals(this.type, statusPagesComponentDataRelationshipsGroupData.type) + && Objects.equals( + this.additionalProperties, + statusPagesComponentDataRelationshipsGroupData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataRelationshipsGroupData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsLastModifiedByUser.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsLastModifiedByUser.java new file mode 100644 index 00000000000..64499547377 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsLastModifiedByUser.java @@ -0,0 +1,155 @@ +/* + * 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({StatusPagesComponentDataRelationshipsLastModifiedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataRelationshipsLastModifiedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPagesComponentDataRelationshipsLastModifiedByUserData data; + + public StatusPagesComponentDataRelationshipsLastModifiedByUser() {} + + @JsonCreator + public StatusPagesComponentDataRelationshipsLastModifiedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPagesComponentDataRelationshipsLastModifiedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPagesComponentDataRelationshipsLastModifiedByUser data( + StatusPagesComponentDataRelationshipsLastModifiedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentDataRelationshipsLastModifiedByUserData getData() { + return data; + } + + public void setData(StatusPagesComponentDataRelationshipsLastModifiedByUserData 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 StatusPagesComponentDataRelationshipsLastModifiedByUser + */ + @JsonAnySetter + public StatusPagesComponentDataRelationshipsLastModifiedByUser 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 StatusPagesComponentDataRelationshipsLastModifiedByUser object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataRelationshipsLastModifiedByUser + statusPagesComponentDataRelationshipsLastModifiedByUser = + (StatusPagesComponentDataRelationshipsLastModifiedByUser) o; + return Objects.equals(this.data, statusPagesComponentDataRelationshipsLastModifiedByUser.data) + && Objects.equals( + this.additionalProperties, + statusPagesComponentDataRelationshipsLastModifiedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataRelationshipsLastModifiedByUser {\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/StatusPagesComponentDataRelationshipsLastModifiedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsLastModifiedByUserData.java new file mode 100644 index 00000000000..1ab2799abec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsLastModifiedByUserData.java @@ -0,0 +1,188 @@ +/* + * 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({ + StatusPagesComponentDataRelationshipsLastModifiedByUserData.JSON_PROPERTY_ID, + StatusPagesComponentDataRelationshipsLastModifiedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataRelationshipsLastModifiedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public StatusPagesComponentDataRelationshipsLastModifiedByUserData() {} + + @JsonCreator + public StatusPagesComponentDataRelationshipsLastModifiedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentDataRelationshipsLastModifiedByUserData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesComponentDataRelationshipsLastModifiedByUserData type( + StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 StatusPagesComponentDataRelationshipsLastModifiedByUserData + */ + @JsonAnySetter + public StatusPagesComponentDataRelationshipsLastModifiedByUserData 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 StatusPagesComponentDataRelationshipsLastModifiedByUserData object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataRelationshipsLastModifiedByUserData + statusPagesComponentDataRelationshipsLastModifiedByUserData = + (StatusPagesComponentDataRelationshipsLastModifiedByUserData) o; + return Objects.equals(this.id, statusPagesComponentDataRelationshipsLastModifiedByUserData.id) + && Objects.equals( + this.type, statusPagesComponentDataRelationshipsLastModifiedByUserData.type) + && Objects.equals( + this.additionalProperties, + statusPagesComponentDataRelationshipsLastModifiedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataRelationshipsLastModifiedByUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsStatusPage.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsStatusPage.java new file mode 100644 index 00000000000..8b45550ea9a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsStatusPage.java @@ -0,0 +1,152 @@ +/* + * 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({StatusPagesComponentDataRelationshipsStatusPage.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataRelationshipsStatusPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPagesComponentDataRelationshipsStatusPageData data; + + public StatusPagesComponentDataRelationshipsStatusPage() {} + + @JsonCreator + public StatusPagesComponentDataRelationshipsStatusPage( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPagesComponentDataRelationshipsStatusPageData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPagesComponentDataRelationshipsStatusPage data( + StatusPagesComponentDataRelationshipsStatusPageData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentDataRelationshipsStatusPageData getData() { + return data; + } + + public void setData(StatusPagesComponentDataRelationshipsStatusPageData 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 StatusPagesComponentDataRelationshipsStatusPage + */ + @JsonAnySetter + public StatusPagesComponentDataRelationshipsStatusPage 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 StatusPagesComponentDataRelationshipsStatusPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataRelationshipsStatusPage + statusPagesComponentDataRelationshipsStatusPage = + (StatusPagesComponentDataRelationshipsStatusPage) o; + return Objects.equals(this.data, statusPagesComponentDataRelationshipsStatusPage.data) + && Objects.equals( + this.additionalProperties, + statusPagesComponentDataRelationshipsStatusPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataRelationshipsStatusPage {\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/StatusPagesComponentDataRelationshipsStatusPageData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsStatusPageData.java new file mode 100644 index 00000000000..dc081a4c95f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentDataRelationshipsStatusPageData.java @@ -0,0 +1,185 @@ +/* + * 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({ + StatusPagesComponentDataRelationshipsStatusPageData.JSON_PROPERTY_ID, + StatusPagesComponentDataRelationshipsStatusPageData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentDataRelationshipsStatusPageData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPageDataType type = StatusPageDataType.STATUS_PAGES; + + public StatusPagesComponentDataRelationshipsStatusPageData() {} + + @JsonCreator + public StatusPagesComponentDataRelationshipsStatusPageData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPageDataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentDataRelationshipsStatusPageData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesComponentDataRelationshipsStatusPageData type(StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Status pages resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageDataType getType() { + return type; + } + + public void setType(StatusPageDataType 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 StatusPagesComponentDataRelationshipsStatusPageData + */ + @JsonAnySetter + public StatusPagesComponentDataRelationshipsStatusPageData 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 StatusPagesComponentDataRelationshipsStatusPageData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentDataRelationshipsStatusPageData + statusPagesComponentDataRelationshipsStatusPageData = + (StatusPagesComponentDataRelationshipsStatusPageData) o; + return Objects.equals(this.id, statusPagesComponentDataRelationshipsStatusPageData.id) + && Objects.equals(this.type, statusPagesComponentDataRelationshipsStatusPageData.type) + && Objects.equals( + this.additionalProperties, + statusPagesComponentDataRelationshipsStatusPageData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentDataRelationshipsStatusPageData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroup.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroup.java new file mode 100644 index 00000000000..3dd7e5c17ee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroup.java @@ -0,0 +1,236 @@ +/* + * 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({ + StatusPagesComponentGroup.JSON_PROPERTY_ATTRIBUTES, + StatusPagesComponentGroup.JSON_PROPERTY_ID, + StatusPagesComponentGroup.JSON_PROPERTY_RELATIONSHIPS, + StatusPagesComponentGroup.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroup { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private StatusPagesComponentGroupAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private StatusPagesComponentGroupRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupType type = StatusPagesComponentGroupType.COMPONENTS; + + public StatusPagesComponentGroup() {} + + @JsonCreator + public StatusPagesComponentGroup( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentGroup attributes(StatusPagesComponentGroupAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributes getAttributes() { + return attributes; + } + + public void setAttributes(StatusPagesComponentGroupAttributes attributes) { + this.attributes = attributes; + } + + public StatusPagesComponentGroup id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesComponentGroup relationships( + StatusPagesComponentGroupRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Getrelationships + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupRelationships getRelationships() { + return relationships; + } + + public void setRelationships(StatusPagesComponentGroupRelationships relationships) { + this.relationships = relationships; + } + + public StatusPagesComponentGroup type(StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Components resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupType 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 StatusPagesComponentGroup + */ + @JsonAnySetter + public StatusPagesComponentGroup 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 StatusPagesComponentGroup object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroup statusPagesComponentGroup = (StatusPagesComponentGroup) o; + return Objects.equals(this.attributes, statusPagesComponentGroup.attributes) + && Objects.equals(this.id, statusPagesComponentGroup.id) + && Objects.equals(this.relationships, statusPagesComponentGroup.relationships) + && Objects.equals(this.type, statusPagesComponentGroup.type) + && Objects.equals( + this.additionalProperties, statusPagesComponentGroup.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroup {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupAttributes.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupAttributes.java new file mode 100644 index 00000000000..42359ddeb1f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupAttributes.java @@ -0,0 +1,338 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + StatusPagesComponentGroupAttributes.JSON_PROPERTY_COMPONENTS, + StatusPagesComponentGroupAttributes.JSON_PROPERTY_CREATED_AT, + StatusPagesComponentGroupAttributes.JSON_PROPERTY_MODIFIED_AT, + StatusPagesComponentGroupAttributes.JSON_PROPERTY_NAME, + StatusPagesComponentGroupAttributes.JSON_PROPERTY_POSITION, + StatusPagesComponentGroupAttributes.JSON_PROPERTY_STATUS, + StatusPagesComponentGroupAttributes.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentDataAttributesStatus status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateComponentRequestDataAttributesType type; + + public StatusPagesComponentGroupAttributes() {} + + @JsonCreator + public StatusPagesComponentGroupAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + CreateComponentRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentGroupAttributes components( + List components) { + this.components = components; + for (StatusPagesComponentGroupAttributesComponentsItems item : components) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPagesComponentGroupAttributes addComponentsItem( + StatusPagesComponentGroupAttributesComponentsItems componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + this.unparsed |= componentsItem.unparsed; + return this; + } + + /** + * Getcomponents + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + public void setComponents(List components) { + this.components = components; + } + + public StatusPagesComponentGroupAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * GetcreatedAt + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public StatusPagesComponentGroupAttributes modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * GetmodifiedAt + * + * @return modifiedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public StatusPagesComponentGroupAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPagesComponentGroupAttributes position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + public StatusPagesComponentGroupAttributes status( + StatusPagesComponentDataAttributesStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentDataAttributesStatus getStatus() { + return status; + } + + public void setStatus(StatusPagesComponentDataAttributesStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public StatusPagesComponentGroupAttributes type(CreateComponentRequestDataAttributesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateComponentRequestDataAttributesType getType() { + return type; + } + + public void setType(CreateComponentRequestDataAttributesType 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 StatusPagesComponentGroupAttributes + */ + @JsonAnySetter + public StatusPagesComponentGroupAttributes 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 StatusPagesComponentGroupAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupAttributes statusPagesComponentGroupAttributes = + (StatusPagesComponentGroupAttributes) o; + return Objects.equals(this.components, statusPagesComponentGroupAttributes.components) + && Objects.equals(this.createdAt, statusPagesComponentGroupAttributes.createdAt) + && Objects.equals(this.modifiedAt, statusPagesComponentGroupAttributes.modifiedAt) + && Objects.equals(this.name, statusPagesComponentGroupAttributes.name) + && Objects.equals(this.position, statusPagesComponentGroupAttributes.position) + && Objects.equals(this.status, statusPagesComponentGroupAttributes.status) + && Objects.equals(this.type, statusPagesComponentGroupAttributes.type) + && Objects.equals( + this.additionalProperties, statusPagesComponentGroupAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + components, createdAt, modifiedAt, name, position, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupAttributes {\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/StatusPagesComponentGroupAttributesComponentsItems.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupAttributesComponentsItems.java new file mode 100644 index 00000000000..1de23fa21c1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupAttributesComponentsItems.java @@ -0,0 +1,240 @@ +/* + * 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({ + StatusPagesComponentGroupAttributesComponentsItems.JSON_PROPERTY_ID, + StatusPagesComponentGroupAttributesComponentsItems.JSON_PROPERTY_NAME, + StatusPagesComponentGroupAttributesComponentsItems.JSON_PROPERTY_POSITION, + StatusPagesComponentGroupAttributesComponentsItems.JSON_PROPERTY_STATUS, + StatusPagesComponentGroupAttributesComponentsItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupAttributesComponentsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Long position; + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusPagesComponentGroupAttributesComponentsItemsStatus status; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupAttributesComponentsItemsType type; + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public StatusPagesComponentGroupAttributesComponentsItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPagesComponentGroupAttributesComponentsItems position(Long position) { + this.position = position; + return this; + } + + /** + * Getposition + * + * @return position + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPosition() { + return position; + } + + public void setPosition(Long position) { + this.position = position; + } + + /** + * Getstatus + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsStatus getStatus() { + return status; + } + + public StatusPagesComponentGroupAttributesComponentsItems type( + StatusPagesComponentGroupAttributesComponentsItemsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupAttributesComponentsItemsType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupAttributesComponentsItemsType 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 StatusPagesComponentGroupAttributesComponentsItems + */ + @JsonAnySetter + public StatusPagesComponentGroupAttributesComponentsItems 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 StatusPagesComponentGroupAttributesComponentsItems object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupAttributesComponentsItems + statusPagesComponentGroupAttributesComponentsItems = + (StatusPagesComponentGroupAttributesComponentsItems) o; + return Objects.equals(this.id, statusPagesComponentGroupAttributesComponentsItems.id) + && Objects.equals(this.name, statusPagesComponentGroupAttributesComponentsItems.name) + && Objects.equals( + this.position, statusPagesComponentGroupAttributesComponentsItems.position) + && Objects.equals(this.status, statusPagesComponentGroupAttributesComponentsItems.status) + && Objects.equals(this.type, statusPagesComponentGroupAttributesComponentsItems.type) + && Objects.equals( + this.additionalProperties, + statusPagesComponentGroupAttributesComponentsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, position, status, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupAttributesComponentsItems {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/StatusPagesComponentGroupAttributesComponentsItemsStatus.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupAttributesComponentsItemsStatus.java new file mode 100644 index 00000000000..e11411e0778 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupAttributesComponentsItemsStatus.java @@ -0,0 +1,70 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize( + using = + StatusPagesComponentGroupAttributesComponentsItemsStatus + .StatusPagesComponentGroupAttributesComponentsItemsStatusSerializer.class) +public class StatusPagesComponentGroupAttributesComponentsItemsStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("operational", "degraded", "partial_outage", "major_outage")); + + public static final StatusPagesComponentGroupAttributesComponentsItemsStatus OPERATIONAL = + new StatusPagesComponentGroupAttributesComponentsItemsStatus("operational"); + public static final StatusPagesComponentGroupAttributesComponentsItemsStatus DEGRADED = + new StatusPagesComponentGroupAttributesComponentsItemsStatus("degraded"); + public static final StatusPagesComponentGroupAttributesComponentsItemsStatus PARTIAL_OUTAGE = + new StatusPagesComponentGroupAttributesComponentsItemsStatus("partial_outage"); + public static final StatusPagesComponentGroupAttributesComponentsItemsStatus MAJOR_OUTAGE = + new StatusPagesComponentGroupAttributesComponentsItemsStatus("major_outage"); + + StatusPagesComponentGroupAttributesComponentsItemsStatus(String value) { + super(value, allowedValues); + } + + public static class StatusPagesComponentGroupAttributesComponentsItemsStatusSerializer + extends StdSerializer { + public StatusPagesComponentGroupAttributesComponentsItemsStatusSerializer( + Class t) { + super(t); + } + + public StatusPagesComponentGroupAttributesComponentsItemsStatusSerializer() { + this(null); + } + + @Override + public void serialize( + StatusPagesComponentGroupAttributesComponentsItemsStatus value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static StatusPagesComponentGroupAttributesComponentsItemsStatus fromValue(String value) { + return new StatusPagesComponentGroupAttributesComponentsItemsStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupAttributesComponentsItemsType.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupAttributesComponentsItemsType.java new file mode 100644 index 00000000000..b1af15147f6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupAttributesComponentsItemsType.java @@ -0,0 +1,62 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize( + using = + StatusPagesComponentGroupAttributesComponentsItemsType + .StatusPagesComponentGroupAttributesComponentsItemsTypeSerializer.class) +public class StatusPagesComponentGroupAttributesComponentsItemsType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("component")); + + public static final StatusPagesComponentGroupAttributesComponentsItemsType COMPONENT = + new StatusPagesComponentGroupAttributesComponentsItemsType("component"); + + StatusPagesComponentGroupAttributesComponentsItemsType(String value) { + super(value, allowedValues); + } + + public static class StatusPagesComponentGroupAttributesComponentsItemsTypeSerializer + extends StdSerializer { + public StatusPagesComponentGroupAttributesComponentsItemsTypeSerializer( + Class t) { + super(t); + } + + public StatusPagesComponentGroupAttributesComponentsItemsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + StatusPagesComponentGroupAttributesComponentsItemsType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static StatusPagesComponentGroupAttributesComponentsItemsType fromValue(String value) { + return new StatusPagesComponentGroupAttributesComponentsItemsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationships.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationships.java new file mode 100644 index 00000000000..bfe54fea869 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationships.java @@ -0,0 +1,230 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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({ + StatusPagesComponentGroupRelationships.JSON_PROPERTY_CREATED_BY_USER, + StatusPagesComponentGroupRelationships.JSON_PROPERTY_GROUP, + StatusPagesComponentGroupRelationships.JSON_PROPERTY_LAST_MODIFIED_BY_USER, + StatusPagesComponentGroupRelationships.JSON_PROPERTY_STATUS_PAGE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private StatusPagesComponentGroupRelationshipsCreatedByUser createdByUser; + + public static final String JSON_PROPERTY_GROUP = "group"; + private StatusPagesComponentGroupRelationshipsGroup group; + + public static final String JSON_PROPERTY_LAST_MODIFIED_BY_USER = "last_modified_by_user"; + private StatusPagesComponentGroupRelationshipsLastModifiedByUser lastModifiedByUser; + + public static final String JSON_PROPERTY_STATUS_PAGE = "status_page"; + private StatusPagesComponentGroupRelationshipsStatusPage statusPage; + + public StatusPagesComponentGroupRelationships createdByUser( + StatusPagesComponentGroupRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * GetcreatedByUser + * + * @return createdByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupRelationshipsCreatedByUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser(StatusPagesComponentGroupRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + } + + public StatusPagesComponentGroupRelationships group( + StatusPagesComponentGroupRelationshipsGroup group) { + this.group = group; + this.unparsed |= group.unparsed; + return this; + } + + /** + * Getgroup + * + * @return group + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupRelationshipsGroup getGroup() { + return group; + } + + public void setGroup(StatusPagesComponentGroupRelationshipsGroup group) { + this.group = group; + } + + public StatusPagesComponentGroupRelationships lastModifiedByUser( + StatusPagesComponentGroupRelationshipsLastModifiedByUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + this.unparsed |= lastModifiedByUser.unparsed; + return this; + } + + /** + * GetlastModifiedByUser + * + * @return lastModifiedByUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupRelationshipsLastModifiedByUser getLastModifiedByUser() { + return lastModifiedByUser; + } + + public void setLastModifiedByUser( + StatusPagesComponentGroupRelationshipsLastModifiedByUser lastModifiedByUser) { + this.lastModifiedByUser = lastModifiedByUser; + } + + public StatusPagesComponentGroupRelationships statusPage( + StatusPagesComponentGroupRelationshipsStatusPage statusPage) { + this.statusPage = statusPage; + this.unparsed |= statusPage.unparsed; + return this; + } + + /** + * GetstatusPage + * + * @return statusPage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesComponentGroupRelationshipsStatusPage getStatusPage() { + return statusPage; + } + + public void setStatusPage(StatusPagesComponentGroupRelationshipsStatusPage statusPage) { + this.statusPage = statusPage; + } + + /** + * 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 StatusPagesComponentGroupRelationships + */ + @JsonAnySetter + public StatusPagesComponentGroupRelationships 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 StatusPagesComponentGroupRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupRelationships statusPagesComponentGroupRelationships = + (StatusPagesComponentGroupRelationships) o; + return Objects.equals(this.createdByUser, statusPagesComponentGroupRelationships.createdByUser) + && Objects.equals(this.group, statusPagesComponentGroupRelationships.group) + && Objects.equals( + this.lastModifiedByUser, statusPagesComponentGroupRelationships.lastModifiedByUser) + && Objects.equals(this.statusPage, statusPagesComponentGroupRelationships.statusPage) + && Objects.equals( + this.additionalProperties, statusPagesComponentGroupRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, group, lastModifiedByUser, statusPage, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); + sb.append(" lastModifiedByUser: ").append(toIndentedString(lastModifiedByUser)).append("\n"); + sb.append(" statusPage: ").append(toIndentedString(statusPage)).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/StatusPagesComponentGroupRelationshipsCreatedByUser.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsCreatedByUser.java new file mode 100644 index 00000000000..13e78b523cb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsCreatedByUser.java @@ -0,0 +1,154 @@ +/* + * 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({StatusPagesComponentGroupRelationshipsCreatedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupRelationshipsCreatedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPagesComponentGroupRelationshipsCreatedByUserData data; + + public StatusPagesComponentGroupRelationshipsCreatedByUser() {} + + @JsonCreator + public StatusPagesComponentGroupRelationshipsCreatedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPagesComponentGroupRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPagesComponentGroupRelationshipsCreatedByUser data( + StatusPagesComponentGroupRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupRelationshipsCreatedByUserData getData() { + return data; + } + + public void setData(StatusPagesComponentGroupRelationshipsCreatedByUserData 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 StatusPagesComponentGroupRelationshipsCreatedByUser + */ + @JsonAnySetter + public StatusPagesComponentGroupRelationshipsCreatedByUser 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 StatusPagesComponentGroupRelationshipsCreatedByUser object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupRelationshipsCreatedByUser + statusPagesComponentGroupRelationshipsCreatedByUser = + (StatusPagesComponentGroupRelationshipsCreatedByUser) o; + return Objects.equals(this.data, statusPagesComponentGroupRelationshipsCreatedByUser.data) + && Objects.equals( + this.additionalProperties, + statusPagesComponentGroupRelationshipsCreatedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupRelationshipsCreatedByUser {\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/StatusPagesComponentGroupRelationshipsCreatedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsCreatedByUserData.java new file mode 100644 index 00000000000..f1690e01ffb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsCreatedByUserData.java @@ -0,0 +1,186 @@ +/* + * 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({ + StatusPagesComponentGroupRelationshipsCreatedByUserData.JSON_PROPERTY_ID, + StatusPagesComponentGroupRelationshipsCreatedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupRelationshipsCreatedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public StatusPagesComponentGroupRelationshipsCreatedByUserData() {} + + @JsonCreator + public StatusPagesComponentGroupRelationshipsCreatedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentGroupRelationshipsCreatedByUserData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesComponentGroupRelationshipsCreatedByUserData type(StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 StatusPagesComponentGroupRelationshipsCreatedByUserData + */ + @JsonAnySetter + public StatusPagesComponentGroupRelationshipsCreatedByUserData 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 StatusPagesComponentGroupRelationshipsCreatedByUserData object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupRelationshipsCreatedByUserData + statusPagesComponentGroupRelationshipsCreatedByUserData = + (StatusPagesComponentGroupRelationshipsCreatedByUserData) o; + return Objects.equals(this.id, statusPagesComponentGroupRelationshipsCreatedByUserData.id) + && Objects.equals(this.type, statusPagesComponentGroupRelationshipsCreatedByUserData.type) + && Objects.equals( + this.additionalProperties, + statusPagesComponentGroupRelationshipsCreatedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupRelationshipsCreatedByUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsGroup.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsGroup.java new file mode 100644 index 00000000000..a4c7c8a4bd9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsGroup.java @@ -0,0 +1,151 @@ +/* + * 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({StatusPagesComponentGroupRelationshipsGroup.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupRelationshipsGroup { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPagesComponentGroupRelationshipsGroupData data; + + public StatusPagesComponentGroupRelationshipsGroup() {} + + @JsonCreator + public StatusPagesComponentGroupRelationshipsGroup( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPagesComponentGroupRelationshipsGroupData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPagesComponentGroupRelationshipsGroup data( + StatusPagesComponentGroupRelationshipsGroupData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupRelationshipsGroupData getData() { + return data; + } + + public void setData(StatusPagesComponentGroupRelationshipsGroupData 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 StatusPagesComponentGroupRelationshipsGroup + */ + @JsonAnySetter + public StatusPagesComponentGroupRelationshipsGroup 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 StatusPagesComponentGroupRelationshipsGroup object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupRelationshipsGroup statusPagesComponentGroupRelationshipsGroup = + (StatusPagesComponentGroupRelationshipsGroup) o; + return Objects.equals(this.data, statusPagesComponentGroupRelationshipsGroup.data) + && Objects.equals( + this.additionalProperties, + statusPagesComponentGroupRelationshipsGroup.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupRelationshipsGroup {\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/StatusPagesComponentGroupRelationshipsGroupData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsGroupData.java new file mode 100644 index 00000000000..cabb9cf91cd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsGroupData.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({ + StatusPagesComponentGroupRelationshipsGroupData.JSON_PROPERTY_ID, + StatusPagesComponentGroupRelationshipsGroupData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupRelationshipsGroupData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesComponentGroupType type = StatusPagesComponentGroupType.COMPONENTS; + + public StatusPagesComponentGroupRelationshipsGroupData() {} + + @JsonCreator + public StatusPagesComponentGroupRelationshipsGroupData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + StatusPagesComponentGroupType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentGroupRelationshipsGroupData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesComponentGroupRelationshipsGroupData type(StatusPagesComponentGroupType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Components resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupType getType() { + return type; + } + + public void setType(StatusPagesComponentGroupType 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 StatusPagesComponentGroupRelationshipsGroupData + */ + @JsonAnySetter + public StatusPagesComponentGroupRelationshipsGroupData 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 StatusPagesComponentGroupRelationshipsGroupData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupRelationshipsGroupData + statusPagesComponentGroupRelationshipsGroupData = + (StatusPagesComponentGroupRelationshipsGroupData) o; + return Objects.equals(this.id, statusPagesComponentGroupRelationshipsGroupData.id) + && Objects.equals(this.type, statusPagesComponentGroupRelationshipsGroupData.type) + && Objects.equals( + this.additionalProperties, + statusPagesComponentGroupRelationshipsGroupData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupRelationshipsGroupData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsLastModifiedByUser.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsLastModifiedByUser.java new file mode 100644 index 00000000000..12e70df6a20 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsLastModifiedByUser.java @@ -0,0 +1,155 @@ +/* + * 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({StatusPagesComponentGroupRelationshipsLastModifiedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupRelationshipsLastModifiedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPagesComponentGroupRelationshipsLastModifiedByUserData data; + + public StatusPagesComponentGroupRelationshipsLastModifiedByUser() {} + + @JsonCreator + public StatusPagesComponentGroupRelationshipsLastModifiedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPagesComponentGroupRelationshipsLastModifiedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPagesComponentGroupRelationshipsLastModifiedByUser data( + StatusPagesComponentGroupRelationshipsLastModifiedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupRelationshipsLastModifiedByUserData getData() { + return data; + } + + public void setData(StatusPagesComponentGroupRelationshipsLastModifiedByUserData 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 StatusPagesComponentGroupRelationshipsLastModifiedByUser + */ + @JsonAnySetter + public StatusPagesComponentGroupRelationshipsLastModifiedByUser 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 StatusPagesComponentGroupRelationshipsLastModifiedByUser object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupRelationshipsLastModifiedByUser + statusPagesComponentGroupRelationshipsLastModifiedByUser = + (StatusPagesComponentGroupRelationshipsLastModifiedByUser) o; + return Objects.equals(this.data, statusPagesComponentGroupRelationshipsLastModifiedByUser.data) + && Objects.equals( + this.additionalProperties, + statusPagesComponentGroupRelationshipsLastModifiedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupRelationshipsLastModifiedByUser {\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/StatusPagesComponentGroupRelationshipsLastModifiedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsLastModifiedByUserData.java new file mode 100644 index 00000000000..bd7130269c9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsLastModifiedByUserData.java @@ -0,0 +1,188 @@ +/* + * 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({ + StatusPagesComponentGroupRelationshipsLastModifiedByUserData.JSON_PROPERTY_ID, + StatusPagesComponentGroupRelationshipsLastModifiedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupRelationshipsLastModifiedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public StatusPagesComponentGroupRelationshipsLastModifiedByUserData() {} + + @JsonCreator + public StatusPagesComponentGroupRelationshipsLastModifiedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentGroupRelationshipsLastModifiedByUserData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesComponentGroupRelationshipsLastModifiedByUserData type( + StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 StatusPagesComponentGroupRelationshipsLastModifiedByUserData + */ + @JsonAnySetter + public StatusPagesComponentGroupRelationshipsLastModifiedByUserData 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 StatusPagesComponentGroupRelationshipsLastModifiedByUserData object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupRelationshipsLastModifiedByUserData + statusPagesComponentGroupRelationshipsLastModifiedByUserData = + (StatusPagesComponentGroupRelationshipsLastModifiedByUserData) o; + return Objects.equals(this.id, statusPagesComponentGroupRelationshipsLastModifiedByUserData.id) + && Objects.equals( + this.type, statusPagesComponentGroupRelationshipsLastModifiedByUserData.type) + && Objects.equals( + this.additionalProperties, + statusPagesComponentGroupRelationshipsLastModifiedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupRelationshipsLastModifiedByUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsStatusPage.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsStatusPage.java new file mode 100644 index 00000000000..98888fbed2c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsStatusPage.java @@ -0,0 +1,152 @@ +/* + * 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({StatusPagesComponentGroupRelationshipsStatusPage.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupRelationshipsStatusPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPagesComponentGroupRelationshipsStatusPageData data; + + public StatusPagesComponentGroupRelationshipsStatusPage() {} + + @JsonCreator + public StatusPagesComponentGroupRelationshipsStatusPage( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPagesComponentGroupRelationshipsStatusPageData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPagesComponentGroupRelationshipsStatusPage data( + StatusPagesComponentGroupRelationshipsStatusPageData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesComponentGroupRelationshipsStatusPageData getData() { + return data; + } + + public void setData(StatusPagesComponentGroupRelationshipsStatusPageData 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 StatusPagesComponentGroupRelationshipsStatusPage + */ + @JsonAnySetter + public StatusPagesComponentGroupRelationshipsStatusPage 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 StatusPagesComponentGroupRelationshipsStatusPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupRelationshipsStatusPage + statusPagesComponentGroupRelationshipsStatusPage = + (StatusPagesComponentGroupRelationshipsStatusPage) o; + return Objects.equals(this.data, statusPagesComponentGroupRelationshipsStatusPage.data) + && Objects.equals( + this.additionalProperties, + statusPagesComponentGroupRelationshipsStatusPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupRelationshipsStatusPage {\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/StatusPagesComponentGroupRelationshipsStatusPageData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsStatusPageData.java new file mode 100644 index 00000000000..c909b547853 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupRelationshipsStatusPageData.java @@ -0,0 +1,185 @@ +/* + * 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({ + StatusPagesComponentGroupRelationshipsStatusPageData.JSON_PROPERTY_ID, + StatusPagesComponentGroupRelationshipsStatusPageData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesComponentGroupRelationshipsStatusPageData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPageDataType type = StatusPageDataType.STATUS_PAGES; + + public StatusPagesComponentGroupRelationshipsStatusPageData() {} + + @JsonCreator + public StatusPagesComponentGroupRelationshipsStatusPageData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPageDataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesComponentGroupRelationshipsStatusPageData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesComponentGroupRelationshipsStatusPageData type(StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Status pages resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageDataType getType() { + return type; + } + + public void setType(StatusPageDataType 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 StatusPagesComponentGroupRelationshipsStatusPageData + */ + @JsonAnySetter + public StatusPagesComponentGroupRelationshipsStatusPageData 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 StatusPagesComponentGroupRelationshipsStatusPageData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesComponentGroupRelationshipsStatusPageData + statusPagesComponentGroupRelationshipsStatusPageData = + (StatusPagesComponentGroupRelationshipsStatusPageData) o; + return Objects.equals(this.id, statusPagesComponentGroupRelationshipsStatusPageData.id) + && Objects.equals(this.type, statusPagesComponentGroupRelationshipsStatusPageData.type) + && Objects.equals( + this.additionalProperties, + statusPagesComponentGroupRelationshipsStatusPageData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesComponentGroupRelationshipsStatusPageData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupType.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupType.java new file mode 100644 index 00000000000..c124a96414b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesComponentGroupType.java @@ -0,0 +1,56 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Components resource type. */ +@JsonSerialize(using = StatusPagesComponentGroupType.StatusPagesComponentGroupTypeSerializer.class) +public class StatusPagesComponentGroupType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("components")); + + public static final StatusPagesComponentGroupType COMPONENTS = + new StatusPagesComponentGroupType("components"); + + StatusPagesComponentGroupType(String value) { + super(value, allowedValues); + } + + public static class StatusPagesComponentGroupTypeSerializer + extends StdSerializer { + public StatusPagesComponentGroupTypeSerializer(Class t) { + super(t); + } + + public StatusPagesComponentGroupTypeSerializer() { + this(null); + } + + @Override + public void serialize( + StatusPagesComponentGroupType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static StatusPagesComponentGroupType fromValue(String value) { + return new StatusPagesComponentGroupType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesUser.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesUser.java new file mode 100644 index 00000000000..97216143735 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesUser.java @@ -0,0 +1,205 @@ +/* + * 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({ + StatusPagesUser.JSON_PROPERTY_ATTRIBUTES, + StatusPagesUser.JSON_PROPERTY_ID, + StatusPagesUser.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private StatusPagesUserAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public StatusPagesUser() {} + + @JsonCreator + public StatusPagesUser( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPagesUser attributes(StatusPagesUserAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusPagesUserAttributes getAttributes() { + return attributes; + } + + public void setAttributes(StatusPagesUserAttributes attributes) { + this.attributes = attributes; + } + + public StatusPagesUser id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatusPagesUser type(StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 StatusPagesUser + */ + @JsonAnySetter + public StatusPagesUser 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 StatusPagesUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesUser statusPagesUser = (StatusPagesUser) o; + return Objects.equals(this.attributes, statusPagesUser.attributes) + && Objects.equals(this.id, statusPagesUser.id) + && Objects.equals(this.type, statusPagesUser.type) + && Objects.equals(this.additionalProperties, statusPagesUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesUser {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPagesUserAttributes.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesUserAttributes.java new file mode 100644 index 00000000000..612a6a4ec34 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesUserAttributes.java @@ -0,0 +1,246 @@ +/* + * 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({ + StatusPagesUserAttributes.JSON_PROPERTY_EMAIL, + StatusPagesUserAttributes.JSON_PROPERTY_HANDLE, + StatusPagesUserAttributes.JSON_PROPERTY_ICON, + StatusPagesUserAttributes.JSON_PROPERTY_NAME, + StatusPagesUserAttributes.JSON_PROPERTY_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPagesUserAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_HANDLE = "handle"; + private String handle; + + public static final String JSON_PROPERTY_ICON = "icon"; + private String icon; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + public StatusPagesUserAttributes email(String email) { + this.email = email; + return this; + } + + /** + * Getemail + * + * @return email + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public StatusPagesUserAttributes handle(String handle) { + this.handle = handle; + return this; + } + + /** + * Gethandle + * + * @return handle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + public StatusPagesUserAttributes icon(String icon) { + this.icon = icon; + return this; + } + + /** + * Geticon + * + * @return icon + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ICON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public StatusPagesUserAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StatusPagesUserAttributes uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Getuuid + * + * @return uuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * 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 StatusPagesUserAttributes + */ + @JsonAnySetter + public StatusPagesUserAttributes 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 StatusPagesUserAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPagesUserAttributes statusPagesUserAttributes = (StatusPagesUserAttributes) o; + return Objects.equals(this.email, statusPagesUserAttributes.email) + && Objects.equals(this.handle, statusPagesUserAttributes.handle) + && Objects.equals(this.icon, statusPagesUserAttributes.icon) + && Objects.equals(this.name, statusPagesUserAttributes.name) + && Objects.equals(this.uuid, statusPagesUserAttributes.uuid) + && Objects.equals( + this.additionalProperties, statusPagesUserAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(email, handle, icon, name, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPagesUserAttributes {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); + sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).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/StatusPagesUserType.java b/src/main/java/com/datadog/api/client/v2/model/StatusPagesUserType.java new file mode 100644 index 00000000000..575b2fbfbad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPagesUserType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Users resource type. */ +@JsonSerialize(using = StatusPagesUserType.StatusPagesUserTypeSerializer.class) +public class StatusPagesUserType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("users")); + + public static final StatusPagesUserType USERS = new StatusPagesUserType("users"); + + StatusPagesUserType(String value) { + super(value, allowedValues); + } + + public static class StatusPagesUserTypeSerializer extends StdSerializer { + public StatusPagesUserTypeSerializer(Class t) { + super(t); + } + + public StatusPagesUserTypeSerializer() { + this(null); + } + + @Override + public void serialize( + StatusPagesUserType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static StatusPagesUserType fromValue(String value) { + return new StatusPagesUserType(value); + } +} diff --git a/src/test/resources/cassettes/features/v2/Create_component_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_component_returns_Created_response.freeze new file mode 100644 index 00000000000..f025fb02025 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_component_returns_Created_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:29.212Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_component_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_component_returns_Created_response.json new file mode 100644 index 00000000000..d8ca8d303f7 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_component_returns_Created_response.json @@ -0,0 +1,104 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"4757e87f9ce8314d\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-4757e87f9ce8314d\",\"enabled\":true,\"name\":\"[DD Integration Tests] 4757e87f9ce8314d\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"9630d960-6b78-43fc-8bf2-c89f96c90fcc\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"cf53df23-442e-46ff-8d01-e131287162ca\",\"name\":\"4757e87f9ce8314d\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:29.365591Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-4757e87f9ce8314d\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:29.365591Z\",\"name\":\"[DD Integration Tests] 4757e87f9ce8314d\",\"page_url\":\"https://frog.datadoghq.com/status-pages/9630d960-6b78-43fc-8bf2-c89f96c90fcc/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "db59b611-0030-5e30-d81f-0fb58ee56065" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"4757e87f9ce8314d\",\"position\":0,\"type\":\"component\"},\"type\":\"components\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages/9630d960-6b78-43fc-8bf2-c89f96c90fcc/components", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"29815cf0-ec53-4a76-a83a-1c0f1e7dd311\",\"type\":\"components\",\"attributes\":{\"created_at\":\"2026-01-09T15:10:29.884285Z\",\"modified_at\":\"2026-01-09T15:10:29.884285Z\",\"name\":\"4757e87f9ce8314d\",\"position\":0,\"status\":\"operational\",\"type\":\"component\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"group\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"9630d960-6b78-43fc-8bf2-c89f96c90fcc\",\"type\":\"status_pages\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f4f9fa99-0dee-a31f-d264-448b1393fecd" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/9630d960-6b78-43fc-8bf2-c89f96c90fcc/components/29815cf0-ec53-4a76-a83a-1c0f1e7dd311", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "83413b84-e548-f055-da55-6db12a167009" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/9630d960-6b78-43fc-8bf2-c89f96c90fcc", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "1b7f79db-3a70-4abb-fc47-2fd0e700f29f" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_degradation_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_degradation_returns_Created_response.freeze new file mode 100644 index 00000000000..8315f6ceeb6 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_degradation_returns_Created_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:30.540Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_degradation_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_degradation_returns_Created_response.json new file mode 100644 index 00000000000..1a9fda6a3c4 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_degradation_returns_Created_response.json @@ -0,0 +1,104 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"636ab3da70919775\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-636ab3da70919775\",\"enabled\":true,\"name\":\"[DD Integration Tests] 636ab3da70919775\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"76134dd6-d6e9-480d-8004-3f1ad908457d\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"4139718b-3133-40a7-835f-cf4497e13306\",\"name\":\"636ab3da70919775\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:30.690398Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-636ab3da70919775\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:30.690398Z\",\"name\":\"[DD Integration Tests] 636ab3da70919775\",\"page_url\":\"https://frog.datadoghq.com/status-pages/76134dd6-d6e9-480d-8004-3f1ad908457d/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "76878533-596d-c06e-a703-597709840fcc" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components_affected\":[{\"id\":\"4139718b-3133-40a7-835f-cf4497e13306\",\"status\":\"major_outage\"}],\"description\":\"636ab3da70919775\",\"status\":\"investigating\",\"title\":\"636ab3da70919775\"},\"type\":\"degradations\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages/76134dd6-d6e9-480d-8004-3f1ad908457d/degradations", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"a9b60bd0-2a32-4de6-aa84-3bb0943dc285\",\"type\":\"degradations\",\"attributes\":{\"components_affected\":[{\"id\":\"4139718b-3133-40a7-835f-cf4497e13306\",\"name\":\"636ab3da70919775\",\"status\":\"major_outage\"}],\"created_at\":\"2026-01-09T15:10:31.218323Z\",\"description\":\"636ab3da70919775\",\"modified_at\":\"2026-01-09T15:10:31.218323Z\",\"status\":\"investigating\",\"title\":\"636ab3da70919775\",\"updates\":[{\"id\":\"5549656a-96a6-4862-aa64-887768a11f83\",\"created_at\":\"2026-01-09T15:10:31.218323Z\",\"modified_at\":\"2026-01-09T15:10:31.218323Z\",\"started_at\":\"0001-01-01T00:00:00Z\",\"status\":\"investigating\",\"description\":\"636ab3da70919775\",\"components_affected\":[{\"id\":\"4139718b-3133-40a7-835f-cf4497e13306\",\"name\":\"636ab3da70919775\",\"status\":\"major_outage\"}]}]},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"76134dd6-d6e9-480d-8004-3f1ad908457d\",\"type\":\"status_pages\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "594c5090-5164-bb4f-5142-3f1ae06375ee" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/76134dd6-d6e9-480d-8004-3f1ad908457d/degradations/a9b60bd0-2a32-4de6-aa84-3bb0943dc285", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ee9985db-3f25-06da-fe02-ec4b72522c4d" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/76134dd6-d6e9-480d-8004-3f1ad908457d", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "160bee44-f5ee-b8d7-043b-e7106c184088" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_status_page_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_status_page_returns_Created_response.freeze new file mode 100644 index 00000000000..2ce0b2eae0c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_status_page_returns_Created_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:31.884Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_status_page_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_status_page_returns_Created_response.json new file mode 100644 index 00000000000..98558a4049e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_status_page_returns_Created_response.json @@ -0,0 +1,53 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"domain_prefix\":\"dd-integrations-tests-1596605167a144b9\",\"enabled\":true,\"name\":\"[DD Integration Tests] 1596605167a144b9\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"763a57ab-77be-42f3-ab01-3446904814aa\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-09T15:10:32.045556Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integrations-tests-1596605167a144b9\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:32.045556Z\",\"name\":\"[DD Integration Tests] 1596605167a144b9\",\"page_url\":\"https://frog.datadoghq.com/status-pages/763a57ab-77be-42f3-ab01-3446904814aa/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "37ab2c44-6189-c3ee-358a-e8d531feb474" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/763a57ab-77be-42f3-ab01-3446904814aa", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "fc775c90-51b7-1d28-3e66-0907491cbb7c" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_component_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_component_returns_No_Content_response.freeze new file mode 100644 index 00000000000..6f60caab9db --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_component_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:32.946Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_component_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_component_returns_No_Content_response.json new file mode 100644 index 00000000000..719633a4bb1 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_component_returns_No_Content_response.json @@ -0,0 +1,74 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"c9c5ea54880643a9\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-c9c5ea54880643a9\",\"enabled\":true,\"name\":\"[DD Integration Tests] c9c5ea54880643a9\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"4042dd87-6324-4c15-a7f0-a11726434782\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"5ddcb366-1172-4703-9f33-9375a24d0e98\",\"name\":\"c9c5ea54880643a9\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:33.076426Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-c9c5ea54880643a9\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:33.076426Z\",\"name\":\"[DD Integration Tests] c9c5ea54880643a9\",\"page_url\":\"https://frog.datadoghq.com/status-pages/4042dd87-6324-4c15-a7f0-a11726434782/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "496f98b4-8fb1-1c34-e0a1-b7c30233333d" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/4042dd87-6324-4c15-a7f0-a11726434782/components/5ddcb366-1172-4703-9f33-9375a24d0e98", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "8dd82c85-9516-08c6-9592-a8ddc3137559" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/4042dd87-6324-4c15-a7f0-a11726434782", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "43f1c522-7cce-6846-2a38-fa9360f0d236" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_degradation_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_degradation_returns_No_Content_response.freeze new file mode 100644 index 00000000000..542f198ae1c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_degradation_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:34.202Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_degradation_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_degradation_returns_No_Content_response.json new file mode 100644 index 00000000000..2a4823625c2 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_degradation_returns_No_Content_response.json @@ -0,0 +1,130 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"6e0ac73a3aac14d9\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-6e0ac73a3aac14d9\",\"enabled\":true,\"name\":\"[DD Integration Tests] 6e0ac73a3aac14d9\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"c2bb233a-5c1c-44cd-9805-45a7db97251e\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"ccf4aff5-a66c-4745-95cd-6913b8fe923b\",\"name\":\"6e0ac73a3aac14d9\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:34.337609Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-6e0ac73a3aac14d9\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:34.337609Z\",\"name\":\"[DD Integration Tests] 6e0ac73a3aac14d9\",\"page_url\":\"https://frog.datadoghq.com/status-pages/c2bb233a-5c1c-44cd-9805-45a7db97251e/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ea262d30-0d1f-aebf-4af7-6841a500da88" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components_affected\":[{\"id\":\"ccf4aff5-a66c-4745-95cd-6913b8fe923b\",\"status\":\"major_outage\"}],\"status\":\"investigating\",\"title\":\"Test-Delete_degradation_returns_No_Content_response-1767971434\"},\"type\":\"degradations\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages/c2bb233a-5c1c-44cd-9805-45a7db97251e/degradations", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"4f486ca4-cc4f-4078-bd17-ae764a77788d\",\"type\":\"degradations\",\"attributes\":{\"components_affected\":[{\"id\":\"ccf4aff5-a66c-4745-95cd-6913b8fe923b\",\"name\":\"6e0ac73a3aac14d9\",\"status\":\"major_outage\"}],\"created_at\":\"2026-01-09T15:10:34.854568Z\",\"description\":\"\",\"modified_at\":\"2026-01-09T15:10:34.854568Z\",\"status\":\"investigating\",\"title\":\"Test-Delete_degradation_returns_No_Content_response-1767971434\",\"updates\":[{\"id\":\"8c235e5d-20e2-465f-b4c5-8829c852aa64\",\"created_at\":\"2026-01-09T15:10:34.854568Z\",\"modified_at\":\"2026-01-09T15:10:34.854568Z\",\"started_at\":\"0001-01-01T00:00:00Z\",\"status\":\"investigating\",\"description\":\"\",\"components_affected\":[{\"id\":\"ccf4aff5-a66c-4745-95cd-6913b8fe923b\",\"name\":\"6e0ac73a3aac14d9\",\"status\":\"major_outage\"}]}]},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"c2bb233a-5c1c-44cd-9805-45a7db97251e\",\"type\":\"status_pages\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "89d454d0-2925-d976-3b38-b37c7cd51933" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/c2bb233a-5c1c-44cd-9805-45a7db97251e/degradations/4f486ca4-cc4f-4078-bd17-ae764a77788d", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "97ff6ed5-724b-8719-0fa1-3e52d176e4c9" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/c2bb233a-5c1c-44cd-9805-45a7db97251e/degradations/4f486ca4-cc4f-4078-bd17-ae764a77788d", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"degradation not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "97ff6ed5-724b-8719-0fa1-3e52d176e4ca" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/c2bb233a-5c1c-44cd-9805-45a7db97251e", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "63426ea9-c3b0-4937-744c-881c936c3f70" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_status_page_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_status_page_returns_No_Content_response.freeze new file mode 100644 index 00000000000..21e29828a09 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_status_page_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:35.590Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_status_page_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_status_page_returns_No_Content_response.json new file mode 100644 index 00000000000..5785587172d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_status_page_returns_No_Content_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"40b563f89cb4c39d\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-40b563f89cb4c39d\",\"enabled\":true,\"name\":\"[DD Integration Tests] 40b563f89cb4c39d\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"48d99313-e0c7-4191-89a2-a53a8bc6b789\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"d2fc15ec-3955-4215-8d2f-70ec54d42ab8\",\"name\":\"40b563f89cb4c39d\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:35.73108Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-40b563f89cb4c39d\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:35.73108Z\",\"name\":\"[DD Integration Tests] 40b563f89cb4c39d\",\"page_url\":\"https://frog.datadoghq.com/status-pages/48d99313-e0c7-4191-89a2-a53a8bc6b789/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5bc63b76-d811-1ba6-ff6a-0030d170ef56" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/48d99313-e0c7-4191-89a2-a53a8bc6b789", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "8092dc56-e60c-a8c7-a502-f14f6ab27cd5" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/48d99313-e0c7-4191-89a2-a53a8bc6b789", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"status page not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "8092dc56-e60c-a8c7-a502-f14f6ab27cd6" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_component_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_component_returns_OK_response.freeze new file mode 100644 index 00000000000..b4766bb29f1 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_component_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:36.762Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_component_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_component_returns_OK_response.json new file mode 100644 index 00000000000..08f0a12a24b --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_component_returns_OK_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"b431563880c76af5\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-b431563880c76af5\",\"enabled\":true,\"name\":\"[DD Integration Tests] b431563880c76af5\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"6bcd6526-f434-400b-a122-5a85d756ac05\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"dd4873ec-14bf-4d53-a6e7-dcbadb247cbc\",\"name\":\"b431563880c76af5\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:36.900813Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-b431563880c76af5\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:36.900813Z\",\"name\":\"[DD Integration Tests] b431563880c76af5\",\"page_url\":\"https://frog.datadoghq.com/status-pages/6bcd6526-f434-400b-a122-5a85d756ac05/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6aaf5a16-482e-6781-9b1c-24beb53e2168" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/statuspages/6bcd6526-f434-400b-a122-5a85d756ac05/components/dd4873ec-14bf-4d53-a6e7-dcbadb247cbc", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"dd4873ec-14bf-4d53-a6e7-dcbadb247cbc\",\"type\":\"components\",\"attributes\":{\"created_at\":\"2026-01-09T15:10:36.900813Z\",\"modified_at\":\"2026-01-09T15:10:36.900813Z\",\"name\":\"b431563880c76af5\",\"position\":0,\"status\":\"operational\",\"type\":\"component\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"group\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"6bcd6526-f434-400b-a122-5a85d756ac05\",\"type\":\"status_pages\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5f96dff6-0669-6115-c74b-b574ba733160" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/6bcd6526-f434-400b-a122-5a85d756ac05", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "7e179ee9-11a4-d7d1-4af8-66ec96d49de7" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_degradation_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_degradation_returns_OK_response.freeze new file mode 100644 index 00000000000..77ec7855df8 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_degradation_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:37.934Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_degradation_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_degradation_returns_OK_response.json new file mode 100644 index 00000000000..c6423695160 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_degradation_returns_OK_response.json @@ -0,0 +1,130 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"899d733c0fb73689\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-899d733c0fb73689\",\"enabled\":true,\"name\":\"[DD Integration Tests] 899d733c0fb73689\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"6fefe1b3-beb8-4bb0-88be-a66a80fb019e\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"4ad10b7a-5042-48e8-8261-8280f0cb6068\",\"name\":\"899d733c0fb73689\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:38.077815Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-899d733c0fb73689\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:38.077815Z\",\"name\":\"[DD Integration Tests] 899d733c0fb73689\",\"page_url\":\"https://frog.datadoghq.com/status-pages/6fefe1b3-beb8-4bb0-88be-a66a80fb019e/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "eb16456f-94a6-f2b4-9269-dd046fdc12a8" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components_affected\":[{\"id\":\"4ad10b7a-5042-48e8-8261-8280f0cb6068\",\"status\":\"major_outage\"}],\"status\":\"investigating\",\"title\":\"Test-Get_degradation_returns_OK_response-1767971437\"},\"type\":\"degradations\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages/6fefe1b3-beb8-4bb0-88be-a66a80fb019e/degradations", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"e8503dfd-7b3c-4dc7-817e-d31d1b993d21\",\"type\":\"degradations\",\"attributes\":{\"components_affected\":[{\"id\":\"4ad10b7a-5042-48e8-8261-8280f0cb6068\",\"name\":\"899d733c0fb73689\",\"status\":\"major_outage\"}],\"created_at\":\"2026-01-09T15:10:38.577046Z\",\"description\":\"\",\"modified_at\":\"2026-01-09T15:10:38.577046Z\",\"status\":\"investigating\",\"title\":\"Test-Get_degradation_returns_OK_response-1767971437\",\"updates\":[{\"id\":\"a32880c7-6124-41cc-9dcb-6a98381bf007\",\"created_at\":\"2026-01-09T15:10:38.577046Z\",\"modified_at\":\"2026-01-09T15:10:38.577046Z\",\"started_at\":\"0001-01-01T00:00:00Z\",\"status\":\"investigating\",\"description\":\"\",\"components_affected\":[{\"id\":\"4ad10b7a-5042-48e8-8261-8280f0cb6068\",\"name\":\"899d733c0fb73689\",\"status\":\"major_outage\"}]}]},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"6fefe1b3-beb8-4bb0-88be-a66a80fb019e\",\"type\":\"status_pages\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2f67c44b-41d0-861f-c40a-a7e1aae3cafb" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/statuspages/6fefe1b3-beb8-4bb0-88be-a66a80fb019e/degradations/e8503dfd-7b3c-4dc7-817e-d31d1b993d21", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"e8503dfd-7b3c-4dc7-817e-d31d1b993d21\",\"type\":\"degradations\",\"attributes\":{\"components_affected\":[{\"id\":\"4ad10b7a-5042-48e8-8261-8280f0cb6068\",\"name\":\"899d733c0fb73689\",\"status\":\"major_outage\"}],\"created_at\":\"2026-01-09T15:10:38.577046Z\",\"description\":\"\",\"modified_at\":\"2026-01-09T15:10:38.577046Z\",\"status\":\"investigating\",\"title\":\"Test-Get_degradation_returns_OK_response-1767971437\",\"updates\":[{\"id\":\"a32880c7-6124-41cc-9dcb-6a98381bf007\",\"created_at\":\"2026-01-09T15:10:38.577046Z\",\"modified_at\":\"2026-01-09T15:10:38.577046Z\",\"started_at\":\"0001-01-01T00:00:00Z\",\"status\":\"investigating\",\"description\":\"\",\"components_affected\":[{\"id\":\"4ad10b7a-5042-48e8-8261-8280f0cb6068\",\"name\":\"899d733c0fb73689\",\"status\":\"major_outage\"}]}]},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"6fefe1b3-beb8-4bb0-88be-a66a80fb019e\",\"type\":\"status_pages\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "8df180f5-2932-b44e-59ef-052f4dd2aaf2" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/6fefe1b3-beb8-4bb0-88be-a66a80fb019e/degradations/e8503dfd-7b3c-4dc7-817e-d31d1b993d21", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b314f3eb-514d-a801-cbc7-4f3de197b7a1" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/6fefe1b3-beb8-4bb0-88be-a66a80fb019e", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d7ba4e4d-a40d-f4dd-b2c5-cb2352f774f5" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_status_page_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_status_page_returns_OK_response.freeze new file mode 100644 index 00000000000..768b9333a19 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_status_page_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:39.311Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_status_page_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_status_page_returns_OK_response.json new file mode 100644 index 00000000000..21f7e9f2db0 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_status_page_returns_OK_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"abe8887f2e64dfa4\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-abe8887f2e64dfa4\",\"enabled\":true,\"name\":\"[DD Integration Tests] abe8887f2e64dfa4\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"46c35c5d-07d3-456c-9e5c-f254b74cc28e\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"584cde9f-4221-4e98-9d3f-087a867abd06\",\"name\":\"abe8887f2e64dfa4\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:39.435658Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-abe8887f2e64dfa4\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:39.435658Z\",\"name\":\"[DD Integration Tests] abe8887f2e64dfa4\",\"page_url\":\"https://frog.datadoghq.com/status-pages/46c35c5d-07d3-456c-9e5c-f254b74cc28e/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "395f603f-2707-8473-8971-0760ff199206" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/statuspages/46c35c5d-07d3-456c-9e5c-f254b74cc28e", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"46c35c5d-07d3-456c-9e5c-f254b74cc28e\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"584cde9f-4221-4e98-9d3f-087a867abd06\",\"name\":\"abe8887f2e64dfa4\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:39.435658Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-abe8887f2e64dfa4\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:39.435658Z\",\"name\":\"[DD Integration Tests] abe8887f2e64dfa4\",\"page_url\":\"https://frog.datadoghq.com/status-pages/46c35c5d-07d3-456c-9e5c-f254b74cc28e/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "9006e5d7-6517-ffd5-683f-aa937fc7ce1d" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/46c35c5d-07d3-456c-9e5c-f254b74cc28e", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "61dc85ed-7843-9c72-7b2f-949afa5267fe" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_components_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_components_returns_OK_response.freeze new file mode 100644 index 00000000000..63d8cd00673 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_components_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:40.428Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_components_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_components_returns_OK_response.json new file mode 100644 index 00000000000..24f2c7d669e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_components_returns_OK_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"c516461d84658757\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-c516461d84658757\",\"enabled\":true,\"name\":\"[DD Integration Tests] c516461d84658757\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"4a0b33cf-63b3-4157-bc15-9b51998e83cc\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"a2c27d85-60eb-42cf-95d7-8929fae0ff5f\",\"name\":\"c516461d84658757\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:40.571898Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-c516461d84658757\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:40.571898Z\",\"name\":\"[DD Integration Tests] c516461d84658757\",\"page_url\":\"https://frog.datadoghq.com/status-pages/4a0b33cf-63b3-4157-bc15-9b51998e83cc/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b12349b9-74a4-9078-a4e1-c44cc373a34c" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/statuspages/4a0b33cf-63b3-4157-bc15-9b51998e83cc/components", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"a2c27d85-60eb-42cf-95d7-8929fae0ff5f\",\"type\":\"components\",\"attributes\":{\"created_at\":\"2026-01-09T15:10:40.571898Z\",\"modified_at\":\"2026-01-09T15:10:40.571898Z\",\"name\":\"c516461d84658757\",\"position\":0,\"status\":\"operational\",\"type\":\"component\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"group\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"4a0b33cf-63b3-4157-bc15-9b51998e83cc\",\"type\":\"status_pages\"}}}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c0ccd952-6ea9-19f4-f2ca-d9605dfd53c8" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/4a0b33cf-63b3-4157-bc15-9b51998e83cc", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5c71f6aa-a622-6f89-39ab-a46bbfe56b10" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_degradations_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_degradations_returns_OK_response.freeze new file mode 100644 index 00000000000..f10199284d8 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_degradations_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:41.484Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_degradations_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_degradations_returns_OK_response.json new file mode 100644 index 00000000000..eb6b1ebbf3a --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_degradations_returns_OK_response.json @@ -0,0 +1,130 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"ba5854b43ab30d6e\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-ba5854b43ab30d6e\",\"enabled\":true,\"name\":\"[DD Integration Tests] ba5854b43ab30d6e\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"e7066362-3fa7-459a-a52c-b375b49681dc\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"e1649bff-ecfb-4c92-95b3-577eae4bd08c\",\"name\":\"ba5854b43ab30d6e\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:41.613246Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-ba5854b43ab30d6e\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:41.613246Z\",\"name\":\"[DD Integration Tests] ba5854b43ab30d6e\",\"page_url\":\"https://frog.datadoghq.com/status-pages/e7066362-3fa7-459a-a52c-b375b49681dc/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5a48de13-3c5d-c295-3f74-5d67bf752c41" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components_affected\":[{\"id\":\"e1649bff-ecfb-4c92-95b3-577eae4bd08c\",\"status\":\"major_outage\"}],\"status\":\"investigating\",\"title\":\"Test-List_degradations_returns_OK_response-1767971441\"},\"type\":\"degradations\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages/e7066362-3fa7-459a-a52c-b375b49681dc/degradations", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"3df8f703-c9d1-4ab5-9e21-f0357ee64df6\",\"type\":\"degradations\",\"attributes\":{\"components_affected\":[{\"id\":\"e1649bff-ecfb-4c92-95b3-577eae4bd08c\",\"name\":\"ba5854b43ab30d6e\",\"status\":\"major_outage\"}],\"created_at\":\"2026-01-09T15:10:42.12258Z\",\"description\":\"\",\"modified_at\":\"2026-01-09T15:10:42.12258Z\",\"status\":\"investigating\",\"title\":\"Test-List_degradations_returns_OK_response-1767971441\",\"updates\":[{\"id\":\"ac710e62-ea83-4ba9-9124-0c16d4797bb3\",\"created_at\":\"2026-01-09T15:10:42.12258Z\",\"modified_at\":\"2026-01-09T15:10:42.12258Z\",\"started_at\":\"0001-01-01T00:00:00Z\",\"status\":\"investigating\",\"description\":\"\",\"components_affected\":[{\"id\":\"e1649bff-ecfb-4c92-95b3-577eae4bd08c\",\"name\":\"ba5854b43ab30d6e\",\"status\":\"major_outage\"}]}]},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"e7066362-3fa7-459a-a52c-b375b49681dc\",\"type\":\"status_pages\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b9cecd98-9552-e537-26a9-2a915c263ca5" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/statuspages/degradations", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"3df8f703-c9d1-4ab5-9e21-f0357ee64df6\",\"type\":\"degradations\",\"attributes\":{\"components_affected\":[{\"id\":\"e1649bff-ecfb-4c92-95b3-577eae4bd08c\",\"name\":\"ba5854b43ab30d6e\",\"status\":\"major_outage\"}],\"created_at\":\"2026-01-09T15:10:42.12258Z\",\"description\":\"\",\"modified_at\":\"2026-01-09T15:10:42.12258Z\",\"status\":\"investigating\",\"title\":\"Test-List_degradations_returns_OK_response-1767971441\",\"updates\":[{\"id\":\"ac710e62-ea83-4ba9-9124-0c16d4797bb3\",\"created_at\":\"2026-01-09T15:10:42.12258Z\",\"modified_at\":\"2026-01-09T15:10:42.12258Z\",\"started_at\":\"0001-01-01T00:00:00Z\",\"status\":\"investigating\",\"description\":\"\",\"components_affected\":[{\"id\":\"e1649bff-ecfb-4c92-95b3-577eae4bd08c\",\"name\":\"ba5854b43ab30d6e\",\"status\":\"major_outage\"}]}]},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"e7066362-3fa7-459a-a52c-b375b49681dc\",\"type\":\"status_pages\"}}}}],\"meta\":{\"page\":{\"type\":\"offset_limit\",\"offset\":0,\"limit\":50,\"total\":1,\"first_offset\":0,\"prev_offset\":null,\"next_offset\":null,\"last_offset\":0}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3de108df-35d0-fa48-2f82-799dc5cb1120" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/e7066362-3fa7-459a-a52c-b375b49681dc/degradations/3df8f703-c9d1-4ab5-9e21-f0357ee64df6", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "92022584-72be-187c-00c4-95a0bd1993aa" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/e7066362-3fa7-459a-a52c-b375b49681dc", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3339c9e1-90fc-d775-a437-440ebeb7161d" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_status_pages_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_status_pages_returns_OK_response.freeze new file mode 100644 index 00000000000..4dd141e72b9 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_status_pages_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:42.881Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_status_pages_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_status_pages_returns_OK_response.json new file mode 100644 index 00000000000..e2721637acd --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_status_pages_returns_OK_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"5e73c258cf890af1\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-5e73c258cf890af1\",\"enabled\":true,\"name\":\"[DD Integration Tests] 5e73c258cf890af1\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"49f512f1-cc33-433b-9856-546a9b6bc558\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"87854501-5e38-4291-9347-9b26b30f7cc1\",\"name\":\"5e73c258cf890af1\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:43.023408Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-5e73c258cf890af1\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:43.023408Z\",\"name\":\"[DD Integration Tests] 5e73c258cf890af1\",\"page_url\":\"https://frog.datadoghq.com/status-pages/49f512f1-cc33-433b-9856-546a9b6bc558/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "0df555d7-ccaf-13b2-4228-ea5dc4c282cc" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"49f512f1-cc33-433b-9856-546a9b6bc558\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"87854501-5e38-4291-9347-9b26b30f7cc1\",\"name\":\"5e73c258cf890af1\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:43.023408Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-5e73c258cf890af1\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:43.023408Z\",\"name\":\"[DD Integration Tests] 5e73c258cf890af1\",\"page_url\":\"https://frog.datadoghq.com/status-pages/49f512f1-cc33-433b-9856-546a9b6bc558/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"6e7cd26d-79d2-4dfa-bc03-14d914aa44ec\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"b2100c9b-d016-40d4-b67f-647abb9d7916\",\"name\":\"9ba6df06aa644d8b\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-07T22:05:22.623944Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-9ba6df06aa644d8b\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T22:05:22.623944Z\",\"name\":\"[DD Integration Test] 9ba6df06aa644d8b\",\"page_url\":\"https://frog.datadoghq.com/status-pages/6e7cd26d-79d2-4dfa-bc03-14d914aa44ec/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"6535d2c8-2d61-4534-8151-16c3c574bcfb\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"2178a015-9c63-4745-bef0-1c7135d1b589\",\"name\":\"54fe6e4053ebf532\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-07T22:05:19.225268Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-54fe6e4053ebf532\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T22:05:19.225268Z\",\"name\":\"[DD Integration Test] 54fe6e4053ebf532\",\"page_url\":\"https://frog.datadoghq.com/status-pages/6535d2c8-2d61-4534-8151-16c3c574bcfb/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"3db89765-421e-4a36-9f60-ceb162065641\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"5e73ceed-9884-45e7-965e-f1ee95179c35\",\"name\":\"077d555eebe600d3\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-07T21:55:48.801746Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-077d555eebe600d3\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:55:48.801746Z\",\"name\":\"[DD Integration Test] 077d555eebe600d3\",\"page_url\":\"https://frog.datadoghq.com/status-pages/3db89765-421e-4a36-9f60-ceb162065641/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"5d678e15-7600-4155-b3b3-48508819494e\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"38fbfc07-c795-4da4-9a29-7efccdd3dcd3\",\"name\":\"c6ab27006fcf9f4f\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-07T21:55:46.101889Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-c6ab27006fcf9f4f\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:55:46.101889Z\",\"name\":\"[DD Integration Test] c6ab27006fcf9f4f\",\"page_url\":\"https://frog.datadoghq.com/status-pages/5d678e15-7600-4155-b3b3-48508819494e/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"90de0053-004c-49f5-ac0f-8629155e9fe4\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"f6b66363-15fd-4463-8054-4ac69d3646a5\",\"name\":\"b21466a263ea70bd\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-07T21:49:26.186112Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-b21466a263ea70bd\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:49:26.186112Z\",\"name\":\"[DD Integration Test] b21466a263ea70bd\",\"page_url\":\"https://frog.datadoghq.com/status-pages/90de0053-004c-49f5-ac0f-8629155e9fe4/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"d47b09d6-7037-407c-af7b-f88633cf7462\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"d866aa95-5d0c-4045-9a44-4067ca52124b\",\"name\":\"9ccc29ccc7ee9a0b\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-07T21:49:23.174194Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-9ccc29ccc7ee9a0b\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:49:23.174194Z\",\"name\":\"[DD Integration Test] 9ccc29ccc7ee9a0b\",\"page_url\":\"https://frog.datadoghq.com/status-pages/d47b09d6-7037-407c-af7b-f88633cf7462/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"bc304f2e-115b-4845-824c-1bb53290a052\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"b14a8692-41db-4235-9243-2b80078e5992\",\"name\":\"3143901166b0273b\",\"type\":\"component\",\"status\":\"operational\",\"position\":0},{\"id\":\"9d65e710-e914-4120-9b8f-523e57ad350b\",\"name\":\"3143901166b0273b\",\"type\":\"component\",\"status\":\"operational\",\"position\":1}],\"created_at\":\"2026-01-07T21:49:18.933778Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-3143901166b0273b\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:49:18.933778Z\",\"name\":\"[DD Integration Test] 3143901166b0273b\",\"page_url\":\"https://frog.datadoghq.com/status-pages/bc304f2e-115b-4845-824c-1bb53290a052/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"6a519e03-8ded-4dc5-a2b3-d7044df1e27e\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"248244d7-3563-4af1-8f7a-cc27535c7906\",\"name\":\"1c37956378cc69f6\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-07T21:41:50.317387Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-1c37956378cc69f6\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:41:50.317387Z\",\"name\":\"[DD Integration Test] 1c37956378cc69f6\",\"page_url\":\"https://frog.datadoghq.com/status-pages/6a519e03-8ded-4dc5-a2b3-d7044df1e27e/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"fd9e7865-b7e1-4b26-9dbf-f413f7f4344d\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"a0a76efc-9290-4dd2-9510-72352f66275c\",\"name\":\"61f869c3aa19a4b7\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-07T21:41:47.280186Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-61f869c3aa19a4b7\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:41:47.280186Z\",\"name\":\"[DD Integration Test] 61f869c3aa19a4b7\",\"page_url\":\"https://frog.datadoghq.com/status-pages/fd9e7865-b7e1-4b26-9dbf-f413f7f4344d/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"4fabae47-e7e4-468a-a789-401f9d495ba8\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"c3dc1706-689f-4384-b1a7-642d659c7aaa\",\"name\":\"870bec4063819bfd\",\"type\":\"component\",\"status\":\"operational\",\"position\":0},{\"id\":\"36b2e214-b16b-4f4e-9c82-a2a2f5f58754\",\"name\":\"870bec4063819bfd\",\"type\":\"component\",\"status\":\"operational\",\"position\":1}],\"created_at\":\"2026-01-07T21:41:42.385118Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-870bec4063819bfd\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:41:42.385118Z\",\"name\":\"[DD Integration Test] 870bec4063819bfd\",\"page_url\":\"https://frog.datadoghq.com/status-pages/4fabae47-e7e4-468a-a789-401f9d495ba8/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"ed901017-3b6a-412c-a09d-1fe4b50d5e36\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:22:43.675027Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-e05459544e87a3fe\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:22:43.675027Z\",\"name\":\"[DD Integration Test] e05459544e87a3fe\",\"page_url\":\"https://frog.datadoghq.com/status-pages/ed901017-3b6a-412c-a09d-1fe4b50d5e36/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"c262df8c-9002-4e61-a03b-d323920b114a\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:22:40.516393Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-30e3c8ba4f62d497\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:22:40.516393Z\",\"name\":\"[DD Integration Test] 30e3c8ba4f62d497\",\"page_url\":\"https://frog.datadoghq.com/status-pages/c262df8c-9002-4e61-a03b-d323920b114a/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"ae02ad48-4559-4e8b-9889-0a956faa575c\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:22:38.425471Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-1ba103377093c75e\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:22:38.425471Z\",\"name\":\"[DD Integration Test] 1ba103377093c75e\",\"page_url\":\"https://frog.datadoghq.com/status-pages/ae02ad48-4559-4e8b-9889-0a956faa575c/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"a27d141d-5dbd-49db-98ec-73282ec8c80d\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"2ff20b5f-9491-4c47-a206-0ed62ed48830\",\"name\":\"64ab73a5b8f98b8d\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-07T21:22:37.706128Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-test-64ab73a5b8f98b8d\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T21:22:37.706128Z\",\"name\":\"[DD Integration Test] 64ab73a5b8f98b8d\",\"page_url\":\"https://frog.datadoghq.com/status-pages/a27d141d-5dbd-49db-98ec-73282ec8c80d/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"a1c25dbe-c831-48bd-aace-c3409677af46\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:11:56.780114Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-0db702e3d8a7bd3c\",\"email_header_image\":null,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-01-07T21:11:56.780114Z\",\"name\":\"[DD Integration Tests] 0db702e3d8a7bd3c\",\"page_url\":\"https://dd-integration-tests-0db702e3d8a7bd3c.statuspage.datadoghq.com\",\"subscriptions_enabled\":false,\"type\":\"public\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"e8e27aab-fd3a-464f-a92c-1dffbaf8d87b\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:11:54.033448Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-82646388753265bf\",\"email_header_image\":null,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-01-07T21:11:54.033448Z\",\"name\":\"[DD Integration Tests] 82646388753265bf\",\"page_url\":\"https://dd-integration-tests-82646388753265bf.statuspage.datadoghq.com\",\"subscriptions_enabled\":false,\"type\":\"public\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"eeeeb3bb-f4cb-478e-bf7d-67f64c956a06\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:11:52.229036Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-00e82e0f4dc68aae\",\"email_header_image\":null,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-01-07T21:11:52.229036Z\",\"name\":\"[DD Integration Tests] 00e82e0f4dc68aae\",\"page_url\":\"https://dd-integration-tests-00e82e0f4dc68aae.statuspage.datadoghq.com\",\"subscriptions_enabled\":false,\"type\":\"public\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"9b1f5e72-5969-4853-ad19-6a5020b033b8\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:10:11.1415Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-4e4bc320b5b5f2c0\",\"email_header_image\":null,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-01-07T21:10:11.1415Z\",\"name\":\"[DD Integration Tests] 4e4bc320b5b5f2c0\",\"page_url\":\"https://dd-integration-tests-4e4bc320b5b5f2c0.statuspage.datadoghq.com\",\"subscriptions_enabled\":false,\"type\":\"public\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"8ca981f1-be34-4764-80fa-616b982116c9\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:10:07.983695Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-8057687cf2d73daa\",\"email_header_image\":null,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-01-07T21:10:07.983695Z\",\"name\":\"[DD Integration Tests] 8057687cf2d73daa\",\"page_url\":\"https://dd-integration-tests-8057687cf2d73daa.statuspage.datadoghq.com\",\"subscriptions_enabled\":false,\"type\":\"public\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"d392d939-0c15-41bb-bace-4b06b83387e6\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:10:06.271298Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-fc83cc60c0c3a755\",\"email_header_image\":null,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-01-07T21:10:06.271298Z\",\"name\":\"[DD Integration Tests] fc83cc60c0c3a755\",\"page_url\":\"https://dd-integration-tests-fc83cc60c0c3a755.statuspage.datadoghq.com\",\"subscriptions_enabled\":false,\"type\":\"public\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"83fd9094-3cfa-4633-8ed0-82007f67f8a5\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"c1500be3-201d-4e96-959f-1b82966d4fcf\",\"name\":\"f12dadf4e55361ae\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-07T21:10:05.67638Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-f12dadf4e55361ae\",\"email_header_image\":null,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-01-07T21:10:05.67638Z\",\"name\":\"[DD Integration Tests] f12dadf4e55361ae\",\"page_url\":\"https://dd-integration-tests-f12dadf4e55361ae.statuspage.datadoghq.com\",\"subscriptions_enabled\":false,\"type\":\"public\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"d4389eb4-44e3-4702-a529-3e8222d7df14\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:03:50.757662Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-5ab57055089e6436\",\"email_header_image\":null,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-01-07T21:03:50.757662Z\",\"name\":\"[DD Integration Tests] 5ab57055089e6436\",\"page_url\":\"https://dd-integration-tests-5ab57055089e6436.statuspage.datadoghq.com\",\"subscriptions_enabled\":false,\"type\":\"public\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"5753e1d2-108f-4638-a1f0-97b9610ef01e\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:03:47.811848Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-9e473b8c7d84baba\",\"email_header_image\":null,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-01-07T21:03:47.811848Z\",\"name\":\"[DD Integration Tests] 9e473b8c7d84baba\",\"page_url\":\"https://dd-integration-tests-9e473b8c7d84baba.statuspage.datadoghq.com\",\"subscriptions_enabled\":false,\"type\":\"public\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"8d518371-6de9-4d93-8678-f0bd40e4fe9e\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T21:03:45.784706Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-edc47fe7bdd8355b\",\"email_header_image\":null,\"enabled\":false,\"favicon\":null,\"modified_at\":\"2026-01-07T21:03:45.784706Z\",\"name\":\"[DD Integration Tests] edc47fe7bdd8355b\",\"page_url\":\"https://dd-integration-tests-edc47fe7bdd8355b.statuspage.datadoghq.com\",\"subscriptions_enabled\":false,\"type\":\"public\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"e1ca6871-b3a2-4e66-9558-1b375ba35fe5\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T20:43:44.147307Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integrations-tests-test-page-2\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T20:43:44.147307Z\",\"name\":\"[DD Integration Tests] test page 2\",\"page_url\":\"https://frog.datadoghq.com/status-pages/e1ca6871-b3a2-4e66-9558-1b375ba35fe5/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}},{\"id\":\"67a67cf9-02ea-48d6-baf7-e6c2d8c20baf\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[],\"created_at\":\"2026-01-07T20:36:07.947173Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integrations-tests-test-page\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-07T20:36:07.947173Z\",\"name\":\"[DD Integration Tests] test page\",\"page_url\":\"https://frog.datadoghq.com/status-pages/67a67cf9-02ea-48d6-baf7-e6c2d8c20baf/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"type\":\"offset_limit\",\"offset\":0,\"limit\":50,\"total\":null,\"first_offset\":0,\"prev_offset\":null,\"next_offset\":50,\"last_offset\":null}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "03ed7bd5-10a1-f889-3eb1-a90550237abe" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/49f512f1-cc33-433b-9856-546a9b6bc558", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ddd076f0-1f3e-9235-768e-b1c3927990b7" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_component_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_component_returns_OK_response.freeze new file mode 100644 index 00000000000..5060d5d722d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_component_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:44.231Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_component_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_component_returns_OK_response.json new file mode 100644 index 00000000000..7ec0398c4d2 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_component_returns_OK_response.json @@ -0,0 +1,83 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"6465bfa84faaf0b2\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-6465bfa84faaf0b2\",\"enabled\":true,\"name\":\"[DD Integration Tests] 6465bfa84faaf0b2\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"99c044f8-e2d0-42e1-a002-8f17a0d0a2b3\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"a934b735-7f6a-4af8-b271-07648058f3aa\",\"name\":\"6465bfa84faaf0b2\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:44.359918Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-6465bfa84faaf0b2\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:44.359918Z\",\"name\":\"[DD Integration Tests] 6465bfa84faaf0b2\",\"page_url\":\"https://frog.datadoghq.com/status-pages/99c044f8-e2d0-42e1-a002-8f17a0d0a2b3/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c4cbd469-ef2f-1ec5-c679-62b669fc6477" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"6465bfa84faaf0b2\"},\"id\":\"a934b735-7f6a-4af8-b271-07648058f3aa\",\"type\":\"components\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/statuspages/99c044f8-e2d0-42e1-a002-8f17a0d0a2b3/components/a934b735-7f6a-4af8-b271-07648058f3aa", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"a934b735-7f6a-4af8-b271-07648058f3aa\",\"type\":\"components\",\"attributes\":{\"created_at\":\"2026-01-09T15:10:44.359918Z\",\"modified_at\":\"2026-01-09T15:10:44.823098Z\",\"name\":\"6465bfa84faaf0b2\",\"position\":0,\"status\":\"operational\",\"type\":\"component\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"group\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"99c044f8-e2d0-42e1-a002-8f17a0d0a2b3\",\"type\":\"status_pages\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "add495f9-de2d-20e9-7ac0-ea83989df37e" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/99c044f8-e2d0-42e1-a002-8f17a0d0a2b3", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b652e5f7-742e-e53d-1126-4e1dfe07b8bd" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_degradation_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_degradation_returns_OK_response.freeze new file mode 100644 index 00000000000..91a2d8e61af --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_degradation_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:45.230Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_degradation_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_degradation_returns_OK_response.json new file mode 100644 index 00000000000..f44306f83b3 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_degradation_returns_OK_response.json @@ -0,0 +1,134 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"390bb05612120734\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-390bb05612120734\",\"enabled\":true,\"name\":\"[DD Integration Tests] 390bb05612120734\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"8b4b0e3f-fad2-4522-af29-6b62e4d39605\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"3c0f50a3-5c70-4b03-86ad-75d4748000f2\",\"name\":\"390bb05612120734\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:45.376117Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-390bb05612120734\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:45.376117Z\",\"name\":\"[DD Integration Tests] 390bb05612120734\",\"page_url\":\"https://frog.datadoghq.com/status-pages/8b4b0e3f-fad2-4522-af29-6b62e4d39605/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "72bfa867-89dc-b5a5-dac3-3aa4270c6e6f" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components_affected\":[{\"id\":\"3c0f50a3-5c70-4b03-86ad-75d4748000f2\",\"status\":\"major_outage\"}],\"status\":\"investigating\",\"title\":\"Test-Update_degradation_returns_OK_response-1767971445\"},\"type\":\"degradations\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages/8b4b0e3f-fad2-4522-af29-6b62e4d39605/degradations", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"425e21e9-e614-4a50-8f1f-8b657122b375\",\"type\":\"degradations\",\"attributes\":{\"components_affected\":[{\"id\":\"3c0f50a3-5c70-4b03-86ad-75d4748000f2\",\"name\":\"390bb05612120734\",\"status\":\"major_outage\"}],\"created_at\":\"2026-01-09T15:10:45.83538Z\",\"description\":\"\",\"modified_at\":\"2026-01-09T15:10:45.83538Z\",\"status\":\"investigating\",\"title\":\"Test-Update_degradation_returns_OK_response-1767971445\",\"updates\":[{\"id\":\"87dcf959-5909-4fc4-8e6a-d038a2d5f61f\",\"created_at\":\"2026-01-09T15:10:45.83538Z\",\"modified_at\":\"2026-01-09T15:10:45.83538Z\",\"started_at\":\"0001-01-01T00:00:00Z\",\"status\":\"investigating\",\"description\":\"\",\"components_affected\":[{\"id\":\"3c0f50a3-5c70-4b03-86ad-75d4748000f2\",\"name\":\"390bb05612120734\",\"status\":\"major_outage\"}]}]},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"8b4b0e3f-fad2-4522-af29-6b62e4d39605\",\"type\":\"status_pages\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f5067d74-17ed-49f1-c051-dd0918e64433" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"title\":\"390bb05612120734\"},\"id\":\"425e21e9-e614-4a50-8f1f-8b657122b375\",\"type\":\"degradations\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/statuspages/8b4b0e3f-fad2-4522-af29-6b62e4d39605/degradations/425e21e9-e614-4a50-8f1f-8b657122b375", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"425e21e9-e614-4a50-8f1f-8b657122b375\",\"type\":\"degradations\",\"attributes\":{\"components_affected\":[{\"id\":\"3c0f50a3-5c70-4b03-86ad-75d4748000f2\",\"name\":\"390bb05612120734\",\"status\":\"major_outage\"}],\"created_at\":\"2026-01-09T15:10:45.83538Z\",\"description\":\"\",\"modified_at\":\"2026-01-09T15:10:45.999809Z\",\"status\":\"investigating\",\"title\":\"390bb05612120734\",\"updates\":[{\"id\":\"87dcf959-5909-4fc4-8e6a-d038a2d5f61f\",\"created_at\":\"2026-01-09T15:10:45.83538Z\",\"modified_at\":\"2026-01-09T15:10:45.83538Z\",\"started_at\":\"0001-01-01T00:00:00Z\",\"status\":\"investigating\",\"description\":\"\",\"components_affected\":[{\"id\":\"3c0f50a3-5c70-4b03-86ad-75d4748000f2\",\"name\":\"390bb05612120734\",\"status\":\"major_outage\"}]}]},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"status_page\":{\"data\":{\"id\":\"8b4b0e3f-fad2-4522-af29-6b62e4d39605\",\"type\":\"status_pages\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3412e187-50fb-5e1a-c3fe-7fda9713bff8" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/8b4b0e3f-fad2-4522-af29-6b62e4d39605/degradations/425e21e9-e614-4a50-8f1f-8b657122b375", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e520e5d1-1ac4-8afb-bb97-0d3b7614c40e" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/8b4b0e3f-fad2-4522-af29-6b62e4d39605", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d0d8bcdf-b057-074b-e8d0-43947dcfa187" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_status_page_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_status_page_returns_OK_response.freeze new file mode 100644 index 00000000000..d84d5839c92 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_status_page_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-01-09T15:10:46.583Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_status_page_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_status_page_returns_OK_response.json new file mode 100644 index 00000000000..09317ab8b27 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_status_page_returns_OK_response.json @@ -0,0 +1,83 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"components\":[{\"name\":\"080487af61d0e9df\",\"type\":\"component\"}],\"domain_prefix\":\"dd-integration-tests-080487af61d0e9df\",\"enabled\":true,\"name\":\"[DD Integration Tests] 080487af61d0e9df\",\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/statuspages", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"714c1ee4-c984-4ce7-9e08-abf4a690f94e\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"a98eaced-6615-4662-a2a2-96d600c79ec4\",\"name\":\"080487af61d0e9df\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:46.745983Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-080487af61d0e9df\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:46.745983Z\",\"name\":\"[DD Integration Tests] 080487af61d0e9df\",\"page_url\":\"https://frog.datadoghq.com/status-pages/714c1ee4-c984-4ce7-9e08-abf4a690f94e/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b032ce41-6b61-c6b2-5979-d586ac888a3e" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"[DD Integration Tests] 080487af61d0e9df\"},\"id\":\"714c1ee4-c984-4ce7-9e08-abf4a690f94e\",\"type\":\"status_pages\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/statuspages/714c1ee4-c984-4ce7-9e08-abf4a690f94e", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"714c1ee4-c984-4ce7-9e08-abf4a690f94e\",\"type\":\"status_pages\",\"attributes\":{\"company_logo\":null,\"components\":[{\"id\":\"a98eaced-6615-4662-a2a2-96d600c79ec4\",\"name\":\"080487af61d0e9df\",\"type\":\"component\",\"status\":\"operational\",\"position\":0}],\"created_at\":\"2026-01-09T15:10:46.745983Z\",\"custom_domain\":null,\"custom_domain_enabled\":false,\"domain_prefix\":\"dd-integration-tests-080487af61d0e9df\",\"email_header_image\":null,\"enabled\":true,\"favicon\":null,\"modified_at\":\"2026-01-09T15:10:47.266518Z\",\"name\":\"[DD Integration Tests] 080487af61d0e9df\",\"page_url\":\"https://frog.datadoghq.com/status-pages/714c1ee4-c984-4ce7-9e08-abf4a690f94e/view\",\"subscriptions_enabled\":false,\"type\":\"internal\",\"visualization_type\":\"bars_and_uptime_percentage\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ec565922-da6c-7bdc-9909-4c99383cd3d3" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/statuspages/714c1ee4-c984-4ce7-9e08-abf4a690f94e", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2f3d57b0-da40-98d9-9882-072b4dab9e78" + } +] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index aa08181879c..b9d2199fd7c 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -1185,6 +1185,34 @@ "tag": "Service Level Objectives", "operationId": "CreateSLOReportJob" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"[DD Integration Tests] {{ unique_hash }}\",\n \"domain_prefix\": \"dd-integration-tests-{{ unique_hash }}\",\n \"components\": [{\"name\": \"{{ unique_hash }}\", \"type\": \"component\"}],\n \"type\": \"internal\",\n \"visualization_type\": \"bars_and_uptime_percentage\",\n \"enabled\": true\n },\n \"type\": \"status_pages\"\n }\n}" + } + ], + "step": "there is a valid \"status_page\" in the system", + "key": "status_page", + "tag": "Status Pages", + "operationId": "CreateStatusPage" + }, + { + "parameters": [ + { + "name": "page_id", + "source": "status_page.data.id" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"title\": \"{{ unique }}\",\n \"status\": \"investigating\",\n \"components_affected\": [\n {\n \"id\": \"{{ status_page.data.attributes.components[0].id }}\",\n \"status\": \"major_outage\"\n }\n ]\n },\n \"type\": \"degradations\"\n }\n}" + } + ], + "step": "there is a valid \"degradation\" in the system", + "key": "degradation", + "tag": "Status Pages", + "operationId": "CreateDegradation" + }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v2/api/status_pages.feature b/src/test/resources/com/datadog/api/client/v2/api/status_pages.feature new file mode 100644 index 00000000000..a3c946ad9fd --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/status_pages.feature @@ -0,0 +1,140 @@ +@endpoint(status-pages) @endpoint(status-pages-v2) +Feature: Status Pages + Auto-generated tag Status Pages + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "StatusPages" API + + @team:DataDog/incident-app + Scenario: Create component returns "Created" response + Given there is a valid "status_page" in the system + And new "CreateComponent" request + And request contains "page_id" parameter from "status_page.data.id" + And body with value {"data": {"attributes": {"name": "{{ unique_hash }}", "position": 0, "type": "component"}, "type": "components"}} + When the request is sent + Then the response status is 201 Created + + @team:DataDog/incident-app + Scenario: Create degradation returns "Created" response + Given there is a valid "status_page" in the system + And new "CreateDegradation" request + And request contains "page_id" parameter from "status_page.data.id" + And body with value {"data": {"attributes": {"components_affected": [{"id": "{{ status_page.data.attributes.components[0].id }}", "status": "major_outage"}], "description": "{{ unique_hash }}", "status": "investigating", "title": "{{ unique_hash }}"}, "type": "degradations"}} + When the request is sent + Then the response status is 201 Created + + @team:DataDog/incident-app + Scenario: Create status page returns "Created" response + Given new "CreateStatusPage" request + And body with value {"data": {"attributes": {"name": "[DD Integration Tests] {{ unique_hash }}", "domain_prefix": "dd-integrations-tests-{{ unique_hash }}", "enabled": true, "type": "internal", "visualization_type": "bars_and_uptime_percentage"}, "type": "status_pages"}} + When the request is sent + Then the response status is 201 Created + + @team:DataDog/incident-app + Scenario: Delete component returns "No Content" response + Given new "DeleteComponent" request + And there is a valid "status_page" in the system + And request contains "page_id" parameter from "status_page.data.id" + And request contains "component_id" parameter from "status_page.data.attributes.components[0].id" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/incident-app + Scenario: Delete degradation returns "No Content" response + Given new "DeleteDegradation" request + And there is a valid "status_page" in the system + And there is a valid "degradation" in the system + And request contains "page_id" parameter from "status_page.data.id" + And request contains "degradation_id" parameter from "degradation.data.id" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/incident-app + Scenario: Delete status page returns "No Content" response + Given new "DeleteStatusPage" request + And there is a valid "status_page" in the system + And request contains "page_id" parameter from "status_page.data.id" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/incident-app + Scenario: Get component returns "OK" response + Given new "GetComponent" request + And there is a valid "status_page" in the system + And request contains "page_id" parameter from "status_page.data.id" + And request contains "component_id" parameter from "status_page.data.attributes.components[0].id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/incident-app + Scenario: Get degradation returns "OK" response + Given new "GetDegradation" request + And there is a valid "status_page" in the system + And there is a valid "degradation" in the system + And request contains "page_id" parameter from "status_page.data.id" + And request contains "degradation_id" parameter from "degradation.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/incident-app + Scenario: Get status page returns "OK" response + Given new "GetStatusPage" request + And there is a valid "status_page" in the system + And request contains "page_id" parameter from "status_page.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/incident-app + Scenario: List components returns "OK" response + Given new "ListComponents" request + And there is a valid "status_page" in the system + And request contains "page_id" parameter from "status_page.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/incident-app + Scenario: List degradations returns "OK" response + Given new "ListDegradations" request + And there is a valid "status_page" in the system + And there is a valid "degradation" in the system + When the request is sent + Then the response status is 200 OK + + @team:DataDog/incident-app + Scenario: List status pages returns "OK" response + Given new "ListStatusPages" request + And there is a valid "status_page" in the system + When the request is sent + Then the response status is 200 OK + + @team:DataDog/incident-app + Scenario: Update component returns "OK" response + Given new "UpdateComponent" request + And there is a valid "status_page" in the system + And request contains "page_id" parameter from "status_page.data.id" + And request contains "component_id" parameter from "status_page.data.attributes.components[0].id" + And body with value {"data": {"attributes": {"name": "{{ unique_hash }}"}, "id": "{{ status_page.data.attributes.components[0].id }}", "type": "components"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/incident-app + Scenario: Update degradation returns "OK" response + Given new "UpdateDegradation" request + And there is a valid "status_page" in the system + And there is a valid "degradation" in the system + And request contains "page_id" parameter from "status_page.data.id" + And request contains "degradation_id" parameter from "degradation.data.id" + And body with value {"data": {"attributes": {"title": "{{ unique_hash }}"}, "id": "{{ degradation.data.id }}", "type": "degradations"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/incident-app + Scenario: Update status page returns "OK" response + Given new "UpdateStatusPage" request + And there is a valid "status_page" in the system + And request contains "page_id" parameter from "status_page.data.id" + And body with value {"data": {"attributes": {"name": "[DD Integration Tests] {{ unique_hash }}"}, "id": "{{ status_page.data.id }}", "type": "status_pages"}} + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 1dc732f7009..5ac23f96161 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -4516,6 +4516,125 @@ "type": "safe" } }, + "ListStatusPages": { + "tag": "Status Pages", + "undo": { + "type": "safe" + } + }, + "CreateStatusPage": { + "tag": "Status Pages", + "undo": { + "operationId": "DeleteStatusPage", + "parameters": [ + { + "name": "page_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "ListDegradations": { + "tag": "Status Pages", + "undo": { + "type": "safe" + } + }, + "DeleteStatusPage": { + "tag": "Status Pages", + "undo": { + "type": "idempotent" + } + }, + "GetStatusPage": { + "tag": "Status Pages", + "undo": { + "type": "safe" + } + }, + "UpdateStatusPage": { + "tag": "Status Pages", + "undo": { + "type": "idempotent" + } + }, + "ListComponents": { + "tag": "Status Pages", + "undo": { + "type": "safe" + } + }, + "CreateComponent": { + "tag": "Status Pages", + "undo": { + "operationId": "DeleteComponent", + "parameters": [ + { + "name": "page_id", + "source": "data.relationships.status_page.data.id" + }, + { + "name": "component_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteComponent": { + "tag": "Status Pages", + "undo": { + "type": "idempotent" + } + }, + "GetComponent": { + "tag": "Status Pages", + "undo": { + "type": "safe" + } + }, + "UpdateComponent": { + "tag": "Status Pages", + "undo": { + "type": "idempotent" + } + }, + "CreateDegradation": { + "tag": "Status Pages", + "undo": { + "operationId": "DeleteDegradation", + "parameters": [ + { + "name": "page_id", + "source": "data.relationships.status_page.data.id" + }, + { + "name": "degradation_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteDegradation": { + "tag": "Status Pages", + "undo": { + "type": "idempotent" + } + }, + "GetDegradation": { + "tag": "Status Pages", + "undo": { + "type": "safe" + } + }, + "UpdateDegradation": { + "tag": "Status Pages", + "undo": { + "type": "idempotent" + } + }, "GetOnDemandConcurrencyCap": { "tag": "Synthetics", "undo": {