diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 51127c3aea27..65d674fb23d1 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -22843,7 +22843,6 @@ components: status: $ref: "#/components/schemas/CreateMaintenanceRequestDataAttributesUpdatesItemsStatus" required: - - components_affected - description - started_at - status @@ -23789,7 +23788,6 @@ components: example: "API Maintenance" type: string required: - - components_affected - title - completed_date - completed_description @@ -24472,6 +24470,9 @@ components: 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. + type: boolean favicon: description: Base64-encoded image data displayed in the browser tab. example: data:image/png;base64,kWMRNw0KGgoAAAANSUhEUgAAAEAAAABACA @@ -24480,6 +24481,12 @@ components: description: The name of the status page. example: Status Page US1 type: string + slack_app_icon: + description: The Slack app icon URL for the status page. + type: string + slack_subscriptions_enabled: + description: Whether Slack subscriptions are enabled for the status page. + type: boolean subscriptions_enabled: description: Whether users can subscribe to the status page. example: true @@ -29747,6 +29754,12 @@ components: format: date-time readOnly: true type: string + deleted_at: + description: The date and time the resource was deleted. + type: string + deleted_by_user_uuid: + description: UUID of the user who deleted the resource. + type: string description: description: Description of the update. type: string @@ -29871,6 +29884,162 @@ components: oneOf: - $ref: "#/components/schemas/StatusPagesUser" - $ref: "#/components/schemas/StatusPageAsIncluded" + DegradationUpdate: + description: Response object for a degradation update. + properties: + data: + $ref: "#/components/schemas/DegradationUpdateData" + included: + description: Resources related to the degradation update. + items: + $ref: "#/components/schemas/DegradationUpdateIncluded" + type: array + type: object + DegradationUpdateData: + description: The data object for a degradation update. + properties: + attributes: + $ref: "#/components/schemas/DegradationUpdateDataAttributes" + id: + description: The ID of the degradation update. + type: string + relationships: + $ref: "#/components/schemas/DegradationUpdateDataRelationships" + type: + $ref: "#/components/schemas/PatchDegradationUpdateRequestDataType" + required: + - type + type: object + DegradationUpdateDataAttributes: + description: Attributes of a degradation update resource. + properties: + components_affected: + description: Components affected by this update. + items: + $ref: "#/components/schemas/DegradationUpdateDataAttributesComponentsAffectedItems" + type: array + created_at: + description: The date and time the update was created. + format: date-time + type: string + deleted_at: + description: The date and time the update was soft-deleted. + format: date-time + type: string + description: + description: The message body of the update. + type: string + modified_at: + description: The date and time the update was last modified. + format: date-time + type: string + started_at: + description: The date and time the update started. + format: date-time + type: string + status: + $ref: "#/components/schemas/CreateDegradationRequestDataAttributesStatus" + type: object + DegradationUpdateDataAttributesComponentsAffectedItems: + description: A component affected by a degradation update. + properties: + id: + description: The ID of the affected component. + example: "" + type: string + name: + description: The name of the affected component. + readOnly: true + type: string + status: + $ref: "#/components/schemas/StatusPagesComponentDataAttributesStatus" + required: + - id + - status + type: object + DegradationUpdateDataRelationships: + description: Relationships of a degradation update resource. + properties: + created_by_user: + $ref: "#/components/schemas/DegradationUpdateDataRelationshipsUser" + degradation: + $ref: "#/components/schemas/DegradationUpdateDataRelationshipsDegradation" + deleted_by_user: + $ref: "#/components/schemas/DegradationUpdateDataRelationshipsUser" + last_modified_by_user: + $ref: "#/components/schemas/DegradationUpdateDataRelationshipsUser" + status_page: + $ref: "#/components/schemas/DegradationUpdateDataRelationshipsStatusPage" + type: object + DegradationUpdateDataRelationshipsDegradation: + description: The degradation relationship of a degradation update. + properties: + data: + $ref: "#/components/schemas/DegradationUpdateDataRelationshipsDegradationData" + required: + - data + type: object + DegradationUpdateDataRelationshipsDegradationData: + description: The degradation linked to a degradation update. + properties: + id: + description: The ID of the degradation. + example: "" + type: string + type: + $ref: "#/components/schemas/PatchDegradationRequestDataType" + required: + - type + - id + type: object + DegradationUpdateDataRelationshipsStatusPage: + description: The status page relationship of a degradation update. + properties: + data: + $ref: "#/components/schemas/DegradationUpdateDataRelationshipsStatusPageData" + required: + - data + type: object + DegradationUpdateDataRelationshipsStatusPageData: + description: The status page linked to a degradation update. + properties: + id: + description: The ID of the status page. + example: "" + type: string + type: + $ref: "#/components/schemas/StatusPageDataType" + required: + - type + - id + type: object + DegradationUpdateDataRelationshipsUser: + description: A user relationship of a degradation update. + properties: + data: + $ref: "#/components/schemas/DegradationUpdateDataRelationshipsUserData" + required: + - data + type: object + DegradationUpdateDataRelationshipsUserData: + description: A Datadog user linked to a degradation update. + properties: + id: + description: The ID of the user. + example: "" + type: string + type: + $ref: "#/components/schemas/StatusPagesUserType" + required: + - type + - id + type: object + DegradationUpdateIncluded: + description: Resources included in a degradation update response. + oneOf: + - $ref: "#/components/schemas/StatusPagesUser" + - $ref: "#/components/schemas/Degradation" + - $ref: "#/components/schemas/StatusPageAsIncluded" DeleteAppResponse: description: The response object after an app is successfully deleted. properties: @@ -71960,6 +72129,61 @@ components: type: string x-enum-varnames: - DEGRADATIONS + PatchDegradationUpdateRequest: + description: Request object for editing a degradation update. + example: + data: + attributes: + description: We've identified the source of the latency increase and are deploying a fix. + status: identified + id: 00000000-0000-0000-0000-000000000000 + type: degradation_updates + properties: + data: + $ref: "#/components/schemas/PatchDegradationUpdateRequestData" + type: object + PatchDegradationUpdateRequestData: + description: The data object for editing a degradation update. + properties: + attributes: + $ref: "#/components/schemas/PatchDegradationUpdateRequestDataAttributes" + id: + description: The ID of the degradation update to edit. + type: string + type: + $ref: "#/components/schemas/PatchDegradationUpdateRequestDataType" + required: + - type + type: object + PatchDegradationUpdateRequestDataAttributes: + description: Attributes for editing a degradation update. + properties: + description: + description: The message body of the update. + type: string + status: + $ref: "#/components/schemas/PatchDegradationUpdateRequestDataAttributesStatus" + type: object + PatchDegradationUpdateRequestDataAttributesStatus: + description: The status of the degradation update. + enum: + - investigating + - identified + - monitoring + type: string + x-enum-varnames: + - INVESTIGATING + - IDENTIFIED + - MONITORING + PatchDegradationUpdateRequestDataType: + default: degradation_updates + description: Degradation updates resource type. + enum: + - degradation_updates + example: degradation_updates + type: string + x-enum-varnames: + - DEGRADATION_UPDATES PatchIncidentNotificationTemplateRequest: description: Update request for a notification template. properties: @@ -72174,6 +72398,12 @@ components: description: The name of the status page. example: Status Page US1 type: string + slack_app_icon: + description: The Slack app icon URL for the status page. + type: string + slack_subscriptions_enabled: + description: Whether Slack subscriptions are enabled for the status page. + type: boolean subscriptions_enabled: description: Whether users can subscribe to the status page. example: true @@ -93878,6 +94108,12 @@ components: page_url: description: The url that the status page is accessible at. type: string + slack_app_icon: + description: The Slack app icon URL for the status page. + type: string + slack_subscriptions_enabled: + description: Whether Slack subscriptions are enabled for the status page. + type: boolean subscriptions_enabled: description: Whether users can subscribe to the status page. type: boolean @@ -94046,6 +94282,12 @@ components: page_url: description: The url that the status page is accessible at. type: string + slack_app_icon: + description: The Slack app icon URL for the status page. + type: string + slack_subscriptions_enabled: + description: Whether Slack subscriptions are enabled for the status page. + type: boolean subscriptions_enabled: description: Whether users can subscribe to the status page. type: boolean @@ -102668,14 +102910,26 @@ components: description: Whether Auto Test Retries are enabled for this service. example: false type: boolean + auto_test_retries_enabled_is_overridden: + description: Whether the Auto Test Retries setting is overridden at the service level. + example: false + type: boolean code_coverage_enabled: description: Whether Code Coverage is enabled for this service. example: false type: boolean + code_coverage_enabled_is_overridden: + description: Whether the Code Coverage setting is overridden at the service level. + example: false + type: boolean early_flake_detection_enabled: description: Whether Early Flake Detection is enabled for this service. example: false type: boolean + early_flake_detection_enabled_is_overridden: + description: Whether the Early Flake Detection setting is overridden at the service level. + example: false + type: boolean env: description: The environment name. example: prod @@ -102684,9 +102938,13 @@ components: description: Whether Failed Test Replay is enabled for this service. example: false type: boolean + failed_test_replay_enabled_is_overridden: + description: Whether the Failed Test Replay setting is overridden at the service level. + example: false + type: boolean pr_comments_enabled: - description: Whether PR Comments are enabled for this service. - example: true + description: Whether PR Comments are enabled. This value reflects the repository-level setting and cannot be overridden at the service level. + example: false type: boolean repository_id: description: The repository identifier. @@ -102698,7 +102956,11 @@ components: type: string test_impact_analysis_enabled: description: Whether Test Impact Analysis is enabled for this service. - example: false + example: true + type: boolean + test_impact_analysis_enabled_is_overridden: + description: Whether the Test Impact Analysis setting is overridden at the service level. + example: true type: boolean type: object TestOptimizationServiceSettingsData: @@ -102708,7 +102970,7 @@ components: $ref: "#/components/schemas/TestOptimizationServiceSettingsAttributes" id: description: Unique identifier for the service settings. - example: github.com/datadog/shopist::shopist::prod + example: 9b8a7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d type: string type: $ref: "#/components/schemas/TestOptimizationServiceSettingsType" @@ -102751,17 +103013,30 @@ components: description: |- Attributes for updating Test Optimization service settings. All non-required fields are optional; only provided fields will be updated. + Setting a field to `null` is a no-op. To reset a setting to inherit from the repository level, use the corresponding `_inherit` field. properties: auto_test_retries_enabled: - description: Whether Auto Test Retries are enabled for this service. + description: Whether Auto Test Retries are enabled for this service. Setting to `null` is a no-op; use `auto_test_retries_enabled_inherit` to reset to repository-level inheritance. + example: false + type: boolean + auto_test_retries_enabled_inherit: + description: When `true`, resets the Auto Test Retries setting to inherit from the repository level. example: false type: boolean code_coverage_enabled: - description: Whether Code Coverage is enabled for this service. + description: Whether Code Coverage is enabled for this service. Setting to `null` is a no-op; use `code_coverage_enabled_inherit` to reset to repository-level inheritance. + example: false + type: boolean + code_coverage_enabled_inherit: + description: When `true`, resets the Code Coverage setting to inherit from the repository level. example: false type: boolean early_flake_detection_enabled: - description: Whether Early Flake Detection is enabled for this service. + description: Whether Early Flake Detection is enabled for this service. Setting to `null` is a no-op; use `early_flake_detection_enabled_inherit` to reset to repository-level inheritance. + example: false + type: boolean + early_flake_detection_enabled_inherit: + description: When `true`, resets the Early Flake Detection setting to inherit from the repository level. example: false type: boolean env: @@ -102769,12 +103044,16 @@ components: example: prod type: string failed_test_replay_enabled: - description: Whether Failed Test Replay is enabled for this service. + description: Whether Failed Test Replay is enabled for this service. Setting to `null` is a no-op; use `failed_test_replay_enabled_inherit` to reset to repository-level inheritance. + example: false + type: boolean + failed_test_replay_enabled_inherit: + description: When `true`, resets the Failed Test Replay setting to inherit from the repository level. example: false type: boolean pr_comments_enabled: - description: Whether PR Comments are enabled for this service. - example: true + description: This field is ignored. PR Comments cannot be overridden at the service level. + example: false type: boolean repository_id: description: The repository identifier. @@ -102787,8 +103066,12 @@ components: minLength: 1 type: string test_impact_analysis_enabled: - description: Whether Test Impact Analysis is enabled for this service. - example: false + description: Whether Test Impact Analysis is enabled for this service. Setting to `null` is a no-op; use `test_impact_analysis_enabled_inherit` to reset to repository-level inheritance. + example: true + type: boolean + test_impact_analysis_enabled_inherit: + description: When `true`, resets the Test Impact Analysis setting to inherit from the repository level. + example: true type: boolean required: - repository_id @@ -120870,7 +121153,9 @@ paths: patch: description: |- Partially update Test Optimization settings for a specific service identified by repository, service name, and environment. - Only provided fields are updated; null or omitted fields are left unchanged. + Only provided fields are updated; setting a field to `null` is a no-op. + To reset a setting to inherit from the repository level, use the corresponding `_inherit` field. + The `pr_comments_enabled` field is ignored as it cannot be overridden at the service level. operationId: UpdateTestOptimizationServiceSettings requestBody: content: @@ -120880,15 +121165,10 @@ paths: value: data: attributes: - auto_test_retries_enabled: false - code_coverage_enabled: false - early_flake_detection_enabled: false env: prod - failed_test_replay_enabled: false - pr_comments_enabled: true repository_id: github.com/datadog/test-service service_name: test-service - test_impact_analysis_enabled: false + test_impact_analysis_enabled_inherit: true type: test_optimization_update_service_settings_request schema: $ref: "#/components/schemas/TestOptimizationUpdateServiceSettingsRequest" @@ -120903,15 +121183,20 @@ paths: data: attributes: auto_test_retries_enabled: false + auto_test_retries_enabled_is_overridden: false code_coverage_enabled: false + code_coverage_enabled_is_overridden: false early_flake_detection_enabled: false + early_flake_detection_enabled_is_overridden: false env: prod failed_test_replay_enabled: false - pr_comments_enabled: true + failed_test_replay_enabled_is_overridden: false + pr_comments_enabled: false repository_id: github.com/datadog/test-service service_name: test-service - test_impact_analysis_enabled: false - id: github.com/datadog/test-service::test-service::prod + test_impact_analysis_enabled: true + test_impact_analysis_enabled_is_overridden: true + id: 9b8a7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d type: test_optimization_service_settings schema: $ref: "#/components/schemas/TestOptimizationServiceSettingsResponse" @@ -120965,15 +121250,20 @@ paths: data: attributes: auto_test_retries_enabled: false + auto_test_retries_enabled_is_overridden: false code_coverage_enabled: false + code_coverage_enabled_is_overridden: false early_flake_detection_enabled: false + early_flake_detection_enabled_is_overridden: false env: prod failed_test_replay_enabled: false - pr_comments_enabled: true + failed_test_replay_enabled_is_overridden: false + pr_comments_enabled: false repository_id: github.com/datadog/test-service service_name: test-service - test_impact_analysis_enabled: false - id: github.com/datadog/test-service::test-service::prod + test_impact_analysis_enabled: true + test_impact_analysis_enabled_is_overridden: true + id: 9b8a7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d type: test_optimization_service_settings schema: $ref: "#/components/schemas/TestOptimizationServiceSettingsResponse" @@ -182940,7 +183230,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_read summary: List status pages tags: - Status Pages @@ -183020,7 +183311,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_write summary: Create status page tags: - Status Pages @@ -183093,7 +183385,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_read summary: List degradations tags: - Status Pages @@ -183167,7 +183460,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_read summary: List maintenances tags: - Status Pages @@ -183196,7 +183490,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_write summary: Delete status page tags: - Status Pages @@ -183247,7 +183542,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_read summary: Get status page tags: - Status Pages @@ -183326,7 +183622,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_write summary: Update status page tags: - Status Pages @@ -183375,7 +183672,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_read summary: List components tags: - Status Pages @@ -183441,7 +183739,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_write summary: Create component tags: - Status Pages @@ -183478,7 +183777,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_write summary: Delete component tags: - Status Pages @@ -183534,7 +183834,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_read summary: Get component tags: - Status Pages @@ -183605,7 +183906,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_write summary: Update component tags: - Status Pages @@ -183683,7 +183985,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_incident_write summary: Create degradation tags: - Status Pages @@ -183762,7 +184065,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_incident_write summary: Create backfilled degradation tags: - Status Pages @@ -183799,7 +184103,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_incident_write summary: Delete degradation tags: - Status Pages @@ -183860,7 +184165,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_read summary: Get degradation tags: - Status Pages @@ -183946,7 +184252,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_incident_write summary: Update degradation tags: - Status Pages @@ -183954,6 +184261,116 @@ paths: operator: AND permissions: - status_pages_incident_write + /api/v2/statuspages/{page_id}/degradations/{degradation_id}/updates/{update_id}: + delete: + description: Soft-deletes a degradation update. + operationId: SoftDeleteDegradationUpdate + parameters: + - description: The ID of the degradation. + in: path + name: degradation_id + required: true + schema: + format: uuid + type: string + - description: The ID of the status page. + in: path + name: page_id + required: true + schema: + format: uuid + type: string + - description: The ID of the degradation update. + in: path + name: update_id + required: true + schema: + format: uuid + type: string + responses: + "204": + description: No Content + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - status_pages_incident_write + summary: Soft delete degradation update + tags: + - Status Pages + patch: + description: Edits a specific degradation update. + operationId: EditDegradationUpdate + parameters: + - description: The ID of the degradation. + in: path + name: degradation_id + required: true + schema: + format: uuid + type: string + - description: "Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, degradation, status_page." + in: query + name: include + schema: + type: string + - description: The ID of the status page. + in: path + name: page_id + required: true + schema: + format: uuid + type: string + - description: The ID of the degradation update. + in: path + name: update_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: We've identified the source of the latency increase and are deploying a fix. + status: identified + id: 00000000-0000-0000-0000-000000000000 + type: degradation_updates + schema: + $ref: "#/components/schemas/PatchDegradationUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + description: We've identified the source of the latency increase and are deploying a fix. + status: identified + id: 00000000-0000-0000-0000-000000000000 + type: degradation_updates + schema: + $ref: "#/components/schemas/DegradationUpdate" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - status_pages_incident_write + summary: Edit degradation update + tags: + - Status Pages /api/v2/statuspages/{page_id}/maintenances: post: description: Schedules a new maintenance. @@ -184025,7 +184442,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_incident_write summary: Schedule maintenance tags: - Status Pages @@ -184103,7 +184521,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_incident_write summary: Create backfilled maintenance tags: - Status Pages @@ -184162,7 +184581,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_settings_read summary: Get maintenance tags: - Status Pages @@ -184244,7 +184664,8 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_incident_write summary: Update maintenance tags: - Status Pages @@ -184272,7 +184693,10 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_internal_page_publish + - status_pages_public_page_publish + - status_pages_settings_write summary: Publish status page tags: - Status Pages @@ -184302,7 +184726,10 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] + - AuthZ: + - status_pages_internal_page_publish + - status_pages_public_page_publish + - status_pages_settings_write summary: Unpublish status page tags: - Status Pages diff --git a/examples/v2/status-pages/EditDegradationUpdate.rb b/examples/v2/status-pages/EditDegradationUpdate.rb new file mode 100644 index 000000000000..5cd932b8ef85 --- /dev/null +++ b/examples/v2/status-pages/EditDegradationUpdate.rb @@ -0,0 +1,16 @@ +# Edit degradation update returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new + +body = DatadogAPIClient::V2::PatchDegradationUpdateRequest.new({ + data: DatadogAPIClient::V2::PatchDegradationUpdateRequestData.new({ + attributes: DatadogAPIClient::V2::PatchDegradationUpdateRequestDataAttributes.new({ + description: "We've identified the source of the latency increase and are deploying a fix.", + status: DatadogAPIClient::V2::PatchDegradationUpdateRequestDataAttributesStatus::IDENTIFIED, + }), + id: "00000000-0000-0000-0000-000000000000", + type: DatadogAPIClient::V2::PatchDegradationUpdateRequestDataType::DEGRADATION_UPDATES, + }), +}) +p api_instance.edit_degradation_update("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body) diff --git a/examples/v2/status-pages/SoftDeleteDegradationUpdate.rb b/examples/v2/status-pages/SoftDeleteDegradationUpdate.rb new file mode 100644 index 000000000000..c31a814cbe1f --- /dev/null +++ b/examples/v2/status-pages/SoftDeleteDegradationUpdate.rb @@ -0,0 +1,5 @@ +# Soft delete degradation update returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::StatusPagesAPI.new +api_instance.soft_delete_degradation_update("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.rb b/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.rb index 8cec095c73fb..7526a9e12fbc 100644 --- a/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.rb +++ b/examples/v2/test-optimization/UpdateTestOptimizationServiceSettings.rb @@ -7,14 +7,19 @@ data: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestData.new({ attributes: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestAttributes.new({ auto_test_retries_enabled: false, + auto_test_retries_enabled_inherit: false, code_coverage_enabled: false, + code_coverage_enabled_inherit: false, early_flake_detection_enabled: false, + early_flake_detection_enabled_inherit: false, env: "prod", failed_test_replay_enabled: false, - pr_comments_enabled: true, + failed_test_replay_enabled_inherit: false, + pr_comments_enabled: false, repository_id: "github.com/datadog/shopist", service_name: "shopist", - test_impact_analysis_enabled: false, + test_impact_analysis_enabled: true, + test_impact_analysis_enabled_inherit: true, }), type: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestDataType::TEST_OPTIMIZATION_UPDATE_SERVICE_SETTINGS_REQUEST, }), diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 08740408c57b..8d27a626e6cf 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -5550,6 +5550,18 @@ "include" => "String", "body" => "PatchDegradationRequest", }, + "v2.SoftDeleteDegradationUpdate" => { + "degradation_id" => "UUID", + "page_id" => "UUID", + "update_id" => "UUID", + }, + "v2.EditDegradationUpdate" => { + "degradation_id" => "UUID", + "include" => "String", + "page_id" => "UUID", + "update_id" => "UUID", + "body" => "PatchDegradationUpdateRequest", + }, "v2.CreateMaintenance" => { "page_id" => "UUID", "notify_subscribers" => "Boolean", diff --git a/features/v2/status_pages.feature b/features/v2/status_pages.feature index 4e671f186dea..99cb8e3ed61b 100644 --- a/features/v2/status_pages.feature +++ b/features/v2/status_pages.feature @@ -94,6 +94,16 @@ Feature: Status Pages When the request is sent Then the response status is 204 No Content + @generated @skip @team:DataDog/incident-app + Scenario: Edit degradation update returns "OK" response + Given new "EditDegradationUpdate" request + And request contains "degradation_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "update_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "We've identified the source of the latency increase and are deploying a fix.", "status": "identified"}, "id": "00000000-0000-0000-0000-000000000000", "type": "degradation_updates"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/incident-app Scenario: Get component returns "OK" response Given new "GetComponent" request @@ -178,6 +188,15 @@ Feature: Status Pages When the request is sent Then the response status is 201 Created + @generated @skip @team:DataDog/incident-app + Scenario: Soft delete degradation update returns "No Content" response + Given new "SoftDeleteDegradationUpdate" request + And request contains "degradation_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "update_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + @generated @skip @team:DataDog/incident-app Scenario: Unpublish status page returns "No Content" response Given new "UnpublishStatusPage" request diff --git a/features/v2/test_optimization.feature b/features/v2/test_optimization.feature index c363d29f04c7..342eda12e8fb 100644 --- a/features/v2/test_optimization.feature +++ b/features/v2/test_optimization.feature @@ -187,21 +187,21 @@ Feature: Test Optimization @generated @skip @team:DataDog/ci-app-backend Scenario: Update Test Optimization service settings returns "Bad Request" response Given new "UpdateTestOptimizationServiceSettings" request - And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "code_coverage_enabled": false, "early_flake_detection_enabled": false, "env": "prod", "failed_test_replay_enabled": false, "pr_comments_enabled": true, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": false}, "type": "test_optimization_update_service_settings_request"}} + And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "auto_test_retries_enabled_inherit": false, "code_coverage_enabled": false, "code_coverage_enabled_inherit": false, "early_flake_detection_enabled": false, "early_flake_detection_enabled_inherit": false, "env": "prod", "failed_test_replay_enabled": false, "failed_test_replay_enabled_inherit": false, "pr_comments_enabled": false, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": true, "test_impact_analysis_enabled_inherit": true}, "type": "test_optimization_update_service_settings_request"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend Scenario: Update Test Optimization service settings returns "Not Found" response Given new "UpdateTestOptimizationServiceSettings" request - And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "code_coverage_enabled": false, "early_flake_detection_enabled": false, "env": "prod", "failed_test_replay_enabled": false, "pr_comments_enabled": true, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": false}, "type": "test_optimization_update_service_settings_request"}} + And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "auto_test_retries_enabled_inherit": false, "code_coverage_enabled": false, "code_coverage_enabled_inherit": false, "early_flake_detection_enabled": false, "early_flake_detection_enabled_inherit": false, "env": "prod", "failed_test_replay_enabled": false, "failed_test_replay_enabled_inherit": false, "pr_comments_enabled": false, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": true, "test_impact_analysis_enabled_inherit": true}, "type": "test_optimization_update_service_settings_request"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/ci-app-backend Scenario: Update Test Optimization service settings returns "OK" response Given new "UpdateTestOptimizationServiceSettings" request - And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "code_coverage_enabled": false, "early_flake_detection_enabled": false, "env": "prod", "failed_test_replay_enabled": false, "pr_comments_enabled": true, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": false}, "type": "test_optimization_update_service_settings_request"}} + And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "auto_test_retries_enabled_inherit": false, "code_coverage_enabled": false, "code_coverage_enabled_inherit": false, "early_flake_detection_enabled": false, "early_flake_detection_enabled_inherit": false, "env": "prod", "failed_test_replay_enabled": false, "failed_test_replay_enabled_inherit": false, "pr_comments_enabled": false, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": true, "test_impact_analysis_enabled_inherit": true}, "type": "test_optimization_update_service_settings_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 89626bc569e4..a5c43f6c0f2c 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -8521,6 +8521,18 @@ "type": "idempotent" } }, + "SoftDeleteDegradationUpdate": { + "tag": "Status Pages", + "undo": { + "type": "idempotent" + } + }, + "EditDegradationUpdate": { + "tag": "Status Pages", + "undo": { + "type": "idempotent" + } + }, "CreateMaintenance": { "tag": "Status Pages", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index d3b40f516952..1912c3a1f419 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2753,6 +2753,18 @@ def overrides "v2.degradation_data_relationships_status_page" => "DegradationDataRelationshipsStatusPage", "v2.degradation_data_relationships_status_page_data" => "DegradationDataRelationshipsStatusPageData", "v2.degradation_included" => "DegradationIncluded", + "v2.degradation_update" => "DegradationUpdate", + "v2.degradation_update_data" => "DegradationUpdateData", + "v2.degradation_update_data_attributes" => "DegradationUpdateDataAttributes", + "v2.degradation_update_data_attributes_components_affected_items" => "DegradationUpdateDataAttributesComponentsAffectedItems", + "v2.degradation_update_data_relationships" => "DegradationUpdateDataRelationships", + "v2.degradation_update_data_relationships_degradation" => "DegradationUpdateDataRelationshipsDegradation", + "v2.degradation_update_data_relationships_degradation_data" => "DegradationUpdateDataRelationshipsDegradationData", + "v2.degradation_update_data_relationships_status_page" => "DegradationUpdateDataRelationshipsStatusPage", + "v2.degradation_update_data_relationships_status_page_data" => "DegradationUpdateDataRelationshipsStatusPageData", + "v2.degradation_update_data_relationships_user" => "DegradationUpdateDataRelationshipsUser", + "v2.degradation_update_data_relationships_user_data" => "DegradationUpdateDataRelationshipsUserData", + "v2.degradation_update_included" => "DegradationUpdateIncluded", "v2.delete_app_response" => "DeleteAppResponse", "v2.delete_app_response_data" => "DeleteAppResponseData", "v2.delete_apps_datastore_item_request" => "DeleteAppsDatastoreItemRequest", @@ -5433,6 +5445,11 @@ def overrides "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_degradation_update_request" => "PatchDegradationUpdateRequest", + "v2.patch_degradation_update_request_data" => "PatchDegradationUpdateRequestData", + "v2.patch_degradation_update_request_data_attributes" => "PatchDegradationUpdateRequestDataAttributes", + "v2.patch_degradation_update_request_data_attributes_status" => "PatchDegradationUpdateRequestDataAttributesStatus", + "v2.patch_degradation_update_request_data_type" => "PatchDegradationUpdateRequestDataType", "v2.patch_incident_notification_template_request" => "PatchIncidentNotificationTemplateRequest", "v2.patch_maintenance_request" => "PatchMaintenanceRequest", "v2.patch_maintenance_request_data" => "PatchMaintenanceRequestData", diff --git a/lib/datadog_api_client/v2/api/status_pages_api.rb b/lib/datadog_api_client/v2/api/status_pages_api.rb index f86e498af32c..8e407eedd278 100644 --- a/lib/datadog_api_client/v2/api/status_pages_api.rb +++ b/lib/datadog_api_client/v2/api/status_pages_api.rb @@ -671,6 +671,90 @@ def delete_status_page_with_http_info(page_id, opts = {}) return data, status_code, headers end + # Edit degradation update. + # + # @see #edit_degradation_update_with_http_info + def edit_degradation_update(degradation_id, page_id, update_id, body, opts = {}) + data, _status_code, _headers = edit_degradation_update_with_http_info(degradation_id, page_id, update_id, body, opts) + data + end + + # Edit degradation update. + # + # Edits a specific degradation update. + # + # @param degradation_id [UUID] The ID of the degradation. + # @param page_id [UUID] The ID of the status page. + # @param update_id [UUID] The ID of the degradation update. + # @param body [PatchDegradationUpdateRequest] + # @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, degradation, status_page. + # @return [Array<(DegradationUpdate, Integer, Hash)>] DegradationUpdate data, response status code and response headers + def edit_degradation_update_with_http_info(degradation_id, page_id, update_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.edit_degradation_update ...' + 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.edit_degradation_update" + 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.edit_degradation_update" + end + # verify the required parameter 'update_id' is set + if @api_client.config.client_side_validation && update_id.nil? + fail ArgumentError, "Missing the required parameter 'update_id' when calling StatusPagesAPI.edit_degradation_update" + 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.edit_degradation_update" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/degradations/{degradation_id}/updates/{update_id}'.sub('{degradation_id}', CGI.escape(degradation_id.to_s).gsub('%2F', '/')).sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')).sub('{update_id}', CGI.escape(update_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] || 'DegradationUpdate' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :edit_degradation_update, + :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#edit_degradation_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get component. # # @see #get_component_with_http_info @@ -1298,6 +1382,81 @@ def publish_status_page_with_http_info(page_id, opts = {}) return data, status_code, headers end + # Soft delete degradation update. + # + # @see #soft_delete_degradation_update_with_http_info + def soft_delete_degradation_update(degradation_id, page_id, update_id, opts = {}) + soft_delete_degradation_update_with_http_info(degradation_id, page_id, update_id, opts) + nil + end + + # Soft delete degradation update. + # + # Soft-deletes a degradation update. + # + # @param degradation_id [UUID] The ID of the degradation. + # @param page_id [UUID] The ID of the status page. + # @param update_id [UUID] The ID of the degradation update. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def soft_delete_degradation_update_with_http_info(degradation_id, page_id, update_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: StatusPagesAPI.soft_delete_degradation_update ...' + 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.soft_delete_degradation_update" + 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.soft_delete_degradation_update" + end + # verify the required parameter 'update_id' is set + if @api_client.config.client_side_validation && update_id.nil? + fail ArgumentError, "Missing the required parameter 'update_id' when calling StatusPagesAPI.soft_delete_degradation_update" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/degradations/{degradation_id}/updates/{update_id}'.sub('{degradation_id}', CGI.escape(degradation_id.to_s).gsub('%2F', '/')).sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')).sub('{update_id}', CGI.escape(update_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 => :soft_delete_degradation_update, + :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#soft_delete_degradation_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Unpublish status page. # # @see #unpublish_status_page_with_http_info diff --git a/lib/datadog_api_client/v2/api/test_optimization_api.rb b/lib/datadog_api_client/v2/api/test_optimization_api.rb index ac74b9328b03..022552f20164 100644 --- a/lib/datadog_api_client/v2/api/test_optimization_api.rb +++ b/lib/datadog_api_client/v2/api/test_optimization_api.rb @@ -467,7 +467,9 @@ def update_test_optimization_service_settings(body, opts = {}) # Update Test Optimization service settings. # # Partially update Test Optimization settings for a specific service identified by repository, service name, and environment. - # Only provided fields are updated; null or omitted fields are left unchanged. + # Only provided fields are updated; setting a field to `null` is a no-op. + # To reset a setting to inherit from the repository level, use the corresponding `_inherit` field. + # The `pr_comments_enabled` field is ignored as it cannot be overridden at the service level. # # @param body [TestOptimizationUpdateServiceSettingsRequest] # @param opts [Hash] the optional parameters diff --git a/lib/datadog_api_client/v2/models/create_backfilled_maintenance_request_data_attributes_updates_items.rb b/lib/datadog_api_client/v2/models/create_backfilled_maintenance_request_data_attributes_updates_items.rb index 61301039b3e6..edbc79e997d4 100644 --- a/lib/datadog_api_client/v2/models/create_backfilled_maintenance_request_data_attributes_updates_items.rb +++ b/lib/datadog_api_client/v2/models/create_backfilled_maintenance_request_data_attributes_updates_items.rb @@ -22,7 +22,7 @@ class CreateBackfilledMaintenanceRequestDataAttributesUpdatesItems include BaseGenericModel # The components affected. - attr_reader :components_affected + attr_accessor :components_affected # A description of the update. attr_reader :description @@ -98,23 +98,12 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @components_affected.nil? return false if @description.nil? return false if @started_at.nil? return false if @status.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 description [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/create_maintenance_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_maintenance_request_data_attributes.rb index af32081d1d96..a12b29d4b59c 100644 --- a/lib/datadog_api_client/v2/models/create_maintenance_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/create_maintenance_request_data_attributes.rb @@ -28,7 +28,7 @@ class CreateMaintenanceRequestDataAttributes attr_reader :completed_description # The components affected by the maintenance. - attr_reader :components_affected + attr_accessor :components_affected # The description shown while the maintenance is in progress. attr_reader :in_progress_description @@ -127,7 +127,6 @@ def initialize(attributes = {}) def valid? return false if @completed_date.nil? return false if @completed_description.nil? - return false if @components_affected.nil? return false if @in_progress_description.nil? return false if @scheduled_description.nil? return false if @start_date.nil? @@ -155,16 +154,6 @@ def completed_description=(completed_description) @completed_description = completed_description 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 in_progress_description [Object] Object to be assigned # @!visibility private 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 index 9c1a55c9de2d..3896a0f6636b 100644 --- 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 @@ -33,12 +33,21 @@ class CreateStatusPageRequestDataAttributes # 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 # The name of the status page. attr_reader :name + # The Slack app icon URL for the status page. + attr_accessor :slack_app_icon + + # Whether Slack subscriptions are enabled for the status page. + attr_accessor :slack_subscriptions_enabled + # Whether users can subscribe to the status page. attr_accessor :subscriptions_enabled @@ -58,8 +67,11 @@ def self.attribute_map :'components' => :'components', :'domain_prefix' => :'domain_prefix', :'email_header_image' => :'email_header_image', + :'enabled' => :'enabled', :'favicon' => :'favicon', :'name' => :'name', + :'slack_app_icon' => :'slack_app_icon', + :'slack_subscriptions_enabled' => :'slack_subscriptions_enabled', :'subscriptions_enabled' => :'subscriptions_enabled', :'type' => :'type', :'visualization_type' => :'visualization_type' @@ -74,8 +86,11 @@ def self.openapi_types :'components' => :'Array', :'domain_prefix' => :'String', :'email_header_image' => :'String', + :'enabled' => :'Boolean', :'favicon' => :'String', :'name' => :'String', + :'slack_app_icon' => :'String', + :'slack_subscriptions_enabled' => :'Boolean', :'subscriptions_enabled' => :'Boolean', :'type' => :'CreateStatusPageRequestDataAttributesType', :'visualization_type' => :'CreateStatusPageRequestDataAttributesVisualizationType' @@ -118,6 +133,10 @@ def initialize(attributes = {}) 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 @@ -126,6 +145,14 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end + if attributes.key?(:'slack_app_icon') + self.slack_app_icon = attributes[:'slack_app_icon'] + end + + if attributes.key?(:'slack_subscriptions_enabled') + self.slack_subscriptions_enabled = attributes[:'slack_subscriptions_enabled'] + end + if attributes.key?(:'subscriptions_enabled') self.subscriptions_enabled = attributes[:'subscriptions_enabled'] end @@ -220,8 +247,11 @@ def ==(o) components == o.components && domain_prefix == o.domain_prefix && email_header_image == o.email_header_image && + enabled == o.enabled && favicon == o.favicon && name == o.name && + slack_app_icon == o.slack_app_icon && + slack_subscriptions_enabled == o.slack_subscriptions_enabled && subscriptions_enabled == o.subscriptions_enabled && type == o.type && visualization_type == o.visualization_type && @@ -232,7 +262,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [company_logo, components, domain_prefix, email_header_image, favicon, name, subscriptions_enabled, type, visualization_type, additional_properties].hash + [company_logo, components, domain_prefix, email_header_image, enabled, favicon, name, slack_app_icon, slack_subscriptions_enabled, subscriptions_enabled, type, visualization_type, 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 index 0208e19f83bb..ea2be9718661 100644 --- 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 @@ -27,6 +27,12 @@ class DegradationDataAttributesUpdatesItems # Timestamp of when the update was created. attr_accessor :created_at + # The date and time the resource was deleted. + attr_accessor :deleted_at + + # UUID of the user who deleted the resource. + attr_accessor :deleted_by_user_uuid + # Description of the update. attr_accessor :description @@ -53,6 +59,8 @@ def self.attribute_map { :'components_affected' => :'components_affected', :'created_at' => :'created_at', + :'deleted_at' => :'deleted_at', + :'deleted_by_user_uuid' => :'deleted_by_user_uuid', :'description' => :'description', :'id' => :'id', :'last_modified_by_user_uuid' => :'last_modified_by_user_uuid', @@ -68,6 +76,8 @@ def self.openapi_types { :'components_affected' => :'Array', :'created_at' => :'Time', + :'deleted_at' => :'String', + :'deleted_by_user_uuid' => :'String', :'description' => :'String', :'id' => :'UUID', :'last_modified_by_user_uuid' => :'String', @@ -105,6 +115,14 @@ def initialize(attributes = {}) self.created_at = attributes[:'created_at'] end + if attributes.key?(:'deleted_at') + self.deleted_at = attributes[:'deleted_at'] + end + + if attributes.key?(:'deleted_by_user_uuid') + self.deleted_by_user_uuid = attributes[:'deleted_by_user_uuid'] + end + if attributes.key?(:'description') self.description = attributes[:'description'] end @@ -158,6 +176,8 @@ def ==(o) self.class == o.class && components_affected == o.components_affected && created_at == o.created_at && + deleted_at == o.deleted_at && + deleted_by_user_uuid == o.deleted_by_user_uuid && description == o.description && id == o.id && last_modified_by_user_uuid == o.last_modified_by_user_uuid && @@ -171,7 +191,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [components_affected, created_at, description, id, last_modified_by_user_uuid, modified_at, started_at, status, additional_properties].hash + [components_affected, created_at, deleted_at, deleted_by_user_uuid, description, id, last_modified_by_user_uuid, modified_at, started_at, status, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/degradation_update.rb b/lib/datadog_api_client/v2/models/degradation_update.rb new file mode 100644 index 000000000000..d42645f38a28 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update.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 + # Response object for a degradation update. + class DegradationUpdate + include BaseGenericModel + + # The data object for a degradation update. + attr_accessor :data + + # Resources related to the degradation update. + 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' => :'DegradationUpdateData', + :'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::DegradationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_data.rb b/lib/datadog_api_client/v2/models/degradation_update_data.rb new file mode 100644 index 000000000000..2c8de36119fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_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 + # The data object for a degradation update. + class DegradationUpdateData + include BaseGenericModel + + # Attributes of a degradation update resource. + attr_accessor :attributes + + # The ID of the degradation update. + attr_accessor :id + + # Relationships of a degradation update resource. + attr_accessor :relationships + + # Degradation updates 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' => :'DegradationUpdateDataAttributes', + :'id' => :'String', + :'relationships' => :'DegradationUpdateDataRelationships', + :'type' => :'PatchDegradationUpdateRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationUpdateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_data_attributes.rb b/lib/datadog_api_client/v2/models/degradation_update_data_attributes.rb new file mode 100644 index 000000000000..c7b09d97e51d --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_data_attributes.rb @@ -0,0 +1,167 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a degradation update resource. + class DegradationUpdateDataAttributes + include BaseGenericModel + + # Components affected by this update. + attr_accessor :components_affected + + # The date and time the update was created. + attr_accessor :created_at + + # The date and time the update was soft-deleted. + attr_accessor :deleted_at + + # The message body of the update. + attr_accessor :description + + # The date and time the update was last modified. + attr_accessor :modified_at + + # The date and time the update started. + attr_accessor :started_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', + :'deleted_at' => :'deleted_at', + :'description' => :'description', + :'modified_at' => :'modified_at', + :'started_at' => :'started_at', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components_affected' => :'Array', + :'created_at' => :'Time', + :'deleted_at' => :'Time', + :'description' => :'String', + :'modified_at' => :'Time', + :'started_at' => :'Time', + :'status' => :'CreateDegradationRequestDataAttributesStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationUpdateDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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?(:'deleted_at') + self.deleted_at = attributes[:'deleted_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?(:'started_at') + self.started_at = attributes[:'started_at'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + components_affected == o.components_affected && + created_at == o.created_at && + deleted_at == o.deleted_at && + description == o.description && + modified_at == o.modified_at && + started_at == o.started_at && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components_affected, created_at, deleted_at, description, modified_at, started_at, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_update_data_attributes_components_affected_items.rb b/lib/datadog_api_client/v2/models/degradation_update_data_attributes_components_affected_items.rb new file mode 100644 index 000000000000..5b5aaad8b65c --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_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 + # A component affected by a degradation update. + class DegradationUpdateDataAttributesComponentsAffectedItems + include BaseGenericModel + + # The ID of the affected component. + attr_reader :id + + # The name of the affected 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' => :'String', + :'name' => :'String', + :'status' => :'StatusPagesComponentDataAttributesStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationUpdateDataAttributesComponentsAffectedItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_data_relationships.rb b/lib/datadog_api_client/v2/models/degradation_update_data_relationships.rb new file mode 100644 index 000000000000..842bfa0c06b9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_data_relationships.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 + # Relationships of a degradation update resource. + class DegradationUpdateDataRelationships + include BaseGenericModel + + # A user relationship of a degradation update. + attr_accessor :created_by_user + + # The degradation relationship of a degradation update. + attr_accessor :degradation + + # A user relationship of a degradation update. + attr_accessor :deleted_by_user + + # A user relationship of a degradation update. + attr_accessor :last_modified_by_user + + # The status page relationship of a degradation update. + 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', + :'degradation' => :'degradation', + :'deleted_by_user' => :'deleted_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' => :'DegradationUpdateDataRelationshipsUser', + :'degradation' => :'DegradationUpdateDataRelationshipsDegradation', + :'deleted_by_user' => :'DegradationUpdateDataRelationshipsUser', + :'last_modified_by_user' => :'DegradationUpdateDataRelationshipsUser', + :'status_page' => :'DegradationUpdateDataRelationshipsStatusPage' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationUpdateDataRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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?(:'degradation') + self.degradation = attributes[:'degradation'] + end + + if attributes.key?(:'deleted_by_user') + self.deleted_by_user = attributes[:'deleted_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 && + degradation == o.degradation && + deleted_by_user == o.deleted_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, degradation, deleted_by_user, last_modified_by_user, status_page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/degradation_update_data_relationships_degradation.rb b/lib/datadog_api_client/v2/models/degradation_update_data_relationships_degradation.rb new file mode 100644 index 000000000000..1a8d309060d7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_data_relationships_degradation.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 degradation relationship of a degradation update. + class DegradationUpdateDataRelationshipsDegradation + include BaseGenericModel + + # The degradation linked to a degradation update. + 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' => :'DegradationUpdateDataRelationshipsDegradationData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationUpdateDataRelationshipsDegradation` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_data_relationships_degradation_data.rb b/lib/datadog_api_client/v2/models/degradation_update_data_relationships_degradation_data.rb new file mode 100644 index 000000000000..91fa44378408 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_data_relationships_degradation_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 + # The degradation linked to a degradation update. + class DegradationUpdateDataRelationshipsDegradationData + include BaseGenericModel + + # The ID of the degradation. + attr_reader :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 + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'PatchDegradationRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationUpdateDataRelationshipsDegradationData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_data_relationships_status_page.rb b/lib/datadog_api_client/v2/models/degradation_update_data_relationships_status_page.rb new file mode 100644 index 000000000000..6f57733f91d5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_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 + # The status page relationship of a degradation update. + class DegradationUpdateDataRelationshipsStatusPage + include BaseGenericModel + + # The status page linked to a degradation update. + 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' => :'DegradationUpdateDataRelationshipsStatusPageData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationUpdateDataRelationshipsStatusPage` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_data_relationships_status_page_data.rb b/lib/datadog_api_client/v2/models/degradation_update_data_relationships_status_page_data.rb new file mode 100644 index 000000000000..12ace90326ec --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_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 + # The status page linked to a degradation update. + class DegradationUpdateDataRelationshipsStatusPageData + 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' => :'String', + :'type' => :'StatusPageDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationUpdateDataRelationshipsStatusPageData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_data_relationships_user.rb b/lib/datadog_api_client/v2/models/degradation_update_data_relationships_user.rb new file mode 100644 index 000000000000..d2bba2ad9d8e --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_data_relationships_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 + # A user relationship of a degradation update. + class DegradationUpdateDataRelationshipsUser + include BaseGenericModel + + # A Datadog user linked to a degradation update. + 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' => :'DegradationUpdateDataRelationshipsUserData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationUpdateDataRelationshipsUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_data_relationships_user_data.rb b/lib/datadog_api_client/v2/models/degradation_update_data_relationships_user_data.rb new file mode 100644 index 000000000000..5b42f2c75fd6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_data_relationships_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 + # A Datadog user linked to a degradation update. + class DegradationUpdateDataRelationshipsUserData + include BaseGenericModel + + # The ID of the user. + 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::DegradationUpdateDataRelationshipsUserData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_included.rb b/lib/datadog_api_client/v2/models/degradation_update_included.rb new file mode 100644 index 000000000000..6048cffa12bb --- /dev/null +++ b/lib/datadog_api_client/v2/models/degradation_update_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 + # Resources included in a degradation update response. + module DegradationUpdateIncluded + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'StatusPagesUser', + :'Degradation', + :'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/patch_degradation_update_request.rb b/lib/datadog_api_client/v2/models/patch_degradation_update_request.rb new file mode 100644 index 000000000000..245d76ae576b --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_update_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 + # Request object for editing a degradation update. + class PatchDegradationUpdateRequest + include BaseGenericModel + + # The data object for editing a degradation update. + 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' => :'PatchDegradationUpdateRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchDegradationUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_request_data.rb b/lib/datadog_api_client/v2/models/patch_degradation_update_request_data.rb new file mode 100644 index 000000000000..ea72fc2cd28a --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_update_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 + # The data object for editing a degradation update. + class PatchDegradationUpdateRequestData + include BaseGenericModel + + # Attributes for editing a degradation update. + attr_accessor :attributes + + # The ID of the degradation update to edit. + attr_accessor :id + + # Degradation updates 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' => :'PatchDegradationUpdateRequestDataAttributes', + :'id' => :'String', + :'type' => :'PatchDegradationUpdateRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchDegradationUpdateRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_update_request_data_attributes.rb b/lib/datadog_api_client/v2/models/patch_degradation_update_request_data_attributes.rb new file mode 100644 index 000000000000..db6924fd5954 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_update_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 + # Attributes for editing a degradation update. + class PatchDegradationUpdateRequestDataAttributes + include BaseGenericModel + + # The message body of the update. + attr_accessor :description + + # The status of the degradation update. + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'description' => :'description', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'status' => :'PatchDegradationUpdateRequestDataAttributesStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchDegradationUpdateRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + 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 && + description == o.description && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/patch_degradation_update_request_data_attributes_status.rb b/lib/datadog_api_client/v2/models/patch_degradation_update_request_data_attributes_status.rb new file mode 100644 index 000000000000..e13261f8672f --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_update_request_data_attributes_status.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 status of the degradation update. + class PatchDegradationUpdateRequestDataAttributesStatus + include BaseEnumModel + + INVESTIGATING = "investigating".freeze + IDENTIFIED = "identified".freeze + MONITORING = "monitoring".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/patch_degradation_update_request_data_type.rb b/lib/datadog_api_client/v2/models/patch_degradation_update_request_data_type.rb new file mode 100644 index 000000000000..f55b4acc3f67 --- /dev/null +++ b/lib/datadog_api_client/v2/models/patch_degradation_update_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 + # Degradation updates resource type. + class PatchDegradationUpdateRequestDataType + include BaseEnumModel + + DEGRADATION_UPDATES = "degradation_updates".freeze + 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 index c4dbe6a7d309..f2a1546841c5 100644 --- 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 @@ -39,6 +39,12 @@ class PatchStatusPageRequestDataAttributes # The name of the status page. attr_accessor :name + # The Slack app icon URL for the status page. + attr_accessor :slack_app_icon + + # Whether Slack subscriptions are enabled for the status page. + attr_accessor :slack_subscriptions_enabled + # Whether users can subscribe to the status page. attr_accessor :subscriptions_enabled @@ -60,6 +66,8 @@ def self.attribute_map :'enabled' => :'enabled', :'favicon' => :'favicon', :'name' => :'name', + :'slack_app_icon' => :'slack_app_icon', + :'slack_subscriptions_enabled' => :'slack_subscriptions_enabled', :'subscriptions_enabled' => :'subscriptions_enabled', :'type' => :'type', :'visualization_type' => :'visualization_type' @@ -76,6 +84,8 @@ def self.openapi_types :'enabled' => :'Boolean', :'favicon' => :'String', :'name' => :'String', + :'slack_app_icon' => :'String', + :'slack_subscriptions_enabled' => :'Boolean', :'subscriptions_enabled' => :'Boolean', :'type' => :'CreateStatusPageRequestDataAttributesType', :'visualization_type' => :'CreateStatusPageRequestDataAttributesVisualizationType' @@ -124,6 +134,14 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end + if attributes.key?(:'slack_app_icon') + self.slack_app_icon = attributes[:'slack_app_icon'] + end + + if attributes.key?(:'slack_subscriptions_enabled') + self.slack_subscriptions_enabled = attributes[:'slack_subscriptions_enabled'] + end + if attributes.key?(:'subscriptions_enabled') self.subscriptions_enabled = attributes[:'subscriptions_enabled'] end @@ -169,6 +187,8 @@ def ==(o) enabled == o.enabled && favicon == o.favicon && name == o.name && + slack_app_icon == o.slack_app_icon && + slack_subscriptions_enabled == o.slack_subscriptions_enabled && subscriptions_enabled == o.subscriptions_enabled && type == o.type && visualization_type == o.visualization_type && @@ -179,7 +199,7 @@ def ==(o) # @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 + [company_logo, domain_prefix, email_header_image, enabled, favicon, name, slack_app_icon, slack_subscriptions_enabled, 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.rb b/lib/datadog_api_client/v2/models/status_page_as_included_attributes.rb index 10f74e7c3fa4..fb1e9af52e61 100644 --- 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 @@ -57,6 +57,12 @@ class StatusPageAsIncludedAttributes # The url that the status page is accessible at. attr_accessor :page_url + # The Slack app icon URL for the status page. + attr_accessor :slack_app_icon + + # Whether Slack subscriptions are enabled for the status page. + attr_accessor :slack_subscriptions_enabled + # Whether users can subscribe to the status page. attr_accessor :subscriptions_enabled @@ -84,6 +90,8 @@ def self.attribute_map :'modified_at' => :'modified_at', :'name' => :'name', :'page_url' => :'page_url', + :'slack_app_icon' => :'slack_app_icon', + :'slack_subscriptions_enabled' => :'slack_subscriptions_enabled', :'subscriptions_enabled' => :'subscriptions_enabled', :'type' => :'type', :'visualization_type' => :'visualization_type' @@ -106,6 +114,8 @@ def self.openapi_types :'modified_at' => :'Time', :'name' => :'String', :'page_url' => :'String', + :'slack_app_icon' => :'String', + :'slack_subscriptions_enabled' => :'Boolean', :'subscriptions_enabled' => :'Boolean', :'type' => :'CreateStatusPageRequestDataAttributesType', :'visualization_type' => :'CreateStatusPageRequestDataAttributesVisualizationType' @@ -180,6 +190,14 @@ def initialize(attributes = {}) self.page_url = attributes[:'page_url'] end + if attributes.key?(:'slack_app_icon') + self.slack_app_icon = attributes[:'slack_app_icon'] + end + + if attributes.key?(:'slack_subscriptions_enabled') + self.slack_subscriptions_enabled = attributes[:'slack_subscriptions_enabled'] + end + if attributes.key?(:'subscriptions_enabled') self.subscriptions_enabled = attributes[:'subscriptions_enabled'] end @@ -231,6 +249,8 @@ def ==(o) modified_at == o.modified_at && name == o.name && page_url == o.page_url && + slack_app_icon == o.slack_app_icon && + slack_subscriptions_enabled == o.slack_subscriptions_enabled && subscriptions_enabled == o.subscriptions_enabled && type == o.type && visualization_type == o.visualization_type && @@ -241,7 +261,7 @@ def ==(o) # @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 + [company_logo, components, created_at, custom_domain, custom_domain_enabled, domain_prefix, email_header_image, enabled, favicon, modified_at, name, page_url, slack_app_icon, slack_subscriptions_enabled, subscriptions_enabled, type, visualization_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 index b95d61b3f1af..c4c4a8f8ce2b 100644 --- a/lib/datadog_api_client/v2/models/status_page_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/status_page_data_attributes.rb @@ -57,6 +57,12 @@ class StatusPageDataAttributes # The url that the status page is accessible at. attr_accessor :page_url + # The Slack app icon URL for the status page. + attr_accessor :slack_app_icon + + # Whether Slack subscriptions are enabled for the status page. + attr_accessor :slack_subscriptions_enabled + # Whether users can subscribe to the status page. attr_accessor :subscriptions_enabled @@ -84,6 +90,8 @@ def self.attribute_map :'modified_at' => :'modified_at', :'name' => :'name', :'page_url' => :'page_url', + :'slack_app_icon' => :'slack_app_icon', + :'slack_subscriptions_enabled' => :'slack_subscriptions_enabled', :'subscriptions_enabled' => :'subscriptions_enabled', :'type' => :'type', :'visualization_type' => :'visualization_type' @@ -106,6 +114,8 @@ def self.openapi_types :'modified_at' => :'Time', :'name' => :'String', :'page_url' => :'String', + :'slack_app_icon' => :'String', + :'slack_subscriptions_enabled' => :'Boolean', :'subscriptions_enabled' => :'Boolean', :'type' => :'CreateStatusPageRequestDataAttributesType', :'visualization_type' => :'CreateStatusPageRequestDataAttributesVisualizationType' @@ -191,6 +201,14 @@ def initialize(attributes = {}) self.page_url = attributes[:'page_url'] end + if attributes.key?(:'slack_app_icon') + self.slack_app_icon = attributes[:'slack_app_icon'] + end + + if attributes.key?(:'slack_subscriptions_enabled') + self.slack_subscriptions_enabled = attributes[:'slack_subscriptions_enabled'] + end + if attributes.key?(:'subscriptions_enabled') self.subscriptions_enabled = attributes[:'subscriptions_enabled'] end @@ -242,6 +260,8 @@ def ==(o) modified_at == o.modified_at && name == o.name && page_url == o.page_url && + slack_app_icon == o.slack_app_icon && + slack_subscriptions_enabled == o.slack_subscriptions_enabled && subscriptions_enabled == o.subscriptions_enabled && type == o.type && visualization_type == o.visualization_type && @@ -252,7 +272,7 @@ def ==(o) # @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 + [company_logo, components, created_at, custom_domain, custom_domain_enabled, domain_prefix, email_header_image, enabled, favicon, modified_at, name, page_url, slack_app_icon, slack_subscriptions_enabled, subscriptions_enabled, type, visualization_type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/test_optimization_service_settings_attributes.rb b/lib/datadog_api_client/v2/models/test_optimization_service_settings_attributes.rb index eb5a0cbdca31..e63abcee371e 100644 --- a/lib/datadog_api_client/v2/models/test_optimization_service_settings_attributes.rb +++ b/lib/datadog_api_client/v2/models/test_optimization_service_settings_attributes.rb @@ -24,19 +24,31 @@ class TestOptimizationServiceSettingsAttributes # Whether Auto Test Retries are enabled for this service. attr_accessor :auto_test_retries_enabled + # Whether the Auto Test Retries setting is overridden at the service level. + attr_accessor :auto_test_retries_enabled_is_overridden + # Whether Code Coverage is enabled for this service. attr_accessor :code_coverage_enabled + # Whether the Code Coverage setting is overridden at the service level. + attr_accessor :code_coverage_enabled_is_overridden + # Whether Early Flake Detection is enabled for this service. attr_accessor :early_flake_detection_enabled + # Whether the Early Flake Detection setting is overridden at the service level. + attr_accessor :early_flake_detection_enabled_is_overridden + # The environment name. attr_accessor :env # Whether Failed Test Replay is enabled for this service. attr_accessor :failed_test_replay_enabled - # Whether PR Comments are enabled for this service. + # Whether the Failed Test Replay setting is overridden at the service level. + attr_accessor :failed_test_replay_enabled_is_overridden + + # Whether PR Comments are enabled. This value reflects the repository-level setting and cannot be overridden at the service level. attr_accessor :pr_comments_enabled # The repository identifier. @@ -48,6 +60,9 @@ class TestOptimizationServiceSettingsAttributes # Whether Test Impact Analysis is enabled for this service. attr_accessor :test_impact_analysis_enabled + # Whether the Test Impact Analysis setting is overridden at the service level. + attr_accessor :test_impact_analysis_enabled_is_overridden + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -55,14 +70,19 @@ class TestOptimizationServiceSettingsAttributes def self.attribute_map { :'auto_test_retries_enabled' => :'auto_test_retries_enabled', + :'auto_test_retries_enabled_is_overridden' => :'auto_test_retries_enabled_is_overridden', :'code_coverage_enabled' => :'code_coverage_enabled', + :'code_coverage_enabled_is_overridden' => :'code_coverage_enabled_is_overridden', :'early_flake_detection_enabled' => :'early_flake_detection_enabled', + :'early_flake_detection_enabled_is_overridden' => :'early_flake_detection_enabled_is_overridden', :'env' => :'env', :'failed_test_replay_enabled' => :'failed_test_replay_enabled', + :'failed_test_replay_enabled_is_overridden' => :'failed_test_replay_enabled_is_overridden', :'pr_comments_enabled' => :'pr_comments_enabled', :'repository_id' => :'repository_id', :'service_name' => :'service_name', - :'test_impact_analysis_enabled' => :'test_impact_analysis_enabled' + :'test_impact_analysis_enabled' => :'test_impact_analysis_enabled', + :'test_impact_analysis_enabled_is_overridden' => :'test_impact_analysis_enabled_is_overridden' } end @@ -71,14 +91,19 @@ def self.attribute_map def self.openapi_types { :'auto_test_retries_enabled' => :'Boolean', + :'auto_test_retries_enabled_is_overridden' => :'Boolean', :'code_coverage_enabled' => :'Boolean', + :'code_coverage_enabled_is_overridden' => :'Boolean', :'early_flake_detection_enabled' => :'Boolean', + :'early_flake_detection_enabled_is_overridden' => :'Boolean', :'env' => :'String', :'failed_test_replay_enabled' => :'Boolean', + :'failed_test_replay_enabled_is_overridden' => :'Boolean', :'pr_comments_enabled' => :'Boolean', :'repository_id' => :'String', :'service_name' => :'String', - :'test_impact_analysis_enabled' => :'Boolean' + :'test_impact_analysis_enabled' => :'Boolean', + :'test_impact_analysis_enabled_is_overridden' => :'Boolean' } end @@ -104,14 +129,26 @@ def initialize(attributes = {}) self.auto_test_retries_enabled = attributes[:'auto_test_retries_enabled'] end + if attributes.key?(:'auto_test_retries_enabled_is_overridden') + self.auto_test_retries_enabled_is_overridden = attributes[:'auto_test_retries_enabled_is_overridden'] + end + if attributes.key?(:'code_coverage_enabled') self.code_coverage_enabled = attributes[:'code_coverage_enabled'] end + if attributes.key?(:'code_coverage_enabled_is_overridden') + self.code_coverage_enabled_is_overridden = attributes[:'code_coverage_enabled_is_overridden'] + end + if attributes.key?(:'early_flake_detection_enabled') self.early_flake_detection_enabled = attributes[:'early_flake_detection_enabled'] end + if attributes.key?(:'early_flake_detection_enabled_is_overridden') + self.early_flake_detection_enabled_is_overridden = attributes[:'early_flake_detection_enabled_is_overridden'] + end + if attributes.key?(:'env') self.env = attributes[:'env'] end @@ -120,6 +157,10 @@ def initialize(attributes = {}) self.failed_test_replay_enabled = attributes[:'failed_test_replay_enabled'] end + if attributes.key?(:'failed_test_replay_enabled_is_overridden') + self.failed_test_replay_enabled_is_overridden = attributes[:'failed_test_replay_enabled_is_overridden'] + end + if attributes.key?(:'pr_comments_enabled') self.pr_comments_enabled = attributes[:'pr_comments_enabled'] end @@ -135,6 +176,10 @@ def initialize(attributes = {}) if attributes.key?(:'test_impact_analysis_enabled') self.test_impact_analysis_enabled = attributes[:'test_impact_analysis_enabled'] end + + if attributes.key?(:'test_impact_analysis_enabled_is_overridden') + self.test_impact_analysis_enabled_is_overridden = attributes[:'test_impact_analysis_enabled_is_overridden'] + end end # Returns the object in the form of hash, with additionalProperties support. @@ -164,14 +209,19 @@ def ==(o) return true if self.equal?(o) self.class == o.class && auto_test_retries_enabled == o.auto_test_retries_enabled && + auto_test_retries_enabled_is_overridden == o.auto_test_retries_enabled_is_overridden && code_coverage_enabled == o.code_coverage_enabled && + code_coverage_enabled_is_overridden == o.code_coverage_enabled_is_overridden && early_flake_detection_enabled == o.early_flake_detection_enabled && + early_flake_detection_enabled_is_overridden == o.early_flake_detection_enabled_is_overridden && env == o.env && failed_test_replay_enabled == o.failed_test_replay_enabled && + failed_test_replay_enabled_is_overridden == o.failed_test_replay_enabled_is_overridden && pr_comments_enabled == o.pr_comments_enabled && repository_id == o.repository_id && service_name == o.service_name && test_impact_analysis_enabled == o.test_impact_analysis_enabled && + test_impact_analysis_enabled_is_overridden == o.test_impact_analysis_enabled_is_overridden && additional_properties == o.additional_properties end @@ -179,7 +229,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [auto_test_retries_enabled, code_coverage_enabled, early_flake_detection_enabled, env, failed_test_replay_enabled, pr_comments_enabled, repository_id, service_name, test_impact_analysis_enabled, additional_properties].hash + [auto_test_retries_enabled, auto_test_retries_enabled_is_overridden, code_coverage_enabled, code_coverage_enabled_is_overridden, early_flake_detection_enabled, early_flake_detection_enabled_is_overridden, env, failed_test_replay_enabled, failed_test_replay_enabled_is_overridden, pr_comments_enabled, repository_id, service_name, test_impact_analysis_enabled, test_impact_analysis_enabled_is_overridden, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_attributes.rb b/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_attributes.rb index 2ea0b8a6cc68..ce257c529895 100644 --- a/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_attributes.rb @@ -19,25 +19,38 @@ module DatadogAPIClient::V2 # Attributes for updating Test Optimization service settings. # All non-required fields are optional; only provided fields will be updated. + # Setting a field to `null` is a no-op. To reset a setting to inherit from the repository level, use the corresponding `_inherit` field. class TestOptimizationUpdateServiceSettingsRequestAttributes include BaseGenericModel - # Whether Auto Test Retries are enabled for this service. + # Whether Auto Test Retries are enabled for this service. Setting to `null` is a no-op; use `auto_test_retries_enabled_inherit` to reset to repository-level inheritance. attr_accessor :auto_test_retries_enabled - # Whether Code Coverage is enabled for this service. + # When `true`, resets the Auto Test Retries setting to inherit from the repository level. + attr_accessor :auto_test_retries_enabled_inherit + + # Whether Code Coverage is enabled for this service. Setting to `null` is a no-op; use `code_coverage_enabled_inherit` to reset to repository-level inheritance. attr_accessor :code_coverage_enabled - # Whether Early Flake Detection is enabled for this service. + # When `true`, resets the Code Coverage setting to inherit from the repository level. + attr_accessor :code_coverage_enabled_inherit + + # Whether Early Flake Detection is enabled for this service. Setting to `null` is a no-op; use `early_flake_detection_enabled_inherit` to reset to repository-level inheritance. attr_accessor :early_flake_detection_enabled + # When `true`, resets the Early Flake Detection setting to inherit from the repository level. + attr_accessor :early_flake_detection_enabled_inherit + # The environment name. If omitted, defaults to `none`. attr_accessor :env - # Whether Failed Test Replay is enabled for this service. + # Whether Failed Test Replay is enabled for this service. Setting to `null` is a no-op; use `failed_test_replay_enabled_inherit` to reset to repository-level inheritance. attr_accessor :failed_test_replay_enabled - # Whether PR Comments are enabled for this service. + # When `true`, resets the Failed Test Replay setting to inherit from the repository level. + attr_accessor :failed_test_replay_enabled_inherit + + # This field is ignored. PR Comments cannot be overridden at the service level. attr_accessor :pr_comments_enabled # The repository identifier. @@ -46,9 +59,12 @@ class TestOptimizationUpdateServiceSettingsRequestAttributes # The service name. attr_reader :service_name - # Whether Test Impact Analysis is enabled for this service. + # Whether Test Impact Analysis is enabled for this service. Setting to `null` is a no-op; use `test_impact_analysis_enabled_inherit` to reset to repository-level inheritance. attr_accessor :test_impact_analysis_enabled + # When `true`, resets the Test Impact Analysis setting to inherit from the repository level. + attr_accessor :test_impact_analysis_enabled_inherit + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -56,14 +72,19 @@ class TestOptimizationUpdateServiceSettingsRequestAttributes def self.attribute_map { :'auto_test_retries_enabled' => :'auto_test_retries_enabled', + :'auto_test_retries_enabled_inherit' => :'auto_test_retries_enabled_inherit', :'code_coverage_enabled' => :'code_coverage_enabled', + :'code_coverage_enabled_inherit' => :'code_coverage_enabled_inherit', :'early_flake_detection_enabled' => :'early_flake_detection_enabled', + :'early_flake_detection_enabled_inherit' => :'early_flake_detection_enabled_inherit', :'env' => :'env', :'failed_test_replay_enabled' => :'failed_test_replay_enabled', + :'failed_test_replay_enabled_inherit' => :'failed_test_replay_enabled_inherit', :'pr_comments_enabled' => :'pr_comments_enabled', :'repository_id' => :'repository_id', :'service_name' => :'service_name', - :'test_impact_analysis_enabled' => :'test_impact_analysis_enabled' + :'test_impact_analysis_enabled' => :'test_impact_analysis_enabled', + :'test_impact_analysis_enabled_inherit' => :'test_impact_analysis_enabled_inherit' } end @@ -72,14 +93,19 @@ def self.attribute_map def self.openapi_types { :'auto_test_retries_enabled' => :'Boolean', + :'auto_test_retries_enabled_inherit' => :'Boolean', :'code_coverage_enabled' => :'Boolean', + :'code_coverage_enabled_inherit' => :'Boolean', :'early_flake_detection_enabled' => :'Boolean', + :'early_flake_detection_enabled_inherit' => :'Boolean', :'env' => :'String', :'failed_test_replay_enabled' => :'Boolean', + :'failed_test_replay_enabled_inherit' => :'Boolean', :'pr_comments_enabled' => :'Boolean', :'repository_id' => :'String', :'service_name' => :'String', - :'test_impact_analysis_enabled' => :'Boolean' + :'test_impact_analysis_enabled' => :'Boolean', + :'test_impact_analysis_enabled_inherit' => :'Boolean' } end @@ -105,14 +131,26 @@ def initialize(attributes = {}) self.auto_test_retries_enabled = attributes[:'auto_test_retries_enabled'] end + if attributes.key?(:'auto_test_retries_enabled_inherit') + self.auto_test_retries_enabled_inherit = attributes[:'auto_test_retries_enabled_inherit'] + end + if attributes.key?(:'code_coverage_enabled') self.code_coverage_enabled = attributes[:'code_coverage_enabled'] end + if attributes.key?(:'code_coverage_enabled_inherit') + self.code_coverage_enabled_inherit = attributes[:'code_coverage_enabled_inherit'] + end + if attributes.key?(:'early_flake_detection_enabled') self.early_flake_detection_enabled = attributes[:'early_flake_detection_enabled'] end + if attributes.key?(:'early_flake_detection_enabled_inherit') + self.early_flake_detection_enabled_inherit = attributes[:'early_flake_detection_enabled_inherit'] + end + if attributes.key?(:'env') self.env = attributes[:'env'] end @@ -121,6 +159,10 @@ def initialize(attributes = {}) self.failed_test_replay_enabled = attributes[:'failed_test_replay_enabled'] end + if attributes.key?(:'failed_test_replay_enabled_inherit') + self.failed_test_replay_enabled_inherit = attributes[:'failed_test_replay_enabled_inherit'] + end + if attributes.key?(:'pr_comments_enabled') self.pr_comments_enabled = attributes[:'pr_comments_enabled'] end @@ -136,6 +178,10 @@ def initialize(attributes = {}) if attributes.key?(:'test_impact_analysis_enabled') self.test_impact_analysis_enabled = attributes[:'test_impact_analysis_enabled'] end + + if attributes.key?(:'test_impact_analysis_enabled_inherit') + self.test_impact_analysis_enabled_inherit = attributes[:'test_impact_analysis_enabled_inherit'] + end end # Check to see if the all the properties in the model are valid @@ -202,14 +248,19 @@ def ==(o) return true if self.equal?(o) self.class == o.class && auto_test_retries_enabled == o.auto_test_retries_enabled && + auto_test_retries_enabled_inherit == o.auto_test_retries_enabled_inherit && code_coverage_enabled == o.code_coverage_enabled && + code_coverage_enabled_inherit == o.code_coverage_enabled_inherit && early_flake_detection_enabled == o.early_flake_detection_enabled && + early_flake_detection_enabled_inherit == o.early_flake_detection_enabled_inherit && env == o.env && failed_test_replay_enabled == o.failed_test_replay_enabled && + failed_test_replay_enabled_inherit == o.failed_test_replay_enabled_inherit && pr_comments_enabled == o.pr_comments_enabled && repository_id == o.repository_id && service_name == o.service_name && test_impact_analysis_enabled == o.test_impact_analysis_enabled && + test_impact_analysis_enabled_inherit == o.test_impact_analysis_enabled_inherit && additional_properties == o.additional_properties end @@ -217,7 +268,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [auto_test_retries_enabled, code_coverage_enabled, early_flake_detection_enabled, env, failed_test_replay_enabled, pr_comments_enabled, repository_id, service_name, test_impact_analysis_enabled, additional_properties].hash + [auto_test_retries_enabled, auto_test_retries_enabled_inherit, code_coverage_enabled, code_coverage_enabled_inherit, early_flake_detection_enabled, early_flake_detection_enabled_inherit, env, failed_test_replay_enabled, failed_test_replay_enabled_inherit, pr_comments_enabled, repository_id, service_name, test_impact_analysis_enabled, test_impact_analysis_enabled_inherit, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_data.rb b/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_data.rb index c9287e586d13..87523ff8a5a0 100644 --- a/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_data.rb +++ b/lib/datadog_api_client/v2/models/test_optimization_update_service_settings_request_data.rb @@ -23,6 +23,7 @@ class TestOptimizationUpdateServiceSettingsRequestData # Attributes for updating Test Optimization service settings. # All non-required fields are optional; only provided fields will be updated. + # Setting a field to `null` is a no-op. To reset a setting to inherit from the repository level, use the corresponding `_inherit` field. attr_reader :attributes # JSON:API type for update service settings request.