Skip to content

Commit 7e23ba0

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b56a85b of spec repo
1 parent 42f8411 commit 7e23ba0

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
@@ -59823,6 +59823,7 @@ components:
5982359823
- $ref: "#/components/schemas/ObservabilityPipelineDedupeProcessor"
5982459824
- $ref: "#/components/schemas/ObservabilityPipelineEnrichmentTableProcessor"
5982559825
- $ref: "#/components/schemas/ObservabilityPipelineGenerateMetricsProcessor"
59826+
- $ref: "#/components/schemas/ObservabilityPipelineGenerateMetricsV2Processor"
5982659827
- $ref: "#/components/schemas/ObservabilityPipelineOcsfMapperProcessor"
5982759828
- $ref: "#/components/schemas/ObservabilityPipelineParseGrokProcessor"
5982859829
- $ref: "#/components/schemas/ObservabilityPipelineParseJSONProcessor"
@@ -60962,6 +60963,50 @@ components:
6096260963
type: string
6096360964
x-enum-varnames:
6096460965
- GENERATE_DATADOG_METRICS
60966+
ObservabilityPipelineGenerateMetricsV2Processor:
60967+
description: |-
60968+
The `generate_metrics` processor creates custom metrics from logs.
60969+
Metrics can be counters, gauges, or distributions and optionally grouped by log fields.
60970+
The generated metrics must be routed to a metrics destination using the input `<processor-id>.metrics`.
60971+
60972+
**Supported pipeline types:** logs
60973+
properties:
60974+
display_name:
60975+
$ref: "#/components/schemas/ObservabilityPipelineComponentDisplayName"
60976+
enabled:
60977+
description: Indicates whether the processor is enabled.
60978+
example: true
60979+
type: boolean
60980+
id:
60981+
description: The unique identifier for this component. Used to reference this component in other parts of the pipeline.
60982+
example: generate-metrics-processor
60983+
type: string
60984+
include:
60985+
description: A Datadog search query used to determine which logs this processor targets.
60986+
example: "service:my-service"
60987+
type: string
60988+
metrics:
60989+
description: Configuration for generating individual metrics.
60990+
items:
60991+
$ref: "#/components/schemas/ObservabilityPipelineGeneratedMetric"
60992+
type: array
60993+
type:
60994+
$ref: "#/components/schemas/ObservabilityPipelineGenerateMetricsV2ProcessorType"
60995+
required:
60996+
- id
60997+
- type
60998+
- enabled
60999+
type: object
61000+
x-pipeline-types: [logs]
61001+
ObservabilityPipelineGenerateMetricsV2ProcessorType:
61002+
default: generate_metrics
61003+
description: The processor type. Always `generate_metrics`.
61004+
enum:
61005+
- generate_metrics
61006+
example: generate_metrics
61007+
type: string
61008+
x-enum-varnames:
61009+
- GENERATE_METRICS
6096561010
ObservabilityPipelineGeneratedMetric:
6096661011
description: |-
6096761012
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
@@ -4771,6 +4771,8 @@ def overrides
47714771
"v2.observability_pipeline_generated_metric_metric_type" => "ObservabilityPipelineGeneratedMetricMetricType",
47724772
"v2.observability_pipeline_generate_metrics_processor" => "ObservabilityPipelineGenerateMetricsProcessor",
47734773
"v2.observability_pipeline_generate_metrics_processor_type" => "ObservabilityPipelineGenerateMetricsProcessorType",
4774+
"v2.observability_pipeline_generate_metrics_v2_processor" => "ObservabilityPipelineGenerateMetricsV2Processor",
4775+
"v2.observability_pipeline_generate_metrics_v2_processor_type" => "ObservabilityPipelineGenerateMetricsV2ProcessorType",
47744776
"v2.observability_pipeline_google_chronicle_destination" => "ObservabilityPipelineGoogleChronicleDestination",
47754777
"v2.observability_pipeline_google_chronicle_destination_encoding" => "ObservabilityPipelineGoogleChronicleDestinationEncoding",
47764778
"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)