diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4980e3a1bd22..9e009bb5a54f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -16546,10 +16546,12 @@ components: properties: completed_date: description: Timestamp of when the maintenance was completed. + example: "2026-02-18T19:51:13.332360075Z" format: date-time type: string completed_description: description: The description shown when the maintenance is completed. + example: "We have completed maintenance on the API to improve performance." type: string components_affected: description: The components affected by the maintenance. @@ -16558,12 +16560,15 @@ components: type: array in_progress_description: description: The description shown while the maintenance is in progress. + example: "We are currently performing maintenance on the API to improve performance." type: string scheduled_description: description: The description shown when the maintenance is scheduled. + example: "We will be performing maintenance on the API to improve performance." type: string start_date: description: Timestamp of when the maintenance is scheduled to start. + example: "2026-02-18T19:21:13.332360075Z" format: date-time type: string title: @@ -16573,6 +16578,11 @@ components: required: - components_affected - title + - completed_date + - completed_description + - scheduled_description + - start_date + - in_progress_description type: object CreateMaintenanceRequestDataAttributesComponentsAffectedItems: description: A component affected by a maintenance. 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 1f8733f3f218..af32081d1d96 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 @@ -22,22 +22,22 @@ class CreateMaintenanceRequestDataAttributes include BaseGenericModel # Timestamp of when the maintenance was completed. - attr_accessor :completed_date + attr_reader :completed_date # The description shown when the maintenance is completed. - attr_accessor :completed_description + attr_reader :completed_description # The components affected by the maintenance. attr_reader :components_affected # The description shown while the maintenance is in progress. - attr_accessor :in_progress_description + attr_reader :in_progress_description # The description shown when the maintenance is scheduled. - attr_accessor :scheduled_description + attr_reader :scheduled_description # Timestamp of when the maintenance is scheduled to start. - attr_accessor :start_date + attr_reader :start_date # The title of the maintenance. attr_reader :title @@ -125,11 +125,36 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private 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? return false if @title.nil? true end + # Custom attribute writer method with validation + # @param completed_date [Object] Object to be assigned + # @!visibility private + def completed_date=(completed_date) + if completed_date.nil? + fail ArgumentError, 'invalid value for "completed_date", completed_date cannot be nil.' + end + @completed_date = completed_date + end + + # Custom attribute writer method with validation + # @param completed_description [Object] Object to be assigned + # @!visibility private + def completed_description=(completed_description) + if completed_description.nil? + fail ArgumentError, 'invalid value for "completed_description", completed_description cannot be nil.' + end + @completed_description = completed_description + end + # Custom attribute writer method with validation # @param components_affected [Object] Object to be assigned # @!visibility private @@ -140,6 +165,36 @@ def components_affected=(components_affected) @components_affected = components_affected end + # Custom attribute writer method with validation + # @param in_progress_description [Object] Object to be assigned + # @!visibility private + def in_progress_description=(in_progress_description) + if in_progress_description.nil? + fail ArgumentError, 'invalid value for "in_progress_description", in_progress_description cannot be nil.' + end + @in_progress_description = in_progress_description + end + + # Custom attribute writer method with validation + # @param scheduled_description [Object] Object to be assigned + # @!visibility private + def scheduled_description=(scheduled_description) + if scheduled_description.nil? + fail ArgumentError, 'invalid value for "scheduled_description", scheduled_description cannot be nil.' + end + @scheduled_description = scheduled_description + end + + # Custom attribute writer method with validation + # @param start_date [Object] Object to be assigned + # @!visibility private + def start_date=(start_date) + if start_date.nil? + fail ArgumentError, 'invalid value for "start_date", start_date cannot be nil.' + end + @start_date = start_date + end + # Custom attribute writer method with validation # @param title [Object] Object to be assigned # @!visibility private