From 3347220555b24c0e73886464bd0008012e90c857 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 16:34:47 +0000 Subject: [PATCH 1/5] Support decimal sample_rate for RUM retention filters (#2829) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 10 +++++----- .../v2/models/rum_retention_filter_attributes.rb | 10 +++++----- .../models/rum_retention_filter_create_attributes.rb | 10 +++++----- .../models/rum_retention_filter_update_attributes.rb | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 1a7913bf33d7..96a86814c8e6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -47336,12 +47336,12 @@ components: $ref: '#/components/schemas/RumRetentionFilterData' type: object RumRetentionFilterSampleRate: - description: The sample rate for a RUM retention filter, between 0 and 100. - example: 25 - format: int64 + description: The sample rate for a RUM retention filter, between 0.1 and 100. + example: 50.5 + format: double maximum: 100 - minimum: 0 - type: integer + minimum: 0.1 + type: number RumRetentionFilterType: default: retention_filters description: The type of the resource. The value should always be retention_filters. diff --git a/lib/datadog_api_client/v2/models/rum_retention_filter_attributes.rb b/lib/datadog_api_client/v2/models/rum_retention_filter_attributes.rb index 037b586b71cd..312649e4c025 100644 --- a/lib/datadog_api_client/v2/models/rum_retention_filter_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_retention_filter_attributes.rb @@ -33,7 +33,7 @@ class RumRetentionFilterAttributes # The query string for a RUM retention filter. attr_accessor :query - # The sample rate for a RUM retention filter, between 0 and 100. + # The sample rate for a RUM retention filter, between 0.1 and 100. attr_reader :sample_rate attr_accessor :additional_properties @@ -58,7 +58,7 @@ def self.openapi_types :'event_type' => :'RumRetentionFilterEventType', :'name' => :'String', :'query' => :'String', - :'sample_rate' => :'Integer' + :'sample_rate' => :'Float' } end @@ -106,7 +106,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if !@sample_rate.nil? && @sample_rate > 100 - return false if !@sample_rate.nil? && @sample_rate < 0 + return false if !@sample_rate.nil? && @sample_rate < 0.1 true end @@ -117,8 +117,8 @@ def sample_rate=(sample_rate) if !sample_rate.nil? && sample_rate > 100 fail ArgumentError, 'invalid value for "sample_rate", must be smaller than or equal to 100.' end - if !sample_rate.nil? && sample_rate < 0 - fail ArgumentError, 'invalid value for "sample_rate", must be greater than or equal to 0.' + if !sample_rate.nil? && sample_rate < 0.1 + fail ArgumentError, 'invalid value for "sample_rate", must be greater than or equal to 0.1.' end @sample_rate = sample_rate end diff --git a/lib/datadog_api_client/v2/models/rum_retention_filter_create_attributes.rb b/lib/datadog_api_client/v2/models/rum_retention_filter_create_attributes.rb index 60748ce19877..d9c472a19a67 100644 --- a/lib/datadog_api_client/v2/models/rum_retention_filter_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_retention_filter_create_attributes.rb @@ -33,7 +33,7 @@ class RumRetentionFilterCreateAttributes # The query string for a RUM retention filter. attr_accessor :query - # The sample rate for a RUM retention filter, between 0 and 100. + # The sample rate for a RUM retention filter, between 0.1 and 100. attr_reader :sample_rate attr_accessor :additional_properties @@ -58,7 +58,7 @@ def self.openapi_types :'event_type' => :'RumRetentionFilterEventType', :'name' => :'String', :'query' => :'String', - :'sample_rate' => :'Integer' + :'sample_rate' => :'Float' } end @@ -109,7 +109,7 @@ def valid? return false if @name.nil? return false if @sample_rate.nil? return false if @sample_rate > 100 - return false if @sample_rate < 0 + return false if @sample_rate < 0.1 true end @@ -143,8 +143,8 @@ def sample_rate=(sample_rate) if sample_rate > 100 fail ArgumentError, 'invalid value for "sample_rate", must be smaller than or equal to 100.' end - if sample_rate < 0 - fail ArgumentError, 'invalid value for "sample_rate", must be greater than or equal to 0.' + if sample_rate < 0.1 + fail ArgumentError, 'invalid value for "sample_rate", must be greater than or equal to 0.1.' end @sample_rate = sample_rate end diff --git a/lib/datadog_api_client/v2/models/rum_retention_filter_update_attributes.rb b/lib/datadog_api_client/v2/models/rum_retention_filter_update_attributes.rb index fb92ae687466..5e9439392edf 100644 --- a/lib/datadog_api_client/v2/models/rum_retention_filter_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_retention_filter_update_attributes.rb @@ -33,7 +33,7 @@ class RumRetentionFilterUpdateAttributes # The query string for a RUM retention filter. attr_accessor :query - # The sample rate for a RUM retention filter, between 0 and 100. + # The sample rate for a RUM retention filter, between 0.1 and 100. attr_reader :sample_rate attr_accessor :additional_properties @@ -58,7 +58,7 @@ def self.openapi_types :'event_type' => :'RumRetentionFilterEventType', :'name' => :'String', :'query' => :'String', - :'sample_rate' => :'Integer' + :'sample_rate' => :'Float' } end @@ -106,7 +106,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if !@sample_rate.nil? && @sample_rate > 100 - return false if !@sample_rate.nil? && @sample_rate < 0 + return false if !@sample_rate.nil? && @sample_rate < 0.1 true end @@ -117,8 +117,8 @@ def sample_rate=(sample_rate) if !sample_rate.nil? && sample_rate > 100 fail ArgumentError, 'invalid value for "sample_rate", must be smaller than or equal to 100.' end - if !sample_rate.nil? && sample_rate < 0 - fail ArgumentError, 'invalid value for "sample_rate", must be greater than or equal to 0.' + if !sample_rate.nil? && sample_rate < 0.1 + fail ArgumentError, 'invalid value for "sample_rate", must be greater than or equal to 0.1.' end @sample_rate = sample_rate end From 671b90149126bc7d0822f04a78d5a2cced8a131d Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 17:31:24 +0000 Subject: [PATCH 2/5] security_monitoring - Document rules bulk export (#2920) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 94 +++++++++++ ...onitoring-rules-returns-OK-response.frozen | 1 + ...y-monitoring-rules-returns-OK-response.yml | 64 ++++++++ .../BulkExportSecurityMonitoringRules.rb | 19 +++ features/scenarios_model_mapping.rb | 3 + features/v2/security_monitoring.feature | 22 +++ features/v2/undo.json | 6 + lib/datadog_api_client/inflector.rb | 4 + .../v2/api/security_monitoring_api.rb | 69 ++++++++ ..._monitoring_rule_bulk_export_attributes.rb | 130 +++++++++++++++ ...curity_monitoring_rule_bulk_export_data.rb | 154 ++++++++++++++++++ ...y_monitoring_rule_bulk_export_data_type.rb | 26 +++ ...ity_monitoring_rule_bulk_export_payload.rb | 123 ++++++++++++++ 13 files changed, 715 insertions(+) create mode 100644 cassettes/features/v2/security_monitoring/Bulk-export-security-monitoring-rules-returns-OK-response.frozen create mode 100644 cassettes/features/v2/security_monitoring/Bulk-export-security-monitoring-rules-returns-OK-response.yml create mode 100644 examples/v2/security-monitoring/BulkExportSecurityMonitoringRules.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_data.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_payload.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 96a86814c8e6..742df1467615 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -49985,6 +49985,55 @@ components: - TWO_DAYS - ONE_WEEK - TWO_WEEKS + SecurityMonitoringRuleBulkExportAttributes: + description: Attributes for bulk exporting security monitoring rules. + properties: + ruleIds: + description: 'List of rule IDs to export. Each rule will be included in + the resulting ZIP file + + as a separate JSON file.' + example: + - def-000-u7q + - def-000-7dd + items: + type: string + minItems: 1 + type: array + required: + - ruleIds + type: object + SecurityMonitoringRuleBulkExportData: + description: Data for bulk exporting security monitoring rules. + properties: + attributes: + $ref: '#/components/schemas/SecurityMonitoringRuleBulkExportAttributes' + id: + description: Request ID. + example: bulk_export + type: string + type: + $ref: '#/components/schemas/SecurityMonitoringRuleBulkExportDataType' + required: + - attributes + - type + type: object + SecurityMonitoringRuleBulkExportDataType: + description: The type of the resource. + enum: + - security_monitoring_rules_bulk_export + example: security_monitoring_rules_bulk_export + type: string + x-enum-varnames: + - SECURITY_MONITORING_RULES_BULK_EXPORT + SecurityMonitoringRuleBulkExportPayload: + description: Payload for bulk exporting security monitoring rules. + properties: + data: + $ref: '#/components/schemas/SecurityMonitoringRuleBulkExportData' + required: + - data + type: object SecurityMonitoringRuleCase: description: Case when signal is generated. properties: @@ -87257,6 +87306,51 @@ paths: operator: OR permissions: - security_monitoring_rules_write + /api/v2/security_monitoring/rules/bulk_export: + post: + description: 'Export a list of security monitoring rules as a ZIP file containing + JSON rule definitions. + + The endpoint accepts a list of rule IDs and returns a ZIP archive where each + rule is + + saved as a separate JSON file named after the rule.' + operationId: BulkExportSecurityMonitoringRules + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SecurityMonitoringRuleBulkExportPayload' + required: true + responses: + '200': + content: + application/zip: + schema: + format: binary + type: string + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_read + summary: Bulk export security monitoring rules + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_monitoring_rules_read /api/v2/security_monitoring/rules/convert: post: description: 'Convert a rule that doesn''t (yet) exist from JSON to Terraform diff --git a/cassettes/features/v2/security_monitoring/Bulk-export-security-monitoring-rules-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Bulk-export-security-monitoring-rules-returns-OK-response.frozen new file mode 100644 index 000000000000..96710cced0a4 --- /dev/null +++ b/cassettes/features/v2/security_monitoring/Bulk-export-security-monitoring-rules-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-20T09:54:52.371Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Bulk-export-security-monitoring-rules-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Bulk-export-security-monitoring-rules-returns-OK-response.yml new file mode 100644 index 000000000000..0c182fa72f80 --- /dev/null +++ b/cassettes/features/v2/security_monitoring/Bulk-export-security-monitoring-rules-returns-OK-response.yml @@ -0,0 +1,64 @@ +http_interactions: +- recorded_at: Tue, 20 Jan 2026 09:54:52 GMT + request: + body: + encoding: UTF-8 + string: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test + rule","name":"Test-Bulk_export_security_monitoring_rules_returns_OK_response-1768902892","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metrics":[],"query":"@test:true"}],"tags":[],"type":"log_detection"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules + response: + body: + encoding: UTF-8 + string: '{"name":"Test-Bulk_export_security_monitoring_rules_returns_OK_response-1768902892","createdAt":1768902892769,"isDefault":false,"isPartner":false,"isEnabled":true,"isBeta":false,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"@test:true","groupByFields":[],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":"","dataSource":"logs"}],"options":{"evaluationWindow":900,"detectionMethod":"threshold","maxSignalDuration":86400,"keepAlive":3600},"cases":[{"name":"","status":"info","notifications":[],"condition":"a + \u003e 0"}],"message":"Test rule","tags":[],"hasExtendedTitle":false,"type":"log_detection","filters":[],"version":1,"id":"ldv-a2n-sgu","blocking":false,"metadata":{"entities":null,"sources":null},"creationAuthorId":1445416,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"updater":{"handle":"","name":""}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 20 Jan 2026 09:54:52 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"ruleIds":["ldv-a2n-sgu"]},"type":"security_monitoring_rules_bulk_export"}}' + headers: + Accept: + - application/zip, application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/bulk_export + response: + body: + encoding: UTF-8 + string: UEsDBBQACAAIANpONFwAAAAAAAAAAAAAAABOAAkAVGVzdC1CdWxrX2V4cG9ydF9zZWN1cml0eV9tb25pdG9yaW5nX3J1bGVzX3JldHVybnNfT0tfcmVzcG9uc2UtMTc2ODkwMjg5Mi5qc29uVVQFAAHsUG9pVJHPbhMxEMZfJfrOrrS0KCQ+QUXhgFAPrcQBqtWwnjijOvbiGZdEUd4d7Spt6c32+Kf5/hyRacfwuGe1i+uWHnvej6Varzy0KnbodyWLlSo59rUl1r6ytZq1v/3WV9axZOWLdx+Wq3V3uVpfwkH0JtPvxAHeamOHP42rsML/PM7nAzw+GqvNczjEWtp4ffginML07cFhS3o7mpRM6evb6YaSskMQNcmD/Q9RjJUjTRg8htKywT1bhEMgo7vS6jDdU4mK04NDmfco/BH8RKnN/A/JofyFX3edQ2DjYXr9zrYtAR62razbkgIcdrS/k5gpfW71vHu1fD9xj8zjpyRPDH+17LqTw0B6DuJVlRpZU3hI3pRJbzHZyEBnVZOxoeQgZ1u0+NW67ooX3ax+x6oUnztcTB3BwSi+BnmzN86Bw71Y4pcA7TCeY+hf/MFhI8m4zvDpXwAAAP//UEsHCNCj/51ZAQAAHwIAAFBLAQIUABQACAAIANpONFzQo/+dWQEAAB8CAABOAAkAAAAAAAAAAAAAAAAAAABUZXN0LUJ1bGtfZXhwb3J0X3NlY3VyaXR5X21vbml0b3JpbmdfcnVsZXNfcmV0dXJuc19PS19yZXNwb25zZS0xNzY4OTAyODkyLmpzb25VVAUAAexQb2lQSwUGAAAAAAEAAQCFAAAA3gEAAAAA + headers: + Content-Type: + - application/zip + status: + code: 200 + message: OK +- recorded_at: Tue, 20 Jan 2026 09:54:52 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/ldv-a2n-sgu + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/examples/v2/security-monitoring/BulkExportSecurityMonitoringRules.rb b/examples/v2/security-monitoring/BulkExportSecurityMonitoringRules.rb new file mode 100644 index 000000000000..fc246e50aa16 --- /dev/null +++ b/examples/v2/security-monitoring/BulkExportSecurityMonitoringRules.rb @@ -0,0 +1,19 @@ +# Bulk export security monitoring rules returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new + +# there is a valid "security_rule" in the system +SECURITY_RULE_ID = ENV["SECURITY_RULE_ID"] + +body = DatadogAPIClient::V2::SecurityMonitoringRuleBulkExportPayload.new({ + data: DatadogAPIClient::V2::SecurityMonitoringRuleBulkExportData.new({ + attributes: DatadogAPIClient::V2::SecurityMonitoringRuleBulkExportAttributes.new({ + rule_ids: [ + SECURITY_RULE_ID, + ], + }), + type: DatadogAPIClient::V2::SecurityMonitoringRuleBulkExportDataType::SECURITY_MONITORING_RULES_BULK_EXPORT, + }), +}) +p api_instance.bulk_export_security_monitoring_rules(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 362672b4c51a..d5a477354e58 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1598,6 +1598,9 @@ "v2.CreateSecurityMonitoringRule" => { "body" => "SecurityMonitoringRuleCreatePayload", }, + "v2.BulkExportSecurityMonitoringRules" => { + "body" => "SecurityMonitoringRuleBulkExportPayload", + }, "v2.ConvertSecurityMonitoringRuleFromJSONToTerraform" => { "body" => "SecurityMonitoringRuleConvertPayload", }, diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 60e9df68bb9c..1ce71f3d3403 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -83,6 +83,28 @@ Feature: Security Monitoring And the response "data.attributes.insights" has item with field "resource_id" with value "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=" And the response "data.attributes.insights" has item with field "resource_id" with value "MmUzMzZkODQ2YTI3NDU0OTk4NDk3NzhkOTY5YjU2Zjh-YWJjZGI1ODI4OTYzNWM3ZmUwZTBlOWRkYTRiMGUyOGQ=" + @skip @team:DataDog/k9-cloud-security-platform + Scenario: Bulk export security monitoring rules returns "Bad Request" response + Given new "BulkExportSecurityMonitoringRules" request + And body with value {"data": {"attributes": {"ruleIds": []}, "type": "security_monitoring_rules_bulk_export"}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/k9-cloud-security-platform + Scenario: Bulk export security monitoring rules returns "Not Found" response + Given new "BulkExportSecurityMonitoringRules" request + And body with value {"data": {"attributes": {"ruleIds": ["non-existent-rule-id"]}, "type": "security_monitoring_rules_bulk_export"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/k9-cloud-security-platform + Scenario: Bulk export security monitoring rules returns "OK" response + Given there is a valid "security_rule" in the system + And new "BulkExportSecurityMonitoringRules" request + And body with value {"data": {"attributes": {"ruleIds": ["{{ security_rule.id }}"]}, "type": "security_monitoring_rules_bulk_export"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/k9-cloud-security-platform Scenario: Cancel a historical job returns "Bad Request" response Given operation "CancelThreatHuntingJob" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index ab0366ca4a25..9020d3f505f1 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4211,6 +4211,12 @@ "type": "unsafe" } }, + "BulkExportSecurityMonitoringRules": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, "ConvertSecurityMonitoringRuleFromJSONToTerraform": { "tag": "Security Monitoring", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 4119c76c1f58..4c05385dacba 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -4107,6 +4107,10 @@ def overrides "v2.security_monitoring_rule_anomaly_detection_options_bucket_duration" => "SecurityMonitoringRuleAnomalyDetectionOptionsBucketDuration", "v2.security_monitoring_rule_anomaly_detection_options_detection_tolerance" => "SecurityMonitoringRuleAnomalyDetectionOptionsDetectionTolerance", "v2.security_monitoring_rule_anomaly_detection_options_learning_duration" => "SecurityMonitoringRuleAnomalyDetectionOptionsLearningDuration", + "v2.security_monitoring_rule_bulk_export_attributes" => "SecurityMonitoringRuleBulkExportAttributes", + "v2.security_monitoring_rule_bulk_export_data" => "SecurityMonitoringRuleBulkExportData", + "v2.security_monitoring_rule_bulk_export_data_type" => "SecurityMonitoringRuleBulkExportDataType", + "v2.security_monitoring_rule_bulk_export_payload" => "SecurityMonitoringRuleBulkExportPayload", "v2.security_monitoring_rule_case" => "SecurityMonitoringRuleCase", "v2.security_monitoring_rule_case_action" => "SecurityMonitoringRuleCaseAction", "v2.security_monitoring_rule_case_action_options" => "SecurityMonitoringRuleCaseActionOptions", diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index a62476064c5c..356fba373289 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -170,6 +170,75 @@ def attach_jira_issue_with_http_info(body, opts = {}) return data, status_code, headers end + # Bulk export security monitoring rules. + # + # @see #bulk_export_security_monitoring_rules_with_http_info + def bulk_export_security_monitoring_rules(body, opts = {}) + data, _status_code, _headers = bulk_export_security_monitoring_rules_with_http_info(body, opts) + data + end + + # Bulk export security monitoring rules. + # + # Export a list of security monitoring rules as a ZIP file containing JSON rule definitions. + # The endpoint accepts a list of rule IDs and returns a ZIP archive where each rule is + # saved as a separate JSON file named after the rule. + # + # @param body [SecurityMonitoringRuleBulkExportPayload] + # @param opts [Hash] the optional parameters + # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers + def bulk_export_security_monitoring_rules_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.bulk_export_security_monitoring_rules ...' + 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 SecurityMonitoringAPI.bulk_export_security_monitoring_rules" + end + # resource path + local_var_path = '/api/v2/security_monitoring/rules/bulk_export' + + # 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(['application/zip', '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] || 'File' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :bulk_export_security_monitoring_rules, + :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: SecurityMonitoringAPI#bulk_export_security_monitoring_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Cancel a threat hunting job. # # @see #cancel_threat_hunting_job_with_http_info diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_attributes.rb new file mode 100644 index 000000000000..f24a4f5ab67f --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_attributes.rb @@ -0,0 +1,130 @@ +=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 + # Attributes for bulk exporting security monitoring rules. + class SecurityMonitoringRuleBulkExportAttributes + include BaseGenericModel + + # List of rule IDs to export. Each rule will be included in the resulting ZIP file + # as a separate JSON file. + attr_reader :rule_ids + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'rule_ids' => :'ruleIds' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'rule_ids' => :'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::SecurityMonitoringRuleBulkExportAttributes` 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?(:'rule_ids') + if (value = attributes[:'rule_ids']).is_a?(Array) + self.rule_ids = 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 @rule_ids.nil? + return false if @rule_ids.length < 1 + true + end + + # Custom attribute writer method with validation + # @param rule_ids [Object] Object to be assigned + # @!visibility private + def rule_ids=(rule_ids) + if rule_ids.nil? + fail ArgumentError, 'invalid value for "rule_ids", rule_ids cannot be nil.' + end + if rule_ids.length < 1 + fail ArgumentError, 'invalid value for "rule_ids", number of items must be greater than or equal to 1.' + end + @rule_ids = rule_ids + 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 && + rule_ids == o.rule_ids && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [rule_ids, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_data.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_data.rb new file mode 100644 index 000000000000..77a4dc29180b --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_data.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 + # Data for bulk exporting security monitoring rules. + class SecurityMonitoringRuleBulkExportData + include BaseGenericModel + + # Attributes for bulk exporting security monitoring rules. + attr_reader :attributes + + # Request ID. + attr_accessor :id + + # The type of the resource. + 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' => :'SecurityMonitoringRuleBulkExportAttributes', + :'id' => :'String', + :'type' => :'SecurityMonitoringRuleBulkExportDataType' + } + 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::SecurityMonitoringRuleBulkExportData` 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 @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + 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/security_monitoring_rule_bulk_export_data_type.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_data_type.rb new file mode 100644 index 000000000000..53339eb8ec69 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_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 + # The type of the resource. + class SecurityMonitoringRuleBulkExportDataType + include BaseEnumModel + + SECURITY_MONITORING_RULES_BULK_EXPORT = "security_monitoring_rules_bulk_export".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_payload.rb new file mode 100644 index 000000000000..e5b3f8474564 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_bulk_export_payload.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 + # Payload for bulk exporting security monitoring rules. + class SecurityMonitoringRuleBulkExportPayload + include BaseGenericModel + + # Data for bulk exporting security monitoring rules. + 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' => :'SecurityMonitoringRuleBulkExportData' + } + 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::SecurityMonitoringRuleBulkExportPayload` 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 From ef69f261b7c231ed13e1a041648df1752b1308ac Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 17:46:18 +0000 Subject: [PATCH 3/5] Create OpenAPI for HAMR endpoints (#2927) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 272 ++++++++++++++++++ .../CreateHamrOrgConnection.rb | 23 ++ .../GetHamrOrgConnection.rb | 8 + features/scenarios_model_mapping.rb | 3 + .../v2/high_availability_multiregion.feature | 48 ++++ features/v2/undo.json | 14 + lib/datadog_api_client/configuration.rb | 2 + lib/datadog_api_client/inflector.rb | 9 + .../api/high_availability_multi_region_api.rb | 169 +++++++++++ .../hamr_org_connection_attributes_request.rb | 235 +++++++++++++++ ...hamr_org_connection_attributes_response.rb | 256 +++++++++++++++++ .../hamr_org_connection_data_request.rb | 165 +++++++++++ .../hamr_org_connection_data_response.rb | 165 +++++++++++ .../v2/models/hamr_org_connection_request.rb | 123 ++++++++ .../v2/models/hamr_org_connection_response.rb | 123 ++++++++ .../v2/models/hamr_org_connection_status.rb | 37 +++ .../v2/models/hamr_org_connection_type.rb | 26 ++ 17 files changed, 1678 insertions(+) create mode 100644 examples/v2/high-availability-multiregion/CreateHamrOrgConnection.rb create mode 100644 examples/v2/high-availability-multiregion/GetHamrOrgConnection.rb create mode 100644 features/v2/high_availability_multiregion.feature create mode 100644 lib/datadog_api_client/v2/api/high_availability_multi_region_api.rb create mode 100644 lib/datadog_api_client/v2/models/hamr_org_connection_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/hamr_org_connection_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/hamr_org_connection_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/hamr_org_connection_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/hamr_org_connection_request.rb create mode 100644 lib/datadog_api_client/v2/models/hamr_org_connection_response.rb create mode 100644 lib/datadog_api_client/v2/models/hamr_org_connection_status.rb create mode 100644 lib/datadog_api_client/v2/models/hamr_org_connection_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 742df1467615..23c590b71e33 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -25944,6 +25944,171 @@ components: - type - value type: object + HamrOrgConnectionAttributesRequest: + properties: + hamr_status: + $ref: '#/components/schemas/HamrOrgConnectionStatus' + is_primary: + description: 'Indicates whether this organization is the primary organization + in the HAMR relationship. + + If true, this is the primary organization. If false, this is the secondary/backup + organization.' + example: true + type: boolean + modified_by: + description: Username or identifier of the user who last modified this HAMR + connection. + example: admin@example.com + type: string + target_org_datacenter: + description: Datacenter location of the target organization (e.g., us1, + eu1, us5). + example: us1 + type: string + target_org_name: + description: Name of the target organization in the HAMR relationship. + example: Production Backup Org + type: string + target_org_uuid: + description: UUID of the target organization in the HAMR relationship. + example: 660f9511-f3ac-52e5-b827-557766551111 + type: string + required: + - target_org_uuid + - target_org_name + - target_org_datacenter + - hamr_status + - is_primary + - modified_by + type: object + HamrOrgConnectionAttributesResponse: + properties: + hamr_status: + $ref: '#/components/schemas/HamrOrgConnectionStatus' + is_primary: + description: 'Indicates whether this organization is the primary organization + in the HAMR relationship. + + If true, this is the primary organization. If false, this is the secondary/backup + organization.' + example: true + type: boolean + modified_at: + description: Timestamp of when this HAMR connection was last modified (RFC3339 + format). + example: '2026-01-13T17:26:48.830968Z' + type: string + modified_by: + description: Username or identifier of the user who last modified this HAMR + connection. + example: admin@example.com + type: string + target_org_datacenter: + description: Datacenter location of the target organization (e.g., us1, + eu1, us5). + example: us1 + type: string + target_org_name: + description: Name of the target organization in the HAMR relationship. + example: Production Backup Org + type: string + target_org_uuid: + description: UUID of the target organization in the HAMR relationship. + example: 660f9511-f3ac-52e5-b827-557766551111 + type: string + required: + - target_org_uuid + - target_org_name + - target_org_datacenter + - hamr_status + - is_primary + - modified_at + - modified_by + type: object + HamrOrgConnectionDataRequest: + properties: + attributes: + $ref: '#/components/schemas/HamrOrgConnectionAttributesRequest' + id: + description: The organization UUID for this HAMR connection. Must match + the authenticated organization's UUID. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + type: + $ref: '#/components/schemas/HamrOrgConnectionType' + required: + - id + - type + - attributes + type: object + HamrOrgConnectionDataResponse: + properties: + attributes: + $ref: '#/components/schemas/HamrOrgConnectionAttributesResponse' + id: + description: The organization UUID for this HAMR connection. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + type: + $ref: '#/components/schemas/HamrOrgConnectionType' + required: + - id + - type + - attributes + type: object + HamrOrgConnectionRequest: + properties: + data: + $ref: '#/components/schemas/HamrOrgConnectionDataRequest' + required: + - data + type: object + HamrOrgConnectionResponse: + properties: + data: + $ref: '#/components/schemas/HamrOrgConnectionDataResponse' + required: + - data + type: object + HamrOrgConnectionStatus: + description: 'Status of the HAMR connection: + + - 0: UNSPECIFIED - Connection status not specified + + - 1: ONBOARDING - Initial setup of HAMR connection + + - 2: PASSIVE - Secondary organization in passive standby mode + + - 3: FAILOVER - Liminal status between PASSIVE and ACTIVE + + - 4: ACTIVE - Organization is an active failover + + - 5: RECOVERY - Recovery operation in progress' + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + example: 4 + type: integer + x-enum-varnames: + - UNSPECIFIED + - ONBOARDING + - PASSIVE + - FAILOVER + - ACTIVE + - RECOVERY + HamrOrgConnectionType: + description: Type of the HAMR organization connection resource. + enum: + - hamr_org_connections + example: hamr_org_connections + type: string + x-enum-varnames: + - HAMR_ORG_CONNECTIONS HourlyUsage: description: Hourly usage for a product family for an org. properties: @@ -71733,6 +71898,105 @@ paths: operator: OR permissions: - events_read + /api/v2/hamr: + get: + description: 'Retrieve the High Availability Multi-Region (HAMR) organization + connection details for the authenticated organization. + + This endpoint returns information about the HAMR connection configuration, + including the target organization, + + datacenter, status, and whether this is the primary or secondary organization + in the HAMR relationship.' + operationId: GetHamrOrgConnection + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/HamrOrgConnectionResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get HAMR organization connection + tags: + - High Availability MultiRegion + x-unstable: '**Note**: This endpoint is in public beta and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: 'Create or update the High Availability Multi-Region (HAMR) organization + connection. + + This endpoint allows you to configure the HAMR connection between the authenticated + organization + + and a target organization, including setting the connection status (ONBOARDING, + PASSIVE, FAILOVER, ACTIVE, RECOVERY)' + operationId: CreateHamrOrgConnection + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HamrOrgConnectionRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/HamrOrgConnectionResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create or update HAMR organization connection + tags: + - High Availability MultiRegion + x-unstable: '**Note**: This endpoint is in public beta and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/incidents: get: description: Get all incidents for the user's organization. @@ -94116,6 +94380,14 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/google_cloud_platform name: GCP Integration +- description: 'Configure High Availability Multi-Region (HAMR) connections between + Datadog organizations. + + HAMR provides disaster recovery capabilities by maintaining synchronized data + between primary + + and secondary organizations across different datacenters.' + name: High Availability MultiRegion - description: 'The IP allowlist API is used to manage the IP addresses that can access the Datadog API and web UI. It does not block diff --git a/examples/v2/high-availability-multiregion/CreateHamrOrgConnection.rb b/examples/v2/high-availability-multiregion/CreateHamrOrgConnection.rb new file mode 100644 index 000000000000..fdd42149be11 --- /dev/null +++ b/examples/v2/high-availability-multiregion/CreateHamrOrgConnection.rb @@ -0,0 +1,23 @@ +# Create or update HAMR organization connection returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_hamr_org_connection".to_sym] = true +end +api_instance = DatadogAPIClient::V2::HighAvailabilityMultiRegionAPI.new + +body = DatadogAPIClient::V2::HamrOrgConnectionRequest.new({ + data: DatadogAPIClient::V2::HamrOrgConnectionDataRequest.new({ + attributes: DatadogAPIClient::V2::HamrOrgConnectionAttributesRequest.new({ + hamr_status: DatadogAPIClient::V2::HamrOrgConnectionStatus::ACTIVE, + is_primary: true, + modified_by: "admin@example.com", + target_org_datacenter: "us1", + target_org_name: "Production Backup Org", + target_org_uuid: "660f9511-f3ac-52e5-b827-557766551111", + }), + id: "550e8400-e29b-41d4-a716-446655440000", + type: DatadogAPIClient::V2::HamrOrgConnectionType::HAMR_ORG_CONNECTIONS, + }), +}) +p api_instance.create_hamr_org_connection(body) diff --git a/examples/v2/high-availability-multiregion/GetHamrOrgConnection.rb b/examples/v2/high-availability-multiregion/GetHamrOrgConnection.rb new file mode 100644 index 000000000000..fd0a13c80f4e --- /dev/null +++ b/examples/v2/high-availability-multiregion/GetHamrOrgConnection.rb @@ -0,0 +1,8 @@ +# Get HAMR organization connection returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_hamr_org_connection".to_sym] = true +end +api_instance = DatadogAPIClient::V2::HighAvailabilityMultiRegionAPI.new +p api_instance.get_hamr_org_connection() diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index d5a477354e58..f2b810504c5b 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2054,6 +2054,9 @@ "v2.GetEvent" => { "event_id" => "String", }, + "v2.CreateHamrOrgConnection" => { + "body" => "HamrOrgConnectionRequest", + }, "v2.ListIncidents" => { "include" => "Array", "page_size" => "Integer", diff --git a/features/v2/high_availability_multiregion.feature b/features/v2/high_availability_multiregion.feature new file mode 100644 index 000000000000..cdca2ff52748 --- /dev/null +++ b/features/v2/high_availability_multiregion.feature @@ -0,0 +1,48 @@ +@endpoint(high-availability-multiregion) @endpoint(high-availability-multiregion-v2) +Feature: High Availability MultiRegion + Configure High Availability Multi-Region (HAMR) connections between + Datadog organizations. HAMR provides disaster recovery capabilities by + maintaining synchronized data between primary and secondary organizations + across different datacenters. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "HighAvailabilityMultiRegion" API + + @generated @skip @team:DataDog/hamr + Scenario: Create or update HAMR organization connection returns "Bad Request" response + Given operation "CreateHamrOrgConnection" enabled + And new "CreateHamrOrgConnection" request + And body with value {"data": {"attributes": {"hamr_status": 4, "is_primary": true, "modified_by": "admin@example.com", "target_org_datacenter": "us1", "target_org_name": "Production Backup Org", "target_org_uuid": "660f9511-f3ac-52e5-b827-557766551111"}, "id": "550e8400-e29b-41d4-a716-446655440000", "type": "hamr_org_connections"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/hamr + Scenario: Create or update HAMR organization connection returns "OK" response + Given operation "CreateHamrOrgConnection" enabled + And new "CreateHamrOrgConnection" request + And body with value {"data": {"attributes": {"hamr_status": 4, "is_primary": true, "modified_by": "admin@example.com", "target_org_datacenter": "us1", "target_org_name": "Production Backup Org", "target_org_uuid": "660f9511-f3ac-52e5-b827-557766551111"}, "id": "550e8400-e29b-41d4-a716-446655440000", "type": "hamr_org_connections"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/hamr + Scenario: Get HAMR organization connection returns "Bad Request" response + Given operation "GetHamrOrgConnection" enabled + And new "GetHamrOrgConnection" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/hamr + Scenario: Get HAMR organization connection returns "Not Found" response + Given operation "GetHamrOrgConnection" enabled + And new "GetHamrOrgConnection" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/hamr + Scenario: Get HAMR organization connection returns "OK" response + Given operation "GetHamrOrgConnection" enabled + And new "GetHamrOrgConnection" request + 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 9020d3f505f1..0fd3f77ed827 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1557,6 +1557,20 @@ "type": "safe" } }, + "GetHamrOrgConnection": { + "tag": "High Availability MultiRegion", + "undo": { + "type": "safe" + } + }, + "CreateHamrOrgConnection": { + "tag": "High Availability MultiRegion", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, "ListIncidents": { "tag": "Incidents", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 580c662dbccd..d94287927f32 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -248,6 +248,8 @@ def initialize "v2.get_deployment_rule": false, "v2.update_deployment_gate": false, "v2.update_deployment_rule": false, + "v2.create_hamr_org_connection": false, + "v2.get_hamr_org_connection": false, "v2.create_incident": false, "v2.create_incident_attachment": false, "v2.create_incident_integration": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 4c05385dacba..ef27f156e7c8 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2523,6 +2523,14 @@ def overrides "v2.grey_noise_integration_type" => "GreyNoiseIntegrationType", "v2.grey_noise_integration_update" => "GreyNoiseIntegrationUpdate", "v2.group_scalar_column" => "GroupScalarColumn", + "v2.hamr_org_connection_attributes_request" => "HamrOrgConnectionAttributesRequest", + "v2.hamr_org_connection_attributes_response" => "HamrOrgConnectionAttributesResponse", + "v2.hamr_org_connection_data_request" => "HamrOrgConnectionDataRequest", + "v2.hamr_org_connection_data_response" => "HamrOrgConnectionDataResponse", + "v2.hamr_org_connection_request" => "HamrOrgConnectionRequest", + "v2.hamr_org_connection_response" => "HamrOrgConnectionResponse", + "v2.hamr_org_connection_status" => "HamrOrgConnectionStatus", + "v2.hamr_org_connection_type" => "HamrOrgConnectionType", "v2.hourly_usage" => "HourlyUsage", "v2.hourly_usage_attributes" => "HourlyUsageAttributes", "v2.hourly_usage_measurement" => "HourlyUsageMeasurement", @@ -4921,6 +4929,7 @@ def overrides "v2.fastly_integration_api" => "FastlyIntegrationAPI", "v2.fleet_automation_api" => "FleetAutomationAPI", "v2.gcp_integration_api" => "GCPIntegrationAPI", + "v2.high_availability_multi_region_api" => "HighAvailabilityMultiRegionAPI", "v2.incident_services_api" => "IncidentServicesAPI", "v2.incident_teams_api" => "IncidentTeamsAPI", "v2.incidents_api" => "IncidentsAPI", diff --git a/lib/datadog_api_client/v2/api/high_availability_multi_region_api.rb b/lib/datadog_api_client/v2/api/high_availability_multi_region_api.rb new file mode 100644 index 000000000000..c9df6e3e05e7 --- /dev/null +++ b/lib/datadog_api_client/v2/api/high_availability_multi_region_api.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 'cgi' + +module DatadogAPIClient::V2 + class HighAvailabilityMultiRegionAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create or update HAMR organization connection. + # + # @see #create_hamr_org_connection_with_http_info + def create_hamr_org_connection(body, opts = {}) + data, _status_code, _headers = create_hamr_org_connection_with_http_info(body, opts) + data + end + + # Create or update HAMR organization connection. + # + # Create or update the High Availability Multi-Region (HAMR) organization connection. + # This endpoint allows you to configure the HAMR connection between the authenticated organization + # and a target organization, including setting the connection status (ONBOARDING, PASSIVE, FAILOVER, ACTIVE, RECOVERY) + # + # @param body [HamrOrgConnectionRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(HamrOrgConnectionResponse, Integer, Hash)>] HamrOrgConnectionResponse data, response status code and response headers + def create_hamr_org_connection_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_hamr_org_connection".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_hamr_org_connection") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_hamr_org_connection")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: HighAvailabilityMultiRegionAPI.create_hamr_org_connection ...' + 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 HighAvailabilityMultiRegionAPI.create_hamr_org_connection" + end + # resource path + local_var_path = '/api/v2/hamr' + + # 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(['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] || 'HamrOrgConnectionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_hamr_org_connection, + :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: HighAvailabilityMultiRegionAPI#create_hamr_org_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get HAMR organization connection. + # + # @see #get_hamr_org_connection_with_http_info + def get_hamr_org_connection(opts = {}) + data, _status_code, _headers = get_hamr_org_connection_with_http_info(opts) + data + end + + # Get HAMR organization connection. + # + # Retrieve the High Availability Multi-Region (HAMR) organization connection details for the authenticated organization. + # This endpoint returns information about the HAMR connection configuration, including the target organization, + # datacenter, status, and whether this is the primary or secondary organization in the HAMR relationship. + # + # @param opts [Hash] the optional parameters + # @return [Array<(HamrOrgConnectionResponse, Integer, Hash)>] HamrOrgConnectionResponse data, response status code and response headers + def get_hamr_org_connection_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_hamr_org_connection".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_hamr_org_connection") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_hamr_org_connection")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: HighAvailabilityMultiRegionAPI.get_hamr_org_connection ...' + end + # resource path + local_var_path = '/api/v2/hamr' + + # 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(['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] || 'HamrOrgConnectionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_hamr_org_connection, + :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: HighAvailabilityMultiRegionAPI#get_hamr_org_connection\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/hamr_org_connection_attributes_request.rb b/lib/datadog_api_client/v2/models/hamr_org_connection_attributes_request.rb new file mode 100644 index 000000000000..557b38a89024 --- /dev/null +++ b/lib/datadog_api_client/v2/models/hamr_org_connection_attributes_request.rb @@ -0,0 +1,235 @@ +=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 HamrOrgConnectionAttributesRequest + include BaseGenericModel + + # Status of the HAMR connection: + # - 0: UNSPECIFIED - Connection status not specified + # - 1: ONBOARDING - Initial setup of HAMR connection + # - 2: PASSIVE - Secondary organization in passive standby mode + # - 3: FAILOVER - Liminal status between PASSIVE and ACTIVE + # - 4: ACTIVE - Organization is an active failover + # - 5: RECOVERY - Recovery operation in progress + attr_reader :hamr_status + + # Indicates whether this organization is the primary organization in the HAMR relationship. + # If true, this is the primary organization. If false, this is the secondary/backup organization. + attr_reader :is_primary + + # Username or identifier of the user who last modified this HAMR connection. + attr_reader :modified_by + + # Datacenter location of the target organization (e.g., us1, eu1, us5). + attr_reader :target_org_datacenter + + # Name of the target organization in the HAMR relationship. + attr_reader :target_org_name + + # UUID of the target organization in the HAMR relationship. + attr_reader :target_org_uuid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'hamr_status' => :'hamr_status', + :'is_primary' => :'is_primary', + :'modified_by' => :'modified_by', + :'target_org_datacenter' => :'target_org_datacenter', + :'target_org_name' => :'target_org_name', + :'target_org_uuid' => :'target_org_uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'hamr_status' => :'HamrOrgConnectionStatus', + :'is_primary' => :'Boolean', + :'modified_by' => :'String', + :'target_org_datacenter' => :'String', + :'target_org_name' => :'String', + :'target_org_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::HamrOrgConnectionAttributesRequest` 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?(:'hamr_status') + self.hamr_status = attributes[:'hamr_status'] + end + + if attributes.key?(:'is_primary') + self.is_primary = attributes[:'is_primary'] + end + + if attributes.key?(:'modified_by') + self.modified_by = attributes[:'modified_by'] + end + + if attributes.key?(:'target_org_datacenter') + self.target_org_datacenter = attributes[:'target_org_datacenter'] + end + + if attributes.key?(:'target_org_name') + self.target_org_name = attributes[:'target_org_name'] + end + + if attributes.key?(:'target_org_uuid') + self.target_org_uuid = attributes[:'target_org_uuid'] + 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 @hamr_status.nil? + return false if @is_primary.nil? + return false if @modified_by.nil? + return false if @target_org_datacenter.nil? + return false if @target_org_name.nil? + return false if @target_org_uuid.nil? + true + end + + # Custom attribute writer method with validation + # @param hamr_status [Object] Object to be assigned + # @!visibility private + def hamr_status=(hamr_status) + if hamr_status.nil? + fail ArgumentError, 'invalid value for "hamr_status", hamr_status cannot be nil.' + end + @hamr_status = hamr_status + end + + # Custom attribute writer method with validation + # @param is_primary [Object] Object to be assigned + # @!visibility private + def is_primary=(is_primary) + if is_primary.nil? + fail ArgumentError, 'invalid value for "is_primary", is_primary cannot be nil.' + end + @is_primary = is_primary + end + + # Custom attribute writer method with validation + # @param modified_by [Object] Object to be assigned + # @!visibility private + def modified_by=(modified_by) + if modified_by.nil? + fail ArgumentError, 'invalid value for "modified_by", modified_by cannot be nil.' + end + @modified_by = modified_by + end + + # Custom attribute writer method with validation + # @param target_org_datacenter [Object] Object to be assigned + # @!visibility private + def target_org_datacenter=(target_org_datacenter) + if target_org_datacenter.nil? + fail ArgumentError, 'invalid value for "target_org_datacenter", target_org_datacenter cannot be nil.' + end + @target_org_datacenter = target_org_datacenter + end + + # Custom attribute writer method with validation + # @param target_org_name [Object] Object to be assigned + # @!visibility private + def target_org_name=(target_org_name) + if target_org_name.nil? + fail ArgumentError, 'invalid value for "target_org_name", target_org_name cannot be nil.' + end + @target_org_name = target_org_name + end + + # Custom attribute writer method with validation + # @param target_org_uuid [Object] Object to be assigned + # @!visibility private + def target_org_uuid=(target_org_uuid) + if target_org_uuid.nil? + fail ArgumentError, 'invalid value for "target_org_uuid", target_org_uuid cannot be nil.' + end + @target_org_uuid = target_org_uuid + 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 && + hamr_status == o.hamr_status && + is_primary == o.is_primary && + modified_by == o.modified_by && + target_org_datacenter == o.target_org_datacenter && + target_org_name == o.target_org_name && + target_org_uuid == o.target_org_uuid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [hamr_status, is_primary, modified_by, target_org_datacenter, target_org_name, target_org_uuid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/hamr_org_connection_attributes_response.rb b/lib/datadog_api_client/v2/models/hamr_org_connection_attributes_response.rb new file mode 100644 index 000000000000..fe5afd8e3521 --- /dev/null +++ b/lib/datadog_api_client/v2/models/hamr_org_connection_attributes_response.rb @@ -0,0 +1,256 @@ +=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 HamrOrgConnectionAttributesResponse + include BaseGenericModel + + # Status of the HAMR connection: + # - 0: UNSPECIFIED - Connection status not specified + # - 1: ONBOARDING - Initial setup of HAMR connection + # - 2: PASSIVE - Secondary organization in passive standby mode + # - 3: FAILOVER - Liminal status between PASSIVE and ACTIVE + # - 4: ACTIVE - Organization is an active failover + # - 5: RECOVERY - Recovery operation in progress + attr_reader :hamr_status + + # Indicates whether this organization is the primary organization in the HAMR relationship. + # If true, this is the primary organization. If false, this is the secondary/backup organization. + attr_reader :is_primary + + # Timestamp of when this HAMR connection was last modified (RFC3339 format). + attr_reader :modified_at + + # Username or identifier of the user who last modified this HAMR connection. + attr_reader :modified_by + + # Datacenter location of the target organization (e.g., us1, eu1, us5). + attr_reader :target_org_datacenter + + # Name of the target organization in the HAMR relationship. + attr_reader :target_org_name + + # UUID of the target organization in the HAMR relationship. + attr_reader :target_org_uuid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'hamr_status' => :'hamr_status', + :'is_primary' => :'is_primary', + :'modified_at' => :'modified_at', + :'modified_by' => :'modified_by', + :'target_org_datacenter' => :'target_org_datacenter', + :'target_org_name' => :'target_org_name', + :'target_org_uuid' => :'target_org_uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'hamr_status' => :'HamrOrgConnectionStatus', + :'is_primary' => :'Boolean', + :'modified_at' => :'String', + :'modified_by' => :'String', + :'target_org_datacenter' => :'String', + :'target_org_name' => :'String', + :'target_org_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::HamrOrgConnectionAttributesResponse` 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?(:'hamr_status') + self.hamr_status = attributes[:'hamr_status'] + end + + if attributes.key?(:'is_primary') + self.is_primary = attributes[:'is_primary'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'modified_by') + self.modified_by = attributes[:'modified_by'] + end + + if attributes.key?(:'target_org_datacenter') + self.target_org_datacenter = attributes[:'target_org_datacenter'] + end + + if attributes.key?(:'target_org_name') + self.target_org_name = attributes[:'target_org_name'] + end + + if attributes.key?(:'target_org_uuid') + self.target_org_uuid = attributes[:'target_org_uuid'] + 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 @hamr_status.nil? + return false if @is_primary.nil? + return false if @modified_at.nil? + return false if @modified_by.nil? + return false if @target_org_datacenter.nil? + return false if @target_org_name.nil? + return false if @target_org_uuid.nil? + true + end + + # Custom attribute writer method with validation + # @param hamr_status [Object] Object to be assigned + # @!visibility private + def hamr_status=(hamr_status) + if hamr_status.nil? + fail ArgumentError, 'invalid value for "hamr_status", hamr_status cannot be nil.' + end + @hamr_status = hamr_status + end + + # Custom attribute writer method with validation + # @param is_primary [Object] Object to be assigned + # @!visibility private + def is_primary=(is_primary) + if is_primary.nil? + fail ArgumentError, 'invalid value for "is_primary", is_primary cannot be nil.' + end + @is_primary = is_primary + end + + # Custom attribute writer method with validation + # @param modified_at [Object] Object to be assigned + # @!visibility private + def modified_at=(modified_at) + if modified_at.nil? + fail ArgumentError, 'invalid value for "modified_at", modified_at cannot be nil.' + end + @modified_at = modified_at + end + + # Custom attribute writer method with validation + # @param modified_by [Object] Object to be assigned + # @!visibility private + def modified_by=(modified_by) + if modified_by.nil? + fail ArgumentError, 'invalid value for "modified_by", modified_by cannot be nil.' + end + @modified_by = modified_by + end + + # Custom attribute writer method with validation + # @param target_org_datacenter [Object] Object to be assigned + # @!visibility private + def target_org_datacenter=(target_org_datacenter) + if target_org_datacenter.nil? + fail ArgumentError, 'invalid value for "target_org_datacenter", target_org_datacenter cannot be nil.' + end + @target_org_datacenter = target_org_datacenter + end + + # Custom attribute writer method with validation + # @param target_org_name [Object] Object to be assigned + # @!visibility private + def target_org_name=(target_org_name) + if target_org_name.nil? + fail ArgumentError, 'invalid value for "target_org_name", target_org_name cannot be nil.' + end + @target_org_name = target_org_name + end + + # Custom attribute writer method with validation + # @param target_org_uuid [Object] Object to be assigned + # @!visibility private + def target_org_uuid=(target_org_uuid) + if target_org_uuid.nil? + fail ArgumentError, 'invalid value for "target_org_uuid", target_org_uuid cannot be nil.' + end + @target_org_uuid = target_org_uuid + 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 && + hamr_status == o.hamr_status && + is_primary == o.is_primary && + modified_at == o.modified_at && + modified_by == o.modified_by && + target_org_datacenter == o.target_org_datacenter && + target_org_name == o.target_org_name && + target_org_uuid == o.target_org_uuid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [hamr_status, is_primary, modified_at, modified_by, target_org_datacenter, target_org_name, target_org_uuid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/hamr_org_connection_data_request.rb b/lib/datadog_api_client/v2/models/hamr_org_connection_data_request.rb new file mode 100644 index 000000000000..9efbc8296b78 --- /dev/null +++ b/lib/datadog_api_client/v2/models/hamr_org_connection_data_request.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 HamrOrgConnectionDataRequest + include BaseGenericModel + + # + attr_reader :attributes + + # The organization UUID for this HAMR connection. Must match the authenticated organization's UUID. + attr_reader :id + + # Type of the HAMR organization connection resource. + 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' => :'HamrOrgConnectionAttributesRequest', + :'id' => :'String', + :'type' => :'HamrOrgConnectionType' + } + 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::HamrOrgConnectionDataRequest` 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 @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + 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 && + 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/hamr_org_connection_data_response.rb b/lib/datadog_api_client/v2/models/hamr_org_connection_data_response.rb new file mode 100644 index 000000000000..f0fb53520305 --- /dev/null +++ b/lib/datadog_api_client/v2/models/hamr_org_connection_data_response.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 HamrOrgConnectionDataResponse + include BaseGenericModel + + # + attr_reader :attributes + + # The organization UUID for this HAMR connection. + attr_reader :id + + # Type of the HAMR organization connection resource. + 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' => :'HamrOrgConnectionAttributesResponse', + :'id' => :'String', + :'type' => :'HamrOrgConnectionType' + } + 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::HamrOrgConnectionDataResponse` 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 @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + 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 && + 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/hamr_org_connection_request.rb b/lib/datadog_api_client/v2/models/hamr_org_connection_request.rb new file mode 100644 index 000000000000..a7f8cbd2f8b7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/hamr_org_connection_request.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 HamrOrgConnectionRequest + 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' => :'HamrOrgConnectionDataRequest' + } + 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::HamrOrgConnectionRequest` 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/hamr_org_connection_response.rb b/lib/datadog_api_client/v2/models/hamr_org_connection_response.rb new file mode 100644 index 000000000000..24ec45416a01 --- /dev/null +++ b/lib/datadog_api_client/v2/models/hamr_org_connection_response.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 HamrOrgConnectionResponse + 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' => :'HamrOrgConnectionDataResponse' + } + 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::HamrOrgConnectionResponse` 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/hamr_org_connection_status.rb b/lib/datadog_api_client/v2/models/hamr_org_connection_status.rb new file mode 100644 index 000000000000..64cd63b2502e --- /dev/null +++ b/lib/datadog_api_client/v2/models/hamr_org_connection_status.rb @@ -0,0 +1,37 @@ +=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 of the HAMR connection: + # - 0: UNSPECIFIED - Connection status not specified + # - 1: ONBOARDING - Initial setup of HAMR connection + # - 2: PASSIVE - Secondary organization in passive standby mode + # - 3: FAILOVER - Liminal status between PASSIVE and ACTIVE + # - 4: ACTIVE - Organization is an active failover + # - 5: RECOVERY - Recovery operation in progress + class HamrOrgConnectionStatus + include BaseEnumModel + + UNSPECIFIED = 0.freeze + ONBOARDING = 1.freeze + PASSIVE = 2.freeze + FAILOVER = 3.freeze + ACTIVE = 4.freeze + RECOVERY = 5.freeze + end +end diff --git a/lib/datadog_api_client/v2/models/hamr_org_connection_type.rb b/lib/datadog_api_client/v2/models/hamr_org_connection_type.rb new file mode 100644 index 000000000000..73e3ef3a44e6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/hamr_org_connection_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 + # Type of the HAMR organization connection resource. + class HamrOrgConnectionType + include BaseEnumModel + + HAMR_ORG_CONNECTIONS = "hamr_org_connections".freeze + end +end From 8937434072bdcb2e14dcad396dd1d3f1006e4957 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 20:19:15 +0000 Subject: [PATCH 4/5] Add Status Pages API specs (#2896) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 2325 +++++++++++++++++ ...-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 | 85 + ...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 | 103 + ...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 | 106 + ...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 | 106 + ...st-status-pages-returns-OK-response.frozen | 1 + .../List-status-pages-returns-OK-response.yml | 61 + ...pdate-component-returns-OK-response.frozen | 1 + .../Update-component-returns-OK-response.yml | 65 + ...ate-degradation-returns-OK-response.frozen | 1 + ...Update-degradation-returns-OK-response.yml | 110 + ...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 | 30 + 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 | 148 ++ 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 | 113 + ...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 | 157 ++ ...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 | 113 + ...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 | 113 + ...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, 18583 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 23c590b71e33..39f6901f1a8c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -13108,6 +13108,123 @@ 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: + description: The supported attributes for creating a component. + properties: + components: + description: If creating a component of type `group`, the components to + create within the group. + example: + - name: Login + position: 0 + type: component + - name: Settings + position: 1 + type: component + items: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesComponentsItems' + type: array + name: + description: The name of the component. + example: Web App + type: string + position: + description: The zero-indexed position of the component. + example: 0 + format: int64 + type: integer + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + description: The type of the component. + example: group + required: + - name + - position + - type + type: object + CreateComponentRequestDataAttributesComponentsItems: + properties: + name: + description: The name of the grouped component. + example: '' + type: string + position: + description: The zero-indexed position of the grouped component relative + to the other components in the group. + example: 0 + format: int64 + type: integer + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + required: + - name + - position + - type + type: object + CreateComponentRequestDataAttributesType: + description: The type of the component. + enum: + - component + - group + example: component + type: string + x-enum-varnames: + - COMPONENT + - GROUP + CreateComponentRequestDataRelationships: + description: The supported relationships for creating a component. + properties: + group: + $ref: '#/components/schemas/CreateComponentRequestDataRelationshipsGroup' + description: The group to create the component within. + type: object + CreateComponentRequestDataRelationshipsGroup: + properties: + data: + $ref: '#/components/schemas/CreateComponentRequestDataRelationshipsGroupData' + required: + - data + type: object + CreateComponentRequestDataRelationshipsGroupData: + nullable: true + properties: + id: + description: The ID of the group. + example: '' + format: uuid + type: string + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + - id + type: object CreateConnectionRequest: example: data: @@ -13278,6 +13395,90 @@ 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: + description: The supported attributes for creating a degradation. + properties: + components_affected: + description: The components affected by the degradation. + example: + - id: 1234abcd-12ab-34cd-56ef-123456abcdef + status: degraded + items: + $ref: '#/components/schemas/CreateDegradationRequestDataAttributesComponentsAffectedItems' + type: array + description: + description: The description of the degradation. + example: Our API is experiencing elevated latency. We are investigating + the issue. + type: string + status: + $ref: '#/components/schemas/CreateDegradationRequestDataAttributesStatus' + description: The status of the degradation. + example: investigating + title: + description: The title of the degradation. + example: Elevated API Latency + type: string + required: + - components_affected + - status + - title + type: object + CreateDegradationRequestDataAttributesComponentsAffectedItems: + properties: + id: + description: The ID of the component. Must be a component of type `component`. + example: '' + format: uuid + type: string + name: + readOnly: true + type: string + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + required: + - id + - status + type: object + CreateDegradationRequestDataAttributesStatus: + description: The status of the degradation. + 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: @@ -13931,6 +14132,186 @@ 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: + description: The supported attributes for creating a status page. + properties: + company_logo: + description: The base64-encoded image data displayed on the status page. + example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAIKMMMM + type: string + components: + description: The components displayed on the status page. + example: + - components: + - name: Login + position: 0 + type: component + - name: Settings + position: 1 + type: component + name: Web App + position: 0 + type: group + - name: API + position: 1 + type: component + - name: Webhooks + position: 2 + type: component + items: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesComponentsItems' + type: array + domain_prefix: + description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. + Globally unique across Datadog Status Pages. + example: status-page-us1 + type: string + email_header_image: + description: Base64-encoded image data included in email notifications sent + to status page subscribers. + example: data:image/png;base64,pQSLAw0KGgoAAAANSUhEUgAAAQ4AASJKFF + type: string + enabled: + description: Whether the status page is enabled. + example: true + type: boolean + favicon: + description: Base64-encoded image data displayed in the browser tab. + example: data:image/png;base64,kWMRNw0KGgoAAAANSUhEUgAAAEAAAABACA + type: string + name: + description: The name of the status page. + example: Status Page US1 + type: string + subscriptions_enabled: + description: Whether users can subscribe to the status page. + example: true + type: boolean + type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType' + example: public + visualization_type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType' + example: bars_and_uptime_percentage + required: + - domain_prefix + - enabled + - name + - type + - visualization_type + type: object + CreateStatusPageRequestDataAttributesComponentsItems: + properties: + components: + description: If creating a component of type `group`, the components to + create within the group. + items: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems' + type: array + id: + description: The ID of the component. + format: uuid + readOnly: true + type: string + name: + description: The name of the component. + type: string + position: + description: The zero-indexed position of the component. + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + type: object + CreateStatusPageRequestDataAttributesComponentsItemsComponentsItems: + properties: + id: + description: The ID of the grouped component. + format: uuid + readOnly: true + type: string + name: + description: The name of the grouped component. + type: string + position: + description: The zero-indexed position of the grouped component. Relative + to the other components in the group. + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + type: object + CreateStatusPageRequestDataAttributesType: + description: The type of the status page controlling how the status page is + accessed. + enum: + - public + - internal + example: public + type: string + x-enum-varnames: + - PUBLIC + - INTERNAL + CreateStatusPageRequestDataAttributesVisualizationType: + description: The visualization type of the status page. + 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. @@ -17300,6 +17681,217 @@ components: example: 1722439510282 format: int64 type: integer + Degradation: + properties: + data: + $ref: '#/components/schemas/DegradationData' + included: + description: The included related resources of a degradation. Client must + explicitly request these resources by name in the `include` query parameter. + items: + $ref: '#/components/schemas/DegradationArrayIncluded' + type: array + type: object + DegradationArray: + properties: + data: + items: + $ref: '#/components/schemas/DegradationData' + type: array + included: + description: The included related resources of a degradation. Client must + explicitly request these resources by name in the `include` query parameter. + items: + $ref: '#/components/schemas/DegradationArrayIncluded' + 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: + description: The ID of the degradation. + format: uuid + type: string + relationships: + $ref: '#/components/schemas/DegradationDataRelationships' + type: + $ref: '#/components/schemas/PatchDegradationRequestDataType' + required: + - type + type: object + DegradationDataAttributes: + description: The attributes of a degradation. + properties: + components_affected: + description: Components affected by the degradation. + items: + $ref: '#/components/schemas/DegradationDataAttributesComponentsAffectedItems' + type: array + created_at: + description: Timestamp of when the degradation was created. + format: date-time + type: string + description: + description: Description of the degradation. + type: string + modified_at: + description: Timestamp of when the degradation was last modified. + format: date-time + type: string + status: + $ref: '#/components/schemas/CreateDegradationRequestDataAttributesStatus' + title: + description: Title of the degradation. + type: string + updates: + description: Past updates made to the degradation. + items: + $ref: '#/components/schemas/DegradationDataAttributesUpdatesItems' + type: array + type: object + DegradationDataAttributesComponentsAffectedItems: + properties: + id: + description: The ID of the component. + example: '' + format: uuid + type: string + name: + description: The name of the component. + readOnly: true + type: string + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + required: + - id + - status + type: object + DegradationDataAttributesUpdatesItems: + properties: + components_affected: + description: The components affected at the time of the update. + items: + $ref: '#/components/schemas/DegradationDataAttributesUpdatesItemsComponentsAffectedItems' + type: array + created_at: + description: Timestamp of when the update was created. + format: date-time + readOnly: true + type: string + description: + description: Description of the update. + type: string + id: + description: Identifier of the update. + format: uuid + readOnly: true + type: string + modified_at: + description: Timestamp of when the update was last modified. + format: date-time + readOnly: true + type: string + status: + $ref: '#/components/schemas/CreateDegradationRequestDataAttributesStatus' + type: object + DegradationDataAttributesUpdatesItemsComponentsAffectedItems: + properties: + id: + description: Identifier of the component affected at the time of the update. + example: '' + format: uuid + type: string + name: + description: The name of the component affected at the time of the update. + readOnly: true + type: string + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + description: The status of the component affected at the time of the update. + required: + - id + - status + type: object + DegradationDataRelationships: + description: The relationships of a degradation. + properties: + created_by_user: + $ref: '#/components/schemas/DegradationDataRelationshipsCreatedByUser' + description: The Datadog user who created the degradation. + last_modified_by_user: + $ref: '#/components/schemas/DegradationDataRelationshipsLastModifiedByUser' + description: The Datadog user who last modified the degradation. + status_page: + $ref: '#/components/schemas/DegradationDataRelationshipsStatusPage' + description: The status page the degradation belongs to. + type: object + DegradationDataRelationshipsCreatedByUser: + properties: + data: + $ref: '#/components/schemas/DegradationDataRelationshipsCreatedByUserData' + required: + - data + type: object + DegradationDataRelationshipsCreatedByUserData: + properties: + id: + description: The ID of the Datadog user who created the degradation. + 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: + description: The ID of the Datadog user who last modified the degradation. + 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: + description: The ID of the status page. + example: '' + format: uuid + type: string + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + - id + type: object DeleteAppResponse: description: The response object after an app is successfully deleted. properties: @@ -42086,6 +42678,136 @@ 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: + description: The ID of the component. + format: uuid + type: string + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + type: object + PatchComponentRequestDataAttributes: + description: The supported attributes for updating a component. + properties: + name: + description: The name of the component. + example: Web App + type: string + position: + description: The position of the component. If the component belongs to + a group, the position is relative to the other components in the group. + example: 1 + 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: + description: The ID of the degradation. + format: uuid + type: string + type: + $ref: '#/components/schemas/PatchDegradationRequestDataType' + required: + - type + type: object + PatchDegradationRequestDataAttributes: + description: The supported attributes for updating a degradation. + properties: + components_affected: + description: The components affected by the degradation. + example: + - id: 1234abcd-12ab-34cd-56ef-123456abcdef + status: operational + items: + $ref: '#/components/schemas/PatchDegradationRequestDataAttributesComponentsAffectedItems' + type: array + description: + description: The description of the degradation. + example: We've deployed a fix and latency has returned to normal. This issue + has been resolved. + type: string + status: + $ref: '#/components/schemas/PatchDegradationRequestDataAttributesStatus' + example: resolved + title: + description: The title of the degradation. + example: Elevated API Latency + type: string + type: object + PatchDegradationRequestDataAttributesComponentsAffectedItems: + properties: + id: + description: The ID of the component. Must be a component of type `component`. + example: '' + format: uuid + type: string + name: + readOnly: true + type: string + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + required: + - id + - status + type: object + PatchDegradationRequestDataAttributesStatus: + description: The status of the degradation. + enum: + - investigating + - identified + - monitoring + - resolved + type: string + x-enum-varnames: + - INVESTIGATING + - IDENTIFIED + - MONITORING + - RESOLVED + 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: @@ -42132,6 +42854,78 @@ 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: + description: The ID of the status page. + format: uuid + type: string + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + type: object + PatchStatusPageRequestDataAttributes: + description: The supported attributes for updating a status page. + properties: + company_logo: + description: The base64-encoded image data displayed on the status page. + example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAIKMMMM + type: string + domain_prefix: + description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. + Globally unique across Datadog Status Pages. + example: status-page-us1 + type: string + email_header_image: + description: The base64-encoded image data displayed in email notifications + sent to status page subscribers. + example: data:image/png;base64,pQSLAw0KGgoAAAANSUhEUgAAAQ4AASJKFF + type: string + enabled: + description: Whether the status page is enabled. + example: true + type: boolean + favicon: + description: The base64-encoded image data displayed in the browser tab. + example: data:image/png;base64,kWMRNw0KGgoAAAANSUhEUgAAAEAAAABACA + type: string + name: + description: The name of the status page. + example: Status Page US1 + type: string + subscriptions_enabled: + description: Whether users can subscribe to the status page. + example: true + type: boolean + type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType' + example: public + visualization_type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType' + example: bars_and_uptime_percentage + type: object PatchTableRequest: description: Request body for updating an existing reference table. example: @@ -56019,6 +56813,871 @@ components: required: - type type: object + StatusPage: + properties: + data: + $ref: '#/components/schemas/StatusPageData' + included: + description: The included related resources of a status page. Client must + explicitly request these resources by name in the `include` query parameter. + items: + $ref: '#/components/schemas/StatusPageArrayIncluded' + type: array + type: object + StatusPageArray: + properties: + data: + items: + $ref: '#/components/schemas/StatusPageData' + type: array + included: + description: The included related resources of a status page. Client must + explicitly request these resources by name in the `include` query parameter. + items: + $ref: '#/components/schemas/StatusPageArrayIncluded' + type: array + meta: + $ref: '#/components/schemas/StatusPagesResponseMeta' + required: + - data + type: object + StatusPageArrayIncluded: + oneOf: + - $ref: '#/components/schemas/StatusPagesUser' + StatusPageAsIncluded: + description: The included status page resource. + properties: + attributes: + $ref: '#/components/schemas/StatusPageAsIncludedAttributes' + id: + description: The ID of the status page. + format: uuid + type: string + relationships: + $ref: '#/components/schemas/StatusPageAsIncludedRelationships' + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + type: object + StatusPageAsIncludedAttributes: + description: The attributes of a status page. + properties: + company_logo: + description: The base64-encoded image data displayed in the company logo. + type: string + components: + description: Components displayed on the status page. + items: + $ref: '#/components/schemas/StatusPageAsIncludedAttributesComponentsItems' + type: array + created_at: + description: Timestamp of when the status page was created. + format: date-time + type: string + custom_domain: + description: If configured, the url that the status page is accessible at. + type: string + custom_domain_enabled: + description: Whether the custom domain is configured. + type: boolean + domain_prefix: + description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. + Globally unique across Datadog Status Pages. + type: string + email_header_image: + description: Base64-encoded image data included in email notifications sent + to status page subscribers. + type: string + enabled: + description: Whether the status page is enabled. + type: boolean + favicon: + description: Base64-encoded image data displayed in the browser tab. + type: string + modified_at: + description: Timestamp of when the status page was last modified. + format: date-time + type: string + name: + description: The name of the status page. + type: string + page_url: + description: The url that the status page is accessible at. + type: string + subscriptions_enabled: + description: Whether users can subscribe to the status page. + 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: + description: The ID of the component. + format: uuid + readOnly: true + type: string + name: + description: The name of the component. + type: string + position: + description: The zero-indexed position of the component. + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + type: object + StatusPageAsIncludedAttributesComponentsItemsComponentsItems: + properties: + id: + description: The ID of the grouped component. + format: uuid + readOnly: true + type: string + name: + description: The name of the grouped component. + type: string + position: + description: The zero-indexed position of the grouped component. Relative + to the other components in the group. + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + type: object + StatusPageAsIncludedRelationships: + description: The relationships of a status page. + properties: + created_by_user: + $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsCreatedByUser' + description: The Datadog user who created the status page. + last_modified_by_user: + $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsLastModifiedByUser' + description: The Datadog user who last modified the status page. + type: object + StatusPageAsIncludedRelationshipsCreatedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPageAsIncludedRelationshipsCreatedByUserData' + required: + - data + type: object + StatusPageAsIncludedRelationshipsCreatedByUserData: + properties: + id: + description: The ID of the Datadog user who created the status page. + 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: + description: The ID of the Datadog user who last modified the status page. + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPageData: + properties: + attributes: + $ref: '#/components/schemas/StatusPageDataAttributes' + id: + description: The ID of the status page. + format: uuid + type: string + relationships: + $ref: '#/components/schemas/StatusPageDataRelationships' + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + type: object + StatusPageDataAttributes: + description: The attributes of a status page. + properties: + company_logo: + description: Base64-encoded image data displayed on the status page. + nullable: true + type: string + components: + description: Components displayed on the status page. + items: + $ref: '#/components/schemas/StatusPageDataAttributesComponentsItems' + type: array + created_at: + description: Timestamp of when the status page was created. + format: date-time + type: string + custom_domain: + description: If configured, the url that the status page is accessible at. + nullable: true + type: string + custom_domain_enabled: + description: Whether the custom domain is configured. + type: boolean + domain_prefix: + description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. + Globally unique across Datadog Status Pages. + type: string + email_header_image: + description: Base64-encoded image data included in email notifications sent + to status page subscribers. + nullable: true + type: string + enabled: + description: Whether the status page is enabled. + type: boolean + favicon: + description: Base64-encoded image data displayed in the browser tab. + nullable: true + type: string + modified_at: + description: Timestamp of when the status page was last modified. + format: date-time + type: string + name: + description: The name of the status page. + type: string + page_url: + description: The url that the status page is accessible at. + type: string + subscriptions_enabled: + description: Whether users can subscribe to the status page. + type: boolean + type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesType' + visualization_type: + $ref: '#/components/schemas/CreateStatusPageRequestDataAttributesVisualizationType' + type: object + StatusPageDataAttributesComponentsItems: + properties: + components: + description: If the component is of type `group`, the components within + the group. + items: + $ref: '#/components/schemas/StatusPageDataAttributesComponentsItemsComponentsItems' + type: array + id: + description: The ID of the component. + format: uuid + type: string + name: + description: The name of the component. + type: string + position: + description: The zero-indexed position of the component. + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + type: object + StatusPageDataAttributesComponentsItemsComponentsItems: + properties: + id: + description: The ID of the component. + format: uuid + type: string + name: + description: The name of the component. + type: string + position: + description: The zero-indexed position of the component. Relative to the + other components in the group. + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + type: object + StatusPageDataRelationships: + description: The relationships of a status page. + properties: + created_by_user: + $ref: '#/components/schemas/StatusPageDataRelationshipsCreatedByUser' + description: The Datadog user who created the status page. + last_modified_by_user: + $ref: '#/components/schemas/StatusPageDataRelationshipsLastModifiedByUser' + description: The Datadog user who last modified the status page. + type: object + StatusPageDataRelationshipsCreatedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPageDataRelationshipsCreatedByUserData' + required: + - data + type: object + StatusPageDataRelationshipsCreatedByUserData: + properties: + id: + description: The ID of the Datadog user who created the status page. + 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: + description: The ID of the Datadog user who last modified the status page. + 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: + description: The included related resources of a component. Client must + explicitly request these resources by name in the `include` query parameter. + items: + $ref: '#/components/schemas/StatusPagesComponentArrayIncluded' + type: array + type: object + StatusPagesComponentArray: + properties: + data: + items: + $ref: '#/components/schemas/StatusPagesComponentData' + type: array + included: + description: The included related resources of a component. Client must + explicitly request these resources by name in the `include` query parameter. + 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: + description: The ID of the component. + format: uuid + type: string + relationships: + $ref: '#/components/schemas/StatusPagesComponentDataRelationships' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + type: object + StatusPagesComponentDataAttributes: + description: The attributes of a component. + properties: + components: + description: If the component is of type `group`, the components within + the group. + items: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesComponentsItems' + type: array + created_at: + description: Timestamp of when the component was created. + format: date-time + type: string + modified_at: + description: Timestamp of when the component was last modified. + format: date-time + type: string + name: + description: The name of the component. + type: string + position: + description: The zero-indexed position of the component. + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + required: + - type + type: object + StatusPagesComponentDataAttributesComponentsItems: + properties: + id: + format: uuid + 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: + description: The status of the component. + enum: + - operational + - degraded + - partial_outage + - major_outage + example: operational + type: string + x-enum-varnames: + - OPERATIONAL + - DEGRADED + - PARTIAL_OUTAGE + - MAJOR_OUTAGE + StatusPagesComponentDataRelationships: + description: The relationships of a component. + properties: + created_by_user: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsCreatedByUser' + description: The Datadog user who created the component. + group: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsGroup' + description: The group the component belongs to. + last_modified_by_user: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsLastModifiedByUser' + description: The Datadog user who last modified the component. + status_page: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsStatusPage' + description: The status page the component belongs to. + type: object + StatusPagesComponentDataRelationshipsCreatedByUser: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsCreatedByUserData' + required: + - data + type: object + StatusPagesComponentDataRelationshipsCreatedByUserData: + properties: + id: + description: The ID of the Datadog user who created the component. + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPagesComponentDataRelationshipsGroup: + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentDataRelationshipsGroupData' + required: + - data + type: object + StatusPagesComponentDataRelationshipsGroupData: + nullable: true + properties: + id: + description: The ID of the group the component belongs to. + example: '' + format: uuid + 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: + description: The ID of the Datadog user who last modified the component. + 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: + description: The ID of the status page the component belongs to. + example: '' + format: uuid + type: string + type: + $ref: '#/components/schemas/StatusPageDataType' + required: + - type + - id + type: object + StatusPagesComponentGroup: + description: The included component group resource. + properties: + attributes: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributes' + id: + description: The ID of the component. + format: uuid + type: string + relationships: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationships' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + type: object + StatusPagesComponentGroupAttributes: + description: The attributes of a component group. + properties: + components: + description: If the component is of type `group`, the components within + the group. + items: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItems' + type: array + created_at: + description: Timestamp of when the component was created. + format: date-time + type: string + modified_at: + description: Timestamp of when the component was last modified. + format: date-time + type: string + name: + description: The name of the component. + type: string + position: + description: The zero-indexed position of the component. + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentDataAttributesStatus' + type: + $ref: '#/components/schemas/CreateComponentRequestDataAttributesType' + required: + - type + type: object + StatusPagesComponentGroupAttributesComponentsItems: + properties: + id: + description: The ID of the grouped component. + format: uuid + readOnly: true + type: string + name: + description: The name of the grouped component. + type: string + position: + description: The zero-indexed position of the grouped component. Relative + to the other components in the group. + format: int64 + type: integer + status: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsStatus' + type: + $ref: '#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType' + type: object + StatusPagesComponentGroupAttributesComponentsItemsStatus: + description: The status of the component. + enum: + - operational + - degraded + - partial_outage + - major_outage + readOnly: true + type: string + x-enum-varnames: + - OPERATIONAL + - DEGRADED + - PARTIAL_OUTAGE + - MAJOR_OUTAGE + StatusPagesComponentGroupAttributesComponentsItemsType: + description: The type of the component. + enum: + - component + example: component + type: string + x-enum-varnames: + - COMPONENT + StatusPagesComponentGroupRelationships: + description: The relationships of a component group. + 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: + description: The Datadog user who created the component group. + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsCreatedByUserData' + required: + - data + type: object + StatusPagesComponentGroupRelationshipsCreatedByUserData: + properties: + id: + description: The ID of the Datadog user who created the component group. + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPagesComponentGroupRelationshipsGroup: + description: The group the component group belongs to. + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsGroupData' + required: + - data + type: object + StatusPagesComponentGroupRelationshipsGroupData: + nullable: true + properties: + id: + example: '' + format: uuid + type: string + type: + $ref: '#/components/schemas/StatusPagesComponentGroupType' + required: + - type + - id + type: object + StatusPagesComponentGroupRelationshipsLastModifiedByUser: + description: The Datadog user who last modified the component group. + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsLastModifiedByUserData' + required: + - data + type: object + StatusPagesComponentGroupRelationshipsLastModifiedByUserData: + properties: + id: + description: The ID of the Datadog user who last modified the component + group. + example: '' + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + - id + type: object + StatusPagesComponentGroupRelationshipsStatusPage: + description: The status page the component group belongs to. + properties: + data: + $ref: '#/components/schemas/StatusPagesComponentGroupRelationshipsStatusPageData' + required: + - data + type: object + StatusPagesComponentGroupRelationshipsStatusPageData: + properties: + id: + description: The ID of the status page. + example: '' + format: uuid + 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: + description: Offset-based pagination schema. + properties: + first_offset: + description: Integer representing the offset to fetch the first page of + results. + example: 0 + format: int64 + type: integer + last_offset: + description: Integer representing the offset to fetch the last page of results. + example: 900 + 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: + description: Integer representing the index of the first element in the + previous page of results. + example: 100 + 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: + description: Response metadata. + properties: + page: + $ref: '#/components/schemas/StatusPagesPagination' + readOnly: true + type: object + StatusPagesUser: + description: The included Datadog user resource. + properties: + attributes: + $ref: '#/components/schemas/StatusPagesUserAttributes' + id: + description: The ID of the Datadog user. + format: uuid + type: string + type: + $ref: '#/components/schemas/StatusPagesUserType' + required: + - type + type: object + StatusPagesUserAttributes: + description: Attributes of the Datadog user. + properties: + email: + description: The email of the Datadog user. + type: string + handle: + description: The handle of the Datadog user. + type: string + icon: + description: The icon of the Datadog user. + type: string + name: + description: The name of the Datadog user. + type: string + uuid: + description: The UUID of the Datadog user. + 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. @@ -90205,6 +91864,668 @@ 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: The ID of the component. + in: path + name: component_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: The ID of the component. + in: path + name: component_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: The ID of the component. + in: path + name: component_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: The ID of the degradation. + in: path + name: degradation_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: The ID of the degradation. + in: path + name: degradation_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + 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. @@ -94711,6 +97032,10 @@ tags: name: Spans Metrics - description: API for static analysis name: Static Analysis +- description: Manage your status pages and communicate service disruptions to stakeholders + via Datadog's API. See the [Status Pages documentation](https://docs.datadoghq.com/incident_response/status_pages/) + for more information. + 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 000000000000..8776d9784d56 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-component-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:16.644Z \ 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 000000000000..5216ddbaafe5 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-component-returns-Created-response.yml @@ -0,0 +1,80 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:16 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-34bcfd8351c0bf6c","enabled":true,"name":"A + Status Page","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":"9f8ede40-b32f-4efb-bc55-a3442b846412","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"5cb2f4f2-361a-4902-9a1a-b84e71164678","name":"Application","type":"group","position":0,"components":[{"id":"ff7ccb5e-ab5a-4fff-b6ed-39746cadc2ac","name":"Login","type":"component","status":"operational","position":0},{"id":"0cbdbc69-6b3c-4a96-8566-8e71492c2bab","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:16.802269Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-34bcfd8351c0bf6c","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:16.802269Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/9f8ede40-b32f-4efb-bc55-a3442b846412/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: Wed, 14 Jan 2026 18:34:16 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Logs","position":0,"type":"component"},"type":"components"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/9f8ede40-b32f-4efb-bc55-a3442b846412/components + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"ad01c370-832f-4b2d-a071-9f965238bedd","type":"components","attributes":{"created_at":"2026-01-14T18:34:17.271005Z","modified_at":"2026-01-14T18:34:17.271005Z","name":"Logs","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":"9f8ede40-b32f-4efb-bc55-a3442b846412","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Jan 2026 18:34:16 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/9f8ede40-b32f-4efb-bc55-a3442b846412/components/ad01c370-832f-4b2d-a071-9f965238bedd + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 14 Jan 2026 18:34:16 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/9f8ede40-b32f-4efb-bc55-a3442b846412 + 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 000000000000..efeea9f60fce --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:17.948Z \ 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 000000000000..ab1eaec78a6f --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-degradation-returns-Created-response.yml @@ -0,0 +1,85 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-789a0331b83650e4","enabled":true,"name":"A + Status Page","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":"df0612f3-4ee3-4627-b8a6-a34b3043e31d","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"9dd5c0f9-5bcb-4694-a8be-4f9b70b63c7e","name":"Application","type":"group","position":0,"components":[{"id":"da61bfdd-4282-49e1-bf83-d3df9f0b2e1c","name":"Login","type":"component","status":"operational","position":0},{"id":"b7ad28fd-a485-452c-81f6-2a72b5e22135","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:18.052972Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-789a0331b83650e4","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:18.052972Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/df0612f3-4ee3-4627-b8a6-a34b3043e31d/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: Wed, 14 Jan 2026 18:34:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"da61bfdd-4282-49e1-bf83-d3df9f0b2e1c","status":"major_outage"}],"description":"Our + API is experiencing elevated latency. We are investigating the issue.","status":"investigating","title":"Elevated + API Latency"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/df0612f3-4ee3-4627-b8a6-a34b3043e31d/degradations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"56a84290-5371-4d6e-b106-b1d5cc52ed79","type":"degradations","attributes":{"components_affected":[{"id":"da61bfdd-4282-49e1-bf83-d3df9f0b2e1c","name":"Login","status":"major_outage"}],"created_at":"2026-01-14T18:34:18.643353Z","description":"Our + API is experiencing elevated latency. We are investigating the issue.","modified_at":"2026-01-14T18:34:18.643353Z","status":"investigating","title":"Elevated + API Latency","updates":[{"id":"1c212f1c-fa94-4f8e-b94e-051e24057d52","created_at":"2026-01-14T18:34:18.643353Z","modified_at":"2026-01-14T18:34:18.643353Z","status":"investigating","description":"Our + API is experiencing elevated latency. We are investigating the issue.","components_affected":[{"id":"da61bfdd-4282-49e1-bf83-d3df9f0b2e1c","name":"Login","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":"df0612f3-4ee3-4627-b8a6-a34b3043e31d","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Jan 2026 18:34:17 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/df0612f3-4ee3-4627-b8a6-a34b3043e31d/degradations/56a84290-5371-4d6e-b106-b1d5cc52ed79 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 14 Jan 2026 18:34:17 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/df0612f3-4ee3-4627-b8a6-a34b3043e31d + 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 000000000000..6162587fbd62 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:19.425Z \ 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 000000000000..9fd455dfc9c6 --- /dev/null +++ b/cassettes/features/v2/status_pages/Create-status-page-returns-Created-response.yml @@ -0,0 +1,42 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:19 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"domain_prefix":"status-page-a2eaf7555bc991fb","enabled":true,"name":"A + Status Page","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":"c55c1c53-c6ad-4a15-9093-4445213c3b79","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"e73ac741-c54d-43b8-90bc-a7258a0ec9fb","name":"Login","type":"component","status":"operational","position":0},{"id":"a3b31d36-202f-444a-9ea4-3fb20794c2f8","name":"Settings","type":"component","status":"operational","position":1}],"created_at":"2026-01-14T18:34:19.55001Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-a2eaf7555bc991fb","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:19.55001Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/c55c1c53-c6ad-4a15-9093-4445213c3b79/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: Wed, 14 Jan 2026 18:34:19 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/c55c1c53-c6ad-4a15-9093-4445213c3b79 + 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 000000000000..6778c0ddc721 --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:20.644Z \ 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 000000000000..78c38699bdb0 --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-component-returns-No-Content-response.yml @@ -0,0 +1,58 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:20 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-0d2d7c9c3a7223ad","enabled":true,"name":"A + Status Page","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":"a2a7be87-a517-45c5-9fde-71d0a2bdeb79","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"21dd43f5-3fe0-40be-a8e8-2d6b9d7e3c5a","name":"Application","type":"group","position":0,"components":[{"id":"159fd76a-661a-4b01-a4f3-b993ddde6efb","name":"Login","type":"component","status":"operational","position":0},{"id":"4c7b8f87-564a-4372-837e-e8aea00b2a47","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:20.819798Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-0d2d7c9c3a7223ad","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:20.819798Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/a2a7be87-a517-45c5-9fde-71d0a2bdeb79/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: Wed, 14 Jan 2026 18:34:20 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/a2a7be87-a517-45c5-9fde-71d0a2bdeb79/components/21dd43f5-3fe0-40be-a8e8-2d6b9d7e3c5a + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 14 Jan 2026 18:34:20 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/a2a7be87-a517-45c5-9fde-71d0a2bdeb79 + 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 000000000000..139657491cc6 --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:21.866Z \ 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 000000000000..9ce7cdd75170 --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-degradation-returns-No-Content-response.yml @@ -0,0 +1,103 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:21 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-b5fbb76b83d2a5d0","enabled":true,"name":"A + Status Page","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":"94baf28b-48d1-4105-8895-1174cb9c8b98","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"d29f3ffb-f72b-4b0d-99f0-e857d0f21c1a","name":"Application","type":"group","position":0,"components":[{"id":"3a491a7c-1816-4129-b12a-c84390a70c3f","name":"Login","type":"component","status":"operational","position":0},{"id":"66727ad7-0687-4da2-91fe-b3e5ad418863","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:21.969023Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-b5fbb76b83d2a5d0","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:21.969023Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/94baf28b-48d1-4105-8895-1174cb9c8b98/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: Wed, 14 Jan 2026 18:34:21 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"3a491a7c-1816-4129-b12a-c84390a70c3f","status":"major_outage"}],"description":"Our + API is experiencing elevated latency. We are investigating the issue.","status":"investigating","title":"Elevated + API Latency"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/94baf28b-48d1-4105-8895-1174cb9c8b98/degradations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"6a6cc623-ef7b-4099-8a68-ee9cd6e625fa","type":"degradations","attributes":{"components_affected":[{"id":"3a491a7c-1816-4129-b12a-c84390a70c3f","name":"Login","status":"major_outage"}],"created_at":"2026-01-14T18:34:22.48327Z","description":"Our + API is experiencing elevated latency. We are investigating the issue.","modified_at":"2026-01-14T18:34:22.48327Z","status":"investigating","title":"Elevated + API Latency","updates":[{"id":"1639ecee-77fc-4424-b719-7bc9a8d9ac10","created_at":"2026-01-14T18:34:22.48327Z","modified_at":"2026-01-14T18:34:22.48327Z","status":"investigating","description":"Our + API is experiencing elevated latency. We are investigating the issue.","components_affected":[{"id":"3a491a7c-1816-4129-b12a-c84390a70c3f","name":"Login","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":"94baf28b-48d1-4105-8895-1174cb9c8b98","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Jan 2026 18:34:21 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/94baf28b-48d1-4105-8895-1174cb9c8b98/degradations/6a6cc623-ef7b-4099-8a68-ee9cd6e625fa + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 14 Jan 2026 18:34:21 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/94baf28b-48d1-4105-8895-1174cb9c8b98/degradations/6a6cc623-ef7b-4099-8a68-ee9cd6e625fa + 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: Wed, 14 Jan 2026 18:34:21 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/94baf28b-48d1-4105-8895-1174cb9c8b98 + 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 000000000000..b96710261e74 --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:23.304Z \ 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 000000000000..b8b4f74f8e50 --- /dev/null +++ b/cassettes/features/v2/status_pages/Delete-status-page-returns-No-Content-response.yml @@ -0,0 +1,60 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:23 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-608a5828d74082cd","enabled":true,"name":"A + Status Page","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":"fe6f8e30-59be-43e6-9836-b2a0bd4af24f","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"ba00bba3-9057-454e-8497-5a5acd5c7793","name":"Application","type":"group","position":0,"components":[{"id":"68a65da3-072c-46a3-927f-e7cd0ce4d48f","name":"Login","type":"component","status":"operational","position":0},{"id":"3034604b-1324-4908-8f30-f91a1528a38e","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:23.396957Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-608a5828d74082cd","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:23.396957Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/fe6f8e30-59be-43e6-9836-b2a0bd4af24f/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: Wed, 14 Jan 2026 18:34:23 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/fe6f8e30-59be-43e6-9836-b2a0bd4af24f + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 14 Jan 2026 18:34:23 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/fe6f8e30-59be-43e6-9836-b2a0bd4af24f + 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 000000000000..6866a930a2c1 --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-component-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:24.440Z \ 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 000000000000..9ef529bbb752 --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-component-returns-OK-response.yml @@ -0,0 +1,60 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:24 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-563dcf7a5f0d37a0","enabled":true,"name":"A + Status Page","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":"db83fc2f-bc0f-4ef4-84d8-bf62b84a4ab5","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"7b449f70-f51b-4133-9339-864ecd98685d","name":"Application","type":"group","position":0,"components":[{"id":"c9ad5347-14a8-422c-b597-972a066968ec","name":"Login","type":"component","status":"operational","position":0},{"id":"d03ae495-668c-4e79-9dae-ff5ecfe6e260","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:24.533596Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-563dcf7a5f0d37a0","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:24.533596Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/db83fc2f-bc0f-4ef4-84d8-bf62b84a4ab5/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: Wed, 14 Jan 2026 18:34:24 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/db83fc2f-bc0f-4ef4-84d8-bf62b84a4ab5/components/7b449f70-f51b-4133-9339-864ecd98685d + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"7b449f70-f51b-4133-9339-864ecd98685d","type":"components","attributes":{"components":[{"id":"c9ad5347-14a8-422c-b597-972a066968ec","name":"Login","type":"component","status":"operational","position":0},{"id":"d03ae495-668c-4e79-9dae-ff5ecfe6e260","name":"Settings","type":"component","status":"operational","position":1}],"created_at":"2026-01-14T18:34:24.533596Z","modified_at":"2026-01-14T18:34:24.533596Z","name":"Application","position":0,"type":"group"},"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":"db83fc2f-bc0f-4ef4-84d8-bf62b84a4ab5","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Jan 2026 18:34:24 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/db83fc2f-bc0f-4ef4-84d8-bf62b84a4ab5 + 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 000000000000..686f91dc763c --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:25.959Z \ 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 000000000000..670ce222f59e --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-degradation-returns-OK-response.yml @@ -0,0 +1,106 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:25 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-5fee2f719be82f29","enabled":true,"name":"A + Status Page","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":"ebf59ea3-337a-4bf7-8229-22714b514a2f","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"a2743d27-3cc3-4a60-ba6e-291f3fe06deb","name":"Application","type":"group","position":0,"components":[{"id":"eae8808a-3353-43da-9d84-a0c79c7c5517","name":"Login","type":"component","status":"operational","position":0},{"id":"a2476857-5843-4bfd-a77d-0b5b65fec5df","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:26.056352Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-5fee2f719be82f29","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:26.056352Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/ebf59ea3-337a-4bf7-8229-22714b514a2f/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: Wed, 14 Jan 2026 18:34:25 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"eae8808a-3353-43da-9d84-a0c79c7c5517","status":"major_outage"}],"description":"Our + API is experiencing elevated latency. We are investigating the issue.","status":"investigating","title":"Elevated + API Latency"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/ebf59ea3-337a-4bf7-8229-22714b514a2f/degradations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"034207a4-1a7e-4cd5-abd5-fbd9fa30a097","type":"degradations","attributes":{"components_affected":[{"id":"eae8808a-3353-43da-9d84-a0c79c7c5517","name":"Login","status":"major_outage"}],"created_at":"2026-01-14T18:34:26.977362Z","description":"Our + API is experiencing elevated latency. We are investigating the issue.","modified_at":"2026-01-14T18:34:26.977362Z","status":"investigating","title":"Elevated + API Latency","updates":[{"id":"2e12dc61-747b-4997-95f7-a28549d0d6d2","created_at":"2026-01-14T18:34:26.977362Z","modified_at":"2026-01-14T18:34:26.977362Z","status":"investigating","description":"Our + API is experiencing elevated latency. We are investigating the issue.","components_affected":[{"id":"eae8808a-3353-43da-9d84-a0c79c7c5517","name":"Login","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":"ebf59ea3-337a-4bf7-8229-22714b514a2f","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Jan 2026 18:34:25 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/ebf59ea3-337a-4bf7-8229-22714b514a2f/degradations/034207a4-1a7e-4cd5-abd5-fbd9fa30a097 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"034207a4-1a7e-4cd5-abd5-fbd9fa30a097","type":"degradations","attributes":{"components_affected":[{"id":"eae8808a-3353-43da-9d84-a0c79c7c5517","name":"Login","status":"major_outage"}],"created_at":"2026-01-14T18:34:26.977362Z","description":"Our + API is experiencing elevated latency. We are investigating the issue.","modified_at":"2026-01-14T18:34:26.977362Z","status":"investigating","title":"Elevated + API Latency","updates":[{"id":"2e12dc61-747b-4997-95f7-a28549d0d6d2","created_at":"2026-01-14T18:34:26.977362Z","modified_at":"2026-01-14T18:34:26.977362Z","status":"investigating","description":"Our + API is experiencing elevated latency. We are investigating the issue.","components_affected":[{"id":"eae8808a-3353-43da-9d84-a0c79c7c5517","name":"Login","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":"ebf59ea3-337a-4bf7-8229-22714b514a2f","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Jan 2026 18:34:25 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/ebf59ea3-337a-4bf7-8229-22714b514a2f/degradations/034207a4-1a7e-4cd5-abd5-fbd9fa30a097 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 14 Jan 2026 18:34:25 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/ebf59ea3-337a-4bf7-8229-22714b514a2f + 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 000000000000..2488910ba136 --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:27.756Z \ 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 000000000000..f6b032f5b2d5 --- /dev/null +++ b/cassettes/features/v2/status_pages/Get-status-page-returns-OK-response.yml @@ -0,0 +1,61 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:27 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-640ff16a0cef647e","enabled":true,"name":"A + Status Page","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":"3d09da75-7a53-486c-be0e-29a1d38626f0","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"5405090a-cfae-4747-a4a1-420c249348b7","name":"Application","type":"group","position":0,"components":[{"id":"c0f34aff-6c67-4c2d-8a84-ec0f05ffd310","name":"Login","type":"component","status":"operational","position":0},{"id":"be2b41a2-dff3-47a1-a4e8-4a42820882f3","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:27.933167Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-640ff16a0cef647e","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:27.933167Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/3d09da75-7a53-486c-be0e-29a1d38626f0/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: Wed, 14 Jan 2026 18:34:27 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/3d09da75-7a53-486c-be0e-29a1d38626f0 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"3d09da75-7a53-486c-be0e-29a1d38626f0","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"5405090a-cfae-4747-a4a1-420c249348b7","name":"Application","type":"group","position":0,"components":[{"id":"c0f34aff-6c67-4c2d-8a84-ec0f05ffd310","name":"Login","type":"component","status":"operational","position":0},{"id":"be2b41a2-dff3-47a1-a4e8-4a42820882f3","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:27.933167Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-640ff16a0cef647e","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:27.933167Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/3d09da75-7a53-486c-be0e-29a1d38626f0/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: Wed, 14 Jan 2026 18:34:27 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/3d09da75-7a53-486c-be0e-29a1d38626f0 + 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 000000000000..1a78119b28dc --- /dev/null +++ b/cassettes/features/v2/status_pages/List-components-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:29.043Z \ 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 000000000000..b9adc5116434 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-components-returns-OK-response.yml @@ -0,0 +1,60 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:29 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-634e6c2db3b869de","enabled":true,"name":"A + Status Page","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":"5ca46325-bac2-4a5e-aa26-5e7d5e1c029e","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"d8b8c3c9-595a-4499-a21e-1f04e853d1a7","name":"Application","type":"group","position":0,"components":[{"id":"933d9347-1271-45f0-bd1d-ce3701e35bef","name":"Login","type":"component","status":"operational","position":0},{"id":"5da24db1-597c-4c01-8f61-5ff87ec805b2","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:29.150095Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-634e6c2db3b869de","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:29.150095Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/5ca46325-bac2-4a5e-aa26-5e7d5e1c029e/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: Wed, 14 Jan 2026 18:34:29 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/statuspages/5ca46325-bac2-4a5e-aa26-5e7d5e1c029e/components + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"d8b8c3c9-595a-4499-a21e-1f04e853d1a7","type":"components","attributes":{"components":[{"id":"933d9347-1271-45f0-bd1d-ce3701e35bef","name":"Login","type":"component","status":"operational","position":0},{"id":"5da24db1-597c-4c01-8f61-5ff87ec805b2","name":"Settings","type":"component","status":"operational","position":1}],"created_at":"2026-01-14T18:34:29.150095Z","modified_at":"2026-01-14T18:34:29.150095Z","name":"Application","position":0,"type":"group"},"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":"5ca46325-bac2-4a5e-aa26-5e7d5e1c029e","type":"status_pages"}}}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Jan 2026 18:34:29 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/5ca46325-bac2-4a5e-aa26-5e7d5e1c029e + 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 000000000000..46d453f1cfd2 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-degradations-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:30.142Z \ 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 000000000000..cce54fe0db88 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-degradations-returns-OK-response.yml @@ -0,0 +1,106 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:30 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-af0603c6bb50c13f","enabled":true,"name":"A + Status Page","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":"19846f06-cd73-44f5-aed1-73dbaa31d58d","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"b2c0e2dd-69e3-4e5a-b8d3-45a26d9428f7","name":"Application","type":"group","position":0,"components":[{"id":"0e309a2e-7cac-47d2-90c9-0301ed7e55e7","name":"Login","type":"component","status":"operational","position":0},{"id":"b0d0261c-d58d-438b-98aa-1828a0aaac36","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:30.242647Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-af0603c6bb50c13f","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:30.242647Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/19846f06-cd73-44f5-aed1-73dbaa31d58d/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: Wed, 14 Jan 2026 18:34:30 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"0e309a2e-7cac-47d2-90c9-0301ed7e55e7","status":"major_outage"}],"description":"Our + API is experiencing elevated latency. We are investigating the issue.","status":"investigating","title":"Elevated + API Latency"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/19846f06-cd73-44f5-aed1-73dbaa31d58d/degradations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"3679c370-8e6c-4779-89ca-2952c68800ac","type":"degradations","attributes":{"components_affected":[{"id":"0e309a2e-7cac-47d2-90c9-0301ed7e55e7","name":"Login","status":"major_outage"}],"created_at":"2026-01-14T18:34:30.903058Z","description":"Our + API is experiencing elevated latency. We are investigating the issue.","modified_at":"2026-01-14T18:34:30.903058Z","status":"investigating","title":"Elevated + API Latency","updates":[{"id":"214cdbcb-f1e3-48fb-a8bc-7211fdb02922","created_at":"2026-01-14T18:34:30.903058Z","modified_at":"2026-01-14T18:34:30.903058Z","status":"investigating","description":"Our + API is experiencing elevated latency. We are investigating the issue.","components_affected":[{"id":"0e309a2e-7cac-47d2-90c9-0301ed7e55e7","name":"Login","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":"19846f06-cd73-44f5-aed1-73dbaa31d58d","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Jan 2026 18:34:30 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":"3679c370-8e6c-4779-89ca-2952c68800ac","type":"degradations","attributes":{"components_affected":[{"id":"0e309a2e-7cac-47d2-90c9-0301ed7e55e7","name":"Login","status":"major_outage"}],"created_at":"2026-01-14T18:34:30.903058Z","description":"Our + API is experiencing elevated latency. We are investigating the issue.","modified_at":"2026-01-14T18:34:30.903058Z","status":"investigating","title":"Elevated + API Latency","updates":[{"id":"214cdbcb-f1e3-48fb-a8bc-7211fdb02922","created_at":"2026-01-14T18:34:30.903058Z","modified_at":"2026-01-14T18:34:30.903058Z","status":"investigating","description":"Our + API is experiencing elevated latency. We are investigating the issue.","components_affected":[{"id":"0e309a2e-7cac-47d2-90c9-0301ed7e55e7","name":"Login","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":"19846f06-cd73-44f5-aed1-73dbaa31d58d","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: Wed, 14 Jan 2026 18:34:30 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/19846f06-cd73-44f5-aed1-73dbaa31d58d/degradations/3679c370-8e6c-4779-89ca-2952c68800ac + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 14 Jan 2026 18:34:30 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/19846f06-cd73-44f5-aed1-73dbaa31d58d + 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 000000000000..d3bb3e54b29e --- /dev/null +++ b/cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:31.731Z \ 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 000000000000..94e632b8a183 --- /dev/null +++ b/cassettes/features/v2/status_pages/List-status-pages-returns-OK-response.yml @@ -0,0 +1,61 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:31 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-473ecd94e34d0b23","enabled":true,"name":"A + Status Page","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":"259141bd-d78b-4c24-9529-b8f9c4f881ed","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"1913d8c1-711f-41b9-9dcc-96820c18f1c4","name":"Application","type":"group","position":0,"components":[{"id":"b564dd30-d03c-41b7-9012-fed1bcf04e6c","name":"Login","type":"component","status":"operational","position":0},{"id":"f1db5443-7982-436a-85b1-f83f055aa298","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:31.824982Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-473ecd94e34d0b23","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:31.824982Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/259141bd-d78b-4c24-9529-b8f9c4f881ed/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: Wed, 14 Jan 2026 18:34: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":"259141bd-d78b-4c24-9529-b8f9c4f881ed","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"1913d8c1-711f-41b9-9dcc-96820c18f1c4","name":"Application","type":"group","position":0,"components":[{"id":"b564dd30-d03c-41b7-9012-fed1bcf04e6c","name":"Login","type":"component","status":"operational","position":0},{"id":"f1db5443-7982-436a-85b1-f83f055aa298","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:31.824982Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-473ecd94e34d0b23","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:31.824982Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/259141bd-d78b-4c24-9529-b8f9c4f881ed/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: Wed, 14 Jan 2026 18:34:31 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/259141bd-d78b-4c24-9529-b8f9c4f881ed + 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 000000000000..7d008cc05bab --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-component-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:32.900Z \ 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 000000000000..3cd1250b0d57 --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-component-returns-OK-response.yml @@ -0,0 +1,65 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:32 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-50dba6ea54427f33","enabled":true,"name":"A + Status Page","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":"d26e4f72-b0a3-4f13-bd0d-59f338781de3","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"40034290-5bed-4588-bf4e-121b23d20c6e","name":"Application","type":"group","position":0,"components":[{"id":"2a49e23f-d513-4b9c-871b-86f03887349a","name":"Login","type":"component","status":"operational","position":0},{"id":"6cddd877-ea55-41ac-b3d9-dc0c737771cb","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:32.985561Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-50dba6ea54427f33","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:32.985561Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/d26e4f72-b0a3-4f13-bd0d-59f338781de3/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: Wed, 14 Jan 2026 18:34:32 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Logs Indexing"},"id":"40034290-5bed-4588-bf4e-121b23d20c6e","type":"components"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/statuspages/d26e4f72-b0a3-4f13-bd0d-59f338781de3/components/40034290-5bed-4588-bf4e-121b23d20c6e + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"40034290-5bed-4588-bf4e-121b23d20c6e","type":"components","attributes":{"components":[{"id":"2a49e23f-d513-4b9c-871b-86f03887349a","name":"Login","type":"component","status":"operational","position":0},{"id":"6cddd877-ea55-41ac-b3d9-dc0c737771cb","name":"Settings","type":"component","status":"operational","position":1}],"created_at":"2026-01-14T18:34:32.985561Z","modified_at":"2026-01-14T18:34:33.510873Z","name":"Logs + Indexing","position":0,"type":"group"},"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":"d26e4f72-b0a3-4f13-bd0d-59f338781de3","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Jan 2026 18:34:32 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/d26e4f72-b0a3-4f13-bd0d-59f338781de3 + 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 000000000000..9a463992e0de --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:34.017Z \ 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 000000000000..fe7ba8ca8bac --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-degradation-returns-OK-response.yml @@ -0,0 +1,110 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:34 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-b3f9b4292208c5ac","enabled":true,"name":"A + Status Page","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":"4d07df0b-455e-4fc6-99ee-5b5bc300ebc9","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"5c2c9b2c-653f-404c-8121-93c7817a40aa","name":"Application","type":"group","position":0,"components":[{"id":"148f4a30-5e7d-42ba-9152-dbffc76ce411","name":"Login","type":"component","status":"operational","position":0},{"id":"3a81534a-ae51-4ad3-b904-4fd964ff33b5","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:34.127897Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-b3f9b4292208c5ac","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:34.127897Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/4d07df0b-455e-4fc6-99ee-5b5bc300ebc9/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: Wed, 14 Jan 2026 18:34:34 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components_affected":[{"id":"148f4a30-5e7d-42ba-9152-dbffc76ce411","status":"major_outage"}],"description":"Our + API is experiencing elevated latency. We are investigating the issue.","status":"investigating","title":"Elevated + API Latency"},"type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/statuspages/4d07df0b-455e-4fc6-99ee-5b5bc300ebc9/degradations + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"560e8fe9-ddfe-4376-9bb3-da8c0e1e1ec3","type":"degradations","attributes":{"components_affected":[{"id":"148f4a30-5e7d-42ba-9152-dbffc76ce411","name":"Login","status":"major_outage"}],"created_at":"2026-01-14T18:34:34.59942Z","description":"Our + API is experiencing elevated latency. We are investigating the issue.","modified_at":"2026-01-14T18:34:34.59942Z","status":"investigating","title":"Elevated + API Latency","updates":[{"id":"83b7db45-8432-4c8e-b543-49deacdb7f2e","created_at":"2026-01-14T18:34:34.59942Z","modified_at":"2026-01-14T18:34:34.59942Z","status":"investigating","description":"Our + API is experiencing elevated latency. We are investigating the issue.","components_affected":[{"id":"148f4a30-5e7d-42ba-9152-dbffc76ce411","name":"Login","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":"4d07df0b-455e-4fc6-99ee-5b5bc300ebc9","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Jan 2026 18:34:34 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"title":"Elevated API Latency in US1"},"id":"560e8fe9-ddfe-4376-9bb3-da8c0e1e1ec3","type":"degradations"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/statuspages/4d07df0b-455e-4fc6-99ee-5b5bc300ebc9/degradations/560e8fe9-ddfe-4376-9bb3-da8c0e1e1ec3 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"560e8fe9-ddfe-4376-9bb3-da8c0e1e1ec3","type":"degradations","attributes":{"components_affected":[{"id":"148f4a30-5e7d-42ba-9152-dbffc76ce411","name":"Login","status":"major_outage"}],"created_at":"2026-01-14T18:34:34.59942Z","description":"Our + API is experiencing elevated latency. We are investigating the issue.","modified_at":"2026-01-14T18:34:34.781458Z","status":"investigating","title":"Elevated + API Latency in US1","updates":[{"id":"83b7db45-8432-4c8e-b543-49deacdb7f2e","created_at":"2026-01-14T18:34:34.59942Z","modified_at":"2026-01-14T18:34:34.59942Z","status":"investigating","description":"Our + API is experiencing elevated latency. We are investigating the issue.","components_affected":[{"id":"148f4a30-5e7d-42ba-9152-dbffc76ce411","name":"Login","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":"4d07df0b-455e-4fc6-99ee-5b5bc300ebc9","type":"status_pages"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Jan 2026 18:34:34 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/4d07df0b-455e-4fc6-99ee-5b5bc300ebc9/degradations/560e8fe9-ddfe-4376-9bb3-da8c0e1e1ec3 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 14 Jan 2026 18:34:34 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/4d07df0b-455e-4fc6-99ee-5b5bc300ebc9 + 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 000000000000..8256c1a62032 --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-14T18:34:35.491Z \ 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 000000000000..627cd54008d3 --- /dev/null +++ b/cassettes/features/v2/status_pages/Update-status-page-returns-OK-response.yml @@ -0,0 +1,65 @@ +http_interactions: +- recorded_at: Wed, 14 Jan 2026 18:34:35 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"components":[{"components":[{"name":"Login","position":0,"type":"component"},{"name":"Settings","position":1,"type":"component"}],"name":"Application","type":"group"}],"domain_prefix":"status-page-0de3b6407596e7bc","enabled":true,"name":"A + Status Page","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":"a82d0d18-667c-453a-8365-36a24caff175","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"ea5ac828-654d-4bf9-a919-65a1dd24720a","name":"Application","type":"group","position":0,"components":[{"id":"f83cbfff-d702-4602-9706-97a3b2041434","name":"Login","type":"component","status":"operational","position":0},{"id":"2f8de9a3-10c7-44b1-b882-66dc063b4afa","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:35.581608Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-0de3b6407596e7bc","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:35.581608Z","name":"A + Status Page","page_url":"https://frog.datadoghq.com/status-pages/a82d0d18-667c-453a-8365-36a24caff175/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: Wed, 14 Jan 2026 18:34:35 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"A Status Page in US1"},"id":"a82d0d18-667c-453a-8365-36a24caff175","type":"status_pages"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/statuspages/a82d0d18-667c-453a-8365-36a24caff175 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"a82d0d18-667c-453a-8365-36a24caff175","type":"status_pages","attributes":{"company_logo":null,"components":[{"id":"ea5ac828-654d-4bf9-a919-65a1dd24720a","name":"Application","type":"group","position":0,"components":[{"id":"f83cbfff-d702-4602-9706-97a3b2041434","name":"Login","type":"component","status":"operational","position":0},{"id":"2f8de9a3-10c7-44b1-b882-66dc063b4afa","name":"Settings","type":"component","status":"operational","position":1}]}],"created_at":"2026-01-14T18:34:35.581608Z","custom_domain":null,"custom_domain_enabled":false,"domain_prefix":"status-page-0de3b6407596e7bc","email_header_image":null,"enabled":true,"favicon":null,"modified_at":"2026-01-14T18:34:36.073572Z","name":"A + Status Page in US1","page_url":"https://frog.datadoghq.com/status-pages/a82d0d18-667c-453a-8365-36a24caff175/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: Wed, 14 Jan 2026 18:34:35 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/statuspages/a82d0d18-667c-453a-8365-36a24caff175 + 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 000000000000..234f5c4a2b3f --- /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: "Logs", + 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 000000000000..ded800e1b3f7 --- /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_COMPONENTS_0_ID = ENV["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_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_COMPONENTS_0_ID, + status: DatadogAPIClient::V2::StatusPagesComponentDataAttributesStatus::MAJOR_OUTAGE, + }), + ], + description: "Our API is experiencing elevated latency. We are investigating the issue.", + status: DatadogAPIClient::V2::CreateDegradationRequestDataAttributesStatus::INVESTIGATING, + title: "Elevated API Latency", + }), + 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 000000000000..a7dfa1068d0b --- /dev/null +++ b/examples/v2/status-pages/CreateStatusPage.rb @@ -0,0 +1,30 @@ +# 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: "A Status Page", + domain_prefix: "status-page-5e2fd69be33e79aa", + components: [ + DatadogAPIClient::V2::CreateStatusPageRequestDataAttributesComponentsItems.new({ + name: "Login", + type: DatadogAPIClient::V2::CreateComponentRequestDataAttributesType::COMPONENT, + position: 0, + }), + DatadogAPIClient::V2::CreateStatusPageRequestDataAttributesComponentsItems.new({ + name: "Settings", + type: DatadogAPIClient::V2::CreateComponentRequestDataAttributesType::COMPONENT, + position: 1, + }), + ], + 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 000000000000..1bf98033c6f4 --- /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 000000000000..a8cfe97820c2 --- /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 000000000000..dcfb517bc92a --- /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 000000000000..92a863844319 --- /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 000000000000..313d379208a5 --- /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 000000000000..1823b9eb777a --- /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 000000000000..8edaaeb4e23e --- /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 000000000000..88b8b6279c89 --- /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 000000000000..76bfd148f9c5 --- /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 000000000000..a7965a8edf98 --- /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: "Logs Indexing", + }), + 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 000000000000..20202bac74ab --- /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: "Elevated API Latency in US1", + }), + 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 000000000000..c6da88d03f7d --- /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: "A Status Page in US1", + }), + 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 f2b810504c5b..6baf44d68412 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3304,6 +3304,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 9d69fd33f222..c7911aa317cf 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1209,6 +1209,34 @@ "tag": "Service Level Objectives", "operationId": "CreateSLOReportJob" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"A Status Page\",\n \"domain_prefix\": \"status-page-{{ unique_hash }}\",\n \"components\": [{\"name\": \"Application\", \"type\": \"group\", \"components\":[{\"name\": \"Login\", \"type\": \"component\", \"position\": 0},{\"name\": \"Settings\", \"type\": \"component\", \"position\": 1}]}],\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", + "value": "\"{{ status_page.data.id }}\"" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"title\": \"Elevated API Latency\",\n \"description\": \"Our API is experiencing elevated latency. We are investigating the issue.\",\n \"status\": \"investigating\",\n \"components_affected\": [\n {\n \"id\": \"{{ status_page.data.attributes.components[0].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 000000000000..1646a25db963 --- /dev/null +++ b/features/v2/status_pages.feature @@ -0,0 +1,148 @@ +@endpoint(status-pages) @endpoint(status-pages-v2) +Feature: Status Pages + Manage your status pages and communicate service disruptions to + stakeholders via Datadog's API. See the [Status Pages + documentation](https://docs.datadoghq.com/incident_response/status_pages/) + for more information. + + 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": "Logs", "position": 0, "type": "component"}, "type": "components"}} + When the request is sent + Then the response status is 201 Created + And the response "data.attributes.status" is equal to "operational" + + @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].components[0].id }}", "status": "major_outage"}], "description": "Our API is experiencing elevated latency. We are investigating the issue.", "status": "investigating", "title": "Elevated API Latency"}, "type": "degradations"}} + When the request is sent + Then the response status is 201 Created + And the response "data.attributes.updates" has length 1 + + @team:DataDog/incident-app + Scenario: Create status page returns "Created" response + Given new "CreateStatusPage" request + And body with value {"data": {"attributes": {"name": "A Status Page", "domain_prefix": "status-page-{{ unique_hash }}", "components":[{"name": "Login", "type": "component", "position": 0},{"name": "Settings", "type": "component", "position": 1}], "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": "Logs Indexing"}, "id": "{{ status_page.data.attributes.components[0].id }}", "type": "components"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "Logs Indexing" + + @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": "Elevated API Latency in US1"}, "id": "{{ degradation.data.id }}", "type": "degradations"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.title" is equal to "Elevated API Latency in US1" + + @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": "A Status Page in US1"}, "id": "{{ status_page.data.id }}", "type": "status_pages"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "A Status Page in US1" diff --git a/features/v2/undo.json b/features/v2/undo.json index 0fd3f77ed827..bfcee722b4e8 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4660,6 +4660,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 ef27f156e7c8..7c462f3abf52 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1724,6 +1724,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", @@ -1735,6 +1743,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", @@ -1782,6 +1795,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", @@ -1950,6 +1970,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", @@ -3575,10 +3610,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", @@ -4472,6 +4519,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", @@ -4973,6 +5079,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 000000000000..cd7c2e6e0476 --- /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 000000000000..b4300521f0a0 --- /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 000000000000..2082479d1617 --- /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 + + # The supported attributes for creating a component. + attr_accessor :attributes + + # The supported relationships for creating a component. + 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 000000000000..d607f0666c41 --- /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 + # The supported attributes for creating a component. + class CreateComponentRequestDataAttributes + include BaseGenericModel + + # If creating a component of type `group`, the components to create within the group. + attr_accessor :components + + # The name of the component. + attr_reader :name + + # The zero-indexed position of the component. + attr_reader :position + + # The type of the component. + 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 000000000000..e6a3fb1836e4 --- /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 + + # The name of the grouped component. + attr_reader :name + + # The zero-indexed position of the grouped component relative to the other components in the group. + attr_reader :position + + # The type of the component. + 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 000000000000..aef7d8e76cf4 --- /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 + # The type of the component. + 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 000000000000..65ff42c0f5e0 --- /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 + # The supported relationships for creating a component. + 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 000000000000..9b4f06d7401a --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_component_request_data_relationships_group.rb @@ -0,0 +1,113 @@ +=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_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' => :'CreateComponentRequestDataRelationshipsGroupData' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'data', + ]) + 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 + + # 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 000000000000..81720ffe0fc7 --- /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 + + # The ID of the group. + 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' => :'UUID', + :'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 000000000000..c8174a971494 --- /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 000000000000..030e05c6f73a --- /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 + + # The supported attributes for creating a degradation. + 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 000000000000..c58110d6e14b --- /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 + # The supported attributes for creating a degradation. + class CreateDegradationRequestDataAttributes + include BaseGenericModel + + # The components affected by the degradation. + attr_reader :components_affected + + # The description of the degradation. + attr_accessor :description + + # The status of the degradation. + attr_reader :status + + # The title of the degradation. + 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 000000000000..5c6e22c4f411 --- /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 + + # The ID of the component. Must be a component of type `component`. + attr_reader :id + + # + attr_accessor :name + + # The status of the component. + 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' => :'UUID', + :'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 000000000000..23d0c51e635a --- /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 + # The status of the degradation. + 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 000000000000..be6913e12128 --- /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 000000000000..674b8670c7a3 --- /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 + + # The supported attributes for creating a status page. + 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 000000000000..a180e94552b5 --- /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 + # The supported attributes for creating a status page. + class CreateStatusPageRequestDataAttributes + include BaseGenericModel + + # The base64-encoded image data displayed on the status page. + attr_accessor :company_logo + + # The components displayed on the status page. + attr_accessor :components + + # The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + attr_reader :domain_prefix + + # Base64-encoded image data included in email notifications sent to status page subscribers. + attr_accessor :email_header_image + + # Whether the status page is enabled. + attr_reader :enabled + + # Base64-encoded image data displayed in the browser tab. + attr_accessor :favicon + + # The name of the status page. + attr_reader :name + + # Whether users can subscribe to the status page. + attr_accessor :subscriptions_enabled + + # The type of the status page controlling how the status page is accessed. + attr_reader :type + + # The visualization type of the status page. + 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 000000000000..c481a5f34518 --- /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 + + # If creating a component of type `group`, the components to create within the group. + attr_accessor :components + + # The ID of the component. + attr_accessor :id + + # The name of the component. + attr_accessor :name + + # The zero-indexed position of the component. + attr_accessor :position + + # The status of the component. + attr_accessor :status + + # The type of the component. + 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' => :'UUID', + :'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 000000000000..1ddde1943891 --- /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 + + # The ID of the grouped component. + attr_accessor :id + + # The name of the grouped component. + attr_accessor :name + + # The zero-indexed position of the grouped component. Relative to the other components in the group. + attr_accessor :position + + # The status of the component. + attr_accessor :status + + # The type of the component. + 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' => :'UUID', + :'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 000000000000..182758a78512 --- /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 + # The type of the status page controlling how the status page is accessed. + 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 000000000000..80ba2e1b4798 --- /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 + # The visualization type of the status page. + 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 000000000000..e06fb6d6a10f --- /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 + + # The included related resources of a degradation. Client must explicitly request these resources by name in the `include` query parameter. + 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 000000000000..d429bbecca4e --- /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 + + # The included related resources of a degradation. Client must explicitly request these resources by name in the `include` query parameter. + attr_accessor :included + + # Response metadata. + 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 000000000000..f63158f99b93 --- /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 000000000000..7983375e8335 --- /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 + + # The attributes of a degradation. + attr_accessor :attributes + + # The ID of the degradation. + attr_accessor :id + + # The relationships of a degradation. + 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' => :'UUID', + :'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 000000000000..19a185de71d0 --- /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 + # The attributes of a degradation. + class DegradationDataAttributes + include BaseGenericModel + + # Components affected by the degradation. + attr_accessor :components_affected + + # Timestamp of when the degradation was created. + attr_accessor :created_at + + # Description of the degradation. + attr_accessor :description + + # Timestamp of when the degradation was last modified. + attr_accessor :modified_at + + # The status of the degradation. + attr_accessor :status + + # Title of the degradation. + attr_accessor :title + + # Past updates made to the degradation. + 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 000000000000..005374c62668 --- /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 + + # The ID of the component. + attr_reader :id + + # The name of the component. + attr_accessor :name + + # The status of the component. + 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' => :'UUID', + :'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 000000000000..d0555b1d5ed0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_data_attributes_updates_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 DegradationDataAttributesUpdatesItems + include BaseGenericModel + + # The components affected at the time of the update. + attr_accessor :components_affected + + # Timestamp of when the update was created. + attr_accessor :created_at + + # Description of the update. + attr_accessor :description + + # Identifier of the update. + attr_accessor :id + + # Timestamp of when the update was last modified. + attr_accessor :modified_at + + # The status of the degradation. + 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components_affected' => :'Array', + :'created_at' => :'Time', + :'description' => :'String', + :'id' => :'UUID', + :'modified_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?(:'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 && + 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, 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 000000000000..46d5c079582e --- /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 + + # Identifier of the component affected at the time of the update. + attr_reader :id + + # The name of the component affected at the time of the update. + attr_accessor :name + + # The status of the component. + 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' => :'UUID', + :'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 000000000000..da347170879d --- /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 + # The relationships of a degradation. + 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 000000000000..0865abd97724 --- /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 000000000000..439f8b3ba8f6 --- /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 + + # The ID of the Datadog user who created the degradation. + 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 000000000000..d5e67d1f4144 --- /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 000000000000..92e02783a502 --- /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 + + # The ID of the Datadog user who last modified the degradation. + 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 000000000000..9567c073d97e --- /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 000000000000..73aa5a75af6d --- /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 + + # The ID of the status page. + 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' => :'UUID', + :'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 000000000000..5bac1b384745 --- /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 000000000000..5fcd76b2ad18 --- /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 + + # The supported attributes for updating a component. + attr_accessor :attributes + + # The ID of the component. + 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' => :'UUID', + :'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 000000000000..aaa7f97c3884 --- /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 + # The supported attributes for updating a component. + class PatchComponentRequestDataAttributes + include BaseGenericModel + + # The name of the component. + attr_accessor :name + + # The position of the component. If the component belongs to a group, the position is relative to the other components in the group. + 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 000000000000..1134796713ee --- /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 000000000000..66b22496605b --- /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 + + # The supported attributes for updating a degradation. + attr_accessor :attributes + + # The ID of the degradation. + 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' => :'UUID', + :'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 000000000000..4d58e5301c2b --- /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 + # The supported attributes for updating a degradation. + class PatchDegradationRequestDataAttributes + include BaseGenericModel + + # The components affected by the degradation. + attr_accessor :components_affected + + # The description of the degradation. + attr_accessor :description + + # The status of the degradation. + attr_accessor :status + + # The title of the degradation. + 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 000000000000..45abc61e9ef5 --- /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 + + # The ID of the component. Must be a component of type `component`. + attr_reader :id + + # + attr_accessor :name + + # The status of the component. + 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' => :'UUID', + :'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 000000000000..7d98541f26ab --- /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 + # The status of the degradation. + 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 000000000000..cbd0e1757a2b --- /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 000000000000..974d466e1c77 --- /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 000000000000..0255d8f5b1f1 --- /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 + + # The supported attributes for updating a status page. + attr_accessor :attributes + + # The ID of the status page. + 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' => :'UUID', + :'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 000000000000..c4dbe6a7d309 --- /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 + # The supported attributes for updating a status page. + class PatchStatusPageRequestDataAttributes + include BaseGenericModel + + # The base64-encoded image data displayed on the status page. + attr_accessor :company_logo + + # The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + attr_accessor :domain_prefix + + # The base64-encoded image data displayed in email notifications sent to status page subscribers. + attr_accessor :email_header_image + + # Whether the status page is enabled. + attr_accessor :enabled + + # The base64-encoded image data displayed in the browser tab. + attr_accessor :favicon + + # The name of the status page. + attr_accessor :name + + # Whether users can subscribe to the status page. + attr_accessor :subscriptions_enabled + + # The type of the status page controlling how the status page is accessed. + attr_accessor :type + + # The visualization type of the status page. + 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 000000000000..59c15062ae11 --- /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 + + # The included related resources of a status page. Client must explicitly request these resources by name in the `include` query parameter. + 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 000000000000..bfa5eefd91f1 --- /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 + + # The included related resources of a status page. Client must explicitly request these resources by name in the `include` query parameter. + attr_accessor :included + + # Response metadata. + 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 000000000000..a20c5e2d0a0f --- /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 000000000000..3dc6b3c65233 --- /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 + # The included status page resource. + class StatusPageAsIncluded + include BaseGenericModel + + # The attributes of a status page. + attr_accessor :attributes + + # The ID of the status page. + attr_accessor :id + + # The relationships of a status page. + 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' => :'UUID', + :'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 000000000000..10f74e7c3fa4 --- /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 + # The attributes of a status page. + class StatusPageAsIncludedAttributes + include BaseGenericModel + + # The base64-encoded image data displayed in the company logo. + attr_accessor :company_logo + + # Components displayed on the status page. + attr_accessor :components + + # Timestamp of when the status page was created. + attr_accessor :created_at + + # If configured, the url that the status page is accessible at. + attr_accessor :custom_domain + + # Whether the custom domain is configured. + attr_accessor :custom_domain_enabled + + # The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + attr_accessor :domain_prefix + + # Base64-encoded image data included in email notifications sent to status page subscribers. + attr_accessor :email_header_image + + # Whether the status page is enabled. + attr_accessor :enabled + + # Base64-encoded image data displayed in the browser tab. + attr_accessor :favicon + + # Timestamp of when the status page was last modified. + attr_accessor :modified_at + + # The name of the status page. + attr_accessor :name + + # The url that the status page is accessible at. + attr_accessor :page_url + + # Whether users can subscribe to the status page. + attr_accessor :subscriptions_enabled + + # The type of the status page controlling how the status page is accessed. + attr_accessor :type + + # The visualization type of the status page. + 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 000000000000..67f09ec940a1 --- /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 + + # The ID of the component. + attr_accessor :id + + # The name of the component. + attr_accessor :name + + # The zero-indexed position of the component. + attr_accessor :position + + # The status of the component. + attr_accessor :status + + # The type of the component. + 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' => :'UUID', + :'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 000000000000..4a814d7e3e88 --- /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 + + # The ID of the grouped component. + attr_accessor :id + + # The name of the grouped component. + attr_accessor :name + + # The zero-indexed position of the grouped component. Relative to the other components in the group. + attr_accessor :position + + # The status of the component. + attr_accessor :status + + # The type of the component. + 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' => :'UUID', + :'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 000000000000..5cad57db5c84 --- /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 + # The relationships of a status page. + 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 000000000000..cb444451785c --- /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 000000000000..41269bdadc2f --- /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 + + # The ID of the Datadog user who created the status page. + 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 000000000000..c2ba33c81876 --- /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 000000000000..a5834de4d5ca --- /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 + + # The ID of the Datadog user who last modified the status page. + 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 000000000000..267a7b9a41a7 --- /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 + + # The attributes of a status page. + attr_accessor :attributes + + # The ID of the status page. + attr_accessor :id + + # The relationships of a status page. + 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' => :'UUID', + :'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 000000000000..b95d61b3f1af --- /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 + # The attributes of a status page. + class StatusPageDataAttributes + include BaseGenericModel + + # Base64-encoded image data displayed on the status page. + attr_accessor :company_logo + + # Components displayed on the status page. + attr_accessor :components + + # Timestamp of when the status page was created. + attr_accessor :created_at + + # If configured, the url that the status page is accessible at. + attr_accessor :custom_domain + + # Whether the custom domain is configured. + attr_accessor :custom_domain_enabled + + # The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + attr_accessor :domain_prefix + + # Base64-encoded image data included in email notifications sent to status page subscribers. + attr_accessor :email_header_image + + # Whether the status page is enabled. + attr_accessor :enabled + + # Base64-encoded image data displayed in the browser tab. + attr_accessor :favicon + + # Timestamp of when the status page was last modified. + attr_accessor :modified_at + + # The name of the status page. + attr_accessor :name + + # The url that the status page is accessible at. + attr_accessor :page_url + + # Whether users can subscribe to the status page. + attr_accessor :subscriptions_enabled + + # The type of the status page controlling how the status page is accessed. + attr_accessor :type + + # The visualization type of the status page. + 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 000000000000..9cf613e962f1 --- /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 + + # If the component is of type `group`, the components within the group. + attr_accessor :components + + # The ID of the component. + attr_accessor :id + + # The name of the component. + attr_accessor :name + + # The zero-indexed position of the component. + attr_accessor :position + + # The status of the component. + attr_accessor :status + + # The type of the component. + 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' => :'UUID', + :'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 000000000000..a79cb6be4582 --- /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 + + # The ID of the component. + attr_accessor :id + + # The name of the component. + attr_accessor :name + + # The zero-indexed position of the component. Relative to the other components in the group. + attr_accessor :position + + # The status of the component. + attr_accessor :status + + # The type of the component. + 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' => :'UUID', + :'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 000000000000..c5795cf31c32 --- /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 + # The relationships of a status page. + 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 000000000000..ed7838b7d33d --- /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 000000000000..185c7f9684c6 --- /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 + + # The ID of the Datadog user who created the status page. + 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 000000000000..9033483c42fa --- /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 000000000000..7aa13b91782e --- /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 + + # The ID of the Datadog user who last modified the status page. + 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 000000000000..2d73f9f72803 --- /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 000000000000..3ea6e818f79d --- /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 + + # The included related resources of a component. Client must explicitly request these resources by name in the `include` query parameter. + 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 000000000000..d3bd64e3f551 --- /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 + + # The included related resources of a component. Client must explicitly request these resources by name in the `include` query parameter. + 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 000000000000..b7d9cd906b7b --- /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 000000000000..e9e8811f5115 --- /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 + + # The attributes of a component. + attr_accessor :attributes + + # The ID of the component. + attr_accessor :id + + # The relationships of a component. + 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' => :'UUID', + :'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 000000000000..56fe0bfdbce2 --- /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 + # The attributes of a component. + class StatusPagesComponentDataAttributes + include BaseGenericModel + + # If the component is of type `group`, the components within the group. + attr_accessor :components + + # Timestamp of when the component was created. + attr_accessor :created_at + + # Timestamp of when the component was last modified. + attr_accessor :modified_at + + # The name of the component. + attr_accessor :name + + # The zero-indexed position of the component. + attr_accessor :position + + # The status of the component. + attr_accessor :status + + # The type of the component. + 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 000000000000..37af5996f680 --- /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 + + # The status of the component. + attr_accessor :status + + # The type of the component. + 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' => :'UUID', + :'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 000000000000..ec9f925482a0 --- /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 + # The status of the component. + 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 000000000000..ea309ef5eb0a --- /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 + # The relationships of a component. + 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 000000000000..1f31ff5b1684 --- /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 000000000000..7f105cc7bd00 --- /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 + + # The ID of the Datadog user who created the component. + 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 000000000000..3412cc0aaf6a --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_data_relationships_group.rb @@ -0,0 +1,113 @@ +=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_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' => :'StatusPagesComponentDataRelationshipsGroupData' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'data', + ]) + 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 + + # 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 000000000000..1a69a18746a8 --- /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 + + # The ID of the group the component belongs to. + 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' => :'UUID', + :'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 000000000000..8dc760651faf --- /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 000000000000..c09d49107dc1 --- /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 + + # The ID of the Datadog user who last modified the component. + 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 000000000000..11d1ba721ff1 --- /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 000000000000..63c5304681dc --- /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 + + # The ID of the status page the component belongs to. + 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' => :'UUID', + :'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 000000000000..aa586f7fc2de --- /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 + # The included component group resource. + class StatusPagesComponentGroup + include BaseGenericModel + + # The attributes of a component group. + attr_accessor :attributes + + # The ID of the component. + attr_accessor :id + + # The relationships of a component group. + 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' => :'UUID', + :'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 000000000000..46622c4d96ac --- /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 + # The attributes of a component group. + class StatusPagesComponentGroupAttributes + include BaseGenericModel + + # If the component is of type `group`, the components within the group. + attr_accessor :components + + # Timestamp of when the component was created. + attr_accessor :created_at + + # Timestamp of when the component was last modified. + attr_accessor :modified_at + + # The name of the component. + attr_accessor :name + + # The zero-indexed position of the component. + attr_accessor :position + + # The status of the component. + attr_accessor :status + + # The type of the component. + 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 000000000000..cfdbf1ab5090 --- /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 + + # The ID of the grouped component. + attr_accessor :id + + # The name of the grouped component. + attr_accessor :name + + # The zero-indexed position of the grouped component. Relative to the other components in the group. + attr_accessor :position + + # The status of the component. + attr_accessor :status + + # The type of the component. + 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' => :'UUID', + :'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 000000000000..72fa0230dd71 --- /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 + # The status of the component. + 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 000000000000..612995e44a36 --- /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 + # The type of the component. + 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 000000000000..4c27158a3e18 --- /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 + # The relationships of a component group. + class StatusPagesComponentGroupRelationships + include BaseGenericModel + + # The Datadog user who created the component group. + attr_accessor :created_by_user + + # The group the component group belongs to. + attr_accessor :group + + # The Datadog user who last modified the component group. + attr_accessor :last_modified_by_user + + # The status page the component group belongs to. + 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 000000000000..3ec02e67a01a --- /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 + # The Datadog user who created the component group. + 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 000000000000..22560844783f --- /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 + + # The ID of the Datadog user who created the component group. + 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 000000000000..25fe9bd22623 --- /dev/null +++ b/lib/datadog_api_client/v2/models/status_pages_component_group_relationships_group.rb @@ -0,0 +1,113 @@ +=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 + # The group the component group belongs to. + class StatusPagesComponentGroupRelationshipsGroup + 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' => :'StatusPagesComponentGroupRelationshipsGroupData' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'data', + ]) + 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 + + # 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 000000000000..ced6d4842e45 --- /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' => :'UUID', + :'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 000000000000..1ed871ab3e0f --- /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 + # The Datadog user who last modified the component group. + 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 000000000000..9350546d4326 --- /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 + + # The ID of the Datadog user who last modified the component group. + 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 000000000000..c2ef91905c60 --- /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 + # The status page the component group belongs to. + 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 000000000000..54bfb8fad29d --- /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 + + # The ID of the status page. + 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' => :'UUID', + :'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 000000000000..08e24a65693a --- /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 000000000000..1c3fb63a9e50 --- /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 + # Offset-based pagination schema. + class StatusPagesPagination + include BaseGenericModel + + # Integer representing the offset to fetch the first page of results. + attr_accessor :first_offset + + # Integer representing the offset to fetch the last page of results. + 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 + + # Integer representing the index of the first element in the previous page of results. + 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 000000000000..bdcf93215f26 --- /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 000000000000..e4e78f8d925e --- /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 + # Response metadata. + class StatusPagesResponseMeta + include BaseGenericModel + + # Offset-based pagination schema. + 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 000000000000..ab54da1668ed --- /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 + # The included Datadog user resource. + class StatusPagesUser + include BaseGenericModel + + # Attributes of the Datadog user. + attr_accessor :attributes + + # The ID of the Datadog user. + 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' => :'UUID', + :'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 000000000000..d14f3c98cf8a --- /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 + # Attributes of the Datadog user. + class StatusPagesUserAttributes + include BaseGenericModel + + # The email of the Datadog user. + attr_accessor :email + + # The handle of the Datadog user. + attr_accessor :handle + + # The icon of the Datadog user. + attr_accessor :icon + + # The name of the Datadog user. + attr_accessor :name + + # The UUID of the Datadog user. + 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 000000000000..cce7e11c7d56 --- /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 From dae81b6275f7a4da26407945dc040ea967af16a8 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 20:38:43 +0000 Subject: [PATCH 5/5] [NO JIRA] Fix failing suppression tests due to long suppression names (#2930) Co-authored-by: ci.datadog-api-spec --- ...uppression-rule-returns-OK-response.frozen | 2 +- ...a-suppression-rule-returns-OK-response.yml | 22 ++++----- ...uppression-rule-returns-OK-response.frozen | 2 +- ...a-suppression-rule-returns-OK-response.yml | 26 +++++------ ...version-history-returns-OK-response.frozen | 2 +- ...-s-version-history-returns-OK-response.yml | 26 +++++------ ...returns-OK-response-with-pagination.frozen | 2 +- ...es-returns-OK-response-with-pagination.yml | 42 +++++++++-------- ...rns-OK-response-with-sort-ascending.frozen | 2 +- ...eturns-OK-response-with-sort-ascending.yml | 46 +++++++++++-------- ...ns-OK-response-with-sort-descending.frozen | 2 +- ...turns-OK-response-with-sort-descending.yml | 46 +++++++++++-------- ...uppression-rule-returns-OK-response.frozen | 2 +- ...a-suppression-rule-returns-OK-response.yml | 28 +++++------ features/v2/given.json | 4 +- features/v2/security_monitoring.feature | 4 +- 16 files changed, 140 insertions(+), 118 deletions(-) diff --git a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen index ec35b858851a..e97b2eea30e7 100644 --- a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:03.168Z \ No newline at end of file +2026-01-21T15:35:04.231Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml index 37f25710f244..8c62a5d7c477 100644 --- a/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Delete-a-suppression-rule-returns-OK-response.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:03 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:04 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Delete_a_suppression_rule_returns_OK_response-1768411743","enabled":true,"name":"suppression - Test-Delete_a_suppression_rule_returns_OK_response-1768411743","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Delete_a_suppression_rule_returns_OK_response-1769009704","enabled":true,"name":"suppression + cf0b1697c5006472","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,9 +15,9 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"itm-ljs-0qw","type":"suppressions","attributes":{"creation_date":1768411744411,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Delete_a_suppression_rule_returns_OK_response-1768411743","editable":true,"enabled":true,"name":"suppression - Test-Delete_a_suppression_rule_returns_OK_response-1768411743","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744411,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"9e0-jx9-qxd","type":"suppressions","attributes":{"creation_date":1769009705137,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Delete_a_suppression_rule_returns_OK_response-1769009704","editable":true,"enabled":true,"name":"suppression + cf0b1697c5006472","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009705137,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -25,14 +25,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:03 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:04 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/9e0-jx9-qxd response: body: encoding: UTF-8 @@ -41,18 +41,18 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Wed, 14 Jan 2026 17:29:03 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:04 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/itm-ljs-0qw + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/9e0-jx9-qxd response: body: encoding: UTF-8 - string: '{"errors":["not_found(Suppression with ID itm-ljs-0qw not found)"]}' + string: '{"errors":["not_found(Suppression with ID 9e0-jx9-qxd not found)"]}' headers: Content-Type: - application/json diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen index 16f1a15eddce..1587aa37ce9c 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:04.856Z \ No newline at end of file +2026-01-21T15:35:05.393Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml index 6021eaad9675..88c21e061972 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-rule-returns-OK-response.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:04 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:05 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","enabled":true,"name":"suppression - Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_rule_returns_OK_response-1769009705","enabled":true,"name":"suppression + 561a22ed12317d7c","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,9 +15,9 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"xno-kwg-8df","type":"suppressions","attributes":{"creation_date":1768411744987,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","editable":true,"enabled":true,"name":"suppression - Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744987,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"k8l-r8a-pfs","type":"suppressions","attributes":{"creation_date":1769009705474,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1769009705","editable":true,"enabled":true,"name":"suppression + 561a22ed12317d7c","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009705474,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -25,20 +25,20 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:04 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:05 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/k8l-r8a-pfs response: body: encoding: UTF-8 - string: '{"data":{"id":"xno-kwg-8df","type":"suppressions","attributes":{"creation_date":1768411744987,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1768411744","editable":true,"enabled":true,"name":"suppression - Test-Get_a_suppression_rule_returns_OK_response-1768411744","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411744987,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"k8l-r8a-pfs","type":"suppressions","attributes":{"creation_date":1769009705474,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_rule_returns_OK_response-1769009705","editable":true,"enabled":true,"name":"suppression + 561a22ed12317d7c","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009705474,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -46,14 +46,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:04 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:05 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/xno-kwg-8df + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/k8l-r8a-pfs response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen index 669132641329..f398064da836 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:05.317Z \ No newline at end of file +2026-01-21T15:35:05.712Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml index 26e1a51de103..e58361c94c1c 100644 --- a/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Get-a-suppression-s-version-history-returns-OK-response.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:05 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","enabled":true,"name":"suppression - Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1769009705","enabled":true,"name":"suppression + ee42c68404916b9e","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,9 +15,9 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"sro-unv-k08","type":"suppressions","attributes":{"creation_date":1768411745430,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression - Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411745430,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"joc-mpc-lbz","type":"suppressions","attributes":{"creation_date":1769009705785,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1769009705","editable":true,"enabled":true,"name":"suppression + ee42c68404916b9e","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009705785,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -25,35 +25,35 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:05 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08/version_history + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/joc-mpc-lbz/version_history response: body: encoding: UTF-8 - string: '{"data":{"id":"sro-unv-k08","type":"suppression_version_history","attributes":{"count":1,"data":{"1":{"suppression":{"id":"sro-unv-k08","name":"suppression - Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","enabled":true,"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","data_exclusion_query":"","version":1,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"joc-mpc-lbz","type":"suppression_version_history","attributes":{"count":1,"data":{"1":{"suppression":{"id":"joc-mpc-lbz","name":"suppression + ee42c68404916b9e","enabled":true,"description":"Test-Get_a_suppression_s_version_history_returns_OK_response-1769009705","rule_query":"source:cloudtrail","suppression_query":"env:test","data_exclusion_query":"","version":1,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"creation_date":1768411745430,"update_date":1768411745430,"editable":true,"tags":["source:cloudtrail","technique:T1110-brute-force"]},"changes":[]}}}}}' + Account"},"creation_date":1769009705785,"update_date":1769009705785,"editable":true,"tags":["source:cloudtrail","technique:T1110-brute-force"]},"changes":[]}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:05 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/sro-unv-k08 + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/joc-mpc-lbz response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen index 23cdf460db77..cbc0a8127fd1 100644 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen +++ b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.frozen @@ -1 +1 @@ -2026-01-14T17:12:28.523Z \ No newline at end of file +2026-01-21T15:35:06.001Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml index 5d0f6038306e..bd34ece86776 100644 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml +++ b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-pagination.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:06 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1769009706","enabled":true,"name":"suppression + 5a71acf7699e3a9e","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,20 +15,22 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"fgz-hyr-ibu","type":"suppressions","attributes":{"creation_date":1768410748883,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410748883,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + string: '{"data":{"id":"dgv-9mh-i77","type":"suppressions","attributes":{"creation_date":1769009706064,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1769009706","editable":true,"enabled":true,"name":"suppression + 5a71acf7699e3a9e","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009706064,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:06 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1769009706","enabled":true,"name":"suppression2 + 5a71acf7699e3a9e","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -39,41 +41,45 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"lgh-7no-380","type":"suppressions","attributes":{"creation_date":1768410749324,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410749324,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + string: '{"data":{"id":"23j-s8c-mlt","type":"suppressions","attributes":{"creation_date":1769009706152,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1769009706","editable":true,"enabled":true,"name":"suppression2 + 5a71acf7699e3a9e","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009706152,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:06 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?page%5Bsize%5D=1&page%5Bnumber%5D=0&query=id%3Afgz-hyr-ibu%20OR%20id%3Algh-7no-380 + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?page%5Bsize%5D=1&page%5Bnumber%5D=0&query=id%3Adgv-9mh-i77%20OR%20id%3A23j-s8c-mlt response: body: encoding: UTF-8 - string: '{"data":[{"id":"fgz-hyr-ibu","type":"suppressions","attributes":{"creation_date":1768410748883,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1768410748","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410748883,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":1,"pageNumber":0}}}' + string: '{"data":[{"id":"dgv-9mh-i77","type":"suppressions","attributes":{"creation_date":1769009706064,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_pagination-1769009706","editable":true,"enabled":true,"name":"suppression + 5a71acf7699e3a9e","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009706064,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":1,"pageNumber":0}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:06 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/lgh-7no-380 + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/23j-s8c-mlt response: body: encoding: UTF-8 @@ -82,14 +88,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Wed, 14 Jan 2026 17:12:28 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:06 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/fgz-hyr-ibu + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/dgv-9mh-i77 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen index 89bfc8cd8ef8..dac8fbb4d4ac 100644 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen +++ b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.frozen @@ -1 +1 @@ -2026-01-14T17:12:30.925Z \ No newline at end of file +2026-01-21T15:35:06.453Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml index 0e765861acf4..1e4064efba78 100644 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml +++ b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-ascending.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:06 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1769009706","enabled":true,"name":"suppression + 9acb44c7d1cc0bd2","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,20 +15,22 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"5cq-vnw-eza","type":"suppressions","attributes":{"creation_date":1768410751276,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751276,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + string: '{"data":{"id":"x91-nfr-3ws","type":"suppressions","attributes":{"creation_date":1769009706525,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1769009706","editable":true,"enabled":true,"name":"suppression + 9acb44c7d1cc0bd2","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009706525,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:06 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1769009706","enabled":true,"name":"suppression2 + 9acb44c7d1cc0bd2","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -39,42 +41,48 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"fuu-xxd-kjd","type":"suppressions","attributes":{"creation_date":1768410751710,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751710,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + string: '{"data":{"id":"4ni-qbs-lxd","type":"suppressions","attributes":{"creation_date":1769009706684,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1769009706","editable":true,"enabled":true,"name":"suppression2 + 9acb44c7d1cc0bd2","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009706684,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:06 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?sort=name&query=id%3A5cq-vnw-eza%20OR%20id%3Afuu-xxd-kjd + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?sort=name&query=id%3Ax91-nfr-3ws%20OR%20id%3A4ni-qbs-lxd response: body: encoding: UTF-8 - string: '{"data":[{"id":"5cq-vnw-eza","type":"suppressions","attributes":{"creation_date":1768410751276,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751276,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}},{"id":"fuu-xxd-kjd","type":"suppressions","attributes":{"creation_date":1768410751710,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1768410750","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410751710,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":2,"pageNumber":0}}}' + string: '{"data":[{"id":"x91-nfr-3ws","type":"suppressions","attributes":{"creation_date":1769009706525,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1769009706","editable":true,"enabled":true,"name":"suppression + 9acb44c7d1cc0bd2","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009706525,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}},{"id":"4ni-qbs-lxd","type":"suppressions","attributes":{"creation_date":1769009706684,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_ascending-1769009706","editable":true,"enabled":true,"name":"suppression2 + 9acb44c7d1cc0bd2","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009706684,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":2,"pageNumber":0}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:06 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/fuu-xxd-kjd + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/4ni-qbs-lxd response: body: encoding: UTF-8 @@ -83,14 +91,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Wed, 14 Jan 2026 17:12:30 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:06 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/5cq-vnw-eza + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/x91-nfr-3ws response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen index d184a46ea082..ef4d4a296f21 100644 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen +++ b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.frozen @@ -1 +1 @@ -2026-01-14T17:12:33.088Z \ No newline at end of file +2026-01-21T15:35:07.003Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml index 8b1f589c4673..a8ef276be464 100644 --- a/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml +++ b/cassettes/features/v2/security_monitoring/Get-all-suppression-rules-returns-OK-response-with-sort-descending.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:07 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707","enabled":true,"name":"suppression + 4668d111f32d9934","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,20 +15,22 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"osw-qyf-tqn","type":"suppressions","attributes":{"creation_date":1768410753455,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753455,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + string: '{"data":{"id":"mru-avx-npf","type":"suppressions","attributes":{"creation_date":1769009707069,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707","editable":true,"enabled":true,"name":"suppression + 4668d111f32d9934","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009707069,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:07 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707","enabled":true,"name":"suppression2 + 4668d111f32d9934","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -39,42 +41,48 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"pe9-gdi-ee2","type":"suppressions","attributes":{"creation_date":1768410753872,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753872,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}}' + string: '{"data":{"id":"qjl-xxu-vlo","type":"suppressions","attributes":{"creation_date":1769009707163,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707","editable":true,"enabled":true,"name":"suppression2 + 4668d111f32d9934","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009707163,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:07 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?sort=-name&query=id%3Aosw-qyf-tqn%20OR%20id%3Ape9-gdi-ee2 + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions?sort=-name&query=id%3Amru-avx-npf%20OR%20id%3Aqjl-xxu-vlo response: body: encoding: UTF-8 - string: '{"data":[{"id":"pe9-gdi-ee2","type":"suppressions","attributes":{"creation_date":1768410753872,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression2 - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753872,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}},{"id":"osw-qyf-tqn","type":"suppressions","attributes":{"creation_date":1768410753455,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","editable":true,"enabled":true,"name":"suppression - Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1768410753","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768410753455,"updater":{"handle":"frog@datadoghq.com","name":"frog"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":2,"pageNumber":0}}}' + string: '{"data":[{"id":"qjl-xxu-vlo","type":"suppressions","attributes":{"creation_date":1769009707163,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707","editable":true,"enabled":true,"name":"suppression2 + 4668d111f32d9934","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009707163,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}},{"id":"mru-avx-npf","type":"suppressions","attributes":{"creation_date":1769009707069,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707","editable":true,"enabled":true,"name":"suppression + 4668d111f32d9934","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009707069,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"version":1}}],"meta":{"page":{"totalCount":2,"pageSize":2,"pageNumber":0}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:07 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/pe9-gdi-ee2 + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/qjl-xxu-vlo response: body: encoding: UTF-8 @@ -83,14 +91,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Wed, 14 Jan 2026 17:12:33 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:07 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/osw-qyf-tqn + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/mru-avx-npf response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen index e05f55dd7103..efe791d5186d 100644 --- a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-14T17:29:05.825Z \ No newline at end of file +2026-01-21T15:35:07.497Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml index 55f2cb1ff7b6..38b8bcc4a349 100644 --- a/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Update-a-suppression-rule-returns-OK-response.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:07 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","enabled":true,"name":"suppression - Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' + string: '{"data":{"attributes":{"description":"Test-Update_a_suppression_rule_returns_OK_response-1769009707","enabled":true,"name":"suppression + 181539185fcb1be7","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["technique:T1110-brute-force","source:cloudtrail"]},"type":"suppressions"}}' headers: Accept: - application/json @@ -15,9 +15,9 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"ucv-bpf-4bc","type":"suppressions","attributes":{"creation_date":1768411745950,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression - Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411745950,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"h6t-xj1-5jw","type":"suppressions","attributes":{"creation_date":1769009707555,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1769009707","editable":true,"enabled":true,"name":"suppression + 181539185fcb1be7","rule_query":"source:cloudtrail","suppression_query":"env:test","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009707555,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":1}}}' headers: Content-Type: @@ -25,7 +25,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:07 GMT request: body: encoding: UTF-8 @@ -36,14 +36,14 @@ http_interactions: Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/h6t-xj1-5jw response: body: encoding: UTF-8 - string: '{"data":{"id":"ucv-bpf-4bc","type":"suppressions","attributes":{"creation_date":1768411745950,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1768411745","editable":true,"enabled":true,"name":"suppression - Test-Update_a_suppression_rule_returns_OK_response-1768411745","rule_query":"source:cloudtrail","suppression_query":"env:staging - status:low","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1768411746111,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"h6t-xj1-5jw","type":"suppressions","attributes":{"creation_date":1769009707555,"creator":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"data_exclusion_query":"","description":"Test-Update_a_suppression_rule_returns_OK_response-1769009707","editable":true,"enabled":true,"name":"suppression + 181539185fcb1be7","rule_query":"source:cloudtrail","suppression_query":"env:staging + status:low","tags":["source:cloudtrail","technique:T1110-brute-force"],"update_date":1769009707651,"updater":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account"},"version":2}}}' headers: Content-Type: @@ -51,14 +51,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 14 Jan 2026 17:29:05 GMT +- recorded_at: Wed, 21 Jan 2026 15:35:07 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ucv-bpf-4bc + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/h6t-xj1-5jw response: body: encoding: UTF-8 diff --git a/features/v2/given.json b/features/v2/given.json index c7911aa317cf..c237924a73ce 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1035,7 +1035,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"suppression {{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"suppression {{ unique_hash }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" } ], "step": "there is a valid \"suppression\" in the system", @@ -1047,7 +1047,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"suppression2 {{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"suppression2 {{ unique_hash }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}" } ], "step": "there is a valid \"suppression2\" in the system", diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 1ce71f3d3403..32722676fab8 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -1167,7 +1167,7 @@ Feature: Security Monitoring And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" When the request is sent Then the response status is 200 OK - And the response "data[0].attributes.name" is equal to "suppression {{ unique }}" + And the response "data[0].attributes.name" is equal to "suppression {{ unique_hash }}" @team:DataDog/k9-cloud-security-platform Scenario: Get all suppression rules returns "OK" response with sort descending @@ -1178,7 +1178,7 @@ Feature: Security Monitoring And request contains "query" parameter with value "id:{{ suppression.data.id }} OR id:{{ suppression2.data.id }}" When the request is sent Then the response status is 200 OK - And the response "data[0].attributes.name" is equal to "suppression2 {{ unique }}" + And the response "data[0].attributes.name" is equal to "suppression2 {{ unique_hash }}" @skip @team:DataDog/k9-cloud-security-platform Scenario: Get critical assets affecting a specific rule returns "Not Found" response