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/cassettes/features/v2/status_pages/Create-component-returns-Created-response.frozen b/cassettes/features/v2/status_pages/Create-component-returns-Created-response.frozen new file mode 100644 index 00000000000..f025fb02025 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-component-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:29.212Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Create-component-returns-Created-response.yml b/cassettes/features/v2/status_pages/Create-component-returns-Created-response.yml new file mode 100644 index 00000000000..7c9baece8f2 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-component-returns-Created-response.yml @@ -0,0 +1,80 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:29 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:29 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"4757e87f9ce8314d","position":0,"type":"component"},"type":"components"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/9630d960-6b78-43fc-8bf2-c89f96c90fcc/components + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:29 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/9630d960-6b78-43fc-8bf2-c89f96c90fcc/components/29815cf0-ec53-4a76-a83a-1c0f1e7dd311 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 15:10:29 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/9630d960-6b78-43fc-8bf2-c89f96c90fcc + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.frozen b/cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.frozen new file mode 100644 index 00000000000..8315f6ceeb6 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:30.540Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.yml b/cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.yml new file mode 100644 index 00000000000..8274632d656 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.yml @@ -0,0 +1,80 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:30 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:30 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"4139718b-3133-40a7-835f-cf4497e13306","status":"major_outage"}],"description":"636ab3da70919775","status":"investigating","title":"636ab3da70919775"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/76134dd6-d6e9-480d-8004-3f1ad908457d/degradations + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:30 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/76134dd6-d6e9-480d-8004-3f1ad908457d/degradations/a9b60bd0-2a32-4de6-aa84-3bb0943dc285 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 15:10:30 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/76134dd6-d6e9-480d-8004-3f1ad908457d + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.frozen b/cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.frozen new file mode 100644 index 00000000000..2ce0b2eae0c --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:31.884Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.yml b/cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.yml new file mode 100644 index 00000000000..a9443547336 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.yml @@ -0,0 +1,42 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:31 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:31 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/763a57ab-77be-42f3-ab01-3446904814aa + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.frozen b/cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.frozen new file mode 100644 index 00000000000..6f60caab9db --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:32.946Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.yml b/cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.yml new file mode 100644 index 00000000000..7bc824578c4 --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.yml @@ -0,0 +1,58 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:32 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:32 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/4042dd87-6324-4c15-a7f0-a11726434782/components/5ddcb366-1172-4703-9f33-9375a24d0e98 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 15:10:32 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/4042dd87-6324-4c15-a7f0-a11726434782 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.frozen b/cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.frozen new file mode 100644 index 00000000000..542f198ae1c --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:34.202Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.yml b/cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.yml new file mode 100644 index 00000000000..5e0168159ad --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.yml @@ -0,0 +1,98 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:34 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:34 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/c2bb233a-5c1c-44cd-9805-45a7db97251e/degradations + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:34 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/c2bb233a-5c1c-44cd-9805-45a7db97251e/degradations/4f486ca4-cc4f-4078-bd17-ae764a77788d + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 15:10:34 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/c2bb233a-5c1c-44cd-9805-45a7db97251e/degradations/4f486ca4-cc4f-4078-bd17-ae764a77788d + response: + body: + encoding: UTF-8 + string: '{"errors":[{"title":"Generic Error","detail":"degradation not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +- recorded_at: Fri, 09 Jan 2026 15:10:34 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/c2bb233a-5c1c-44cd-9805-45a7db97251e + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.frozen b/cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.frozen new file mode 100644 index 00000000000..21e29828a09 --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:35.590Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.yml b/cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.yml new file mode 100644 index 00000000000..78db609f771 --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.yml @@ -0,0 +1,60 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:35 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:35 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/48d99313-e0c7-4191-89a2-a53a8bc6b789 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 15:10:35 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/48d99313-e0c7-4191-89a2-a53a8bc6b789 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"title":"Generic Error","detail":"status page not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Get-component-returns-OK-response.frozen b/cassettes/features/v2/status_pages/Get-component-returns-OK-response.frozen new file mode 100644 index 00000000000..b4766bb29f1 --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-component-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:36.762Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Get-component-returns-OK-response.yml b/cassettes/features/v2/status_pages/Get-component-returns-OK-response.yml new file mode 100644 index 00000000000..96a13b72dd8 --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-component-returns-OK-response.yml @@ -0,0 +1,60 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:36 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:36 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/6bcd6526-f434-400b-a122-5a85d756ac05/components/dd4873ec-14bf-4d53-a6e7-dcbadb247cbc + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 15:10:36 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/6bcd6526-f434-400b-a122-5a85d756ac05 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.frozen b/cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.frozen new file mode 100644 index 00000000000..77ec7855df8 --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:37.934Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.yml b/cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.yml new file mode 100644 index 00000000000..ba46ad92d7f --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.yml @@ -0,0 +1,98 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:37 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:37 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/6fefe1b3-beb8-4bb0-88be-a66a80fb019e/degradations + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:37 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/6fefe1b3-beb8-4bb0-88be-a66a80fb019e/degradations/e8503dfd-7b3c-4dc7-817e-d31d1b993d21 + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 15:10:37 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/6fefe1b3-beb8-4bb0-88be-a66a80fb019e/degradations/e8503dfd-7b3c-4dc7-817e-d31d1b993d21 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 15:10:37 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/6fefe1b3-beb8-4bb0-88be-a66a80fb019e + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.frozen b/cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.frozen new file mode 100644 index 00000000000..768b9333a19 --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:39.311Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.yml b/cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.yml new file mode 100644 index 00000000000..f69e3326fd0 --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.yml @@ -0,0 +1,61 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:39 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:39 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/46c35c5d-07d3-456c-9e5c-f254b74cc28e + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 15:10:39 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/46c35c5d-07d3-456c-9e5c-f254b74cc28e + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/List-components-returns-OK-response.frozen b/cassettes/features/v2/status_pages/List-components-returns-OK-response.frozen new file mode 100644 index 00000000000..63d8cd00673 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-components-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:40.428Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/List-components-returns-OK-response.yml b/cassettes/features/v2/status_pages/List-components-returns-OK-response.yml new file mode 100644 index 00000000000..f88d144192c --- /dev/null +++ b/cassettes/features/v2/status_pages/List-components-returns-OK-response.yml @@ -0,0 +1,60 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:40 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:40 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/4a0b33cf-63b3-4157-bc15-9b51998e83cc/components + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 15:10:40 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/4a0b33cf-63b3-4157-bc15-9b51998e83cc + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/List-degradations-returns-OK-response.frozen b/cassettes/features/v2/status_pages/List-degradations-returns-OK-response.frozen new file mode 100644 index 00000000000..f10199284d8 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-degradations-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:41.484Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/List-degradations-returns-OK-response.yml b/cassettes/features/v2/status_pages/List-degradations-returns-OK-response.yml new file mode 100644 index 00000000000..02504c5b73c --- /dev/null +++ b/cassettes/features/v2/status_pages/List-degradations-returns-OK-response.yml @@ -0,0 +1,98 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:41 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:41 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/e7066362-3fa7-459a-a52c-b375b49681dc/degradations + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:41 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/degradations + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 15:10:41 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/e7066362-3fa7-459a-a52c-b375b49681dc/degradations/3df8f703-c9d1-4ab5-9e21-f0357ee64df6 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 15:10:41 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/e7066362-3fa7-459a-a52c-b375b49681dc + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.frozen b/cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.frozen new file mode 100644 index 00000000000..4dd141e72b9 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:42.881Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.yml b/cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.yml new file mode 100644 index 00000000000..b0f793a8113 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.yml @@ -0,0 +1,87 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:42 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:42 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 15:10:42 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/49f512f1-cc33-433b-9856-546a9b6bc558 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Update-component-returns-OK-response.frozen b/cassettes/features/v2/status_pages/Update-component-returns-OK-response.frozen new file mode 100644 index 00000000000..5060d5d722d --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-component-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:44.231Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Update-component-returns-OK-response.yml b/cassettes/features/v2/status_pages/Update-component-returns-OK-response.yml new file mode 100644 index 00000000000..0cb4823ac02 --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-component-returns-OK-response.yml @@ -0,0 +1,64 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:44 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:44 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"6465bfa84faaf0b2"},"id":"a934b735-7f6a-4af8-b271-07648058f3aa","type":"components"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/statuspages/99c044f8-e2d0-42e1-a002-8f17a0d0a2b3/components/a934b735-7f6a-4af8-b271-07648058f3aa + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 15:10:44 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/99c044f8-e2d0-42e1-a002-8f17a0d0a2b3 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.frozen b/cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.frozen new file mode 100644 index 00000000000..91a2d8e61af --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:45.230Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.yml b/cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.yml new file mode 100644 index 00000000000..3a78adda6aa --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.yml @@ -0,0 +1,102 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:45 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:45 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/8b4b0e3f-fad2-4522-af29-6b62e4d39605/degradations + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:45 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"title":"390bb05612120734"},"id":"425e21e9-e614-4a50-8f1f-8b657122b375","type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/statuspages/8b4b0e3f-fad2-4522-af29-6b62e4d39605/degradations/425e21e9-e614-4a50-8f1f-8b657122b375 + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 15:10:45 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/8b4b0e3f-fad2-4522-af29-6b62e4d39605/degradations/425e21e9-e614-4a50-8f1f-8b657122b375 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 15:10:45 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/8b4b0e3f-fad2-4522-af29-6b62e4d39605 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.frozen b/cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.frozen new file mode 100644 index 00000000000..d84d5839c92 --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T15:10:46.583Z \ No newline at end of file diff --git a/cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.yml b/cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.yml new file mode 100644 index 00000000000..18209f71618 --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.yml @@ -0,0 +1,65 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 15:10:46 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 15:10:46 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"[DD Integration Tests] 080487af61d0e9df"},"id":"714c1ee4-c984-4ce7-9e08-abf4a690f94e","type":"status_pages"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/statuspages/714c1ee4-c984-4ce7-9e08-abf4a690f94e + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 15:10:46 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/714c1ee4-c984-4ce7-9e08-abf4a690f94e + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/examples/v2/status-pages/CreateComponent.rb b/examples/v2/status-pages/CreateComponent.rb new file mode 100644 index 00000000000..84e4801fb41 --- /dev/null +++ b/examples/v2/status-pages/CreateComponent.rb @@ -0,0 +1,19 @@ +# Create component returns "Created" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] + +body = DatadogAPIClient::V2::CreateComponentRequest.new({ + data: DatadogAPIClient::V2::CreateComponentRequestData.new({ + attributes: DatadogAPIClient::V2::CreateComponentRequestDataAttributes.new({ + name: "5e2fd69be33e79aa", + position: 0, + type: DatadogAPIClient::V2::CreateComponentRequestDataAttributesType::COMPONENT, + }), + type: DatadogAPIClient::V2::StatusPagesComponentGroupType::COMPONENTS, + }), +}) +p api_instance.create_component(STATUS_PAGE_DATA_ID, body) diff --git a/examples/v2/status-pages/CreateDegradation.rb b/examples/v2/status-pages/CreateDegradation.rb new file mode 100644 index 00000000000..081ba41dbde --- /dev/null +++ b/examples/v2/status-pages/CreateDegradation.rb @@ -0,0 +1,26 @@ +# Create degradation returns "Created" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = ENV["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"] +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] + +body = DatadogAPIClient::V2::CreateDegradationRequest.new({ + data: DatadogAPIClient::V2::CreateDegradationRequestData.new({ + attributes: DatadogAPIClient::V2::CreateDegradationRequestDataAttributes.new({ + components_affected: [ + DatadogAPIClient::V2::CreateDegradationRequestDataAttributesComponentsAffectedItems.new({ + id: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID, + status: DatadogAPIClient::V2::StatusPagesComponentDataAttributesStatus::MAJOR_OUTAGE, + }), + ], + description: "5e2fd69be33e79aa", + status: DatadogAPIClient::V2::CreateDegradationRequestDataAttributesStatus::INVESTIGATING, + title: "5e2fd69be33e79aa", + }), + type: DatadogAPIClient::V2::PatchDegradationRequestDataType::DEGRADATIONS, + }), +}) +p api_instance.create_degradation(STATUS_PAGE_DATA_ID, body) diff --git a/examples/v2/status-pages/CreateStatusPage.rb b/examples/v2/status-pages/CreateStatusPage.rb new file mode 100644 index 00000000000..9adf58540e7 --- /dev/null +++ b/examples/v2/status-pages/CreateStatusPage.rb @@ -0,0 +1,18 @@ +# Create status page returns "Created" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +body = DatadogAPIClient::V2::CreateStatusPageRequest.new({ + data: DatadogAPIClient::V2::CreateStatusPageRequestData.new({ + attributes: DatadogAPIClient::V2::CreateStatusPageRequestDataAttributes.new({ + name: "[DD Integration Tests] 5e2fd69be33e79aa", + domain_prefix: "dd-integrations-tests-5e2fd69be33e79aa", + enabled: true, + type: DatadogAPIClient::V2::CreateStatusPageRequestDataAttributesType::INTERNAL, + visualization_type: DatadogAPIClient::V2::CreateStatusPageRequestDataAttributesVisualizationType::BARS_AND_UPTIME_PERCENTAGE, + }), + type: DatadogAPIClient::V2::StatusPageDataType::STATUS_PAGES, + }), +}) +p api_instance.create_status_page(body) diff --git a/examples/v2/status-pages/DeleteComponent.rb b/examples/v2/status-pages/DeleteComponent.rb new file mode 100644 index 00000000000..1bf98033c6f --- /dev/null +++ b/examples/v2/status-pages/DeleteComponent.rb @@ -0,0 +1,9 @@ +# Delete component returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = ENV["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"] +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] +api_instance.delete_component(STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID) diff --git a/examples/v2/status-pages/DeleteDegradation.rb b/examples/v2/status-pages/DeleteDegradation.rb new file mode 100644 index 00000000000..a8cfe97820c --- /dev/null +++ b/examples/v2/status-pages/DeleteDegradation.rb @@ -0,0 +1,11 @@ +# Delete degradation returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] + +# there is a valid "degradation" in the system +DEGRADATION_DATA_ID = ENV["DEGRADATION_DATA_ID"] +api_instance.delete_degradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID) diff --git a/examples/v2/status-pages/DeleteStatusPage.rb b/examples/v2/status-pages/DeleteStatusPage.rb new file mode 100644 index 00000000000..dcfb517bc92 --- /dev/null +++ b/examples/v2/status-pages/DeleteStatusPage.rb @@ -0,0 +1,8 @@ +# Delete status page returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] +api_instance.delete_status_page(STATUS_PAGE_DATA_ID) diff --git a/examples/v2/status-pages/GetComponent.rb b/examples/v2/status-pages/GetComponent.rb new file mode 100644 index 00000000000..92a86384431 --- /dev/null +++ b/examples/v2/status-pages/GetComponent.rb @@ -0,0 +1,9 @@ +# Get component returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = ENV["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"] +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] +p api_instance.get_component(STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID) diff --git a/examples/v2/status-pages/GetDegradation.rb b/examples/v2/status-pages/GetDegradation.rb new file mode 100644 index 00000000000..313d379208a --- /dev/null +++ b/examples/v2/status-pages/GetDegradation.rb @@ -0,0 +1,11 @@ +# Get degradation returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] + +# there is a valid "degradation" in the system +DEGRADATION_DATA_ID = ENV["DEGRADATION_DATA_ID"] +p api_instance.get_degradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID) diff --git a/examples/v2/status-pages/GetStatusPage.rb b/examples/v2/status-pages/GetStatusPage.rb new file mode 100644 index 00000000000..1823b9eb777 --- /dev/null +++ b/examples/v2/status-pages/GetStatusPage.rb @@ -0,0 +1,8 @@ +# Get status page returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] +p api_instance.get_status_page(STATUS_PAGE_DATA_ID) diff --git a/examples/v2/status-pages/ListComponents.rb b/examples/v2/status-pages/ListComponents.rb new file mode 100644 index 00000000000..8edaaeb4e23 --- /dev/null +++ b/examples/v2/status-pages/ListComponents.rb @@ -0,0 +1,8 @@ +# List components returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] +p api_instance.list_components(STATUS_PAGE_DATA_ID) diff --git a/examples/v2/status-pages/ListDegradations.rb b/examples/v2/status-pages/ListDegradations.rb new file mode 100644 index 00000000000..88b8b6279c8 --- /dev/null +++ b/examples/v2/status-pages/ListDegradations.rb @@ -0,0 +1,5 @@ +# List degradations returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new +p api_instance.list_degradations() diff --git a/examples/v2/status-pages/ListStatusPages.rb b/examples/v2/status-pages/ListStatusPages.rb new file mode 100644 index 00000000000..76bfd148f9c --- /dev/null +++ b/examples/v2/status-pages/ListStatusPages.rb @@ -0,0 +1,5 @@ +# List status pages returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new +p api_instance.list_status_pages() diff --git a/examples/v2/status-pages/UpdateComponent.rb b/examples/v2/status-pages/UpdateComponent.rb new file mode 100644 index 00000000000..1f6bdbb0188 --- /dev/null +++ b/examples/v2/status-pages/UpdateComponent.rb @@ -0,0 +1,19 @@ +# Update component returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = ENV["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"] +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] + +body = DatadogAPIClient::V2::PatchComponentRequest.new({ + data: DatadogAPIClient::V2::PatchComponentRequestData.new({ + attributes: DatadogAPIClient::V2::PatchComponentRequestDataAttributes.new({ + name: "5e2fd69be33e79aa", + }), + id: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID, + type: DatadogAPIClient::V2::StatusPagesComponentGroupType::COMPONENTS, + }), +}) +p api_instance.update_component(STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID, body) diff --git a/examples/v2/status-pages/UpdateDegradation.rb b/examples/v2/status-pages/UpdateDegradation.rb new file mode 100644 index 00000000000..01337978222 --- /dev/null +++ b/examples/v2/status-pages/UpdateDegradation.rb @@ -0,0 +1,21 @@ +# Update degradation returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] + +# there is a valid "degradation" in the system +DEGRADATION_DATA_ID = ENV["DEGRADATION_DATA_ID"] + +body = DatadogAPIClient::V2::PatchDegradationRequest.new({ + data: DatadogAPIClient::V2::PatchDegradationRequestData.new({ + attributes: DatadogAPIClient::V2::PatchDegradationRequestDataAttributes.new({ + title: "5e2fd69be33e79aa", + }), + id: DEGRADATION_DATA_ID, + type: DatadogAPIClient::V2::PatchDegradationRequestDataType::DEGRADATIONS, + }), +}) +p api_instance.update_degradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID, body) diff --git a/examples/v2/status-pages/UpdateStatusPage.rb b/examples/v2/status-pages/UpdateStatusPage.rb new file mode 100644 index 00000000000..dba4284c757 --- /dev/null +++ b/examples/v2/status-pages/UpdateStatusPage.rb @@ -0,0 +1,18 @@ +# Update status page returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +# there is a valid "status_page" in the system +STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"] + +body = DatadogAPIClient::V2::PatchStatusPageRequest.new({ + data: DatadogAPIClient::V2::PatchStatusPageRequestData.new({ + attributes: DatadogAPIClient::V2::PatchStatusPageRequestDataAttributes.new({ + name: "[DD Integration Tests] 5e2fd69be33e79aa", + }), + id: STATUS_PAGE_DATA_ID, + type: DatadogAPIClient::V2::StatusPageDataType::STATUS_PAGES, + }), +}) +p api_instance.update_status_page(STATUS_PAGE_DATA_ID, body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 331c370985a..7cc8ee2ae0e 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3225,6 +3225,81 @@ "v2.CreateSCAResolveVulnerableSymbols" => { "body" => "ResolveVulnerableSymbolsRequest", }, + "v2.ListStatusPages" => { + "page_offset" => "Integer", + "page_limit" => "Integer", + "include" => "String", + }, + "v2.CreateStatusPage" => { + "include" => "String", + "body" => "CreateStatusPageRequest", + }, + "v2.ListDegradations" => { + "filter_page_id" => "String", + "page_offset" => "Integer", + "page_limit" => "Integer", + "include" => "String", + "filter_status" => "String", + }, + "v2.DeleteStatusPage" => { + "page_id" => "UUID", + }, + "v2.GetStatusPage" => { + "page_id" => "UUID", + "include" => "String", + }, + "v2.UpdateStatusPage" => { + "delete_subscribers" => "Boolean", + "page_id" => "UUID", + "include" => "String", + "body" => "PatchStatusPageRequest", + }, + "v2.ListComponents" => { + "page_id" => "UUID", + "include" => "String", + }, + "v2.CreateComponent" => { + "page_id" => "UUID", + "include" => "String", + "body" => "CreateComponentRequest", + }, + "v2.DeleteComponent" => { + "page_id" => "UUID", + "component_id" => "UUID", + }, + "v2.GetComponent" => { + "page_id" => "UUID", + "component_id" => "UUID", + "include" => "String", + }, + "v2.UpdateComponent" => { + "page_id" => "UUID", + "component_id" => "UUID", + "include" => "String", + "body" => "PatchComponentRequest", + }, + "v2.CreateDegradation" => { + "page_id" => "UUID", + "notify_subscribers" => "Boolean", + "include" => "String", + "body" => "CreateDegradationRequest", + }, + "v2.DeleteDegradation" => { + "page_id" => "UUID", + "degradation_id" => "UUID", + }, + "v2.GetDegradation" => { + "page_id" => "UUID", + "degradation_id" => "UUID", + "include" => "String", + }, + "v2.UpdateDegradation" => { + "page_id" => "UUID", + "notify_subscribers" => "Boolean", + "degradation_id" => "UUID", + "include" => "String", + "body" => "PatchDegradationRequest", + }, "v2.SetOnDemandConcurrencyCap" => { "body" => "OnDemandConcurrencyCapAttributes", }, diff --git a/features/v2/given.json b/features/v2/given.json index aa08181879c..b9d2199fd7c 100644 --- a/features/v2/given.json +++ b/features/v2/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/features/v2/status_pages.feature b/features/v2/status_pages.feature new file mode 100644 index 00000000000..a3c946ad9fd --- /dev/null +++ b/features/v2/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/features/v2/undo.json b/features/v2/undo.json index 1dc732f7009..5ac23f96161 100644 --- a/features/v2/undo.json +++ b/features/v2/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": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index a6c91f777c4..9d19e02b066 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1706,6 +1706,14 @@ def overrides "v2.create_case_request_data" => "CreateCaseRequestData", "v2.create_case_request_data_attributes" => "CreateCaseRequestDataAttributes", "v2.create_case_request_data_relationships" => "CreateCaseRequestDataRelationships", + "v2.create_component_request" => "CreateComponentRequest", + "v2.create_component_request_data" => "CreateComponentRequestData", + "v2.create_component_request_data_attributes" => "CreateComponentRequestDataAttributes", + "v2.create_component_request_data_attributes_components_items" => "CreateComponentRequestDataAttributesComponentsItems", + "v2.create_component_request_data_attributes_type" => "CreateComponentRequestDataAttributesType", + "v2.create_component_request_data_relationships" => "CreateComponentRequestDataRelationships", + "v2.create_component_request_data_relationships_group" => "CreateComponentRequestDataRelationshipsGroup", + "v2.create_component_request_data_relationships_group_data" => "CreateComponentRequestDataRelationshipsGroupData", "v2.create_connection_request" => "CreateConnectionRequest", "v2.create_connection_request_data" => "CreateConnectionRequestData", "v2.create_connection_request_data_attributes" => "CreateConnectionRequestDataAttributes", @@ -1717,6 +1725,11 @@ def overrides "v2.create_data_deletion_request_body_data" => "CreateDataDeletionRequestBodyData", "v2.create_data_deletion_request_body_data_type" => "CreateDataDeletionRequestBodyDataType", "v2.create_data_deletion_response_body" => "CreateDataDeletionResponseBody", + "v2.create_degradation_request" => "CreateDegradationRequest", + "v2.create_degradation_request_data" => "CreateDegradationRequestData", + "v2.create_degradation_request_data_attributes" => "CreateDegradationRequestDataAttributes", + "v2.create_degradation_request_data_attributes_components_affected_items" => "CreateDegradationRequestDataAttributesComponentsAffectedItems", + "v2.create_degradation_request_data_attributes_status" => "CreateDegradationRequestDataAttributesStatus", "v2.create_deployment_gate_params" => "CreateDeploymentGateParams", "v2.create_deployment_gate_params_data" => "CreateDeploymentGateParamsData", "v2.create_deployment_gate_params_data_attributes" => "CreateDeploymentGateParamsDataAttributes", @@ -1764,6 +1777,13 @@ def overrides "v2.create_ruleset_request_data_attributes_rules_items_reference_table" => "CreateRulesetRequestDataAttributesRulesItemsReferenceTable", "v2.create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items" => "CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems", "v2.create_ruleset_request_data_type" => "CreateRulesetRequestDataType", + "v2.create_status_page_request" => "CreateStatusPageRequest", + "v2.create_status_page_request_data" => "CreateStatusPageRequestData", + "v2.create_status_page_request_data_attributes" => "CreateStatusPageRequestDataAttributes", + "v2.create_status_page_request_data_attributes_components_items" => "CreateStatusPageRequestDataAttributesComponentsItems", + "v2.create_status_page_request_data_attributes_components_items_components_items" => "CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems", + "v2.create_status_page_request_data_attributes_type" => "CreateStatusPageRequestDataAttributesType", + "v2.create_status_page_request_data_attributes_visualization_type" => "CreateStatusPageRequestDataAttributesVisualizationType", "v2.create_table_request" => "CreateTableRequest", "v2.create_table_request_data" => "CreateTableRequestData", "v2.create_table_request_data_attributes" => "CreateTableRequestDataAttributes", @@ -1933,6 +1953,21 @@ def overrides "v2.data_transform" => "DataTransform", "v2.data_transform_properties" => "DataTransformProperties", "v2.data_transform_type" => "DataTransformType", + "v2.degradation" => "Degradation", + "v2.degradation_array" => "DegradationArray", + "v2.degradation_array_included" => "DegradationArrayIncluded", + "v2.degradation_data" => "DegradationData", + "v2.degradation_data_attributes" => "DegradationDataAttributes", + "v2.degradation_data_attributes_components_affected_items" => "DegradationDataAttributesComponentsAffectedItems", + "v2.degradation_data_attributes_updates_items" => "DegradationDataAttributesUpdatesItems", + "v2.degradation_data_attributes_updates_items_components_affected_items" => "DegradationDataAttributesUpdatesItemsComponentsAffectedItems", + "v2.degradation_data_relationships" => "DegradationDataRelationships", + "v2.degradation_data_relationships_created_by_user" => "DegradationDataRelationshipsCreatedByUser", + "v2.degradation_data_relationships_created_by_user_data" => "DegradationDataRelationshipsCreatedByUserData", + "v2.degradation_data_relationships_last_modified_by_user" => "DegradationDataRelationshipsLastModifiedByUser", + "v2.degradation_data_relationships_last_modified_by_user_data" => "DegradationDataRelationshipsLastModifiedByUserData", + "v2.degradation_data_relationships_status_page" => "DegradationDataRelationshipsStatusPage", + "v2.degradation_data_relationships_status_page_data" => "DegradationDataRelationshipsStatusPageData", "v2.delete_app_response" => "DeleteAppResponse", "v2.delete_app_response_data" => "DeleteAppResponseData", "v2.delete_apps_datastore_item_request" => "DeleteAppsDatastoreItemRequest", @@ -3491,10 +3526,22 @@ def overrides "v2.patch_attachment_request_data" => "PatchAttachmentRequestData", "v2.patch_attachment_request_data_attributes" => "PatchAttachmentRequestDataAttributes", "v2.patch_attachment_request_data_attributes_attachment" => "PatchAttachmentRequestDataAttributesAttachment", + "v2.patch_component_request" => "PatchComponentRequest", + "v2.patch_component_request_data" => "PatchComponentRequestData", + "v2.patch_component_request_data_attributes" => "PatchComponentRequestDataAttributes", + "v2.patch_degradation_request" => "PatchDegradationRequest", + "v2.patch_degradation_request_data" => "PatchDegradationRequestData", + "v2.patch_degradation_request_data_attributes" => "PatchDegradationRequestDataAttributes", + "v2.patch_degradation_request_data_attributes_components_affected_items" => "PatchDegradationRequestDataAttributesComponentsAffectedItems", + "v2.patch_degradation_request_data_attributes_status" => "PatchDegradationRequestDataAttributesStatus", + "v2.patch_degradation_request_data_type" => "PatchDegradationRequestDataType", "v2.patch_incident_notification_template_request" => "PatchIncidentNotificationTemplateRequest", "v2.patch_notification_rule_parameters" => "PatchNotificationRuleParameters", "v2.patch_notification_rule_parameters_data" => "PatchNotificationRuleParametersData", "v2.patch_notification_rule_parameters_data_attributes" => "PatchNotificationRuleParametersDataAttributes", + "v2.patch_status_page_request" => "PatchStatusPageRequest", + "v2.patch_status_page_request_data" => "PatchStatusPageRequestData", + "v2.patch_status_page_request_data_attributes" => "PatchStatusPageRequestDataAttributes", "v2.patch_table_request" => "PatchTableRequest", "v2.patch_table_request_data" => "PatchTableRequestData", "v2.patch_table_request_data_attributes" => "PatchTableRequestDataAttributes", @@ -4341,6 +4388,62 @@ def overrides "v2.statsig_integration" => "StatsigIntegration", "v2.statsig_integration_type" => "StatsigIntegrationType", "v2.statsig_integration_update" => "StatsigIntegrationUpdate", + "v2.status_page" => "StatusPage", + "v2.status_page_array" => "StatusPageArray", + "v2.status_page_array_included" => "StatusPageArrayIncluded", + "v2.status_page_as_included" => "StatusPageAsIncluded", + "v2.status_page_as_included_attributes" => "StatusPageAsIncludedAttributes", + "v2.status_page_as_included_attributes_components_items" => "StatusPageAsIncludedAttributesComponentsItems", + "v2.status_page_as_included_attributes_components_items_components_items" => "StatusPageAsIncludedAttributesComponentsItemsComponentsItems", + "v2.status_page_as_included_relationships" => "StatusPageAsIncludedRelationships", + "v2.status_page_as_included_relationships_created_by_user" => "StatusPageAsIncludedRelationshipsCreatedByUser", + "v2.status_page_as_included_relationships_created_by_user_data" => "StatusPageAsIncludedRelationshipsCreatedByUserData", + "v2.status_page_as_included_relationships_last_modified_by_user" => "StatusPageAsIncludedRelationshipsLastModifiedByUser", + "v2.status_page_as_included_relationships_last_modified_by_user_data" => "StatusPageAsIncludedRelationshipsLastModifiedByUserData", + "v2.status_page_data" => "StatusPageData", + "v2.status_page_data_attributes" => "StatusPageDataAttributes", + "v2.status_page_data_attributes_components_items" => "StatusPageDataAttributesComponentsItems", + "v2.status_page_data_attributes_components_items_components_items" => "StatusPageDataAttributesComponentsItemsComponentsItems", + "v2.status_page_data_relationships" => "StatusPageDataRelationships", + "v2.status_page_data_relationships_created_by_user" => "StatusPageDataRelationshipsCreatedByUser", + "v2.status_page_data_relationships_created_by_user_data" => "StatusPageDataRelationshipsCreatedByUserData", + "v2.status_page_data_relationships_last_modified_by_user" => "StatusPageDataRelationshipsLastModifiedByUser", + "v2.status_page_data_relationships_last_modified_by_user_data" => "StatusPageDataRelationshipsLastModifiedByUserData", + "v2.status_page_data_type" => "StatusPageDataType", + "v2.status_pages_component" => "StatusPagesComponent", + "v2.status_pages_component_array" => "StatusPagesComponentArray", + "v2.status_pages_component_array_included" => "StatusPagesComponentArrayIncluded", + "v2.status_pages_component_data" => "StatusPagesComponentData", + "v2.status_pages_component_data_attributes" => "StatusPagesComponentDataAttributes", + "v2.status_pages_component_data_attributes_components_items" => "StatusPagesComponentDataAttributesComponentsItems", + "v2.status_pages_component_data_attributes_status" => "StatusPagesComponentDataAttributesStatus", + "v2.status_pages_component_data_relationships" => "StatusPagesComponentDataRelationships", + "v2.status_pages_component_data_relationships_created_by_user" => "StatusPagesComponentDataRelationshipsCreatedByUser", + "v2.status_pages_component_data_relationships_created_by_user_data" => "StatusPagesComponentDataRelationshipsCreatedByUserData", + "v2.status_pages_component_data_relationships_group" => "StatusPagesComponentDataRelationshipsGroup", + "v2.status_pages_component_data_relationships_group_data" => "StatusPagesComponentDataRelationshipsGroupData", + "v2.status_pages_component_data_relationships_last_modified_by_user" => "StatusPagesComponentDataRelationshipsLastModifiedByUser", + "v2.status_pages_component_data_relationships_last_modified_by_user_data" => "StatusPagesComponentDataRelationshipsLastModifiedByUserData", + "v2.status_pages_component_data_relationships_status_page" => "StatusPagesComponentDataRelationshipsStatusPage", + "v2.status_pages_component_data_relationships_status_page_data" => "StatusPagesComponentDataRelationshipsStatusPageData", + "v2.status_pages_component_group" => "StatusPagesComponentGroup", + "v2.status_pages_component_group_attributes" => "StatusPagesComponentGroupAttributes", + "v2.status_pages_component_group_attributes_components_items" => "StatusPagesComponentGroupAttributesComponentsItems", + "v2.status_pages_component_group_attributes_components_items_status" => "StatusPagesComponentGroupAttributesComponentsItemsStatus", + "v2.status_pages_component_group_attributes_components_items_type" => "StatusPagesComponentGroupAttributesComponentsItemsType", + "v2.status_pages_component_group_relationships" => "StatusPagesComponentGroupRelationships", + "v2.status_pages_component_group_relationships_created_by_user" => "StatusPagesComponentGroupRelationshipsCreatedByUser", + "v2.status_pages_component_group_relationships_created_by_user_data" => "StatusPagesComponentGroupRelationshipsCreatedByUserData", + "v2.status_pages_component_group_relationships_group" => "StatusPagesComponentGroupRelationshipsGroup", + "v2.status_pages_component_group_relationships_group_data" => "StatusPagesComponentGroupRelationshipsGroupData", + "v2.status_pages_component_group_relationships_last_modified_by_user" => "StatusPagesComponentGroupRelationshipsLastModifiedByUser", + "v2.status_pages_component_group_relationships_last_modified_by_user_data" => "StatusPagesComponentGroupRelationshipsLastModifiedByUserData", + "v2.status_pages_component_group_relationships_status_page" => "StatusPagesComponentGroupRelationshipsStatusPage", + "v2.status_pages_component_group_relationships_status_page_data" => "StatusPagesComponentGroupRelationshipsStatusPageData", + "v2.status_pages_component_group_type" => "StatusPagesComponentGroupType", + "v2.status_pages_user" => "StatusPagesUser", + "v2.status_pages_user_attributes" => "StatusPagesUserAttributes", + "v2.status_pages_user_type" => "StatusPagesUserType", "v2.step" => "Step", "v2.step_display" => "StepDisplay", "v2.step_display_bounds" => "StepDisplayBounds", @@ -4825,6 +4928,7 @@ def overrides "v2.spans_api" => "SpansAPI", "v2.spans_metrics_api" => "SpansMetricsAPI", "v2.static_analysis_api" => "StaticAnalysisAPI", + "v2.status_pages_api" => "StatusPagesAPI", "v2.synthetics_api" => "SyntheticsAPI", "v2.teams_api" => "TeamsAPI", "v2.test_optimization_api" => "TestOptimizationAPI", diff --git a/lib/datadog_api_client/v2/api/status_pages_api.rb b/lib/datadog_api_client/v2/api/status_pages_api.rb new file mode 100644 index 00000000000..c6a69050cef --- /dev/null +++ b/lib/datadog_api_client/v2/api/status_pages_api.rb @@ -0,0 +1,1100 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class StatusPagesAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create component. + # + # @see #create_component_with_http_info + def create_component(page_id, body, opts = {}) + data, _status_code, _headers = create_component_with_http_info(page_id, body, opts) + data + end + + # Create component. + # + # Creates a new component. + # + # @param page_id [UUID] The ID of the status page. + # @param body [CreateComponentRequest] + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group. + # @return [Array<(StatusPagesComponent, Integer, Hash)>] StatusPagesComponent data, response status code and response headers + def create_component_with_http_info(page_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.create_component ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.create_component" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling StatusPagesAPI.create_component" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/components'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'StatusPagesComponent' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_component, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#create_component\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create degradation. + # + # @see #create_degradation_with_http_info + def create_degradation(page_id, body, opts = {}) + data, _status_code, _headers = create_degradation_with_http_info(page_id, body, opts) + data + end + + # Create degradation. + # + # Creates a new degradation. + # + # @param page_id [UUID] The ID of the status page. + # @param body [CreateDegradationRequest] + # @param opts [Hash] the optional parameters + # @option opts [Boolean] :notify_subscribers Whether to notify page subscribers of the degradation or maintenance. + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page. + # @return [Array<(Degradation, Integer, Hash)>] Degradation data, response status code and response headers + def create_degradation_with_http_info(page_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.create_degradation ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.create_degradation" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling StatusPagesAPI.create_degradation" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/degradations'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'notify_subscribers'] = opts[:'notify_subscribers'] if !opts[:'notify_subscribers'].nil? + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'Degradation' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_degradation, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#create_degradation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create status page. + # + # @see #create_status_page_with_http_info + def create_status_page(body, opts = {}) + data, _status_code, _headers = create_status_page_with_http_info(body, opts) + data + end + + # Create status page. + # + # Creates a new status page. + # + # @param body [CreateStatusPageRequest] + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user. + # @return [Array<(StatusPage, Integer, Hash)>] StatusPage data, response status code and response headers + def create_status_page_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.create_status_page ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling StatusPagesAPI.create_status_page" + end + # resource path + local_var_path = '/api/v2/statuspages' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'StatusPage' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_status_page, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#create_status_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete component. + # + # @see #delete_component_with_http_info + def delete_component(page_id, component_id, opts = {}) + delete_component_with_http_info(page_id, component_id, opts) + nil + end + + # Delete component. + # + # Deletes a component by its ID. + # + # @param page_id [UUID] The ID of the status page. + # @param component_id [UUID] The ID of the component. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_component_with_http_info(page_id, component_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.delete_component ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.delete_component" + end + # verify the required parameter 'component_id' is set + if @api_client.config.client_side_validation && component_id.nil? + fail ArgumentError, "Missing the required parameter 'component_id' when calling StatusPagesAPI.delete_component" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/components/{component_id}'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')).sub('{component_id}', CGI.escape(component_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_component, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#delete_component\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete degradation. + # + # @see #delete_degradation_with_http_info + def delete_degradation(page_id, degradation_id, opts = {}) + delete_degradation_with_http_info(page_id, degradation_id, opts) + nil + end + + # Delete degradation. + # + # Deletes a degradation by its ID. + # + # @param page_id [UUID] The ID of the status page. + # @param degradation_id [UUID] The ID of the degradation. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_degradation_with_http_info(page_id, degradation_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.delete_degradation ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.delete_degradation" + end + # verify the required parameter 'degradation_id' is set + if @api_client.config.client_side_validation && degradation_id.nil? + fail ArgumentError, "Missing the required parameter 'degradation_id' when calling StatusPagesAPI.delete_degradation" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/degradations/{degradation_id}'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')).sub('{degradation_id}', CGI.escape(degradation_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_degradation, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#delete_degradation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete status page. + # + # @see #delete_status_page_with_http_info + def delete_status_page(page_id, opts = {}) + delete_status_page_with_http_info(page_id, opts) + nil + end + + # Delete status page. + # + # Deletes a status page by its ID. + # + # @param page_id [UUID] The ID of the status page. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_status_page_with_http_info(page_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.delete_status_page ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.delete_status_page" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_status_page, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#delete_status_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get component. + # + # @see #get_component_with_http_info + def get_component(page_id, component_id, opts = {}) + data, _status_code, _headers = get_component_with_http_info(page_id, component_id, opts) + data + end + + # Get component. + # + # Retrieves a specific component by its ID. + # + # @param page_id [UUID] The ID of the status page. + # @param component_id [UUID] The ID of the component. + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group. + # @return [Array<(StatusPagesComponent, Integer, Hash)>] StatusPagesComponent data, response status code and response headers + def get_component_with_http_info(page_id, component_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.get_component ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.get_component" + end + # verify the required parameter 'component_id' is set + if @api_client.config.client_side_validation && component_id.nil? + fail ArgumentError, "Missing the required parameter 'component_id' when calling StatusPagesAPI.get_component" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/components/{component_id}'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')).sub('{component_id}', CGI.escape(component_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'StatusPagesComponent' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_component, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#get_component\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get degradation. + # + # @see #get_degradation_with_http_info + def get_degradation(page_id, degradation_id, opts = {}) + data, _status_code, _headers = get_degradation_with_http_info(page_id, degradation_id, opts) + data + end + + # Get degradation. + # + # Retrieves a specific degradation by its ID. + # + # @param page_id [UUID] The ID of the status page. + # @param degradation_id [UUID] The ID of the degradation. + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page. + # @return [Array<(Degradation, Integer, Hash)>] Degradation data, response status code and response headers + def get_degradation_with_http_info(page_id, degradation_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.get_degradation ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.get_degradation" + end + # verify the required parameter 'degradation_id' is set + if @api_client.config.client_side_validation && degradation_id.nil? + fail ArgumentError, "Missing the required parameter 'degradation_id' when calling StatusPagesAPI.get_degradation" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/degradations/{degradation_id}'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')).sub('{degradation_id}', CGI.escape(degradation_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Degradation' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_degradation, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#get_degradation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get status page. + # + # @see #get_status_page_with_http_info + def get_status_page(page_id, opts = {}) + data, _status_code, _headers = get_status_page_with_http_info(page_id, opts) + data + end + + # Get status page. + # + # Retrieves a specific status page by its ID. + # + # @param page_id [UUID] The ID of the status page. + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user. + # @return [Array<(StatusPage, Integer, Hash)>] StatusPage data, response status code and response headers + def get_status_page_with_http_info(page_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.get_status_page ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.get_status_page" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'StatusPage' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_status_page, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#get_status_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List components. + # + # @see #list_components_with_http_info + def list_components(page_id, opts = {}) + data, _status_code, _headers = list_components_with_http_info(page_id, opts) + data + end + + # List components. + # + # Lists all components for a status page. + # + # @param page_id [UUID] The ID of the status page. + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group. + # @return [Array<(StatusPagesComponentArray, Integer, Hash)>] StatusPagesComponentArray data, response status code and response headers + def list_components_with_http_info(page_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.list_components ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.list_components" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/components'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'StatusPagesComponentArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_components, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#list_components\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List degradations. + # + # @see #list_degradations_with_http_info + def list_degradations(opts = {}) + data, _status_code, _headers = list_degradations_with_http_info(opts) + data + end + + # List degradations. + # + # Lists all degradations for the organization. Optionally filter by status and page. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :filter_page_id Optional page id filter. + # @option opts [Integer] :page_offset Offset to use as the start of the page. + # @option opts [Integer] :page_limit The number of degradations to return per page. + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page. + # @option opts [String] :filter_status Optional degradation status filter. Supported values: investigating, identified, monitoring, resolved. + # @return [Array<(DegradationArray, Integer, Hash)>] DegradationArray data, response status code and response headers + def list_degradations_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.list_degradations ...' + end + # resource path + local_var_path = '/api/v2/statuspages/degradations' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[page_id]'] = opts[:'filter_page_id'] if !opts[:'filter_page_id'].nil? + query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? + query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DegradationArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_degradations, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#list_degradations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List status pages. + # + # @see #list_status_pages_with_http_info + def list_status_pages(opts = {}) + data, _status_code, _headers = list_status_pages_with_http_info(opts) + data + end + + # List status pages. + # + # Lists all status pages for the organization. + # + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_offset Offset to use as the start of the page. + # @option opts [Integer] :page_limit The number of status pages to return per page. + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user. + # @return [Array<(StatusPageArray, Integer, Hash)>] StatusPageArray data, response status code and response headers + def list_status_pages_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.list_status_pages ...' + end + # resource path + local_var_path = '/api/v2/statuspages' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? + query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'StatusPageArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_status_pages, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#list_status_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update component. + # + # @see #update_component_with_http_info + def update_component(page_id, component_id, body, opts = {}) + data, _status_code, _headers = update_component_with_http_info(page_id, component_id, body, opts) + data + end + + # Update component. + # + # Updates an existing component's attributes. + # + # @param page_id [UUID] The ID of the status page. + # @param component_id [UUID] The ID of the component. + # @param body [PatchComponentRequest] + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group. + # @return [Array<(StatusPagesComponent, Integer, Hash)>] StatusPagesComponent data, response status code and response headers + def update_component_with_http_info(page_id, component_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.update_component ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.update_component" + end + # verify the required parameter 'component_id' is set + if @api_client.config.client_side_validation && component_id.nil? + fail ArgumentError, "Missing the required parameter 'component_id' when calling StatusPagesAPI.update_component" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling StatusPagesAPI.update_component" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/components/{component_id}'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')).sub('{component_id}', CGI.escape(component_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'StatusPagesComponent' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_component, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#update_component\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update degradation. + # + # @see #update_degradation_with_http_info + def update_degradation(page_id, degradation_id, body, opts = {}) + data, _status_code, _headers = update_degradation_with_http_info(page_id, degradation_id, body, opts) + data + end + + # Update degradation. + # + # Updates an existing degradation's attributes. + # + # @param page_id [UUID] The ID of the status page. + # @param degradation_id [UUID] The ID of the degradation. + # @param body [PatchDegradationRequest] + # @param opts [Hash] the optional parameters + # @option opts [Boolean] :notify_subscribers Whether to notify page subscribers of the degradation or maintenance. + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page. + # @return [Array<(Degradation, Integer, Hash)>] Degradation data, response status code and response headers + def update_degradation_with_http_info(page_id, degradation_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.update_degradation ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.update_degradation" + end + # verify the required parameter 'degradation_id' is set + if @api_client.config.client_side_validation && degradation_id.nil? + fail ArgumentError, "Missing the required parameter 'degradation_id' when calling StatusPagesAPI.update_degradation" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling StatusPagesAPI.update_degradation" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/degradations/{degradation_id}'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')).sub('{degradation_id}', CGI.escape(degradation_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'notify_subscribers'] = opts[:'notify_subscribers'] if !opts[:'notify_subscribers'].nil? + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'Degradation' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_degradation, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#update_degradation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update status page. + # + # @see #update_status_page_with_http_info + def update_status_page(page_id, body, opts = {}) + data, _status_code, _headers = update_status_page_with_http_info(page_id, body, opts) + data + end + + # Update status page. + # + # Updates an existing status page's attributes. + # + # @param page_id [UUID] The ID of the status page. + # @param body [PatchStatusPageRequest] + # @param opts [Hash] the optional parameters + # @option opts [Boolean] :delete_subscribers Whether to delete existing subscribers when updating a status page's type. + # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user. + # @return [Array<(StatusPage, Integer, Hash)>] StatusPage data, response status code and response headers + def update_status_page_with_http_info(page_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.update_status_page ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling StatusPagesAPI.update_status_page" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling StatusPagesAPI.update_status_page" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'delete_subscribers'] = opts[:'delete_subscribers'] if !opts[:'delete_subscribers'].nil? + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'StatusPage' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_status_page, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: StatusPagesAPI#update_status_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_component_request.rb b/lib/datadog_api_client/v2/models/create_component_request.rb new file mode 100644 index 00000000000..b4300521f0a --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_component_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateComponentRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CreateComponentRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateComponentRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_component_request_data.rb b/lib/datadog_api_client/v2/models/create_component_request_data.rb new file mode 100644 index 00000000000..90caba53da3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_component_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateComponentRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :relationships + + # Components resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CreateComponentRequestDataAttributes', + :'relationships' => :'CreateComponentRequestDataRelationships', + :'type' => :'StatusPagesComponentGroupType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateComponentRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_component_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_component_request_data_attributes.rb new file mode 100644 index 00000000000..cc2f6a26897 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_component_request_data_attributes.rb @@ -0,0 +1,177 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateComponentRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :components + + # + attr_reader :name + + # + attr_reader :position + + # + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components' => :'components', + :'name' => :'name', + :'position' => :'position', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components' => :'Array', + :'name' => :'String', + :'position' => :'Integer', + :'type' => :'CreateComponentRequestDataAttributesType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateComponentRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components') + if (value = attributes[:'components']).is_a?(Array) + self.components = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @position.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param position [Object] Object to be assigned + # @!visibility private + def position=(position) + if position.nil? + fail ArgumentError, 'invalid value for "position", position cannot be nil.' + end + @position = position + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components == o.components && + name == o.name && + position == o.position && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components, name, position, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_component_request_data_attributes_components_items.rb b/lib/datadog_api_client/v2/models/create_component_request_data_attributes_components_items.rb new file mode 100644 index 00000000000..cb83b163cfa --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_component_request_data_attributes_components_items.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateComponentRequestDataAttributesComponentsItems + include BaseGenericModel + + # + attr_reader :name + + # + attr_reader :position + + # + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'position' => :'position', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'position' => :'Integer', + :'type' => :'StatusPagesComponentGroupAttributesComponentsItemsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateComponentRequestDataAttributesComponentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @position.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param position [Object] Object to be assigned + # @!visibility private + def position=(position) + if position.nil? + fail ArgumentError, 'invalid value for "position", position cannot be nil.' + end + @position = position + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + position == o.position && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, position, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_component_request_data_attributes_type.rb b/lib/datadog_api_client/v2/models/create_component_request_data_attributes_type.rb new file mode 100644 index 00000000000..a55f1f51d94 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_component_request_data_attributes_type.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateComponentRequestDataAttributesType + include BaseEnumModel + + COMPONENT = "component".freeze + GROUP = "group".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/create_component_request_data_relationships.rb b/lib/datadog_api_client/v2/models/create_component_request_data_relationships.rb new file mode 100644 index 00000000000..f00f792f699 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_component_request_data_relationships.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateComponentRequestDataRelationships + include BaseGenericModel + + # + attr_accessor :group + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'group' => :'group' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'group' => :'CreateComponentRequestDataRelationshipsGroup' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateComponentRequestDataRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + group == o.group && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [group, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_component_request_data_relationships_group.rb b/lib/datadog_api_client/v2/models/create_component_request_data_relationships_group.rb new file mode 100644 index 00000000000..fd24b304ae4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_component_request_data_relationships_group.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateComponentRequestDataRelationshipsGroup + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CreateComponentRequestDataRelationshipsGroupData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateComponentRequestDataRelationshipsGroup` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_component_request_data_relationships_group_data.rb b/lib/datadog_api_client/v2/models/create_component_request_data_relationships_group_data.rb new file mode 100644 index 00000000000..2e64ab05a13 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_component_request_data_relationships_group_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateComponentRequestDataRelationshipsGroupData + include BaseGenericModel + + # + attr_reader :id + + # Components resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesComponentGroupType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateComponentRequestDataRelationshipsGroupData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_degradation_request.rb b/lib/datadog_api_client/v2/models/create_degradation_request.rb new file mode 100644 index 00000000000..c8174a97149 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_degradation_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateDegradationRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CreateDegradationRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateDegradationRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_degradation_request_data.rb b/lib/datadog_api_client/v2/models/create_degradation_request_data.rb new file mode 100644 index 00000000000..4b474e83d4e --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_degradation_request_data.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateDegradationRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # Degradations resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CreateDegradationRequestDataAttributes', + :'type' => :'PatchDegradationRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateDegradationRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_degradation_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_degradation_request_data_attributes.rb new file mode 100644 index 00000000000..3424bce5a3a --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_degradation_request_data_attributes.rb @@ -0,0 +1,177 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateDegradationRequestDataAttributes + include BaseGenericModel + + # + attr_reader :components_affected + + # + attr_accessor :description + + # + attr_reader :status + + # + attr_reader :title + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components_affected' => :'components_affected', + :'description' => :'description', + :'status' => :'status', + :'title' => :'title' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components_affected' => :'Array', + :'description' => :'String', + :'status' => :'CreateDegradationRequestDataAttributesStatus', + :'title' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateDegradationRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components_affected') + if (value = attributes[:'components_affected']).is_a?(Array) + self.components_affected = value + end + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @components_affected.nil? + return false if @status.nil? + return false if @title.nil? + true + end + + # Custom attribute writer method with validation + # @param components_affected [Object] Object to be assigned + # @!visibility private + def components_affected=(components_affected) + if components_affected.nil? + fail ArgumentError, 'invalid value for "components_affected", components_affected cannot be nil.' + end + @components_affected = components_affected + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Custom attribute writer method with validation + # @param title [Object] Object to be assigned + # @!visibility private + def title=(title) + if title.nil? + fail ArgumentError, 'invalid value for "title", title cannot be nil.' + end + @title = title + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components_affected == o.components_affected && + description == o.description && + status == o.status && + title == o.title && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components_affected, description, status, title, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_degradation_request_data_attributes_components_affected_items.rb b/lib/datadog_api_client/v2/models/create_degradation_request_data_attributes_components_affected_items.rb new file mode 100644 index 00000000000..3602cc9aff3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_degradation_request_data_attributes_components_affected_items.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateDegradationRequestDataAttributesComponentsAffectedItems + include BaseGenericModel + + # + attr_reader :id + + # + attr_accessor :name + + # + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'status' => :'StatusPagesComponentDataAttributesStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateDegradationRequestDataAttributesComponentsAffectedItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_degradation_request_data_attributes_status.rb b/lib/datadog_api_client/v2/models/create_degradation_request_data_attributes_status.rb new file mode 100644 index 00000000000..4332042b8c5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_degradation_request_data_attributes_status.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateDegradationRequestDataAttributesStatus + include BaseEnumModel + + INVESTIGATING = "investigating".freeze + IDENTIFIED = "identified".freeze + MONITORING = "monitoring".freeze + RESOLVED = "resolved".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/create_status_page_request.rb b/lib/datadog_api_client/v2/models/create_status_page_request.rb new file mode 100644 index 00000000000..be6913e1212 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_status_page_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateStatusPageRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CreateStatusPageRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateStatusPageRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_status_page_request_data.rb b/lib/datadog_api_client/v2/models/create_status_page_request_data.rb new file mode 100644 index 00000000000..62cd05abb19 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_status_page_request_data.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateStatusPageRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # Status pages resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CreateStatusPageRequestDataAttributes', + :'type' => :'StatusPageDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateStatusPageRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes.rb new file mode 100644 index 00000000000..b87ab0a3fb7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes.rb @@ -0,0 +1,259 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateStatusPageRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :company_logo + + # + attr_accessor :components + + # + attr_reader :domain_prefix + + # + attr_accessor :email_header_image + + # + attr_reader :enabled + + # + attr_accessor :favicon + + # + attr_reader :name + + # + attr_accessor :subscriptions_enabled + + # + attr_reader :type + + # + attr_reader :visualization_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'company_logo' => :'company_logo', + :'components' => :'components', + :'domain_prefix' => :'domain_prefix', + :'email_header_image' => :'email_header_image', + :'enabled' => :'enabled', + :'favicon' => :'favicon', + :'name' => :'name', + :'subscriptions_enabled' => :'subscriptions_enabled', + :'type' => :'type', + :'visualization_type' => :'visualization_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'company_logo' => :'String', + :'components' => :'Array', + :'domain_prefix' => :'String', + :'email_header_image' => :'String', + :'enabled' => :'Boolean', + :'favicon' => :'String', + :'name' => :'String', + :'subscriptions_enabled' => :'Boolean', + :'type' => :'CreateStatusPageRequestDataAttributesType', + :'visualization_type' => :'CreateStatusPageRequestDataAttributesVisualizationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateStatusPageRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'company_logo') + self.company_logo = attributes[:'company_logo'] + end + + if attributes.key?(:'components') + if (value = attributes[:'components']).is_a?(Array) + self.components = value + end + end + + if attributes.key?(:'domain_prefix') + self.domain_prefix = attributes[:'domain_prefix'] + end + + if attributes.key?(:'email_header_image') + self.email_header_image = attributes[:'email_header_image'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'favicon') + self.favicon = attributes[:'favicon'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'subscriptions_enabled') + self.subscriptions_enabled = attributes[:'subscriptions_enabled'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'visualization_type') + self.visualization_type = attributes[:'visualization_type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @domain_prefix.nil? + return false if @enabled.nil? + return false if @name.nil? + return false if @type.nil? + return false if @visualization_type.nil? + true + end + + # Custom attribute writer method with validation + # @param domain_prefix [Object] Object to be assigned + # @!visibility private + def domain_prefix=(domain_prefix) + if domain_prefix.nil? + fail ArgumentError, 'invalid value for "domain_prefix", domain_prefix cannot be nil.' + end + @domain_prefix = domain_prefix + end + + # Custom attribute writer method with validation + # @param enabled [Object] Object to be assigned + # @!visibility private + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' + end + @enabled = enabled + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Custom attribute writer method with validation + # @param visualization_type [Object] Object to be assigned + # @!visibility private + def visualization_type=(visualization_type) + if visualization_type.nil? + fail ArgumentError, 'invalid value for "visualization_type", visualization_type cannot be nil.' + end + @visualization_type = visualization_type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + company_logo == o.company_logo && + components == o.components && + domain_prefix == o.domain_prefix && + email_header_image == o.email_header_image && + enabled == o.enabled && + favicon == o.favicon && + name == o.name && + subscriptions_enabled == o.subscriptions_enabled && + type == o.type && + visualization_type == o.visualization_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [company_logo, components, domain_prefix, email_header_image, enabled, favicon, name, subscriptions_enabled, type, visualization_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_components_items.rb b/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_components_items.rb new file mode 100644 index 00000000000..9c15324b88e --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_components_items.rb @@ -0,0 +1,157 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateStatusPageRequestDataAttributesComponentsItems + include BaseGenericModel + + # + attr_accessor :components + + # + attr_accessor :id + + # + attr_accessor :name + + # + attr_accessor :position + + # + attr_accessor :status + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components' => :'components', + :'id' => :'id', + :'name' => :'name', + :'position' => :'position', + :'status' => :'status', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components' => :'Array', + :'id' => :'String', + :'name' => :'String', + :'position' => :'Integer', + :'status' => :'StatusPagesComponentGroupAttributesComponentsItemsStatus', + :'type' => :'CreateComponentRequestDataAttributesType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateStatusPageRequestDataAttributesComponentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components') + if (value = attributes[:'components']).is_a?(Array) + self.components = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components == o.components && + id == o.id && + name == o.name && + position == o.position && + status == o.status && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components, id, name, position, status, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_components_items_components_items.rb b/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_components_items_components_items.rb new file mode 100644 index 00000000000..cd340023953 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_components_items_components_items.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems + include BaseGenericModel + + # + attr_accessor :id + + # + attr_accessor :name + + # + attr_accessor :position + + # + attr_accessor :status + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'position' => :'position', + :'status' => :'status', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'position' => :'Integer', + :'status' => :'StatusPagesComponentGroupAttributesComponentsItemsStatus', + :'type' => :'StatusPagesComponentGroupAttributesComponentsItemsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + position == o.position && + status == o.status && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, position, status, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_type.rb b/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_type.rb new file mode 100644 index 00000000000..f05fb21799a --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_type.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateStatusPageRequestDataAttributesType + include BaseEnumModel + + PUBLIC = "public".freeze + INTERNAL = "internal".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_visualization_type.rb b/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_visualization_type.rb new file mode 100644 index 00000000000..67532a7de8a --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_visualization_type.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateStatusPageRequestDataAttributesVisualizationType + include BaseEnumModel + + BARS_AND_UPTIME_PERCENTAGE = "bars_and_uptime_percentage".freeze + BARS_ONLY = "bars_only".freeze + COMPONENT_NAME_ONLY = "component_name_only".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/degradation.rb b/lib/datadog_api_client/v2/models/degradation.rb new file mode 100644 index 00000000000..68e1710f575 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation.rb @@ -0,0 +1,117 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class Degradation + include BaseGenericModel + + # + attr_accessor :data + + # + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DegradationData', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Degradation` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_array.rb b/lib/datadog_api_client/v2/models/degradation_array.rb new file mode 100644 index 00000000000..bbb55948c61 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_array.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationArray + include BaseGenericModel + + # + attr_reader :data + + # + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_array_included.rb b/lib/datadog_api_client/v2/models/degradation_array_included.rb new file mode 100644 index 00000000000..f63158f99b9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_array_included.rb @@ -0,0 +1,63 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + module DegradationArrayIncluded + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'StatusPagesUser', + :'StatusPageAsIncluded' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data.rb b/lib/datadog_api_client/v2/models/degradation_data.rb new file mode 100644 index 00000000000..e96451a20b6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data.rb @@ -0,0 +1,153 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + attr_accessor :relationships + + # Degradations resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'DegradationDataAttributes', + :'id' => :'String', + :'relationships' => :'DegradationDataRelationships', + :'type' => :'PatchDegradationRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_attributes.rb b/lib/datadog_api_client/v2/models/degradation_data_attributes.rb new file mode 100644 index 00000000000..64949dfc5d0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_attributes.rb @@ -0,0 +1,169 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataAttributes + include BaseGenericModel + + # + attr_accessor :components_affected + + # + attr_accessor :created_at + + # + attr_accessor :description + + # + attr_accessor :modified_at + + # + attr_accessor :status + + # + attr_accessor :title + + # + attr_accessor :updates + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components_affected' => :'components_affected', + :'created_at' => :'created_at', + :'description' => :'description', + :'modified_at' => :'modified_at', + :'status' => :'status', + :'title' => :'title', + :'updates' => :'updates' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components_affected' => :'Array', + :'created_at' => :'Time', + :'description' => :'String', + :'modified_at' => :'Time', + :'status' => :'CreateDegradationRequestDataAttributesStatus', + :'title' => :'String', + :'updates' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components_affected') + if (value = attributes[:'components_affected']).is_a?(Array) + self.components_affected = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'updates') + if (value = attributes[:'updates']).is_a?(Array) + self.updates = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components_affected == o.components_affected && + created_at == o.created_at && + description == o.description && + modified_at == o.modified_at && + status == o.status && + title == o.title && + updates == o.updates && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components_affected, created_at, description, modified_at, status, title, updates, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_attributes_components_affected_items.rb b/lib/datadog_api_client/v2/models/degradation_data_attributes_components_affected_items.rb new file mode 100644 index 00000000000..60d50635faa --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_attributes_components_affected_items.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataAttributesComponentsAffectedItems + include BaseGenericModel + + # + attr_reader :id + + # + attr_accessor :name + + # + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'status' => :'StatusPagesComponentDataAttributesStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataAttributesComponentsAffectedItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_attributes_updates_items.rb b/lib/datadog_api_client/v2/models/degradation_data_attributes_updates_items.rb new file mode 100644 index 00000000000..ce66feb576d --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_attributes_updates_items.rb @@ -0,0 +1,167 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataAttributesUpdatesItems + include BaseGenericModel + + # + attr_accessor :components_affected + + # + attr_accessor :created_at + + # + attr_accessor :description + + # + attr_accessor :id + + # + attr_accessor :modified_at + + # + attr_accessor :started_at + + # + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components_affected' => :'components_affected', + :'created_at' => :'created_at', + :'description' => :'description', + :'id' => :'id', + :'modified_at' => :'modified_at', + :'started_at' => :'started_at', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components_affected' => :'Array', + :'created_at' => :'Time', + :'description' => :'String', + :'id' => :'String', + :'modified_at' => :'Time', + :'started_at' => :'Time', + :'status' => :'CreateDegradationRequestDataAttributesStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataAttributesUpdatesItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components_affected') + if (value = attributes[:'components_affected']).is_a?(Array) + self.components_affected = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'started_at') + self.started_at = attributes[:'started_at'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components_affected == o.components_affected && + created_at == o.created_at && + description == o.description && + id == o.id && + modified_at == o.modified_at && + started_at == o.started_at && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components_affected, created_at, description, id, modified_at, started_at, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_attributes_updates_items_components_affected_items.rb b/lib/datadog_api_client/v2/models/degradation_data_attributes_updates_items_components_affected_items.rb new file mode 100644 index 00000000000..45ffcec1a2d --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_attributes_updates_items_components_affected_items.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataAttributesUpdatesItemsComponentsAffectedItems + include BaseGenericModel + + # + attr_reader :id + + # + attr_accessor :name + + # + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'status' => :'StatusPagesComponentDataAttributesStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataAttributesUpdatesItemsComponentsAffectedItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_relationships.rb b/lib/datadog_api_client/v2/models/degradation_data_relationships.rb new file mode 100644 index 00000000000..94d73b45537 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_relationships.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataRelationships + include BaseGenericModel + + # + attr_accessor :created_by_user + + # + attr_accessor :last_modified_by_user + + # + attr_accessor :status_page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_by_user' => :'created_by_user', + :'last_modified_by_user' => :'last_modified_by_user', + :'status_page' => :'status_page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_by_user' => :'DegradationDataRelationshipsCreatedByUser', + :'last_modified_by_user' => :'DegradationDataRelationshipsLastModifiedByUser', + :'status_page' => :'DegradationDataRelationshipsStatusPage' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_by_user') + self.created_by_user = attributes[:'created_by_user'] + end + + if attributes.key?(:'last_modified_by_user') + self.last_modified_by_user = attributes[:'last_modified_by_user'] + end + + if attributes.key?(:'status_page') + self.status_page = attributes[:'status_page'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_by_user == o.created_by_user && + last_modified_by_user == o.last_modified_by_user && + status_page == o.status_page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_by_user, last_modified_by_user, status_page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_relationships_created_by_user.rb b/lib/datadog_api_client/v2/models/degradation_data_relationships_created_by_user.rb new file mode 100644 index 00000000000..0865abd9772 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_relationships_created_by_user.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataRelationshipsCreatedByUser + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DegradationDataRelationshipsCreatedByUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataRelationshipsCreatedByUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_relationships_created_by_user_data.rb b/lib/datadog_api_client/v2/models/degradation_data_relationships_created_by_user_data.rb new file mode 100644 index 00000000000..f5f862a27b7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_relationships_created_by_user_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataRelationshipsCreatedByUserData + include BaseGenericModel + + # + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataRelationshipsCreatedByUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_relationships_last_modified_by_user.rb b/lib/datadog_api_client/v2/models/degradation_data_relationships_last_modified_by_user.rb new file mode 100644 index 00000000000..d5e67d1f414 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_relationships_last_modified_by_user.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataRelationshipsLastModifiedByUser + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DegradationDataRelationshipsLastModifiedByUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataRelationshipsLastModifiedByUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_relationships_last_modified_by_user_data.rb b/lib/datadog_api_client/v2/models/degradation_data_relationships_last_modified_by_user_data.rb new file mode 100644 index 00000000000..1c53dee0b8e --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_relationships_last_modified_by_user_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataRelationshipsLastModifiedByUserData + include BaseGenericModel + + # + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataRelationshipsLastModifiedByUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_relationships_status_page.rb b/lib/datadog_api_client/v2/models/degradation_data_relationships_status_page.rb new file mode 100644 index 00000000000..9567c073d97 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_relationships_status_page.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataRelationshipsStatusPage + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DegradationDataRelationshipsStatusPageData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataRelationshipsStatusPage` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_data_relationships_status_page_data.rb b/lib/datadog_api_client/v2/models/degradation_data_relationships_status_page_data.rb new file mode 100644 index 00000000000..969595a6160 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_relationships_status_page_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class DegradationDataRelationshipsStatusPageData + include BaseGenericModel + + # + attr_reader :id + + # Status pages resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPageDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationDataRelationshipsStatusPageData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_component_request.rb b/lib/datadog_api_client/v2/models/patch_component_request.rb new file mode 100644 index 00000000000..5bac1b38474 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_component_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchComponentRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'PatchComponentRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchComponentRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_component_request_data.rb b/lib/datadog_api_client/v2/models/patch_component_request_data.rb new file mode 100644 index 00000000000..d23a415b961 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_component_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchComponentRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Components resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'PatchComponentRequestDataAttributes', + :'id' => :'String', + :'type' => :'StatusPagesComponentGroupType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchComponentRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_component_request_data_attributes.rb b/lib/datadog_api_client/v2/models/patch_component_request_data_attributes.rb new file mode 100644 index 00000000000..8fab3d20a1c --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_component_request_data_attributes.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchComponentRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :name + + # + attr_accessor :position + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'position' => :'position' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'position' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchComponentRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + position == o.position && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, position, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_degradation_request.rb b/lib/datadog_api_client/v2/models/patch_degradation_request.rb new file mode 100644 index 00000000000..1134796713e --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchDegradationRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'PatchDegradationRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchDegradationRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_degradation_request_data.rb b/lib/datadog_api_client/v2/models/patch_degradation_request_data.rb new file mode 100644 index 00000000000..64d1edddc86 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchDegradationRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Degradations resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'PatchDegradationRequestDataAttributes', + :'id' => :'String', + :'type' => :'PatchDegradationRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchDegradationRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes.rb b/lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes.rb new file mode 100644 index 00000000000..4dd78fe0c2d --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchDegradationRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :components_affected + + # + attr_accessor :description + + # + attr_accessor :status + + # + attr_accessor :title + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components_affected' => :'components_affected', + :'description' => :'description', + :'status' => :'status', + :'title' => :'title' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components_affected' => :'Array', + :'description' => :'String', + :'status' => :'PatchDegradationRequestDataAttributesStatus', + :'title' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchDegradationRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components_affected') + if (value = attributes[:'components_affected']).is_a?(Array) + self.components_affected = value + end + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components_affected == o.components_affected && + description == o.description && + status == o.status && + title == o.title && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components_affected, description, status, title, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes_components_affected_items.rb b/lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes_components_affected_items.rb new file mode 100644 index 00000000000..29a92ff50f2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes_components_affected_items.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchDegradationRequestDataAttributesComponentsAffectedItems + include BaseGenericModel + + # + attr_reader :id + + # + attr_accessor :name + + # + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'status' => :'StatusPagesComponentDataAttributesStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchDegradationRequestDataAttributesComponentsAffectedItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes_status.rb b/lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes_status.rb new file mode 100644 index 00000000000..d272f11cf55 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes_status.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchDegradationRequestDataAttributesStatus + include BaseEnumModel + + INVESTIGATING = "investigating".freeze + IDENTIFIED = "identified".freeze + MONITORING = "monitoring".freeze + RESOLVED = "resolved".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/patch_degradation_request_data_type.rb b/lib/datadog_api_client/v2/models/patch_degradation_request_data_type.rb new file mode 100644 index 00000000000..cbd0e1757a2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_request_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Degradations resource type. + class PatchDegradationRequestDataType + include BaseEnumModel + + DEGRADATIONS = "degradations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/patch_status_page_request.rb b/lib/datadog_api_client/v2/models/patch_status_page_request.rb new file mode 100644 index 00000000000..974d466e1c7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_status_page_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchStatusPageRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'PatchStatusPageRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchStatusPageRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_status_page_request_data.rb b/lib/datadog_api_client/v2/models/patch_status_page_request_data.rb new file mode 100644 index 00000000000..8abbcad5b90 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_status_page_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchStatusPageRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Status pages resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'PatchStatusPageRequestDataAttributes', + :'id' => :'String', + :'type' => :'StatusPageDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchStatusPageRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_status_page_request_data_attributes.rb b/lib/datadog_api_client/v2/models/patch_status_page_request_data_attributes.rb new file mode 100644 index 00000000000..8c8b16c4d27 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_status_page_request_data_attributes.rb @@ -0,0 +1,185 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PatchStatusPageRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :company_logo + + # + attr_accessor :domain_prefix + + # + attr_accessor :email_header_image + + # + attr_accessor :enabled + + # + attr_accessor :favicon + + # + attr_accessor :name + + # + attr_accessor :subscriptions_enabled + + # + attr_accessor :type + + # + attr_accessor :visualization_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'company_logo' => :'company_logo', + :'domain_prefix' => :'domain_prefix', + :'email_header_image' => :'email_header_image', + :'enabled' => :'enabled', + :'favicon' => :'favicon', + :'name' => :'name', + :'subscriptions_enabled' => :'subscriptions_enabled', + :'type' => :'type', + :'visualization_type' => :'visualization_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'company_logo' => :'String', + :'domain_prefix' => :'String', + :'email_header_image' => :'String', + :'enabled' => :'Boolean', + :'favicon' => :'String', + :'name' => :'String', + :'subscriptions_enabled' => :'Boolean', + :'type' => :'CreateStatusPageRequestDataAttributesType', + :'visualization_type' => :'CreateStatusPageRequestDataAttributesVisualizationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchStatusPageRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'company_logo') + self.company_logo = attributes[:'company_logo'] + end + + if attributes.key?(:'domain_prefix') + self.domain_prefix = attributes[:'domain_prefix'] + end + + if attributes.key?(:'email_header_image') + self.email_header_image = attributes[:'email_header_image'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'favicon') + self.favicon = attributes[:'favicon'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'subscriptions_enabled') + self.subscriptions_enabled = attributes[:'subscriptions_enabled'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'visualization_type') + self.visualization_type = attributes[:'visualization_type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + company_logo == o.company_logo && + domain_prefix == o.domain_prefix && + email_header_image == o.email_header_image && + enabled == o.enabled && + favicon == o.favicon && + name == o.name && + subscriptions_enabled == o.subscriptions_enabled && + type == o.type && + visualization_type == o.visualization_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [company_logo, domain_prefix, email_header_image, enabled, favicon, name, subscriptions_enabled, type, visualization_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page.rb b/lib/datadog_api_client/v2/models/status_page.rb new file mode 100644 index 00000000000..39ec8f018fd --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page.rb @@ -0,0 +1,117 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPage + include BaseGenericModel + + # + attr_accessor :data + + # + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPageData', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPage` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_array.rb b/lib/datadog_api_client/v2/models/status_page_array.rb new file mode 100644 index 00000000000..cb6cae04505 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_array.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageArray + include BaseGenericModel + + # + attr_reader :data + + # + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_array_included.rb b/lib/datadog_api_client/v2/models/status_page_array_included.rb new file mode 100644 index 00000000000..a20c5e2d0a0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_array_included.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + module StatusPageArrayIncluded + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'StatusPagesUser' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_as_included.rb b/lib/datadog_api_client/v2/models/status_page_as_included.rb new file mode 100644 index 00000000000..015f89a6bdf --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_as_included.rb @@ -0,0 +1,153 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageAsIncluded + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + attr_accessor :relationships + + # Status pages resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'StatusPageAsIncludedAttributes', + :'id' => :'String', + :'relationships' => :'StatusPageAsIncludedRelationships', + :'type' => :'StatusPageDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageAsIncluded` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_as_included_attributes.rb b/lib/datadog_api_client/v2/models/status_page_as_included_attributes.rb new file mode 100644 index 00000000000..f722ee01191 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_as_included_attributes.rb @@ -0,0 +1,247 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageAsIncludedAttributes + include BaseGenericModel + + # + attr_accessor :company_logo + + # + attr_accessor :components + + # + attr_accessor :created_at + + # + attr_accessor :custom_domain + + # + attr_accessor :custom_domain_enabled + + # + attr_accessor :domain_prefix + + # + attr_accessor :email_header_image + + # + attr_accessor :enabled + + # + attr_accessor :favicon + + # + attr_accessor :modified_at + + # + attr_accessor :name + + # + attr_accessor :page_url + + # + attr_accessor :subscriptions_enabled + + # + attr_accessor :type + + # + attr_accessor :visualization_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'company_logo' => :'company_logo', + :'components' => :'components', + :'created_at' => :'created_at', + :'custom_domain' => :'custom_domain', + :'custom_domain_enabled' => :'custom_domain_enabled', + :'domain_prefix' => :'domain_prefix', + :'email_header_image' => :'email_header_image', + :'enabled' => :'enabled', + :'favicon' => :'favicon', + :'modified_at' => :'modified_at', + :'name' => :'name', + :'page_url' => :'page_url', + :'subscriptions_enabled' => :'subscriptions_enabled', + :'type' => :'type', + :'visualization_type' => :'visualization_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'company_logo' => :'String', + :'components' => :'Array', + :'created_at' => :'Time', + :'custom_domain' => :'String', + :'custom_domain_enabled' => :'Boolean', + :'domain_prefix' => :'String', + :'email_header_image' => :'String', + :'enabled' => :'Boolean', + :'favicon' => :'String', + :'modified_at' => :'Time', + :'name' => :'String', + :'page_url' => :'String', + :'subscriptions_enabled' => :'Boolean', + :'type' => :'CreateStatusPageRequestDataAttributesType', + :'visualization_type' => :'CreateStatusPageRequestDataAttributesVisualizationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageAsIncludedAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'company_logo') + self.company_logo = attributes[:'company_logo'] + end + + if attributes.key?(:'components') + if (value = attributes[:'components']).is_a?(Array) + self.components = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'custom_domain') + self.custom_domain = attributes[:'custom_domain'] + end + + if attributes.key?(:'custom_domain_enabled') + self.custom_domain_enabled = attributes[:'custom_domain_enabled'] + end + + if attributes.key?(:'domain_prefix') + self.domain_prefix = attributes[:'domain_prefix'] + end + + if attributes.key?(:'email_header_image') + self.email_header_image = attributes[:'email_header_image'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'favicon') + self.favicon = attributes[:'favicon'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'page_url') + self.page_url = attributes[:'page_url'] + end + + if attributes.key?(:'subscriptions_enabled') + self.subscriptions_enabled = attributes[:'subscriptions_enabled'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'visualization_type') + self.visualization_type = attributes[:'visualization_type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + company_logo == o.company_logo && + components == o.components && + created_at == o.created_at && + custom_domain == o.custom_domain && + custom_domain_enabled == o.custom_domain_enabled && + domain_prefix == o.domain_prefix && + email_header_image == o.email_header_image && + enabled == o.enabled && + favicon == o.favicon && + modified_at == o.modified_at && + name == o.name && + page_url == o.page_url && + subscriptions_enabled == o.subscriptions_enabled && + type == o.type && + visualization_type == o.visualization_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [company_logo, components, created_at, custom_domain, custom_domain_enabled, domain_prefix, email_header_image, enabled, favicon, modified_at, name, page_url, subscriptions_enabled, type, visualization_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_as_included_attributes_components_items.rb b/lib/datadog_api_client/v2/models/status_page_as_included_attributes_components_items.rb new file mode 100644 index 00000000000..94a45a282ce --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_as_included_attributes_components_items.rb @@ -0,0 +1,157 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageAsIncludedAttributesComponentsItems + include BaseGenericModel + + # + attr_accessor :components + + # + attr_accessor :id + + # + attr_accessor :name + + # + attr_accessor :position + + # + attr_accessor :status + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components' => :'components', + :'id' => :'id', + :'name' => :'name', + :'position' => :'position', + :'status' => :'status', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components' => :'Array', + :'id' => :'String', + :'name' => :'String', + :'position' => :'Integer', + :'status' => :'StatusPagesComponentGroupAttributesComponentsItemsStatus', + :'type' => :'CreateComponentRequestDataAttributesType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageAsIncludedAttributesComponentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components') + if (value = attributes[:'components']).is_a?(Array) + self.components = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components == o.components && + id == o.id && + name == o.name && + position == o.position && + status == o.status && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components, id, name, position, status, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_as_included_attributes_components_items_components_items.rb b/lib/datadog_api_client/v2/models/status_page_as_included_attributes_components_items_components_items.rb new file mode 100644 index 00000000000..4dc57c471c5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_as_included_attributes_components_items_components_items.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageAsIncludedAttributesComponentsItemsComponentsItems + include BaseGenericModel + + # + attr_accessor :id + + # + attr_accessor :name + + # + attr_accessor :position + + # + attr_accessor :status + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'position' => :'position', + :'status' => :'status', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'position' => :'Integer', + :'status' => :'StatusPagesComponentGroupAttributesComponentsItemsStatus', + :'type' => :'StatusPagesComponentGroupAttributesComponentsItemsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageAsIncludedAttributesComponentsItemsComponentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + position == o.position && + status == o.status && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, position, status, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_as_included_relationships.rb b/lib/datadog_api_client/v2/models/status_page_as_included_relationships.rb new file mode 100644 index 00000000000..7dbbf0d5fb2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_as_included_relationships.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageAsIncludedRelationships + include BaseGenericModel + + # + attr_accessor :created_by_user + + # + attr_accessor :last_modified_by_user + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_by_user' => :'created_by_user', + :'last_modified_by_user' => :'last_modified_by_user' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_by_user' => :'StatusPageAsIncludedRelationshipsCreatedByUser', + :'last_modified_by_user' => :'StatusPageAsIncludedRelationshipsLastModifiedByUser' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageAsIncludedRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_by_user') + self.created_by_user = attributes[:'created_by_user'] + end + + if attributes.key?(:'last_modified_by_user') + self.last_modified_by_user = attributes[:'last_modified_by_user'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_by_user == o.created_by_user && + last_modified_by_user == o.last_modified_by_user && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_by_user, last_modified_by_user, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_as_included_relationships_created_by_user.rb b/lib/datadog_api_client/v2/models/status_page_as_included_relationships_created_by_user.rb new file mode 100644 index 00000000000..cb444451785 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_as_included_relationships_created_by_user.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageAsIncludedRelationshipsCreatedByUser + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPageAsIncludedRelationshipsCreatedByUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageAsIncludedRelationshipsCreatedByUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_as_included_relationships_created_by_user_data.rb b/lib/datadog_api_client/v2/models/status_page_as_included_relationships_created_by_user_data.rb new file mode 100644 index 00000000000..7210ee1a876 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_as_included_relationships_created_by_user_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageAsIncludedRelationshipsCreatedByUserData + include BaseGenericModel + + # + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageAsIncludedRelationshipsCreatedByUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_as_included_relationships_last_modified_by_user.rb b/lib/datadog_api_client/v2/models/status_page_as_included_relationships_last_modified_by_user.rb new file mode 100644 index 00000000000..c2ba33c8187 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_as_included_relationships_last_modified_by_user.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageAsIncludedRelationshipsLastModifiedByUser + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPageAsIncludedRelationshipsLastModifiedByUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageAsIncludedRelationshipsLastModifiedByUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_as_included_relationships_last_modified_by_user_data.rb b/lib/datadog_api_client/v2/models/status_page_as_included_relationships_last_modified_by_user_data.rb new file mode 100644 index 00000000000..7ee93267d86 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_as_included_relationships_last_modified_by_user_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageAsIncludedRelationshipsLastModifiedByUserData + include BaseGenericModel + + # + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageAsIncludedRelationshipsLastModifiedByUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_data.rb b/lib/datadog_api_client/v2/models/status_page_data.rb new file mode 100644 index 00000000000..194ed2ff0f1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data.rb @@ -0,0 +1,153 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + attr_accessor :relationships + + # Status pages resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'StatusPageDataAttributes', + :'id' => :'String', + :'relationships' => :'StatusPageDataRelationships', + :'type' => :'StatusPageDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_data_attributes.rb b/lib/datadog_api_client/v2/models/status_page_data_attributes.rb new file mode 100644 index 00000000000..3f401dd5834 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data_attributes.rb @@ -0,0 +1,247 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageDataAttributes + include BaseGenericModel + + # + attr_accessor :company_logo + + # + attr_accessor :components + + # + attr_accessor :created_at + + # + attr_accessor :custom_domain + + # + attr_accessor :custom_domain_enabled + + # + attr_accessor :domain_prefix + + # + attr_accessor :email_header_image + + # + attr_accessor :enabled + + # + attr_accessor :favicon + + # + attr_accessor :modified_at + + # + attr_accessor :name + + # + attr_accessor :page_url + + # + attr_accessor :subscriptions_enabled + + # + attr_accessor :type + + # + attr_accessor :visualization_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'company_logo' => :'company_logo', + :'components' => :'components', + :'created_at' => :'created_at', + :'custom_domain' => :'custom_domain', + :'custom_domain_enabled' => :'custom_domain_enabled', + :'domain_prefix' => :'domain_prefix', + :'email_header_image' => :'email_header_image', + :'enabled' => :'enabled', + :'favicon' => :'favicon', + :'modified_at' => :'modified_at', + :'name' => :'name', + :'page_url' => :'page_url', + :'subscriptions_enabled' => :'subscriptions_enabled', + :'type' => :'type', + :'visualization_type' => :'visualization_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'company_logo' => :'String', + :'components' => :'Array', + :'created_at' => :'Time', + :'custom_domain' => :'String', + :'custom_domain_enabled' => :'Boolean', + :'domain_prefix' => :'String', + :'email_header_image' => :'String', + :'enabled' => :'Boolean', + :'favicon' => :'String', + :'modified_at' => :'Time', + :'name' => :'String', + :'page_url' => :'String', + :'subscriptions_enabled' => :'Boolean', + :'type' => :'CreateStatusPageRequestDataAttributesType', + :'visualization_type' => :'CreateStatusPageRequestDataAttributesVisualizationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'company_logo') + self.company_logo = attributes[:'company_logo'] + end + + if attributes.key?(:'components') + if (value = attributes[:'components']).is_a?(Array) + self.components = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'custom_domain') + self.custom_domain = attributes[:'custom_domain'] + end + + if attributes.key?(:'custom_domain_enabled') + self.custom_domain_enabled = attributes[:'custom_domain_enabled'] + end + + if attributes.key?(:'domain_prefix') + self.domain_prefix = attributes[:'domain_prefix'] + end + + if attributes.key?(:'email_header_image') + self.email_header_image = attributes[:'email_header_image'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'favicon') + self.favicon = attributes[:'favicon'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'page_url') + self.page_url = attributes[:'page_url'] + end + + if attributes.key?(:'subscriptions_enabled') + self.subscriptions_enabled = attributes[:'subscriptions_enabled'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'visualization_type') + self.visualization_type = attributes[:'visualization_type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + company_logo == o.company_logo && + components == o.components && + created_at == o.created_at && + custom_domain == o.custom_domain && + custom_domain_enabled == o.custom_domain_enabled && + domain_prefix == o.domain_prefix && + email_header_image == o.email_header_image && + enabled == o.enabled && + favicon == o.favicon && + modified_at == o.modified_at && + name == o.name && + page_url == o.page_url && + subscriptions_enabled == o.subscriptions_enabled && + type == o.type && + visualization_type == o.visualization_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [company_logo, components, created_at, custom_domain, custom_domain_enabled, domain_prefix, email_header_image, enabled, favicon, modified_at, name, page_url, subscriptions_enabled, type, visualization_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_data_attributes_components_items.rb b/lib/datadog_api_client/v2/models/status_page_data_attributes_components_items.rb new file mode 100644 index 00000000000..537dc501d25 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data_attributes_components_items.rb @@ -0,0 +1,157 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageDataAttributesComponentsItems + include BaseGenericModel + + # + attr_accessor :components + + # + attr_accessor :id + + # + attr_accessor :name + + # + attr_accessor :position + + # + attr_accessor :status + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components' => :'components', + :'id' => :'id', + :'name' => :'name', + :'position' => :'position', + :'status' => :'status', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components' => :'Array', + :'id' => :'String', + :'name' => :'String', + :'position' => :'Integer', + :'status' => :'StatusPagesComponentGroupAttributesComponentsItemsStatus', + :'type' => :'CreateComponentRequestDataAttributesType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageDataAttributesComponentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components') + if (value = attributes[:'components']).is_a?(Array) + self.components = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components == o.components && + id == o.id && + name == o.name && + position == o.position && + status == o.status && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components, id, name, position, status, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_data_attributes_components_items_components_items.rb b/lib/datadog_api_client/v2/models/status_page_data_attributes_components_items_components_items.rb new file mode 100644 index 00000000000..d4089d55ce9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data_attributes_components_items_components_items.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageDataAttributesComponentsItemsComponentsItems + include BaseGenericModel + + # + attr_accessor :id + + # + attr_accessor :name + + # + attr_accessor :position + + # + attr_accessor :status + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'position' => :'position', + :'status' => :'status', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'position' => :'Integer', + :'status' => :'StatusPagesComponentGroupAttributesComponentsItemsStatus', + :'type' => :'StatusPagesComponentGroupAttributesComponentsItemsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageDataAttributesComponentsItemsComponentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + position == o.position && + status == o.status && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, position, status, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_data_relationships.rb b/lib/datadog_api_client/v2/models/status_page_data_relationships.rb new file mode 100644 index 00000000000..a57d15bf2f8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data_relationships.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageDataRelationships + include BaseGenericModel + + # + attr_accessor :created_by_user + + # + attr_accessor :last_modified_by_user + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_by_user' => :'created_by_user', + :'last_modified_by_user' => :'last_modified_by_user' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_by_user' => :'StatusPageDataRelationshipsCreatedByUser', + :'last_modified_by_user' => :'StatusPageDataRelationshipsLastModifiedByUser' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageDataRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_by_user') + self.created_by_user = attributes[:'created_by_user'] + end + + if attributes.key?(:'last_modified_by_user') + self.last_modified_by_user = attributes[:'last_modified_by_user'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_by_user == o.created_by_user && + last_modified_by_user == o.last_modified_by_user && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_by_user, last_modified_by_user, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_data_relationships_created_by_user.rb b/lib/datadog_api_client/v2/models/status_page_data_relationships_created_by_user.rb new file mode 100644 index 00000000000..ed7838b7d33 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data_relationships_created_by_user.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageDataRelationshipsCreatedByUser + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPageDataRelationshipsCreatedByUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageDataRelationshipsCreatedByUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_data_relationships_created_by_user_data.rb b/lib/datadog_api_client/v2/models/status_page_data_relationships_created_by_user_data.rb new file mode 100644 index 00000000000..29eb5c5de42 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data_relationships_created_by_user_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageDataRelationshipsCreatedByUserData + include BaseGenericModel + + # + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageDataRelationshipsCreatedByUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_data_relationships_last_modified_by_user.rb b/lib/datadog_api_client/v2/models/status_page_data_relationships_last_modified_by_user.rb new file mode 100644 index 00000000000..9033483c42f --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data_relationships_last_modified_by_user.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageDataRelationshipsLastModifiedByUser + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPageDataRelationshipsLastModifiedByUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageDataRelationshipsLastModifiedByUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_data_relationships_last_modified_by_user_data.rb b/lib/datadog_api_client/v2/models/status_page_data_relationships_last_modified_by_user_data.rb new file mode 100644 index 00000000000..a85ebb020b0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data_relationships_last_modified_by_user_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPageDataRelationshipsLastModifiedByUserData + include BaseGenericModel + + # + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPageDataRelationshipsLastModifiedByUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_page_data_type.rb b/lib/datadog_api_client/v2/models/status_page_data_type.rb new file mode 100644 index 00000000000..2d73f9f7280 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Status pages resource type. + class StatusPageDataType + include BaseEnumModel + + STATUS_PAGES = "status_pages".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component.rb b/lib/datadog_api_client/v2/models/status_pages_component.rb new file mode 100644 index 00000000000..9073715322f --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component.rb @@ -0,0 +1,117 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponent + include BaseGenericModel + + # + attr_accessor :data + + # + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPagesComponentData', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponent` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_array.rb b/lib/datadog_api_client/v2/models/status_pages_component_array.rb new file mode 100644 index 00000000000..b445ac6d9ae --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_array.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentArray + include BaseGenericModel + + # + attr_reader :data + + # + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_array_included.rb b/lib/datadog_api_client/v2/models/status_pages_component_array_included.rb new file mode 100644 index 00000000000..b7d9cd906b7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_array_included.rb @@ -0,0 +1,64 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + module StatusPagesComponentArrayIncluded + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'StatusPagesUser', + :'StatusPageAsIncluded', + :'StatusPagesComponentGroup' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data.rb b/lib/datadog_api_client/v2/models/status_pages_component_data.rb new file mode 100644 index 00000000000..2ec7d8e0630 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data.rb @@ -0,0 +1,153 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + attr_accessor :relationships + + # Components resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'StatusPagesComponentDataAttributes', + :'id' => :'String', + :'relationships' => :'StatusPagesComponentDataRelationships', + :'type' => :'StatusPagesComponentGroupType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_attributes.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_attributes.rb new file mode 100644 index 00000000000..b3edb97b4fa --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_attributes.rb @@ -0,0 +1,185 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataAttributes + include BaseGenericModel + + # + attr_accessor :components + + # + attr_accessor :created_at + + # + attr_accessor :modified_at + + # + attr_accessor :name + + # + attr_accessor :position + + # + attr_accessor :status + + # + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components' => :'components', + :'created_at' => :'created_at', + :'modified_at' => :'modified_at', + :'name' => :'name', + :'position' => :'position', + :'status' => :'status', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components' => :'Array', + :'created_at' => :'Time', + :'modified_at' => :'Time', + :'name' => :'String', + :'position' => :'Integer', + :'status' => :'StatusPagesComponentDataAttributesStatus', + :'type' => :'CreateComponentRequestDataAttributesType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components') + if (value = attributes[:'components']).is_a?(Array) + self.components = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components == o.components && + created_at == o.created_at && + modified_at == o.modified_at && + name == o.name && + position == o.position && + status == o.status && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components, created_at, modified_at, name, position, status, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_attributes_components_items.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_attributes_components_items.rb new file mode 100644 index 00000000000..50b5dd1cc61 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_attributes_components_items.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataAttributesComponentsItems + include BaseGenericModel + + # + attr_accessor :id + + # + attr_accessor :name + + # + attr_accessor :position + + # + attr_accessor :status + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'position' => :'position', + :'status' => :'status', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'position' => :'Integer', + :'status' => :'StatusPagesComponentGroupAttributesComponentsItemsStatus', + :'type' => :'StatusPagesComponentGroupAttributesComponentsItemsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataAttributesComponentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + position == o.position && + status == o.status && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, position, status, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_attributes_status.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_attributes_status.rb new file mode 100644 index 00000000000..0e76e8e58a6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_attributes_status.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataAttributesStatus + include BaseEnumModel + + OPERATIONAL = "operational".freeze + DEGRADED = "degraded".freeze + PARTIAL_OUTAGE = "partial_outage".freeze + MAJOR_OUTAGE = "major_outage".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_relationships.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships.rb new file mode 100644 index 00000000000..039d68dcc15 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataRelationships + include BaseGenericModel + + # + attr_accessor :created_by_user + + # + attr_accessor :group + + # + attr_accessor :last_modified_by_user + + # + attr_accessor :status_page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_by_user' => :'created_by_user', + :'group' => :'group', + :'last_modified_by_user' => :'last_modified_by_user', + :'status_page' => :'status_page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_by_user' => :'StatusPagesComponentDataRelationshipsCreatedByUser', + :'group' => :'StatusPagesComponentDataRelationshipsGroup', + :'last_modified_by_user' => :'StatusPagesComponentDataRelationshipsLastModifiedByUser', + :'status_page' => :'StatusPagesComponentDataRelationshipsStatusPage' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_by_user') + self.created_by_user = attributes[:'created_by_user'] + end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end + + if attributes.key?(:'last_modified_by_user') + self.last_modified_by_user = attributes[:'last_modified_by_user'] + end + + if attributes.key?(:'status_page') + self.status_page = attributes[:'status_page'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_by_user == o.created_by_user && + group == o.group && + last_modified_by_user == o.last_modified_by_user && + status_page == o.status_page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_by_user, group, last_modified_by_user, status_page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_created_by_user.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_created_by_user.rb new file mode 100644 index 00000000000..1f31ff5b168 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_created_by_user.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataRelationshipsCreatedByUser + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPagesComponentDataRelationshipsCreatedByUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataRelationshipsCreatedByUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_created_by_user_data.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_created_by_user_data.rb new file mode 100644 index 00000000000..dc2f4758185 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_created_by_user_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataRelationshipsCreatedByUserData + include BaseGenericModel + + # + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataRelationshipsCreatedByUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_group.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_group.rb new file mode 100644 index 00000000000..ef394d54827 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_group.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataRelationshipsGroup + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPagesComponentDataRelationshipsGroupData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataRelationshipsGroup` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_group_data.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_group_data.rb new file mode 100644 index 00000000000..ac0322cfcfe --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_group_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataRelationshipsGroupData + include BaseGenericModel + + # + attr_reader :id + + # Components resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesComponentGroupType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataRelationshipsGroupData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_last_modified_by_user.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_last_modified_by_user.rb new file mode 100644 index 00000000000..8dc760651fa --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_last_modified_by_user.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataRelationshipsLastModifiedByUser + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPagesComponentDataRelationshipsLastModifiedByUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataRelationshipsLastModifiedByUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_last_modified_by_user_data.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_last_modified_by_user_data.rb new file mode 100644 index 00000000000..842ded83283 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_last_modified_by_user_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataRelationshipsLastModifiedByUserData + include BaseGenericModel + + # + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataRelationshipsLastModifiedByUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_status_page.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_status_page.rb new file mode 100644 index 00000000000..11d1ba721ff --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_status_page.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataRelationshipsStatusPage + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPagesComponentDataRelationshipsStatusPageData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataRelationshipsStatusPage` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_status_page_data.rb b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_status_page_data.rb new file mode 100644 index 00000000000..1b043993e69 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_status_page_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentDataRelationshipsStatusPageData + include BaseGenericModel + + # + attr_reader :id + + # Status pages resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPageDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentDataRelationshipsStatusPageData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group.rb b/lib/datadog_api_client/v2/models/status_pages_component_group.rb new file mode 100644 index 00000000000..e889f129fe2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group.rb @@ -0,0 +1,153 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroup + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + attr_accessor :relationships + + # Components resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'StatusPagesComponentGroupAttributes', + :'id' => :'String', + :'relationships' => :'StatusPagesComponentGroupRelationships', + :'type' => :'StatusPagesComponentGroupType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroup` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_attributes.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_attributes.rb new file mode 100644 index 00000000000..58d01032e1f --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_attributes.rb @@ -0,0 +1,185 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupAttributes + include BaseGenericModel + + # + attr_accessor :components + + # + attr_accessor :created_at + + # + attr_accessor :modified_at + + # + attr_accessor :name + + # + attr_accessor :position + + # + attr_accessor :status + + # + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components' => :'components', + :'created_at' => :'created_at', + :'modified_at' => :'modified_at', + :'name' => :'name', + :'position' => :'position', + :'status' => :'status', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components' => :'Array', + :'created_at' => :'Time', + :'modified_at' => :'Time', + :'name' => :'String', + :'position' => :'Integer', + :'status' => :'StatusPagesComponentDataAttributesStatus', + :'type' => :'CreateComponentRequestDataAttributesType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components') + if (value = attributes[:'components']).is_a?(Array) + self.components = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components == o.components && + created_at == o.created_at && + modified_at == o.modified_at && + name == o.name && + position == o.position && + status == o.status && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components, created_at, modified_at, name, position, status, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items.rb new file mode 100644 index 00000000000..1cd1e8ceda2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupAttributesComponentsItems + include BaseGenericModel + + # + attr_accessor :id + + # + attr_accessor :name + + # + attr_accessor :position + + # + attr_accessor :status + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'position' => :'position', + :'status' => :'status', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'position' => :'Integer', + :'status' => :'StatusPagesComponentGroupAttributesComponentsItemsStatus', + :'type' => :'StatusPagesComponentGroupAttributesComponentsItemsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupAttributesComponentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + position == o.position && + status == o.status && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, position, status, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items_status.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items_status.rb new file mode 100644 index 00000000000..430f517356d --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items_status.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupAttributesComponentsItemsStatus + include BaseEnumModel + + OPERATIONAL = "operational".freeze + DEGRADED = "degraded".freeze + PARTIAL_OUTAGE = "partial_outage".freeze + MAJOR_OUTAGE = "major_outage".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items_type.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items_type.rb new file mode 100644 index 00000000000..1cff3b8e56a --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupAttributesComponentsItemsType + include BaseEnumModel + + COMPONENT = "component".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_relationships.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships.rb new file mode 100644 index 00000000000..97f4412a373 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupRelationships + include BaseGenericModel + + # + attr_accessor :created_by_user + + # + attr_accessor :group + + # + attr_accessor :last_modified_by_user + + # + attr_accessor :status_page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_by_user' => :'created_by_user', + :'group' => :'group', + :'last_modified_by_user' => :'last_modified_by_user', + :'status_page' => :'status_page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_by_user' => :'StatusPagesComponentGroupRelationshipsCreatedByUser', + :'group' => :'StatusPagesComponentGroupRelationshipsGroup', + :'last_modified_by_user' => :'StatusPagesComponentGroupRelationshipsLastModifiedByUser', + :'status_page' => :'StatusPagesComponentGroupRelationshipsStatusPage' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_by_user') + self.created_by_user = attributes[:'created_by_user'] + end + + if attributes.key?(:'group') + self.group = attributes[:'group'] + end + + if attributes.key?(:'last_modified_by_user') + self.last_modified_by_user = attributes[:'last_modified_by_user'] + end + + if attributes.key?(:'status_page') + self.status_page = attributes[:'status_page'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_by_user == o.created_by_user && + group == o.group && + last_modified_by_user == o.last_modified_by_user && + status_page == o.status_page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_by_user, group, last_modified_by_user, status_page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_created_by_user.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_created_by_user.rb new file mode 100644 index 00000000000..02b616c5bb8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_created_by_user.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupRelationshipsCreatedByUser + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPagesComponentGroupRelationshipsCreatedByUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupRelationshipsCreatedByUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_created_by_user_data.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_created_by_user_data.rb new file mode 100644 index 00000000000..9e2aba3ba7b --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_created_by_user_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupRelationshipsCreatedByUserData + include BaseGenericModel + + # + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupRelationshipsCreatedByUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_group.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_group.rb new file mode 100644 index 00000000000..885f144211b --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_group.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupRelationshipsGroup + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPagesComponentGroupRelationshipsGroupData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupRelationshipsGroup` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_group_data.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_group_data.rb new file mode 100644 index 00000000000..101516689a6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_group_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupRelationshipsGroupData + include BaseGenericModel + + # + attr_reader :id + + # Components resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesComponentGroupType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupRelationshipsGroupData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_last_modified_by_user.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_last_modified_by_user.rb new file mode 100644 index 00000000000..1a343c05597 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_last_modified_by_user.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupRelationshipsLastModifiedByUser + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPagesComponentGroupRelationshipsLastModifiedByUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupRelationshipsLastModifiedByUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_last_modified_by_user_data.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_last_modified_by_user_data.rb new file mode 100644 index 00000000000..dc1996bcdae --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_last_modified_by_user_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupRelationshipsLastModifiedByUserData + include BaseGenericModel + + # + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupRelationshipsLastModifiedByUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_status_page.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_status_page.rb new file mode 100644 index 00000000000..5eb9114e8b6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_status_page.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupRelationshipsStatusPage + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'StatusPagesComponentGroupRelationshipsStatusPageData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupRelationshipsStatusPage` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_status_page_data.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_status_page_data.rb new file mode 100644 index 00000000000..9c8dcc18bed --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_status_page_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesComponentGroupRelationshipsStatusPageData + include BaseGenericModel + + # + attr_reader :id + + # Status pages resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'StatusPageDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesComponentGroupRelationshipsStatusPageData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_component_group_type.rb b/lib/datadog_api_client/v2/models/status_pages_component_group_type.rb new file mode 100644 index 00000000000..08e24a65693 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Components resource type. + class StatusPagesComponentGroupType + include BaseEnumModel + + COMPONENTS = "components".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_user.rb b/lib/datadog_api_client/v2/models/status_pages_user.rb new file mode 100644 index 00000000000..2b162dfa0b6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_user.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesUser + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'StatusPagesUserAttributes', + :'id' => :'String', + :'type' => :'StatusPagesUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_user_attributes.rb b/lib/datadog_api_client/v2/models/status_pages_user_attributes.rb new file mode 100644 index 00000000000..041173fcc01 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_user_attributes.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class StatusPagesUserAttributes + include BaseGenericModel + + # + attr_accessor :email + + # + attr_accessor :handle + + # + attr_accessor :icon + + # + attr_accessor :name + + # + attr_accessor :uuid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'email' => :'email', + :'handle' => :'handle', + :'icon' => :'icon', + :'name' => :'name', + :'uuid' => :'uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'email' => :'String', + :'handle' => :'String', + :'icon' => :'String', + :'name' => :'String', + :'uuid' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatusPagesUserAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'handle') + self.handle = attributes[:'handle'] + end + + if attributes.key?(:'icon') + self.icon = attributes[:'icon'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'uuid') + self.uuid = attributes[:'uuid'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + handle == o.handle && + icon == o.icon && + name == o.name && + uuid == o.uuid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [email, handle, icon, name, uuid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_user_type.rb b/lib/datadog_api_client/v2/models/status_pages_user_type.rb new file mode 100644 index 00000000000..cce7e11c7d5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_user_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Users resource type. + class StatusPagesUserType + include BaseEnumModel + + USERS = "users".freeze + end +end