diff --git a/.generated-info b/.generated-info index 126fda6a0b0a..dbb48bef672d 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "b75095c", - "generated": "2025-07-31 10:45:49.687" + "spec_repo_commit": "b14c9da", + "generated": "2025-07-31 15:31:39.889" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b125b71c69d5..ab031f4a84e5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -27480,6 +27480,16 @@ components: description: The `sample` processor allows probabilistic sampling of logs at a fixed rate. properties: + group_by: + description: Optional list of fields to group events by. Each group will + be sampled independently + example: + - service + - host + items: + type: string + minItems: 1 + type: array id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` 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 32229c4bad55..0ccd32df2a9c 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 @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ObservabilityPipelineSampleProcessor include BaseGenericModel + # Optional list of fields to group events by. Each group will be sampled independently + attr_reader :group_by + # The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` to downstream components). attr_reader :id @@ -45,6 +48,7 @@ class ObservabilityPipelineSampleProcessor # @!visibility private def self.attribute_map { + :'group_by' => :'group_by', :'id' => :'id', :'include' => :'include', :'inputs' => :'inputs', @@ -58,6 +62,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'group_by' => :'Array', :'id' => :'String', :'include' => :'String', :'inputs' => :'Array', @@ -85,6 +90,12 @@ def initialize(attributes = {}) end } + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -116,6 +127,7 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@group_by.nil? && @group_by.length < 1 return false if @id.nil? return false if @include.nil? return false if @inputs.nil? @@ -124,6 +136,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param group_by [Object] Object to be assigned + # @!visibility private + def group_by=(group_by) + if !group_by.nil? && group_by.length < 1 + fail ArgumentError, 'invalid value for "group_by", number of items must be greater than or equal to 1.' + end + @group_by = group_by + end + # Custom attribute writer method with validation # @param id [Object] Object to be assigned # @!visibility private @@ -200,6 +222,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + group_by == o.group_by && id == o.id && include == o.include && inputs == o.inputs && @@ -213,7 +236,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, include, inputs, percentage, rate, type, additional_properties].hash + [group_by, id, include, inputs, percentage, rate, type, additional_properties].hash end end end