diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index cfbcb7286ac..56373d348f4 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -37791,18 +37791,13 @@ components: example: 10.0 format: double type: number - rate: - description: Number of events to sample (1 in N). - example: 10 - format: int64 - minimum: 1 - type: integer type: $ref: '#/components/schemas/ObservabilityPipelineSampleProcessorType' required: - id - type - include + - percentage - enabled type: object ObservabilityPipelineSampleProcessorType: diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb index e8e7e7af2b7..d9ccc89c80b 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb @@ -34,10 +34,7 @@ class ObservabilityPipelineSampleProcessor attr_reader :include # The percentage of logs to sample. - attr_accessor :percentage - - # Number of events to sample (1 in N). - attr_reader :rate + attr_reader :percentage # The processor type. The value should always be `sample`. attr_reader :type @@ -53,7 +50,6 @@ def self.attribute_map :'id' => :'id', :'include' => :'include', :'percentage' => :'percentage', - :'rate' => :'rate', :'type' => :'type' } end @@ -67,7 +63,6 @@ def self.openapi_types :'id' => :'String', :'include' => :'String', :'percentage' => :'Float', - :'rate' => :'Integer', :'type' => :'ObservabilityPipelineSampleProcessorType' } end @@ -110,10 +105,6 @@ def initialize(attributes = {}) self.percentage = attributes[:'percentage'] end - if attributes.key?(:'rate') - self.rate = attributes[:'rate'] - end - if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -126,7 +117,7 @@ def valid? return false if @enabled.nil? return false if @id.nil? return false if @include.nil? - return false if !@rate.nil? && @rate < 1 + return false if @percentage.nil? return false if @type.nil? true end @@ -162,13 +153,13 @@ def include=(include) end # Custom attribute writer method with validation - # @param rate [Object] Object to be assigned + # @param percentage [Object] Object to be assigned # @!visibility private - def rate=(rate) - if !rate.nil? && rate < 1 - fail ArgumentError, 'invalid value for "rate", must be greater than or equal to 1.' + def percentage=(percentage) + if percentage.nil? + fail ArgumentError, 'invalid value for "percentage", percentage cannot be nil.' end - @rate = rate + @percentage = percentage end # Custom attribute writer method with validation @@ -212,7 +203,6 @@ def ==(o) id == o.id && include == o.include && percentage == o.percentage && - rate == o.rate && type == o.type && additional_properties == o.additional_properties end @@ -221,7 +211,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [display_name, enabled, id, include, percentage, rate, type, additional_properties].hash + [display_name, enabled, id, include, percentage, type, additional_properties].hash end end end