Skip to content

Commit 0dfdd5e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9a06a25 of spec repo
1 parent c014049 commit 0dfdd5e

5 files changed

Lines changed: 275 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61211,6 +61211,7 @@ components:
6121161211
- $ref: "#/components/schemas/ObservabilityPipelineDedupeProcessor"
6121261212
- $ref: "#/components/schemas/ObservabilityPipelineEnrichmentTableProcessor"
6121361213
- $ref: "#/components/schemas/ObservabilityPipelineGenerateMetricsProcessor"
61214+
- $ref: "#/components/schemas/ObservabilityPipelineGenerateMetricsV2Processor"
6121461215
- $ref: "#/components/schemas/ObservabilityPipelineOcsfMapperProcessor"
6121561216
- $ref: "#/components/schemas/ObservabilityPipelineParseGrokProcessor"
6121661217
- $ref: "#/components/schemas/ObservabilityPipelineParseJSONProcessor"
@@ -62350,6 +62351,50 @@ components:
6235062351
type: string
6235162352
x-enum-varnames:
6235262353
- GENERATE_DATADOG_METRICS
62354+
ObservabilityPipelineGenerateMetricsV2Processor:
62355+
description: |-
62356+
The `generate_metrics` processor creates custom metrics from logs.
62357+
Metrics can be counters, gauges, or distributions and optionally grouped by log fields.
62358+
The generated metrics must be routed to a metrics destination using the input `<processor-id>.metrics`.
62359+
62360+
**Supported pipeline types:** logs
62361+
properties:
62362+
display_name:
62363+
$ref: "#/components/schemas/ObservabilityPipelineComponentDisplayName"
62364+
enabled:
62365+
description: Indicates whether the processor is enabled.
62366+
example: true
62367+
type: boolean
62368+
id:
62369+
description: The unique identifier for this component. Used to reference this component in other parts of the pipeline.
62370+
example: generate-metrics-processor
62371+
type: string
62372+
include:
62373+
description: A Datadog search query used to determine which logs this processor targets.
62374+
example: "service:my-service"
62375+
type: string
62376+
metrics:
62377+
description: Configuration for generating individual metrics.
62378+
items:
62379+
$ref: "#/components/schemas/ObservabilityPipelineGeneratedMetric"
62380+
type: array
62381+
type:
62382+
$ref: "#/components/schemas/ObservabilityPipelineGenerateMetricsV2ProcessorType"
62383+
required:
62384+
- id
62385+
- type
62386+
- enabled
62387+
type: object
62388+
x-pipeline-types: [logs]
62389+
ObservabilityPipelineGenerateMetricsV2ProcessorType:
62390+
default: generate_metrics
62391+
description: The processor type. Always `generate_metrics`.
62392+
enum:
62393+
- generate_metrics
62394+
example: generate_metrics
62395+
type: string
62396+
x-enum-varnames:
62397+
- GENERATE_METRICS
6235362398
ObservabilityPipelineGeneratedMetric:
6235462399
description: |-
6235562400
Defines a log-based custom metric, including its name, type, filter, value computation strategy,

lib/datadog_api_client/inflector.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4855,6 +4855,8 @@ def overrides
48554855
"v2.observability_pipeline_generated_metric_metric_type" => "ObservabilityPipelineGeneratedMetricMetricType",
48564856
"v2.observability_pipeline_generate_metrics_processor" => "ObservabilityPipelineGenerateMetricsProcessor",
48574857
"v2.observability_pipeline_generate_metrics_processor_type" => "ObservabilityPipelineGenerateMetricsProcessorType",
4858+
"v2.observability_pipeline_generate_metrics_v2_processor" => "ObservabilityPipelineGenerateMetricsV2Processor",
4859+
"v2.observability_pipeline_generate_metrics_v2_processor_type" => "ObservabilityPipelineGenerateMetricsV2ProcessorType",
48584860
"v2.observability_pipeline_google_chronicle_destination" => "ObservabilityPipelineGoogleChronicleDestination",
48594861
"v2.observability_pipeline_google_chronicle_destination_encoding" => "ObservabilityPipelineGoogleChronicleDestinationEncoding",
48604862
"v2.observability_pipeline_google_chronicle_destination_type" => "ObservabilityPipelineGoogleChronicleDestinationType",

lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def openapi_one_of
3535
:'ObservabilityPipelineDedupeProcessor',
3636
:'ObservabilityPipelineEnrichmentTableProcessor',
3737
:'ObservabilityPipelineGenerateMetricsProcessor',
38+
:'ObservabilityPipelineGenerateMetricsV2Processor',
3839
:'ObservabilityPipelineOcsfMapperProcessor',
3940
:'ObservabilityPipelineParseGrokProcessor',
4041
:'ObservabilityPipelineParseJSONProcessor',
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V2
20+
# The `generate_metrics` processor creates custom metrics from logs.
21+
# Metrics can be counters, gauges, or distributions and optionally grouped by log fields.
22+
# The generated metrics must be routed to a metrics destination using the input `<processor-id>.metrics`.
23+
#
24+
# **Supported pipeline types:** logs
25+
class ObservabilityPipelineGenerateMetricsV2Processor
26+
include BaseGenericModel
27+
28+
# The display name for a component.
29+
attr_accessor :display_name
30+
31+
# Indicates whether the processor is enabled.
32+
attr_reader :enabled
33+
34+
# The unique identifier for this component. Used to reference this component in other parts of the pipeline.
35+
attr_reader :id
36+
37+
# A Datadog search query used to determine which logs this processor targets.
38+
attr_accessor :include
39+
40+
# Configuration for generating individual metrics.
41+
attr_accessor :metrics
42+
43+
# The processor type. Always `generate_metrics`.
44+
attr_reader :type
45+
46+
attr_accessor :additional_properties
47+
48+
# Attribute mapping from ruby-style variable name to JSON key.
49+
# @!visibility private
50+
def self.attribute_map
51+
{
52+
:'display_name' => :'display_name',
53+
:'enabled' => :'enabled',
54+
:'id' => :'id',
55+
:'include' => :'include',
56+
:'metrics' => :'metrics',
57+
:'type' => :'type'
58+
}
59+
end
60+
61+
# Attribute type mapping.
62+
# @!visibility private
63+
def self.openapi_types
64+
{
65+
:'display_name' => :'String',
66+
:'enabled' => :'Boolean',
67+
:'id' => :'String',
68+
:'include' => :'String',
69+
:'metrics' => :'Array<ObservabilityPipelineGeneratedMetric>',
70+
:'type' => :'ObservabilityPipelineGenerateMetricsV2ProcessorType'
71+
}
72+
end
73+
74+
# Initializes the object
75+
# @param attributes [Hash] Model attributes in the form of hash
76+
# @!visibility private
77+
def initialize(attributes = {})
78+
if (!attributes.is_a?(Hash))
79+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineGenerateMetricsV2Processor` initialize method"
80+
end
81+
82+
self.additional_properties = {}
83+
# check to see if the attribute exists and convert string to symbol for hash key
84+
attributes = attributes.each_with_object({}) { |(k, v), h|
85+
if (!self.class.attribute_map.key?(k.to_sym))
86+
self.additional_properties[k.to_sym] = v
87+
else
88+
h[k.to_sym] = v
89+
end
90+
}
91+
92+
if attributes.key?(:'display_name')
93+
self.display_name = attributes[:'display_name']
94+
end
95+
96+
if attributes.key?(:'enabled')
97+
self.enabled = attributes[:'enabled']
98+
end
99+
100+
if attributes.key?(:'id')
101+
self.id = attributes[:'id']
102+
end
103+
104+
if attributes.key?(:'include')
105+
self.include = attributes[:'include']
106+
end
107+
108+
if attributes.key?(:'metrics')
109+
if (value = attributes[:'metrics']).is_a?(Array)
110+
self.metrics = value
111+
end
112+
end
113+
114+
if attributes.key?(:'type')
115+
self.type = attributes[:'type']
116+
end
117+
end
118+
119+
# Check to see if the all the properties in the model are valid
120+
# @return true if the model is valid
121+
# @!visibility private
122+
def valid?
123+
return false if @enabled.nil?
124+
return false if @id.nil?
125+
return false if @type.nil?
126+
true
127+
end
128+
129+
# Custom attribute writer method with validation
130+
# @param enabled [Object] Object to be assigned
131+
# @!visibility private
132+
def enabled=(enabled)
133+
if enabled.nil?
134+
fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.'
135+
end
136+
@enabled = enabled
137+
end
138+
139+
# Custom attribute writer method with validation
140+
# @param id [Object] Object to be assigned
141+
# @!visibility private
142+
def id=(id)
143+
if id.nil?
144+
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
145+
end
146+
@id = id
147+
end
148+
149+
# Custom attribute writer method with validation
150+
# @param type [Object] Object to be assigned
151+
# @!visibility private
152+
def type=(type)
153+
if type.nil?
154+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
155+
end
156+
@type = type
157+
end
158+
159+
# Returns the object in the form of hash, with additionalProperties support.
160+
# @return [Hash] Returns the object in the form of hash
161+
# @!visibility private
162+
def to_hash
163+
hash = {}
164+
self.class.attribute_map.each_pair do |attr, param|
165+
value = self.send(attr)
166+
if value.nil?
167+
is_nullable = self.class.openapi_nullable.include?(attr)
168+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
169+
end
170+
171+
hash[param] = _to_hash(value)
172+
end
173+
self.additional_properties.each_pair do |attr, value|
174+
hash[attr] = value
175+
end
176+
hash
177+
end
178+
179+
# Checks equality by comparing each attribute.
180+
# @param o [Object] Object to be compared
181+
# @!visibility private
182+
def ==(o)
183+
return true if self.equal?(o)
184+
self.class == o.class &&
185+
display_name == o.display_name &&
186+
enabled == o.enabled &&
187+
id == o.id &&
188+
include == o.include &&
189+
metrics == o.metrics &&
190+
type == o.type &&
191+
additional_properties == o.additional_properties
192+
end
193+
194+
# Calculates hash code according to all attributes.
195+
# @return [Integer] Hash code
196+
# @!visibility private
197+
def hash
198+
[display_name, enabled, id, include, metrics, type, additional_properties].hash
199+
end
200+
end
201+
end
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V2
20+
# The processor type. Always `generate_metrics`.
21+
class ObservabilityPipelineGenerateMetricsV2ProcessorType
22+
include BaseEnumModel
23+
24+
GENERATE_METRICS = "generate_metrics".freeze
25+
end
26+
end

0 commit comments

Comments
 (0)