From 911aaa3267359e5450ac156fd4ea3161048409f5 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 9 Jan 2026 19:19:30 +0000 Subject: [PATCH] Regenerate client from commit 913e59c of spec repo --- .generator/schemas/v2/openapi.yaml | 2012 +++++++++++++++++ ...-component-returns-Created-response.frozen | 1 + ...ate-component-returns-Created-response.yml | 80 + ...egradation-returns-Created-response.frozen | 1 + ...e-degradation-returns-Created-response.yml | 80 + ...tatus-page-returns-Created-response.frozen | 1 + ...e-status-page-returns-Created-response.yml | 42 + ...mponent-returns-No-Content-response.frozen | 1 + ...-component-returns-No-Content-response.yml | 58 + ...adation-returns-No-Content-response.frozen | 1 + ...egradation-returns-No-Content-response.yml | 98 + ...us-page-returns-No-Content-response.frozen | 1 + ...tatus-page-returns-No-Content-response.yml | 60 + .../Get-component-returns-OK-response.frozen | 1 + .../Get-component-returns-OK-response.yml | 60 + ...Get-degradation-returns-OK-response.frozen | 1 + .../Get-degradation-returns-OK-response.yml | 98 + ...Get-status-page-returns-OK-response.frozen | 1 + .../Get-status-page-returns-OK-response.yml | 61 + ...List-components-returns-OK-response.frozen | 1 + .../List-components-returns-OK-response.yml | 60 + ...st-degradations-returns-OK-response.frozen | 1 + .../List-degradations-returns-OK-response.yml | 98 + ...st-status-pages-returns-OK-response.frozen | 1 + .../List-status-pages-returns-OK-response.yml | 102 + ...pdate-component-returns-OK-response.frozen | 1 + .../Update-component-returns-OK-response.yml | 64 + ...ate-degradation-returns-OK-response.frozen | 1 + ...Update-degradation-returns-OK-response.yml | 102 + ...ate-status-page-returns-OK-response.frozen | 1 + ...Update-status-page-returns-OK-response.yml | 65 + examples/v2/status-pages/CreateComponent.rb | 19 + examples/v2/status-pages/CreateDegradation.rb | 26 + examples/v2/status-pages/CreateStatusPage.rb | 18 + examples/v2/status-pages/DeleteComponent.rb | 9 + examples/v2/status-pages/DeleteDegradation.rb | 11 + examples/v2/status-pages/DeleteStatusPage.rb | 8 + examples/v2/status-pages/GetComponent.rb | 9 + examples/v2/status-pages/GetDegradation.rb | 11 + examples/v2/status-pages/GetStatusPage.rb | 8 + examples/v2/status-pages/ListComponents.rb | 8 + examples/v2/status-pages/ListDegradations.rb | 5 + examples/v2/status-pages/ListStatusPages.rb | 5 + examples/v2/status-pages/UpdateComponent.rb | 19 + examples/v2/status-pages/UpdateDegradation.rb | 21 + examples/v2/status-pages/UpdateStatusPage.rb | 18 + features/scenarios_model_mapping.rb | 75 + features/v2/given.json | 28 + features/v2/status_pages.feature | 140 ++ features/v2/undo.json | 119 + lib/datadog_api_client/inflector.rb | 107 + .../v2/api/status_pages_api.rb | 1100 +++++++++ .../v2/models/create_component_request.rb | 105 + .../models/create_component_request_data.rb | 143 ++ ...reate_component_request_data_attributes.rb | 177 ++ ...equest_data_attributes_components_items.rb | 165 ++ ..._component_request_data_attributes_type.rb | 27 + ...te_component_request_data_relationships.rb | 105 + ...ponent_request_data_relationships_group.rb | 123 + ...t_request_data_relationships_group_data.rb | 144 ++ .../v2/models/create_degradation_request.rb | 105 + .../models/create_degradation_request_data.rb | 133 ++ ...ate_degradation_request_data_attributes.rb | 177 ++ ...ta_attributes_components_affected_items.rb | 154 ++ ...radation_request_data_attributes_status.rb | 29 + .../v2/models/create_status_page_request.rb | 105 + .../models/create_status_page_request_data.rb | 133 ++ ...ate_status_page_request_data_attributes.rb | 259 +++ ...equest_data_attributes_components_items.rb | 157 ++ ...butes_components_items_components_items.rb | 145 ++ ...tatus_page_request_data_attributes_type.rb | 27 + ...uest_data_attributes_visualization_type.rb | 28 + .../v2/models/degradation.rb | 117 + .../v2/models/degradation_array.rb | 147 ++ .../v2/models/degradation_array_included.rb | 63 + .../v2/models/degradation_data.rb | 153 ++ .../v2/models/degradation_data_attributes.rb | 169 ++ ...ta_attributes_components_affected_items.rb | 154 ++ ...gradation_data_attributes_updates_items.rb | 167 ++ ...updates_items_components_affected_items.rb | 154 ++ .../models/degradation_data_relationships.rb | 125 + ...tion_data_relationships_created_by_user.rb | 123 + ...data_relationships_created_by_user_data.rb | 144 ++ ...ata_relationships_last_modified_by_user.rb | 123 + ...elationships_last_modified_by_user_data.rb | 144 ++ ...radation_data_relationships_status_page.rb | 123 + ...ion_data_relationships_status_page_data.rb | 144 ++ .../v2/models/patch_component_request.rb | 105 + .../v2/models/patch_component_request_data.rb | 143 ++ ...patch_component_request_data_attributes.rb | 115 + .../v2/models/patch_degradation_request.rb | 105 + .../models/patch_degradation_request_data.rb | 143 ++ ...tch_degradation_request_data_attributes.rb | 137 ++ ...ta_attributes_components_affected_items.rb | 154 ++ ...radation_request_data_attributes_status.rb | 29 + .../patch_degradation_request_data_type.rb | 26 + .../v2/models/patch_status_page_request.rb | 105 + .../models/patch_status_page_request_data.rb | 143 ++ ...tch_status_page_request_data_attributes.rb | 185 ++ .../v2/models/status_page.rb | 117 + .../v2/models/status_page_array.rb | 147 ++ .../v2/models/status_page_array_included.rb | 62 + .../v2/models/status_page_as_included.rb | 153 ++ .../status_page_as_included_attributes.rb | 247 ++ ...as_included_attributes_components_items.rb | 157 ++ ...butes_components_items_components_items.rb | 145 ++ .../status_page_as_included_relationships.rb | 115 + ..._included_relationships_created_by_user.rb | 123 + ...uded_relationships_created_by_user_data.rb | 144 ++ ...ded_relationships_last_modified_by_user.rb | 123 + ...elationships_last_modified_by_user_data.rb | 144 ++ .../v2/models/status_page_data.rb | 153 ++ .../v2/models/status_page_data_attributes.rb | 258 +++ ...s_page_data_attributes_components_items.rb | 157 ++ ...butes_components_items_components_items.rb | 145 ++ .../models/status_page_data_relationships.rb | 115 + ...page_data_relationships_created_by_user.rb | 123 + ...data_relationships_created_by_user_data.rb | 144 ++ ...ata_relationships_last_modified_by_user.rb | 123 + ...elationships_last_modified_by_user_data.rb | 144 ++ .../v2/models/status_page_data_type.rb | 26 + .../v2/models/status_pages_component.rb | 117 + .../v2/models/status_pages_component_array.rb | 137 ++ .../status_pages_component_array_included.rb | 64 + .../v2/models/status_pages_component_data.rb | 153 ++ .../status_pages_component_data_attributes.rb | 185 ++ ...ponent_data_attributes_components_items.rb | 145 ++ ..._pages_component_data_attributes_status.rb | 29 + ...atus_pages_component_data_relationships.rb | 135 ++ ...nent_data_relationships_created_by_user.rb | 123 + ...data_relationships_created_by_user_data.rb | 144 ++ ...ages_component_data_relationships_group.rb | 123 + ...component_data_relationships_group_data.rb | 144 ++ ...ata_relationships_last_modified_by_user.rb | 123 + ...elationships_last_modified_by_user_data.rb | 144 ++ ...omponent_data_relationships_status_page.rb | 123 + ...ent_data_relationships_status_page_data.rb | 144 ++ .../v2/models/status_pages_component_group.rb | 153 ++ ...status_pages_component_group_attributes.rb | 185 ++ ...onent_group_attributes_components_items.rb | 145 ++ ...roup_attributes_components_items_status.rb | 29 + ..._group_attributes_components_items_type.rb | 26 + ...tus_pages_component_group_relationships.rb | 135 ++ ...ent_group_relationships_created_by_user.rb | 123 + ...roup_relationships_created_by_user_data.rb | 144 ++ ...ges_component_group_relationships_group.rb | 123 + ...omponent_group_relationships_group_data.rb | 144 ++ ...oup_relationships_last_modified_by_user.rb | 123 + ...elationships_last_modified_by_user_data.rb | 144 ++ ...mponent_group_relationships_status_page.rb | 123 + ...nt_group_relationships_status_page_data.rb | 144 ++ .../status_pages_component_group_type.rb | 26 + .../v2/models/status_pages_pagination.rb | 186 ++ .../v2/models/status_pages_pagination_type.rb | 26 + .../v2/models/status_pages_response_meta.rb | 105 + .../v2/models/status_pages_user.rb | 143 ++ .../v2/models/status_pages_user_attributes.rb | 145 ++ .../v2/models/status_pages_user_type.rb | 26 + 158 files changed, 18296 insertions(+) create mode 100644 cassettes/features/v2/status_pages/Create-component-returns-Created-response.frozen create mode 100644 cassettes/features/v2/status_pages/Create-component-returns-Created-response.yml create mode 100644 cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.frozen create mode 100644 cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.yml create mode 100644 cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.frozen create mode 100644 cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.yml create mode 100644 cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/status_pages/Get-component-returns-OK-response.frozen create mode 100644 cassettes/features/v2/status_pages/Get-component-returns-OK-response.yml create mode 100644 cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.frozen create mode 100644 cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.yml create mode 100644 cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.frozen create mode 100644 cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.yml create mode 100644 cassettes/features/v2/status_pages/List-components-returns-OK-response.frozen create mode 100644 cassettes/features/v2/status_pages/List-components-returns-OK-response.yml create mode 100644 cassettes/features/v2/status_pages/List-degradations-returns-OK-response.frozen create mode 100644 cassettes/features/v2/status_pages/List-degradations-returns-OK-response.yml create mode 100644 cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.frozen create mode 100644 cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.yml create mode 100644 cassettes/features/v2/status_pages/Update-component-returns-OK-response.frozen create mode 100644 cassettes/features/v2/status_pages/Update-component-returns-OK-response.yml create mode 100644 cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.frozen create mode 100644 cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.yml create mode 100644 cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.frozen create mode 100644 cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.yml create mode 100644 examples/v2/status-pages/CreateComponent.rb create mode 100644 examples/v2/status-pages/CreateDegradation.rb create mode 100644 examples/v2/status-pages/CreateStatusPage.rb create mode 100644 examples/v2/status-pages/DeleteComponent.rb create mode 100644 examples/v2/status-pages/DeleteDegradation.rb create mode 100644 examples/v2/status-pages/DeleteStatusPage.rb create mode 100644 examples/v2/status-pages/GetComponent.rb create mode 100644 examples/v2/status-pages/GetDegradation.rb create mode 100644 examples/v2/status-pages/GetStatusPage.rb create mode 100644 examples/v2/status-pages/ListComponents.rb create mode 100644 examples/v2/status-pages/ListDegradations.rb create mode 100644 examples/v2/status-pages/ListStatusPages.rb create mode 100644 examples/v2/status-pages/UpdateComponent.rb create mode 100644 examples/v2/status-pages/UpdateDegradation.rb create mode 100644 examples/v2/status-pages/UpdateStatusPage.rb create mode 100644 features/v2/status_pages.feature create mode 100644 lib/datadog_api_client/v2/api/status_pages_api.rb create mode 100644 lib/datadog_api_client/v2/models/create_component_request.rb create mode 100644 lib/datadog_api_client/v2/models/create_component_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/create_component_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/create_component_request_data_attributes_components_items.rb create mode 100644 lib/datadog_api_client/v2/models/create_component_request_data_attributes_type.rb create mode 100644 lib/datadog_api_client/v2/models/create_component_request_data_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/create_component_request_data_relationships_group.rb create mode 100644 lib/datadog_api_client/v2/models/create_component_request_data_relationships_group_data.rb create mode 100644 lib/datadog_api_client/v2/models/create_degradation_request.rb create mode 100644 lib/datadog_api_client/v2/models/create_degradation_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/create_degradation_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/create_degradation_request_data_attributes_components_affected_items.rb create mode 100644 lib/datadog_api_client/v2/models/create_degradation_request_data_attributes_status.rb create mode 100644 lib/datadog_api_client/v2/models/create_status_page_request.rb create mode 100644 lib/datadog_api_client/v2/models/create_status_page_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/create_status_page_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_components_items.rb create mode 100644 lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_components_items_components_items.rb create mode 100644 lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_type.rb create mode 100644 lib/datadog_api_client/v2/models/create_status_page_request_data_attributes_visualization_type.rb create mode 100644 lib/datadog_api_client/v2/models/degradation.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_array.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_array_included.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_attributes_components_affected_items.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_attributes_updates_items.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_attributes_updates_items_components_affected_items.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_relationships_created_by_user.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_relationships_created_by_user_data.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_relationships_last_modified_by_user.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_relationships_last_modified_by_user_data.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_relationships_status_page.rb create mode 100644 lib/datadog_api_client/v2/models/degradation_data_relationships_status_page_data.rb create mode 100644 lib/datadog_api_client/v2/models/patch_component_request.rb create mode 100644 lib/datadog_api_client/v2/models/patch_component_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/patch_component_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/patch_degradation_request.rb create mode 100644 lib/datadog_api_client/v2/models/patch_degradation_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes_components_affected_items.rb create mode 100644 lib/datadog_api_client/v2/models/patch_degradation_request_data_attributes_status.rb create mode 100644 lib/datadog_api_client/v2/models/patch_degradation_request_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/patch_status_page_request.rb create mode 100644 lib/datadog_api_client/v2/models/patch_status_page_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/patch_status_page_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/status_page.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_array.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_array_included.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_as_included.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_as_included_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_as_included_attributes_components_items.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_as_included_attributes_components_items_components_items.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_as_included_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_as_included_relationships_created_by_user.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_as_included_relationships_created_by_user_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_as_included_relationships_last_modified_by_user.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_as_included_relationships_last_modified_by_user_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_data_attributes_components_items.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_data_attributes_components_items_components_items.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_data_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_data_relationships_created_by_user.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_data_relationships_created_by_user_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_data_relationships_last_modified_by_user.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_data_relationships_last_modified_by_user_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_page_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_array.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_array_included.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_attributes_components_items.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_attributes_status.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_relationships_created_by_user.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_relationships_created_by_user_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_relationships_group.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_relationships_group_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_relationships_last_modified_by_user.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_relationships_last_modified_by_user_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_relationships_status_page.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_data_relationships_status_page_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items_status.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_attributes_components_items_type.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_relationships_created_by_user.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_relationships_created_by_user_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_relationships_group.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_relationships_group_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_relationships_last_modified_by_user.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_relationships_last_modified_by_user_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_relationships_status_page.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_relationships_status_page_data.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_component_group_type.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_pagination.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_pagination_type.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_response_meta.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_user.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_user_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/status_pages_user_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f2d659f77f9..567c7001e13 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,186 @@ 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 + meta: + $ref: '#/components/schemas/StatusPagesResponseMeta' + 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: @@ -40610,6 +41086,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: @@ -40656,6 +41240,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: @@ -53864,6 +54505,731 @@ 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 + meta: + $ref: '#/components/schemas/StatusPagesResponseMeta' + 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: + nullable: true + type: string + components: + items: + $ref: '#/components/schemas/StatusPageDataAttributesComponentsItems' + type: array + created_at: + format: date-time + type: string + custom_domain: + nullable: true + type: string + custom_domain_enabled: + type: boolean + domain_prefix: + type: string + email_header_image: + nullable: true + type: string + enabled: + type: boolean + favicon: + nullable: true + 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' + nullable: true + 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 + StatusPagesPagination: + properties: + first_offset: + example: 0 + format: int64 + type: integer + last_offset: + example: null + format: int64 + nullable: true + type: integer + limit: + description: Integer representing the number of elements to returned in + the results. + example: 100 + format: int64 + type: integer + next_offset: + description: Integer representing the index of the first element in the + next page of results. Equal to page size added to the current offset. + example: 100 + format: int64 + nullable: true + type: integer + offset: + description: Integer representing the index of the first element in the + results. + example: 0 + format: int64 + type: integer + prev_offset: + example: null + format: int64 + nullable: true + type: integer + total: + description: Integer representing the total number of elements available. + example: 1000 + format: int64 + nullable: true + type: integer + type: + $ref: '#/components/schemas/StatusPagesPaginationType' + type: object + StatusPagesPaginationType: + default: offset_limit + enum: + - offset_limit + example: offset_limit + type: string + x-enum-varnames: + - OFFSET_LIMIT + StatusPagesResponseMeta: + properties: + page: + $ref: '#/components/schemas/StatusPagesPagination' + readOnly: true + type: object + 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. @@ -86996,6 +88362,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. + 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. + 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. @@ -91268,6 +93278,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..9362dbb218a --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-component-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:17.737Z \ 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..e9a570269d5 --- /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 18:43:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"1ce8205a4e6ea1ed","type":"component"}],"domain_prefix":"dd-integration-tests-1ce8205a4e6ea1ed","enabled":true,"name":"[DD + Integration Tests] 1ce8205a4e6ea1ed","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":"57c413b7-a3b0-465e-99a0-1ed82e39ab7a","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"93d7ec73-4666-4fb7-b4fd-a679c66df580","name":"1ce8205a4e6ea1ed","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:17.896426Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-1ce8205a4e6ea1ed","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:17.896426Z","name":"[DD + Integration Tests] 1ce8205a4e6ea1ed","page_url":"https://frog.datadoghq.com/status-pages/57c413b7-a3b0-465e-99a0-1ed82e39ab7a/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 18:43:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"1ce8205a4e6ea1ed","position":0,"type":"component"},"type":"components"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/57c413b7-a3b0-465e-99a0-1ed82e39ab7a/components + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"4abc57bc-67da-4d19-b7c0-4a302a9430b0","type":"components","attributes":{"created_at":"2026-01-09T18:43:18.336904Z","modified_at":"2026-01-09T18:43:18.336904Z","name":"1ce8205a4e6ea1ed","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":"57c413b7-a3b0-465e-99a0-1ed82e39ab7a","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 18:43:17 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/57c413b7-a3b0-465e-99a0-1ed82e39ab7a/components/4abc57bc-67da-4d19-b7c0-4a302a9430b0 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 18:43:17 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/57c413b7-a3b0-465e-99a0-1ed82e39ab7a + 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..0c3d09f9602 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:18.926Z \ 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..00cba2fbe47 --- /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 18:43:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"141ea186b391858b","type":"component"}],"domain_prefix":"dd-integration-tests-141ea186b391858b","enabled":true,"name":"[DD + Integration Tests] 141ea186b391858b","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":"60d9adb8-50c8-4493-92b1-cada1aadedc3","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"0b631115-4d84-41f6-bbb0-e7c98ba29517","name":"141ea186b391858b","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:19.080078Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-141ea186b391858b","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:19.080078Z","name":"[DD + Integration Tests] 141ea186b391858b","page_url":"https://frog.datadoghq.com/status-pages/60d9adb8-50c8-4493-92b1-cada1aadedc3/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 18:43:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"0b631115-4d84-41f6-bbb0-e7c98ba29517","status":"major_outage"}],"description":"141ea186b391858b","status":"investigating","title":"141ea186b391858b"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/60d9adb8-50c8-4493-92b1-cada1aadedc3/degradations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"92757e05-3927-43ab-9e26-913bd3d342fc","type":"degradations","attributes":{"components_affected":[{"id":"0b631115-4d84-41f6-bbb0-e7c98ba29517","name":"141ea186b391858b","status":"major_outage"}],"created_at":"2026-01-09T18:43:19.619679Z","description":"141ea186b391858b","modified_at":"2026-01-09T18:43:19.619679Z","status":"investigating","title":"141ea186b391858b","updates":[{"id":"22f5ab64-99e9-49dd-95e4-1f8f62f8ee59","created_at":"2026-01-09T18:43:19.619679Z","modified_at":"2026-01-09T18:43:19.619679Z","started_at":"0001-01-01T00:00:00Z","status":"investigating","description":"141ea186b391858b","components_affected":[{"id":"0b631115-4d84-41f6-bbb0-e7c98ba29517","name":"141ea186b391858b","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":"60d9adb8-50c8-4493-92b1-cada1aadedc3","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 18:43:18 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/60d9adb8-50c8-4493-92b1-cada1aadedc3/degradations/92757e05-3927-43ab-9e26-913bd3d342fc + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 18:43:18 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/60d9adb8-50c8-4493-92b1-cada1aadedc3 + 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..0beb7626429 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:20.246Z \ 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..efa8a593e72 --- /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 18:43:20 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"domain_prefix":"dd-integrations-tests-c6b0af836a4d778b","enabled":true,"name":"[DD + Integration Tests] c6b0af836a4d778b","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":"084aff0f-2ff7-46a0-8402-3de8b83fc16d","type":"status_pages","attributes":{"company_logo":null,"components":[],"created_at":"2026-01-09T18:43:20.393281Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integrations-tests-c6b0af836a4d778b","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:20.393281Z","name":"[DD + Integration Tests] c6b0af836a4d778b","page_url":"https://frog.datadoghq.com/status-pages/084aff0f-2ff7-46a0-8402-3de8b83fc16d/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 18:43:20 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/084aff0f-2ff7-46a0-8402-3de8b83fc16d + 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..fe39ae57aca --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:21.568Z \ 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..f59932b29a4 --- /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 18:43:21 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"bc677795c3d91f44","type":"component"}],"domain_prefix":"dd-integration-tests-bc677795c3d91f44","enabled":true,"name":"[DD + Integration Tests] bc677795c3d91f44","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":"12bdb3b1-c9fb-4f0e-a6c1-de3912ee9e24","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"acb49b1c-cca2-4a77-ad79-5af7f4c00968","name":"bc677795c3d91f44","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:21.720956Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-bc677795c3d91f44","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:21.720956Z","name":"[DD + Integration Tests] bc677795c3d91f44","page_url":"https://frog.datadoghq.com/status-pages/12bdb3b1-c9fb-4f0e-a6c1-de3912ee9e24/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 18:43:21 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/12bdb3b1-c9fb-4f0e-a6c1-de3912ee9e24/components/acb49b1c-cca2-4a77-ad79-5af7f4c00968 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 18:43:21 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/12bdb3b1-c9fb-4f0e-a6c1-de3912ee9e24 + 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..7210c0fa36d --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:22.674Z \ 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..78b68d5c644 --- /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 18:43:22 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"fa39919ddfcca95a","type":"component"}],"domain_prefix":"dd-integration-tests-fa39919ddfcca95a","enabled":true,"name":"[DD + Integration Tests] fa39919ddfcca95a","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":"970a7a1e-d4b5-47bf-8841-ea4213755f86","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"5ee03770-c344-4a03-b5e8-a2a63b505118","name":"fa39919ddfcca95a","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:22.828055Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-fa39919ddfcca95a","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:22.828055Z","name":"[DD + Integration Tests] fa39919ddfcca95a","page_url":"https://frog.datadoghq.com/status-pages/970a7a1e-d4b5-47bf-8841-ea4213755f86/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 18:43:22 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"5ee03770-c344-4a03-b5e8-a2a63b505118","status":"major_outage"}],"status":"investigating","title":"Test-Delete_degradation_returns_No_Content_response-1767984202"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/970a7a1e-d4b5-47bf-8841-ea4213755f86/degradations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"fda16955-3499-43dc-92ab-255044455a0a","type":"degradations","attributes":{"components_affected":[{"id":"5ee03770-c344-4a03-b5e8-a2a63b505118","name":"fa39919ddfcca95a","status":"major_outage"}],"created_at":"2026-01-09T18:43:23.362082Z","description":"","modified_at":"2026-01-09T18:43:23.362082Z","status":"investigating","title":"Test-Delete_degradation_returns_No_Content_response-1767984202","updates":[{"id":"a7e6f0b1-64c0-434e-8960-e44380175209","created_at":"2026-01-09T18:43:23.362082Z","modified_at":"2026-01-09T18:43:23.362082Z","started_at":"0001-01-01T00:00:00Z","status":"investigating","description":"","components_affected":[{"id":"5ee03770-c344-4a03-b5e8-a2a63b505118","name":"fa39919ddfcca95a","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":"970a7a1e-d4b5-47bf-8841-ea4213755f86","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 18:43:22 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/970a7a1e-d4b5-47bf-8841-ea4213755f86/degradations/fda16955-3499-43dc-92ab-255044455a0a + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 18:43:22 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/970a7a1e-d4b5-47bf-8841-ea4213755f86/degradations/fda16955-3499-43dc-92ab-255044455a0a + 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 18:43:22 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/970a7a1e-d4b5-47bf-8841-ea4213755f86 + 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..bed7ccab683 --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:24.044Z \ 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..94bcba0a9bb --- /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 18:43:24 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"20bbb49e0cc5c753","type":"component"}],"domain_prefix":"dd-integration-tests-20bbb49e0cc5c753","enabled":true,"name":"[DD + Integration Tests] 20bbb49e0cc5c753","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":"8960312c-f69e-472d-ba4d-809e15025a97","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"40cf7eb3-b9d4-4a6f-b185-a0cffd1a0f08","name":"20bbb49e0cc5c753","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:24.232029Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-20bbb49e0cc5c753","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:24.232029Z","name":"[DD + Integration Tests] 20bbb49e0cc5c753","page_url":"https://frog.datadoghq.com/status-pages/8960312c-f69e-472d-ba4d-809e15025a97/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 18:43:24 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/8960312c-f69e-472d-ba4d-809e15025a97 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 18:43:24 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/8960312c-f69e-472d-ba4d-809e15025a97 + 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..ba5b45da8dc --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-component-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:25.349Z \ 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..2f774037f82 --- /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 18:43:25 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"24698ce50c1fef6d","type":"component"}],"domain_prefix":"dd-integration-tests-24698ce50c1fef6d","enabled":true,"name":"[DD + Integration Tests] 24698ce50c1fef6d","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":"4819a47c-1109-46c1-9943-12463fc02bac","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"b839ef09-c76c-458f-b0ae-95528094e45d","name":"24698ce50c1fef6d","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:25.492666Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-24698ce50c1fef6d","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:25.492666Z","name":"[DD + Integration Tests] 24698ce50c1fef6d","page_url":"https://frog.datadoghq.com/status-pages/4819a47c-1109-46c1-9943-12463fc02bac/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 18:43:25 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/4819a47c-1109-46c1-9943-12463fc02bac/components/b839ef09-c76c-458f-b0ae-95528094e45d + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"b839ef09-c76c-458f-b0ae-95528094e45d","type":"components","attributes":{"created_at":"2026-01-09T18:43:25.492666Z","modified_at":"2026-01-09T18:43:25.492666Z","name":"24698ce50c1fef6d","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":"4819a47c-1109-46c1-9943-12463fc02bac","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 18:43:25 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/4819a47c-1109-46c1-9943-12463fc02bac + 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..07ed875e85f --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:26.419Z \ 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..f465d6bb21b --- /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 18:43:26 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"9093ba6f940b71ca","type":"component"}],"domain_prefix":"dd-integration-tests-9093ba6f940b71ca","enabled":true,"name":"[DD + Integration Tests] 9093ba6f940b71ca","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":"57ce4c9b-d23a-4dc7-8da1-0a238984ec4d","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"8913f5c5-9e5b-4b59-883d-616974fad11b","name":"9093ba6f940b71ca","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:26.571098Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-9093ba6f940b71ca","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:26.571098Z","name":"[DD + Integration Tests] 9093ba6f940b71ca","page_url":"https://frog.datadoghq.com/status-pages/57ce4c9b-d23a-4dc7-8da1-0a238984ec4d/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 18:43:26 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"8913f5c5-9e5b-4b59-883d-616974fad11b","status":"major_outage"}],"status":"investigating","title":"Test-Get_degradation_returns_OK_response-1767984206"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/57ce4c9b-d23a-4dc7-8da1-0a238984ec4d/degradations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"787494b1-ba32-4ebe-ace4-0940f49691c2","type":"degradations","attributes":{"components_affected":[{"id":"8913f5c5-9e5b-4b59-883d-616974fad11b","name":"9093ba6f940b71ca","status":"major_outage"}],"created_at":"2026-01-09T18:43:27.095612Z","description":"","modified_at":"2026-01-09T18:43:27.095612Z","status":"investigating","title":"Test-Get_degradation_returns_OK_response-1767984206","updates":[{"id":"516ee26d-c7c8-42d1-a0dc-d1cb175dc01e","created_at":"2026-01-09T18:43:27.095612Z","modified_at":"2026-01-09T18:43:27.095612Z","started_at":"0001-01-01T00:00:00Z","status":"investigating","description":"","components_affected":[{"id":"8913f5c5-9e5b-4b59-883d-616974fad11b","name":"9093ba6f940b71ca","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":"57ce4c9b-d23a-4dc7-8da1-0a238984ec4d","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 18:43:26 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/57ce4c9b-d23a-4dc7-8da1-0a238984ec4d/degradations/787494b1-ba32-4ebe-ace4-0940f49691c2 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"787494b1-ba32-4ebe-ace4-0940f49691c2","type":"degradations","attributes":{"components_affected":[{"id":"8913f5c5-9e5b-4b59-883d-616974fad11b","name":"9093ba6f940b71ca","status":"major_outage"}],"created_at":"2026-01-09T18:43:27.095612Z","description":"","modified_at":"2026-01-09T18:43:27.095612Z","status":"investigating","title":"Test-Get_degradation_returns_OK_response-1767984206","updates":[{"id":"516ee26d-c7c8-42d1-a0dc-d1cb175dc01e","created_at":"2026-01-09T18:43:27.095612Z","modified_at":"2026-01-09T18:43:27.095612Z","started_at":"0001-01-01T00:00:00Z","status":"investigating","description":"","components_affected":[{"id":"8913f5c5-9e5b-4b59-883d-616974fad11b","name":"9093ba6f940b71ca","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":"57ce4c9b-d23a-4dc7-8da1-0a238984ec4d","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 18:43:26 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/57ce4c9b-d23a-4dc7-8da1-0a238984ec4d/degradations/787494b1-ba32-4ebe-ace4-0940f49691c2 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 18:43:26 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/57ce4c9b-d23a-4dc7-8da1-0a238984ec4d + 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..897051d1f48 --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:27.767Z \ 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..b05e302ade6 --- /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 18:43:27 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"25293c10536005b8","type":"component"}],"domain_prefix":"dd-integration-tests-25293c10536005b8","enabled":true,"name":"[DD + Integration Tests] 25293c10536005b8","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":"03bf79eb-b4cb-4af1-b10d-4c86b98a3e78","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"011c1d53-81f9-4a6e-b1d0-4291e4cab9a5","name":"25293c10536005b8","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:27.905411Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-25293c10536005b8","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:27.905411Z","name":"[DD + Integration Tests] 25293c10536005b8","page_url":"https://frog.datadoghq.com/status-pages/03bf79eb-b4cb-4af1-b10d-4c86b98a3e78/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 18:43:27 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/03bf79eb-b4cb-4af1-b10d-4c86b98a3e78 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"03bf79eb-b4cb-4af1-b10d-4c86b98a3e78","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"011c1d53-81f9-4a6e-b1d0-4291e4cab9a5","name":"25293c10536005b8","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:27.905411Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-25293c10536005b8","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:27.905411Z","name":"[DD + Integration Tests] 25293c10536005b8","page_url":"https://frog.datadoghq.com/status-pages/03bf79eb-b4cb-4af1-b10d-4c86b98a3e78/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 18:43:27 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/03bf79eb-b4cb-4af1-b10d-4c86b98a3e78 + 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..fc40b154bdd --- /dev/null +++ b/cassettes/features/v2/status_pages/List-components-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:28.839Z \ 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..b2880e611d9 --- /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 18:43:28 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"ac93ac9ef66f717f","type":"component"}],"domain_prefix":"dd-integration-tests-ac93ac9ef66f717f","enabled":true,"name":"[DD + Integration Tests] ac93ac9ef66f717f","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":"b111a384-9063-4364-8f54-f7265a779f49","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"ad1aee4e-b117-4083-9c42-c24d059f0cff","name":"ac93ac9ef66f717f","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:28.976141Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-ac93ac9ef66f717f","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:28.976141Z","name":"[DD + Integration Tests] ac93ac9ef66f717f","page_url":"https://frog.datadoghq.com/status-pages/b111a384-9063-4364-8f54-f7265a779f49/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 18:43:28 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/b111a384-9063-4364-8f54-f7265a779f49/components + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"ad1aee4e-b117-4083-9c42-c24d059f0cff","type":"components","attributes":{"created_at":"2026-01-09T18:43:28.976141Z","modified_at":"2026-01-09T18:43:28.976141Z","name":"ac93ac9ef66f717f","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":"b111a384-9063-4364-8f54-f7265a779f49","type":"status_pages"}}}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 18:43:28 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/b111a384-9063-4364-8f54-f7265a779f49 + 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..15c7575c088 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-degradations-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:29.906Z \ 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..d3cd9045ba4 --- /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 18:43:29 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"d7b6718b33c64158","type":"component"}],"domain_prefix":"dd-integration-tests-d7b6718b33c64158","enabled":true,"name":"[DD + Integration Tests] d7b6718b33c64158","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":"78493753-727b-428a-bcd8-5e1430aeac43","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"a521c403-7602-4420-bcca-923c0883c3af","name":"d7b6718b33c64158","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:30.053538Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-d7b6718b33c64158","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:30.053538Z","name":"[DD + Integration Tests] d7b6718b33c64158","page_url":"https://frog.datadoghq.com/status-pages/78493753-727b-428a-bcd8-5e1430aeac43/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 18:43:29 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"a521c403-7602-4420-bcca-923c0883c3af","status":"major_outage"}],"status":"investigating","title":"Test-List_degradations_returns_OK_response-1767984209"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/78493753-727b-428a-bcd8-5e1430aeac43/degradations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"f24344db-10cb-4216-a7e4-09ed31aeee8b","type":"degradations","attributes":{"components_affected":[{"id":"a521c403-7602-4420-bcca-923c0883c3af","name":"d7b6718b33c64158","status":"major_outage"}],"created_at":"2026-01-09T18:43:30.546603Z","description":"","modified_at":"2026-01-09T18:43:30.546603Z","status":"investigating","title":"Test-List_degradations_returns_OK_response-1767984209","updates":[{"id":"558b4409-9552-4dbf-a897-daa67ec7bbe9","created_at":"2026-01-09T18:43:30.546603Z","modified_at":"2026-01-09T18:43:30.546603Z","started_at":"0001-01-01T00:00:00Z","status":"investigating","description":"","components_affected":[{"id":"a521c403-7602-4420-bcca-923c0883c3af","name":"d7b6718b33c64158","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":"78493753-727b-428a-bcd8-5e1430aeac43","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 18:43:29 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":"f24344db-10cb-4216-a7e4-09ed31aeee8b","type":"degradations","attributes":{"components_affected":[{"id":"a521c403-7602-4420-bcca-923c0883c3af","name":"d7b6718b33c64158","status":"major_outage"}],"created_at":"2026-01-09T18:43:30.546603Z","description":"","modified_at":"2026-01-09T18:43:30.546603Z","status":"investigating","title":"Test-List_degradations_returns_OK_response-1767984209","updates":[{"id":"558b4409-9552-4dbf-a897-daa67ec7bbe9","created_at":"2026-01-09T18:43:30.546603Z","modified_at":"2026-01-09T18:43:30.546603Z","started_at":"0001-01-01T00:00:00Z","status":"investigating","description":"","components_affected":[{"id":"a521c403-7602-4420-bcca-923c0883c3af","name":"d7b6718b33c64158","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":"78493753-727b-428a-bcd8-5e1430aeac43","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 18:43:29 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/78493753-727b-428a-bcd8-5e1430aeac43/degradations/f24344db-10cb-4216-a7e4-09ed31aeee8b + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 18:43:29 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/78493753-727b-428a-bcd8-5e1430aeac43 + 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..41c4dfd8076 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:31.279Z \ 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..a4b82bc89e1 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.yml @@ -0,0 +1,102 @@ +http_interactions: +- recorded_at: Fri, 09 Jan 2026 18:43:31 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"da3b654f2686eb34","type":"component"}],"domain_prefix":"dd-integration-tests-da3b654f2686eb34","enabled":true,"name":"[DD + Integration Tests] da3b654f2686eb34","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":"a1c8be0b-22fb-401e-b4af-428ffc4564ee","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"60d7e1dc-4221-489f-97a9-7f5ac73d4b51","name":"da3b654f2686eb34","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:31.425329Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-da3b654f2686eb34","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:31.425329Z","name":"[DD + Integration Tests] da3b654f2686eb34","page_url":"https://frog.datadoghq.com/status-pages/a1c8be0b-22fb-401e-b4af-428ffc4564ee/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 18:43:31 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":"a1c8be0b-22fb-401e-b4af-428ffc4564ee","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"60d7e1dc-4221-489f-97a9-7f5ac73d4b51","name":"da3b654f2686eb34","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:31.425329Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-da3b654f2686eb34","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:31.425329Z","name":"[DD + Integration Tests] da3b654f2686eb34","page_url":"https://frog.datadoghq.com/status-pages/a1c8be0b-22fb-401e-b4af-428ffc4564ee/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":"b5a00d25-1898-44d0-b6c6-cd6edab26cac","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"66246b2a-fc43-4727-a4ed-d2146e7ac9a7","name":"e78409b4341f3893","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:12.380612Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-e78409b4341f3893","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:12.380612Z","name":"[DD + Integration Tests] e78409b4341f3893","page_url":"https://frog.datadoghq.com/status-pages/b5a00d25-1898-44d0-b6c6-cd6edab26cac/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":"68751dce-bdf9-4b9d-96e5-0a97ecdcba3a","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"0c3432c9-99e3-4a3c-9444-66415d8a6eea","name":"c99e23a3038027f3","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:11.873589Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-c99e23a3038027f3","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:11.873589Z","name":"[DD + Integration Tests] c99e23a3038027f3","page_url":"https://frog.datadoghq.com/status-pages/68751dce-bdf9-4b9d-96e5-0a97ecdcba3a/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":"b0d2cc67-25ba-4cac-a1f2-f9250268253c","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"841e3373-11ec-4151-81a7-7e031380f784","name":"587d33bd10c86da6","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:11.291732Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-587d33bd10c86da6","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:11.291732Z","name":"[DD + Integration Tests] 587d33bd10c86da6","page_url":"https://frog.datadoghq.com/status-pages/b0d2cc67-25ba-4cac-a1f2-f9250268253c/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":"9b074790-b37d-4143-90d3-a69d9e9a2c62","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"6a707017-9c34-4557-8a5e-e3e5db9ba6f7","name":"e4fadf05616d6fa8","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:10.704669Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-e4fadf05616d6fa8","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:10.704669Z","name":"[DD + Integration Tests] e4fadf05616d6fa8","page_url":"https://frog.datadoghq.com/status-pages/9b074790-b37d-4143-90d3-a69d9e9a2c62/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":"87f6aa36-e636-4724-bfdb-13b24be34113","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"c8b69c81-7fc4-4f52-b759-a285fdeec4d2","name":"745c1a96ff0c847e","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:10.098316Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-745c1a96ff0c847e","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:10.098316Z","name":"[DD + Integration Tests] 745c1a96ff0c847e","page_url":"https://frog.datadoghq.com/status-pages/87f6aa36-e636-4724-bfdb-13b24be34113/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":"f37f1d2c-d70a-48e8-9ec8-f1b4b65dbeea","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"7ba0b85c-aaaf-4cbb-b591-ecdfb193155b","name":"b6a83d35d921afa8","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:09.556265Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-b6a83d35d921afa8","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:09.556265Z","name":"[DD + Integration Tests] b6a83d35d921afa8","page_url":"https://frog.datadoghq.com/status-pages/f37f1d2c-d70a-48e8-9ec8-f1b4b65dbeea/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":"7bd16aca-924c-402b-8c7c-3b78f9ec4e27","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"16964855-73ad-4353-9226-c0c8b1d3c074","name":"58d40195a73439b2","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:08.946885Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-58d40195a73439b2","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:08.946885Z","name":"[DD + Integration Tests] 58d40195a73439b2","page_url":"https://frog.datadoghq.com/status-pages/7bd16aca-924c-402b-8c7c-3b78f9ec4e27/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":"b326bb5e-ae1c-4325-9ef9-8fe981edb3ce","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"e7896d6f-8096-487a-840e-bc4fa46a3854","name":"ac7f7b7596677644","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:08.347864Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-ac7f7b7596677644","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:08.347864Z","name":"[DD + Integration Tests] ac7f7b7596677644","page_url":"https://frog.datadoghq.com/status-pages/b326bb5e-ae1c-4325-9ef9-8fe981edb3ce/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":"cddeb2af-6ead-4a02-a5ba-1fe9aabf834b","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"30ea3f11-3fce-41c0-8537-0cd925bc1855","name":"ee512fe694801369","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:07.749606Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-ee512fe694801369","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:07.749606Z","name":"[DD + Integration Tests] ee512fe694801369","page_url":"https://frog.datadoghq.com/status-pages/cddeb2af-6ead-4a02-a5ba-1fe9aabf834b/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":"63b4658a-5215-4c8f-a08d-eec3e7c05994","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"e992a841-c1b5-47b0-8a71-fc3b56d10e1e","name":"7105ace678f1a750","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:07.180429Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-7105ace678f1a750","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:07.180429Z","name":"[DD + Integration Tests] 7105ace678f1a750","page_url":"https://frog.datadoghq.com/status-pages/63b4658a-5215-4c8f-a08d-eec3e7c05994/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":"fae34e4e-c6dc-42cf-ad2a-cb9c31b3b7db","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"8bd7e498-bb1c-4e7b-834d-9cee0b0e1728","name":"70d3e77116519881","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:06.638161Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-70d3e77116519881","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:06.638161Z","name":"[DD + Integration Tests] 70d3e77116519881","page_url":"https://frog.datadoghq.com/status-pages/fae34e4e-c6dc-42cf-ad2a-cb9c31b3b7db/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":"a33bd772-f086-420a-ad2c-ca7ea38f5439","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"543a712a-b89a-4f0b-8749-410273863b6f","name":"c96319d0119ed52c","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:06.134025Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-c96319d0119ed52c","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:06.134025Z","name":"[DD + Integration Tests] c96319d0119ed52c","page_url":"https://frog.datadoghq.com/status-pages/a33bd772-f086-420a-ad2c-ca7ea38f5439/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":"85bbc521-3f79-4e19-a55f-5599de766527","type":"status_pages","attributes":{"company_logo":null,"components":[],"created_at":"2026-01-09T17:53:05.623179Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integrations-tests-3690b31bd0cce1f7","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:05.623179Z","name":"[DD + Integration Tests] 3690b31bd0cce1f7","page_url":"https://frog.datadoghq.com/status-pages/85bbc521-3f79-4e19-a55f-5599de766527/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":"ed5e3f9d-e4c7-4958-9204-070eef3b9d4f","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"454115aa-a0cd-4d4d-af8e-4099dfd891e5","name":"420a01564a85200c","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:05.025706Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-420a01564a85200c","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:05.025706Z","name":"[DD + Integration Tests] 420a01564a85200c","page_url":"https://frog.datadoghq.com/status-pages/ed5e3f9d-e4c7-4958-9204-070eef3b9d4f/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":"e149dd6d-2a1a-4eed-a92c-731e50860c4f","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"e710e127-6e24-4516-8064-1c05ff982eaf","name":"d163b22dd382284c","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T17:53:04.493625Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-d163b22dd382284c","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T17:53:04.493625Z","name":"[DD + Integration Tests] d163b22dd382284c","page_url":"https://frog.datadoghq.com/status-pages/e149dd6d-2a1a-4eed-a92c-731e50860c4f/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 18:43:31 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/a1c8be0b-22fb-401e-b4af-428ffc4564ee + 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..8e639c2c21d --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-component-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:32.694Z \ 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..9390df6b519 --- /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 18:43:32 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"60f11665233eebe6","type":"component"}],"domain_prefix":"dd-integration-tests-60f11665233eebe6","enabled":true,"name":"[DD + Integration Tests] 60f11665233eebe6","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":"e6a6e6ac-0bf8-47d0-8b2f-050867b0e666","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"2d7542fb-8481-450f-9c50-d29eb6f1d37b","name":"60f11665233eebe6","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:32.8413Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-60f11665233eebe6","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:32.8413Z","name":"[DD + Integration Tests] 60f11665233eebe6","page_url":"https://frog.datadoghq.com/status-pages/e6a6e6ac-0bf8-47d0-8b2f-050867b0e666/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 18:43:32 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"60f11665233eebe6"},"id":"2d7542fb-8481-450f-9c50-d29eb6f1d37b","type":"components"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/statuspages/e6a6e6ac-0bf8-47d0-8b2f-050867b0e666/components/2d7542fb-8481-450f-9c50-d29eb6f1d37b + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"2d7542fb-8481-450f-9c50-d29eb6f1d37b","type":"components","attributes":{"created_at":"2026-01-09T18:43:32.8413Z","modified_at":"2026-01-09T18:43:33.312732Z","name":"60f11665233eebe6","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":"e6a6e6ac-0bf8-47d0-8b2f-050867b0e666","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 18:43:32 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/e6a6e6ac-0bf8-47d0-8b2f-050867b0e666 + 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..fd36da0e8b1 --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:33.780Z \ 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..23aeeb1814e --- /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 18:43:33 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"f0a5f49e26ad0d17","type":"component"}],"domain_prefix":"dd-integration-tests-f0a5f49e26ad0d17","enabled":true,"name":"[DD + Integration Tests] f0a5f49e26ad0d17","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":"d0e9e47d-947b-48f3-ac6a-e9e0ddab5454","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"1e65a14d-11f8-4df4-b2e6-4e485cd4e120","name":"f0a5f49e26ad0d17","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:33.924264Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-f0a5f49e26ad0d17","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:33.924264Z","name":"[DD + Integration Tests] f0a5f49e26ad0d17","page_url":"https://frog.datadoghq.com/status-pages/d0e9e47d-947b-48f3-ac6a-e9e0ddab5454/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 18:43:33 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"1e65a14d-11f8-4df4-b2e6-4e485cd4e120","status":"major_outage"}],"status":"investigating","title":"Test-Update_degradation_returns_OK_response-1767984213"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/d0e9e47d-947b-48f3-ac6a-e9e0ddab5454/degradations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"6ff8cf75-718b-4e61-81a5-7554c26aeb7b","type":"degradations","attributes":{"components_affected":[{"id":"1e65a14d-11f8-4df4-b2e6-4e485cd4e120","name":"f0a5f49e26ad0d17","status":"major_outage"}],"created_at":"2026-01-09T18:43:34.431657Z","description":"","modified_at":"2026-01-09T18:43:34.431657Z","status":"investigating","title":"Test-Update_degradation_returns_OK_response-1767984213","updates":[{"id":"0f0a8f00-aa73-410c-bbbd-7d2ff8532894","created_at":"2026-01-09T18:43:34.431657Z","modified_at":"2026-01-09T18:43:34.431657Z","started_at":"0001-01-01T00:00:00Z","status":"investigating","description":"","components_affected":[{"id":"1e65a14d-11f8-4df4-b2e6-4e485cd4e120","name":"f0a5f49e26ad0d17","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":"d0e9e47d-947b-48f3-ac6a-e9e0ddab5454","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Fri, 09 Jan 2026 18:43:33 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"title":"f0a5f49e26ad0d17"},"id":"6ff8cf75-718b-4e61-81a5-7554c26aeb7b","type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/statuspages/d0e9e47d-947b-48f3-ac6a-e9e0ddab5454/degradations/6ff8cf75-718b-4e61-81a5-7554c26aeb7b + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"6ff8cf75-718b-4e61-81a5-7554c26aeb7b","type":"degradations","attributes":{"components_affected":[{"id":"1e65a14d-11f8-4df4-b2e6-4e485cd4e120","name":"f0a5f49e26ad0d17","status":"major_outage"}],"created_at":"2026-01-09T18:43:34.431657Z","description":"","modified_at":"2026-01-09T18:43:34.64106Z","status":"investigating","title":"f0a5f49e26ad0d17","updates":[{"id":"0f0a8f00-aa73-410c-bbbd-7d2ff8532894","created_at":"2026-01-09T18:43:34.431657Z","modified_at":"2026-01-09T18:43:34.431657Z","started_at":"0001-01-01T00:00:00Z","status":"investigating","description":"","components_affected":[{"id":"1e65a14d-11f8-4df4-b2e6-4e485cd4e120","name":"f0a5f49e26ad0d17","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":"d0e9e47d-947b-48f3-ac6a-e9e0ddab5454","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 09 Jan 2026 18:43:33 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/d0e9e47d-947b-48f3-ac6a-e9e0ddab5454/degradations/6ff8cf75-718b-4e61-81a5-7554c26aeb7b + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Fri, 09 Jan 2026 18:43:33 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/d0e9e47d-947b-48f3-ac6a-e9e0ddab5454 + 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..a62c5e958ae --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-09T18:43:35.241Z \ 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..c5b66dbc8a2 --- /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 18:43:35 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"7cd6f9a8901a0989","type":"component"}],"domain_prefix":"dd-integration-tests-7cd6f9a8901a0989","enabled":true,"name":"[DD + Integration Tests] 7cd6f9a8901a0989","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":"d52f5180-0f43-43f0-ad0a-f9a515822cf7","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"be042c66-03de-44bc-bc06-554920d52a45","name":"7cd6f9a8901a0989","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:35.391817Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-7cd6f9a8901a0989","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:35.391817Z","name":"[DD + Integration Tests] 7cd6f9a8901a0989","page_url":"https://frog.datadoghq.com/status-pages/d52f5180-0f43-43f0-ad0a-f9a515822cf7/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 18:43:35 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"[DD Integration Tests] 7cd6f9a8901a0989"},"id":"d52f5180-0f43-43f0-ad0a-f9a515822cf7","type":"status_pages"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/statuspages/d52f5180-0f43-43f0-ad0a-f9a515822cf7 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d52f5180-0f43-43f0-ad0a-f9a515822cf7","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"be042c66-03de-44bc-bc06-554920d52a45","name":"7cd6f9a8901a0989","type":"component","status":"operational","position":0}],"created_at":"2026-01-09T18:43:35.391817Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"dd-integration-tests-7cd6f9a8901a0989","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-09T18:43:35.934679Z","name":"[DD + Integration Tests] 7cd6f9a8901a0989","page_url":"https://frog.datadoghq.com/status-pages/d52f5180-0f43-43f0-ad0a-f9a515822cf7/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 18:43:35 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/d52f5180-0f43-43f0-ad0a-f9a515822cf7 + 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 50840f4f759..daeb3bf8dc0 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3234,6 +3234,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 b54378e93ba..1a576774321 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4528,6 +4528,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 6ed3b2b0682..a6702d7d520 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", @@ -3492,10 +3527,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", @@ -4354,6 +4401,65 @@ 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_pagination" => "StatusPagesPagination", + "v2.status_pages_pagination_type" => "StatusPagesPaginationType", + "v2.status_pages_response_meta" => "StatusPagesResponseMeta", + "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", @@ -4838,6 +4944,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..cd7c2e6e047 --- /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. + # @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. + # @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..2a6ab1048d7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_array.rb @@ -0,0 +1,147 @@ +=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 :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'included' => :'Array', + :'meta' => :'StatusPagesResponseMeta' + } + 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 + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, meta, 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..3f2c77f501b --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_array.rb @@ -0,0 +1,147 @@ +=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 :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'included' => :'Array', + :'meta' => :'StatusPagesResponseMeta' + } + 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 + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, meta, 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..9a31265a1b3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_page_data_attributes.rb @@ -0,0 +1,258 @@ +=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 + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'company_logo', + :'custom_domain', + :'email_header_image', + :'favicon', + ]) + 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_pagination.rb b/lib/datadog_api_client/v2/models/status_pages_pagination.rb new file mode 100644 index 00000000000..b4f3f193440 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_pagination.rb @@ -0,0 +1,186 @@ +=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 StatusPagesPagination + include BaseGenericModel + + # + attr_accessor :first_offset + + # + attr_accessor :last_offset + + # Integer representing the number of elements to returned in the results. + attr_accessor :limit + + # Integer representing the index of the first element in the next page of results. Equal to page size added to the current offset. + attr_accessor :next_offset + + # Integer representing the index of the first element in the results. + attr_accessor :offset + + # + attr_accessor :prev_offset + + # Integer representing the total number of elements available. + attr_accessor :total + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'first_offset' => :'first_offset', + :'last_offset' => :'last_offset', + :'limit' => :'limit', + :'next_offset' => :'next_offset', + :'offset' => :'offset', + :'prev_offset' => :'prev_offset', + :'total' => :'total', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'first_offset' => :'Integer', + :'last_offset' => :'Integer', + :'limit' => :'Integer', + :'next_offset' => :'Integer', + :'offset' => :'Integer', + :'prev_offset' => :'Integer', + :'total' => :'Integer', + :'type' => :'StatusPagesPaginationType' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'last_offset', + :'next_offset', + :'prev_offset', + :'total', + ]) + 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::StatusPagesPagination` 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?(:'first_offset') + self.first_offset = attributes[:'first_offset'] + end + + if attributes.key?(:'last_offset') + self.last_offset = attributes[:'last_offset'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'next_offset') + self.next_offset = attributes[:'next_offset'] + end + + if attributes.key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.key?(:'prev_offset') + self.prev_offset = attributes[:'prev_offset'] + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + 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 && + first_offset == o.first_offset && + last_offset == o.last_offset && + limit == o.limit && + next_offset == o.next_offset && + offset == o.offset && + prev_offset == o.prev_offset && + total == o.total && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [first_offset, last_offset, limit, next_offset, offset, prev_offset, total, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_pagination_type.rb b/lib/datadog_api_client/v2/models/status_pages_pagination_type.rb new file mode 100644 index 00000000000..bdcf93215f2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_pagination_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 StatusPagesPaginationType + include BaseEnumModel + + OFFSET_LIMIT = "offset_limit".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/status_pages_response_meta.rb b/lib/datadog_api_client/v2/models/status_pages_response_meta.rb new file mode 100644 index 00000000000..313282c039d --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_response_meta.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 StatusPagesResponseMeta + include BaseGenericModel + + # + attr_accessor :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'page' => :'StatusPagesPagination' + } + 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::StatusPagesResponseMeta` 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?(:'page') + self.page = attributes[:'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 && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [page, additional_properties].hash + end + 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