diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5423824d0a6..147e01bf6b9 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -13283,6 +13283,7 @@ components: type: $ref: '#/components/schemas/StatusPagesComponentGroupType' required: + - attributes - type type: object CreateComponentRequestDataAttributes: @@ -13367,7 +13368,7 @@ components: properties: id: description: The ID of the group. - example: '' + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string type: @@ -13569,6 +13570,7 @@ components: type: $ref: '#/components/schemas/PatchDegradationRequestDataType' required: + - attributes - type type: object CreateDegradationRequestDataAttributes: @@ -13604,7 +13606,7 @@ components: properties: id: description: The ID of the component. Must be a component of type `component`. - example: '' + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string name: @@ -14327,6 +14329,7 @@ components: type: $ref: '#/components/schemas/StatusPageDataType' required: + - attributes - type type: object CreateStatusPageRequestDataAttributes: @@ -18391,7 +18394,7 @@ components: properties: id: description: The ID of the component. - example: '' + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string name: @@ -18436,7 +18439,7 @@ components: properties: id: description: Identifier of the component affected at the time of the update. - example: '' + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string name: @@ -18512,7 +18515,7 @@ components: properties: id: description: The ID of the status page. - example: '' + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string type: @@ -43661,11 +43664,14 @@ components: $ref: '#/components/schemas/PatchComponentRequestDataAttributes' id: description: The ID of the component. + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string type: $ref: '#/components/schemas/StatusPagesComponentGroupType' required: + - attributes + - id - type type: object PatchComponentRequestDataAttributes: @@ -43704,11 +43710,14 @@ components: $ref: '#/components/schemas/PatchDegradationRequestDataAttributes' id: description: The ID of the degradation. + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string type: $ref: '#/components/schemas/PatchDegradationRequestDataType' required: + - attributes + - id - type type: object PatchDegradationRequestDataAttributes: @@ -43739,7 +43748,7 @@ components: properties: id: description: The ID of the component. Must be a component of type `component`. - example: '' + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string name: @@ -43844,11 +43853,14 @@ components: $ref: '#/components/schemas/PatchStatusPageRequestDataAttributes' id: description: The ID of the status page. + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string type: $ref: '#/components/schemas/StatusPageDataType' required: + - attributes + - id - type type: object PatchStatusPageRequestDataAttributes: @@ -58776,7 +58788,7 @@ components: properties: id: description: The ID of the group the component belongs to. - example: '' + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string type: @@ -58815,7 +58827,7 @@ components: properties: id: description: The ID of the status page the component belongs to. - example: '' + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string type: @@ -58957,7 +58969,7 @@ components: nullable: true properties: id: - example: '' + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string type: @@ -58999,7 +59011,7 @@ components: properties: id: description: The ID of the status page. - example: '' + example: 1234abcd-12ab-34cd-56ef-123456abcdef format: uuid type: string type: diff --git a/lib/datadog_api_client/v2/models/create_component_request_data.rb b/lib/datadog_api_client/v2/models/create_component_request_data.rb index 2082479d161..c7636411680 100644 --- a/lib/datadog_api_client/v2/models/create_component_request_data.rb +++ b/lib/datadog_api_client/v2/models/create_component_request_data.rb @@ -22,7 +22,7 @@ class CreateComponentRequestData include BaseGenericModel # The supported attributes for creating a component. - attr_accessor :attributes + attr_reader :attributes # The supported relationships for creating a component. attr_accessor :relationships @@ -87,10 +87,21 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if @attributes.nil? return false if @type.nil? true end + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/create_degradation_request_data.rb b/lib/datadog_api_client/v2/models/create_degradation_request_data.rb index 030e05c6f73..97a6bb99a2d 100644 --- a/lib/datadog_api_client/v2/models/create_degradation_request_data.rb +++ b/lib/datadog_api_client/v2/models/create_degradation_request_data.rb @@ -22,7 +22,7 @@ class CreateDegradationRequestData include BaseGenericModel # The supported attributes for creating a degradation. - attr_accessor :attributes + attr_reader :attributes # Degradations resource type. attr_reader :type @@ -78,10 +78,21 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if @attributes.nil? return false if @type.nil? true end + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/create_status_page_request_data.rb b/lib/datadog_api_client/v2/models/create_status_page_request_data.rb index 674b8670c7a..b58f9617ab4 100644 --- a/lib/datadog_api_client/v2/models/create_status_page_request_data.rb +++ b/lib/datadog_api_client/v2/models/create_status_page_request_data.rb @@ -22,7 +22,7 @@ class CreateStatusPageRequestData include BaseGenericModel # The supported attributes for creating a status page. - attr_accessor :attributes + attr_reader :attributes # Status pages resource type. attr_reader :type @@ -78,10 +78,21 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if @attributes.nil? return false if @type.nil? true end + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/patch_component_request_data.rb b/lib/datadog_api_client/v2/models/patch_component_request_data.rb index 5fcd76b2ad1..eb02c6e2d7a 100644 --- a/lib/datadog_api_client/v2/models/patch_component_request_data.rb +++ b/lib/datadog_api_client/v2/models/patch_component_request_data.rb @@ -22,10 +22,10 @@ class PatchComponentRequestData include BaseGenericModel # The supported attributes for updating a component. - attr_accessor :attributes + attr_reader :attributes # The ID of the component. - attr_accessor :id + attr_reader :id # Components resource type. attr_reader :type @@ -87,10 +87,32 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if @attributes.nil? + return false if @id.nil? return false if @type.nil? true end + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/patch_degradation_request_data.rb b/lib/datadog_api_client/v2/models/patch_degradation_request_data.rb index 66b22496605..3e0dd8c48e1 100644 --- a/lib/datadog_api_client/v2/models/patch_degradation_request_data.rb +++ b/lib/datadog_api_client/v2/models/patch_degradation_request_data.rb @@ -22,10 +22,10 @@ class PatchDegradationRequestData include BaseGenericModel # The supported attributes for updating a degradation. - attr_accessor :attributes + attr_reader :attributes # The ID of the degradation. - attr_accessor :id + attr_reader :id # Degradations resource type. attr_reader :type @@ -87,10 +87,32 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if @attributes.nil? + return false if @id.nil? return false if @type.nil? true end + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/patch_status_page_request_data.rb b/lib/datadog_api_client/v2/models/patch_status_page_request_data.rb index 0255d8f5b1f..01ebb844119 100644 --- a/lib/datadog_api_client/v2/models/patch_status_page_request_data.rb +++ b/lib/datadog_api_client/v2/models/patch_status_page_request_data.rb @@ -22,10 +22,10 @@ class PatchStatusPageRequestData include BaseGenericModel # The supported attributes for updating a status page. - attr_accessor :attributes + attr_reader :attributes # The ID of the status page. - attr_accessor :id + attr_reader :id # Status pages resource type. attr_reader :type @@ -87,10 +87,32 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if @attributes.nil? + return false if @id.nil? return false if @type.nil? true end + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private