Skip to content

Commit 75d61a0

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ce2ae7a of spec repo
1 parent 1fcd8e7 commit 75d61a0

8 files changed

+435
-2
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": "d93d991",
3-
"generated": "2025-07-15 09:36:57.148"
2+
"spec_repo_commit": "ce2ae7a",
3+
"generated": "2025-07-15 23:00:03.186"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25164,6 +25164,7 @@ components:
2516425164
- $ref: '#/components/schemas/ObservabilityPipelineEnrichmentTableProcessor'
2516525165
- $ref: '#/components/schemas/ObservabilityPipelineReduceProcessor'
2516625166
- $ref: '#/components/schemas/ObservabilityPipelineThrottleProcessor'
25167+
- $ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessor'
2516725168
ObservabilityPipelineConfigSourceItem:
2516825169
description: A data source for the pipeline.
2516925170
oneOf:
@@ -25273,6 +25274,82 @@ components:
2527325274
type: string
2527425275
x-enum-varnames:
2527525276
- DATADOG_LOGS
25277+
ObservabilityPipelineDatadogTagsProcessor:
25278+
description: The `datadog_tags` processor filters logs based on Datadog tags.
25279+
It can include or exclude logs that have specific tag keys.
25280+
properties:
25281+
action:
25282+
$ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorAction'
25283+
id:
25284+
description: The unique identifier for this component. Used to reference
25285+
this component in other parts of the pipeline (for example, as the `input`
25286+
to downstream components).
25287+
example: datadog-tags-processor
25288+
type: string
25289+
include:
25290+
description: A Datadog search query used to determine which logs this processor
25291+
targets.
25292+
example: service:my-service
25293+
type: string
25294+
inputs:
25295+
description: A list of component IDs whose output is used as the `input`
25296+
for this component.
25297+
example:
25298+
- datadog-agent-source
25299+
items:
25300+
type: string
25301+
type: array
25302+
keys:
25303+
description: A list of tag keys to filter on. Tag keys must start with a
25304+
letter and contain only letters, numbers, underscores, hyphens, periods,
25305+
or slashes. Maximum 100 keys allowed.
25306+
example:
25307+
- env
25308+
- service
25309+
- version
25310+
items:
25311+
type: string
25312+
type: array
25313+
mode:
25314+
$ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorMode'
25315+
type:
25316+
$ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorType'
25317+
required:
25318+
- id
25319+
- type
25320+
- include
25321+
- mode
25322+
- action
25323+
- keys
25324+
- inputs
25325+
type: object
25326+
ObservabilityPipelineDatadogTagsProcessorAction:
25327+
description: The action to take on logs that match the specified tag keys.
25328+
enum:
25329+
- include
25330+
- exclude
25331+
example: include
25332+
type: string
25333+
x-enum-varnames:
25334+
- INCLUDE
25335+
- EXCLUDE
25336+
ObservabilityPipelineDatadogTagsProcessorMode:
25337+
description: The filtering mode. Currently only `filter` is supported.
25338+
enum:
25339+
- filter
25340+
example: filter
25341+
type: string
25342+
x-enum-varnames:
25343+
- FILTER
25344+
ObservabilityPipelineDatadogTagsProcessorType:
25345+
default: datadog_tags
25346+
description: The processor type. The value should always be `datadog_tags`.
25347+
enum:
25348+
- datadog_tags
25349+
example: datadog_tags
25350+
type: string
25351+
x-enum-varnames:
25352+
- DATADOG_TAGS
2527625353
ObservabilityPipelineDecoding:
2527725354
description: The decoding format used to interpret incoming logs.
2527825355
enum:

src/datadogV2/model/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3650,6 +3650,14 @@ pub mod model_observability_pipeline_throttle_processor;
36503650
pub use self::model_observability_pipeline_throttle_processor::ObservabilityPipelineThrottleProcessor;
36513651
pub mod model_observability_pipeline_throttle_processor_type;
36523652
pub use self::model_observability_pipeline_throttle_processor_type::ObservabilityPipelineThrottleProcessorType;
3653+
pub mod model_observability_pipeline_datadog_tags_processor;
3654+
pub use self::model_observability_pipeline_datadog_tags_processor::ObservabilityPipelineDatadogTagsProcessor;
3655+
pub mod model_observability_pipeline_datadog_tags_processor_action;
3656+
pub use self::model_observability_pipeline_datadog_tags_processor_action::ObservabilityPipelineDatadogTagsProcessorAction;
3657+
pub mod model_observability_pipeline_datadog_tags_processor_mode;
3658+
pub use self::model_observability_pipeline_datadog_tags_processor_mode::ObservabilityPipelineDatadogTagsProcessorMode;
3659+
pub mod model_observability_pipeline_datadog_tags_processor_type;
3660+
pub use self::model_observability_pipeline_datadog_tags_processor_type::ObservabilityPipelineDatadogTagsProcessorType;
36533661
pub mod model_observability_pipeline_config_processor_item;
36543662
pub use self::model_observability_pipeline_config_processor_item::ObservabilityPipelineConfigProcessorItem;
36553663
pub mod model_observability_pipeline_kafka_source;

src/datadogV2/model/model_observability_pipeline_config_processor_item.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ pub enum ObservabilityPipelineConfigProcessorItem {
5656
ObservabilityPipelineThrottleProcessor(
5757
Box<crate::datadogV2::model::ObservabilityPipelineThrottleProcessor>,
5858
),
59+
ObservabilityPipelineDatadogTagsProcessor(
60+
Box<crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessor>,
61+
),
5962
UnparsedObject(crate::datadog::UnparsedObject),
6063
}
6164

@@ -213,6 +216,14 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineConfigProcessorItem {
213216
return Ok(ObservabilityPipelineConfigProcessorItem::ObservabilityPipelineThrottleProcessor(_v));
214217
}
215218
}
219+
if let Ok(_v) = serde_json::from_value::<
220+
Box<crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessor>,
221+
>(value.clone())
222+
{
223+
if !_v._unparsed {
224+
return Ok(ObservabilityPipelineConfigProcessorItem::ObservabilityPipelineDatadogTagsProcessor(_v));
225+
}
226+
}
216227

217228
return Ok(ObservabilityPipelineConfigProcessorItem::UnparsedObject(
218229
crate::datadog::UnparsedObject { value },
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
use serde::de::{Error, MapAccess, Visitor};
5+
use serde::{Deserialize, Deserializer, Serialize};
6+
use serde_with::skip_serializing_none;
7+
use std::fmt::{self, Formatter};
8+
9+
/// The `datadog_tags` processor filters logs based on Datadog tags. It can include or exclude logs that have specific tag keys.
10+
#[non_exhaustive]
11+
#[skip_serializing_none]
12+
#[derive(Clone, Debug, PartialEq, Serialize)]
13+
pub struct ObservabilityPipelineDatadogTagsProcessor {
14+
/// The action to take on logs that match the specified tag keys.
15+
#[serde(rename = "action")]
16+
pub action: crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorAction,
17+
/// 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).
18+
#[serde(rename = "id")]
19+
pub id: String,
20+
/// A Datadog search query used to determine which logs this processor targets.
21+
#[serde(rename = "include")]
22+
pub include: String,
23+
/// A list of component IDs whose output is used as the `input` for this component.
24+
#[serde(rename = "inputs")]
25+
pub inputs: Vec<String>,
26+
/// A list of tag keys to filter on. Tag keys must start with a letter and contain only letters, numbers, underscores, hyphens, periods, or slashes. Maximum 100 keys allowed.
27+
#[serde(rename = "keys")]
28+
pub keys: Vec<String>,
29+
/// The filtering mode. Currently only `filter` is supported.
30+
#[serde(rename = "mode")]
31+
pub mode: crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorMode,
32+
/// The processor type. The value should always be `datadog_tags`.
33+
#[serde(rename = "type")]
34+
pub type_: crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorType,
35+
#[serde(flatten)]
36+
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
37+
#[serde(skip)]
38+
#[serde(default)]
39+
pub(crate) _unparsed: bool,
40+
}
41+
42+
impl ObservabilityPipelineDatadogTagsProcessor {
43+
pub fn new(
44+
action: crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorAction,
45+
id: String,
46+
include: String,
47+
inputs: Vec<String>,
48+
keys: Vec<String>,
49+
mode: crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorMode,
50+
type_: crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorType,
51+
) -> ObservabilityPipelineDatadogTagsProcessor {
52+
ObservabilityPipelineDatadogTagsProcessor {
53+
action,
54+
id,
55+
include,
56+
inputs,
57+
keys,
58+
mode,
59+
type_,
60+
additional_properties: std::collections::BTreeMap::new(),
61+
_unparsed: false,
62+
}
63+
}
64+
65+
pub fn additional_properties(
66+
mut self,
67+
value: std::collections::BTreeMap<String, serde_json::Value>,
68+
) -> Self {
69+
self.additional_properties = value;
70+
self
71+
}
72+
}
73+
74+
impl<'de> Deserialize<'de> for ObservabilityPipelineDatadogTagsProcessor {
75+
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
76+
where
77+
D: Deserializer<'de>,
78+
{
79+
struct ObservabilityPipelineDatadogTagsProcessorVisitor;
80+
impl<'a> Visitor<'a> for ObservabilityPipelineDatadogTagsProcessorVisitor {
81+
type Value = ObservabilityPipelineDatadogTagsProcessor;
82+
83+
fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result {
84+
f.write_str("a mapping")
85+
}
86+
87+
fn visit_map<M>(self, mut map: M) -> Result<Self::Value, M::Error>
88+
where
89+
M: MapAccess<'a>,
90+
{
91+
let mut action: Option<
92+
crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorAction,
93+
> = None;
94+
let mut id: Option<String> = None;
95+
let mut include: Option<String> = None;
96+
let mut inputs: Option<Vec<String>> = None;
97+
let mut keys: Option<Vec<String>> = None;
98+
let mut mode: Option<
99+
crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorMode,
100+
> = None;
101+
let mut type_: Option<
102+
crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorType,
103+
> = None;
104+
let mut additional_properties: std::collections::BTreeMap<
105+
String,
106+
serde_json::Value,
107+
> = std::collections::BTreeMap::new();
108+
let mut _unparsed = false;
109+
110+
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
111+
match k.as_str() {
112+
"action" => {
113+
action = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
114+
if let Some(ref _action) = action {
115+
match _action {
116+
crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorAction::UnparsedObject(_action) => {
117+
_unparsed = true;
118+
},
119+
_ => {}
120+
}
121+
}
122+
}
123+
"id" => {
124+
id = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
125+
}
126+
"include" => {
127+
include = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
128+
}
129+
"inputs" => {
130+
inputs = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
131+
}
132+
"keys" => {
133+
keys = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
134+
}
135+
"mode" => {
136+
mode = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
137+
if let Some(ref _mode) = mode {
138+
match _mode {
139+
crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorMode::UnparsedObject(_mode) => {
140+
_unparsed = true;
141+
},
142+
_ => {}
143+
}
144+
}
145+
}
146+
"type" => {
147+
type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
148+
if let Some(ref _type_) = type_ {
149+
match _type_ {
150+
crate::datadogV2::model::ObservabilityPipelineDatadogTagsProcessorType::UnparsedObject(_type_) => {
151+
_unparsed = true;
152+
},
153+
_ => {}
154+
}
155+
}
156+
}
157+
&_ => {
158+
if let Ok(value) = serde_json::from_value(v.clone()) {
159+
additional_properties.insert(k, value);
160+
}
161+
}
162+
}
163+
}
164+
let action = action.ok_or_else(|| M::Error::missing_field("action"))?;
165+
let id = id.ok_or_else(|| M::Error::missing_field("id"))?;
166+
let include = include.ok_or_else(|| M::Error::missing_field("include"))?;
167+
let inputs = inputs.ok_or_else(|| M::Error::missing_field("inputs"))?;
168+
let keys = keys.ok_or_else(|| M::Error::missing_field("keys"))?;
169+
let mode = mode.ok_or_else(|| M::Error::missing_field("mode"))?;
170+
let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?;
171+
172+
let content = ObservabilityPipelineDatadogTagsProcessor {
173+
action,
174+
id,
175+
include,
176+
inputs,
177+
keys,
178+
mode,
179+
type_,
180+
additional_properties,
181+
_unparsed,
182+
};
183+
184+
Ok(content)
185+
}
186+
}
187+
188+
deserializer.deserialize_any(ObservabilityPipelineDatadogTagsProcessorVisitor)
189+
}
190+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
5+
use serde::{Deserialize, Deserializer, Serialize, Serializer};
6+
7+
#[non_exhaustive]
8+
#[derive(Clone, Debug, Eq, PartialEq)]
9+
pub enum ObservabilityPipelineDatadogTagsProcessorAction {
10+
INCLUDE,
11+
EXCLUDE,
12+
UnparsedObject(crate::datadog::UnparsedObject),
13+
}
14+
15+
impl ToString for ObservabilityPipelineDatadogTagsProcessorAction {
16+
fn to_string(&self) -> String {
17+
match self {
18+
Self::INCLUDE => String::from("include"),
19+
Self::EXCLUDE => String::from("exclude"),
20+
Self::UnparsedObject(v) => v.value.to_string(),
21+
}
22+
}
23+
}
24+
25+
impl Serialize for ObservabilityPipelineDatadogTagsProcessorAction {
26+
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
27+
where
28+
S: Serializer,
29+
{
30+
match self {
31+
Self::UnparsedObject(v) => v.serialize(serializer),
32+
_ => serializer.serialize_str(self.to_string().as_str()),
33+
}
34+
}
35+
}
36+
37+
impl<'de> Deserialize<'de> for ObservabilityPipelineDatadogTagsProcessorAction {
38+
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
39+
where
40+
D: Deserializer<'de>,
41+
{
42+
let s: String = String::deserialize(deserializer)?;
43+
Ok(match s.as_str() {
44+
"include" => Self::INCLUDE,
45+
"exclude" => Self::EXCLUDE,
46+
_ => Self::UnparsedObject(crate::datadog::UnparsedObject {
47+
value: serde_json::Value::String(s.into()),
48+
}),
49+
})
50+
}
51+
}

0 commit comments

Comments
 (0)