Skip to content

Commit 65fda66

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b14c9da of spec repo
1 parent 2fcd67a commit 65fda66

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "b75095c",
3-
"generated": "2025-07-31 10:45:49.687"
2+
"spec_repo_commit": "b14c9da",
3+
"generated": "2025-07-31 15:31:39.889"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27480,6 +27480,16 @@ components:
2748027480
description: The `sample` processor allows probabilistic sampling of logs at
2748127481
a fixed rate.
2748227482
properties:
27483+
group_by:
27484+
description: Optional list of fields to group events by. Each group will
27485+
be sampled independently
27486+
example:
27487+
- service
27488+
- host
27489+
items:
27490+
type: string
27491+
minItems: 1
27492+
type: array
2748327493
id:
2748427494
description: The unique identifier for this component. Used to reference
2748527495
this component in other parts of the pipeline (for example, as the `input`

lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
2121
class ObservabilityPipelineSampleProcessor
2222
include BaseGenericModel
2323

24+
# Optional list of fields to group events by. Each group will be sampled independently
25+
attr_reader :group_by
26+
2427
# 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).
2528
attr_reader :id
2629

@@ -45,6 +48,7 @@ class ObservabilityPipelineSampleProcessor
4548
# @!visibility private
4649
def self.attribute_map
4750
{
51+
:'group_by' => :'group_by',
4852
:'id' => :'id',
4953
:'include' => :'include',
5054
:'inputs' => :'inputs',
@@ -58,6 +62,7 @@ def self.attribute_map
5862
# @!visibility private
5963
def self.openapi_types
6064
{
65+
:'group_by' => :'Array<String>',
6166
:'id' => :'String',
6267
:'include' => :'String',
6368
:'inputs' => :'Array<String>',
@@ -85,6 +90,12 @@ def initialize(attributes = {})
8590
end
8691
}
8792

93+
if attributes.key?(:'group_by')
94+
if (value = attributes[:'group_by']).is_a?(Array)
95+
self.group_by = value
96+
end
97+
end
98+
8899
if attributes.key?(:'id')
89100
self.id = attributes[:'id']
90101
end
@@ -116,6 +127,7 @@ def initialize(attributes = {})
116127
# @return true if the model is valid
117128
# @!visibility private
118129
def valid?
130+
return false if !@group_by.nil? && @group_by.length < 1
119131
return false if @id.nil?
120132
return false if @include.nil?
121133
return false if @inputs.nil?
@@ -124,6 +136,16 @@ def valid?
124136
true
125137
end
126138

139+
# Custom attribute writer method with validation
140+
# @param group_by [Object] Object to be assigned
141+
# @!visibility private
142+
def group_by=(group_by)
143+
if !group_by.nil? && group_by.length < 1
144+
fail ArgumentError, 'invalid value for "group_by", number of items must be greater than or equal to 1.'
145+
end
146+
@group_by = group_by
147+
end
148+
127149
# Custom attribute writer method with validation
128150
# @param id [Object] Object to be assigned
129151
# @!visibility private
@@ -200,6 +222,7 @@ def to_hash
200222
def ==(o)
201223
return true if self.equal?(o)
202224
self.class == o.class &&
225+
group_by == o.group_by &&
203226
id == o.id &&
204227
include == o.include &&
205228
inputs == o.inputs &&
@@ -213,7 +236,7 @@ def ==(o)
213236
# @return [Integer] Hash code
214237
# @!visibility private
215238
def hash
216-
[id, include, inputs, percentage, rate, type, additional_properties].hash
239+
[group_by, id, include, inputs, percentage, rate, type, additional_properties].hash
217240
end
218241
end
219242
end

0 commit comments

Comments
 (0)