Skip to content

Commit 327fe48

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e03163b of spec repo
1 parent 242684a commit 327fe48

9 files changed

+607
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29261,6 +29261,7 @@ components:
2926129261
- $ref: '#/components/schemas/ObservabilityPipelineSocketDestination'
2926229262
- $ref: '#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestination'
2926329263
- $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination'
29264+
- $ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestination'
2926429265
ObservabilityPipelineConfigProcessorItem:
2926529266
description: A processor for the pipeline.
2926629267
oneOf:
@@ -29300,6 +29301,7 @@ components:
2930029301
- $ref: '#/components/schemas/ObservabilityPipelineGooglePubSubSource'
2930129302
- $ref: '#/components/schemas/ObservabilityPipelineHttpClientSource'
2930229303
- $ref: '#/components/schemas/ObservabilityPipelineLogstashSource'
29304+
- $ref: '#/components/schemas/ObservabilityPipelineOpentelemetrySource'
2930329305
- $ref: '#/components/schemas/ObservabilityPipelineSocketSource'
2930429306
ObservabilityPipelineCrowdStrikeNextGenSiemDestination:
2930529307
description: The `crowdstrike_next_gen_siem` destination forwards logs to CrowdStrike
@@ -30322,6 +30324,65 @@ components:
3032230324
type: string
3032330325
x-enum-varnames:
3032430326
- GOOGLE_CLOUD_STORAGE
30327+
ObservabilityPipelineGooglePubSubDestination:
30328+
description: The `google_pubsub` destination publishes logs to a Google Cloud
30329+
Pub/Sub topic.
30330+
properties:
30331+
auth:
30332+
$ref: '#/components/schemas/ObservabilityPipelineGcpAuth'
30333+
encoding:
30334+
$ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestinationEncoding'
30335+
id:
30336+
description: The unique identifier for this component.
30337+
example: google-pubsub-destination
30338+
type: string
30339+
inputs:
30340+
description: A list of component IDs whose output is used as the `input`
30341+
for this component.
30342+
example:
30343+
- filter-processor
30344+
items:
30345+
type: string
30346+
type: array
30347+
project:
30348+
description: The GCP project ID that owns the Pub/Sub topic.
30349+
example: my-gcp-project
30350+
type: string
30351+
tls:
30352+
$ref: '#/components/schemas/ObservabilityPipelineTls'
30353+
topic:
30354+
description: The Pub/Sub topic name to publish logs to.
30355+
example: logs-subscription
30356+
type: string
30357+
type:
30358+
$ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestinationType'
30359+
required:
30360+
- id
30361+
- type
30362+
- inputs
30363+
- encoding
30364+
- project
30365+
- topic
30366+
type: object
30367+
ObservabilityPipelineGooglePubSubDestinationEncoding:
30368+
description: Encoding format for log events.
30369+
enum:
30370+
- json
30371+
- raw_message
30372+
example: json
30373+
type: string
30374+
x-enum-varnames:
30375+
- JSON
30376+
- RAW_MESSAGE
30377+
ObservabilityPipelineGooglePubSubDestinationType:
30378+
default: google_pubsub
30379+
description: The destination type. The value should always be `google_pubsub`.
30380+
enum:
30381+
- google_pubsub
30382+
example: google_pubsub
30383+
type: string
30384+
x-enum-varnames:
30385+
- GOOGLE_PUBSUB
3032530386
ObservabilityPipelineGooglePubSubSource:
3032630387
description: The `google_pubsub` source ingests logs from a Google Cloud Pub/Sub
3032730388
subscription.
@@ -30749,6 +30810,33 @@ components:
3074930810
type: string
3075030811
x-enum-varnames:
3075130812
- OPENSEARCH
30813+
ObservabilityPipelineOpentelemetrySource:
30814+
description: The `opentelemetry` source receives OpenTelemetry data through
30815+
gRPC or HTTP.
30816+
properties:
30817+
id:
30818+
description: The unique identifier for this component. Used to reference
30819+
this component in other parts of the pipeline (e.g., as input to downstream
30820+
components).
30821+
example: opentelemetry-source
30822+
type: string
30823+
tls:
30824+
$ref: '#/components/schemas/ObservabilityPipelineTls'
30825+
type:
30826+
$ref: '#/components/schemas/ObservabilityPipelineOpentelemetrySourceType'
30827+
required:
30828+
- id
30829+
- type
30830+
type: object
30831+
ObservabilityPipelineOpentelemetrySourceType:
30832+
default: opentelemetry
30833+
description: The source type. The value should always be `opentelemetry`.
30834+
enum:
30835+
- opentelemetry
30836+
example: opentelemetry
30837+
type: string
30838+
x-enum-varnames:
30839+
- OPENTELEMETRY
3075230840
ObservabilityPipelineParseGrokProcessor:
3075330841
description: The `parse_grok` processor extracts structured fields from unstructured
3075430842
log messages using Grok patterns.

src/datadogV2/model/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4290,6 +4290,12 @@ pub mod model_observability_pipeline_crowd_strike_next_gen_siem_destination_enco
42904290
pub use self::model_observability_pipeline_crowd_strike_next_gen_siem_destination_encoding::ObservabilityPipelineCrowdStrikeNextGenSiemDestinationEncoding;
42914291
pub mod model_observability_pipeline_crowd_strike_next_gen_siem_destination_type;
42924292
pub use self::model_observability_pipeline_crowd_strike_next_gen_siem_destination_type::ObservabilityPipelineCrowdStrikeNextGenSiemDestinationType;
4293+
pub mod model_observability_pipeline_google_pub_sub_destination;
4294+
pub use self::model_observability_pipeline_google_pub_sub_destination::ObservabilityPipelineGooglePubSubDestination;
4295+
pub mod model_observability_pipeline_google_pub_sub_destination_encoding;
4296+
pub use self::model_observability_pipeline_google_pub_sub_destination_encoding::ObservabilityPipelineGooglePubSubDestinationEncoding;
4297+
pub mod model_observability_pipeline_google_pub_sub_destination_type;
4298+
pub use self::model_observability_pipeline_google_pub_sub_destination_type::ObservabilityPipelineGooglePubSubDestinationType;
42934299
pub mod model_observability_pipeline_config_destination_item;
42944300
pub use self::model_observability_pipeline_config_destination_item::ObservabilityPipelineConfigDestinationItem;
42954301
pub mod model_observability_pipeline_filter_processor;
@@ -4562,6 +4568,10 @@ pub mod model_observability_pipeline_logstash_source;
45624568
pub use self::model_observability_pipeline_logstash_source::ObservabilityPipelineLogstashSource;
45634569
pub mod model_observability_pipeline_logstash_source_type;
45644570
pub use self::model_observability_pipeline_logstash_source_type::ObservabilityPipelineLogstashSourceType;
4571+
pub mod model_observability_pipeline_opentelemetry_source;
4572+
pub use self::model_observability_pipeline_opentelemetry_source::ObservabilityPipelineOpentelemetrySource;
4573+
pub mod model_observability_pipeline_opentelemetry_source_type;
4574+
pub use self::model_observability_pipeline_opentelemetry_source_type::ObservabilityPipelineOpentelemetrySourceType;
45654575
pub mod model_observability_pipeline_socket_source;
45664576
pub use self::model_observability_pipeline_socket_source::ObservabilityPipelineSocketSource;
45674577
pub mod model_observability_pipeline_socket_source_framing_newline_delimited;

src/datadogV2/model/model_observability_pipeline_config_destination_item.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ pub enum ObservabilityPipelineConfigDestinationItem {
5858
ObservabilityPipelineCrowdStrikeNextGenSiemDestination(
5959
Box<crate::datadogV2::model::ObservabilityPipelineCrowdStrikeNextGenSiemDestination>,
6060
),
61+
ObservabilityPipelineGooglePubSubDestination(
62+
Box<crate::datadogV2::model::ObservabilityPipelineGooglePubSubDestination>,
63+
),
6164
UnparsedObject(crate::datadog::UnparsedObject),
6265
}
6366

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

217228
return Ok(ObservabilityPipelineConfigDestinationItem::UnparsedObject(
218229
crate::datadog::UnparsedObject { value },

src/datadogV2/model/model_observability_pipeline_config_source_item.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ pub enum ObservabilityPipelineConfigSourceItem {
5353
ObservabilityPipelineLogstashSource(
5454
Box<crate::datadogV2::model::ObservabilityPipelineLogstashSource>,
5555
),
56+
ObservabilityPipelineOpentelemetrySource(
57+
Box<crate::datadogV2::model::ObservabilityPipelineOpentelemetrySource>,
58+
),
5659
ObservabilityPipelineSocketSource(
5760
Box<crate::datadogV2::model::ObservabilityPipelineSocketSource>,
5861
),
@@ -221,6 +224,18 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineConfigSourceItem {
221224
);
222225
}
223226
}
227+
if let Ok(_v) = serde_json::from_value::<
228+
Box<crate::datadogV2::model::ObservabilityPipelineOpentelemetrySource>,
229+
>(value.clone())
230+
{
231+
if !_v._unparsed {
232+
return Ok(
233+
ObservabilityPipelineConfigSourceItem::ObservabilityPipelineOpentelemetrySource(
234+
_v,
235+
),
236+
);
237+
}
238+
}
224239
if let Ok(_v) = serde_json::from_value::<
225240
Box<crate::datadogV2::model::ObservabilityPipelineSocketSource>,
226241
>(value.clone())
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
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 `google_pubsub` destination publishes logs to a Google Cloud Pub/Sub topic.
10+
#[non_exhaustive]
11+
#[skip_serializing_none]
12+
#[derive(Clone, Debug, PartialEq, Serialize)]
13+
pub struct ObservabilityPipelineGooglePubSubDestination {
14+
/// GCP credentials used to authenticate with Google Cloud Storage.
15+
///
16+
#[serde(rename = "auth")]
17+
pub auth: Option<crate::datadogV2::model::ObservabilityPipelineGcpAuth>,
18+
/// Encoding format for log events.
19+
#[serde(rename = "encoding")]
20+
pub encoding: crate::datadogV2::model::ObservabilityPipelineGooglePubSubDestinationEncoding,
21+
/// The unique identifier for this component.
22+
#[serde(rename = "id")]
23+
pub id: String,
24+
/// A list of component IDs whose output is used as the `input` for this component.
25+
#[serde(rename = "inputs")]
26+
pub inputs: Vec<String>,
27+
/// The GCP project ID that owns the Pub/Sub topic.
28+
#[serde(rename = "project")]
29+
pub project: String,
30+
/// Configuration for enabling TLS encryption between the pipeline component and external services.
31+
#[serde(rename = "tls")]
32+
pub tls: Option<crate::datadogV2::model::ObservabilityPipelineTls>,
33+
/// The Pub/Sub topic name to publish logs to.
34+
#[serde(rename = "topic")]
35+
pub topic: String,
36+
/// The destination type. The value should always be `google_pubsub`.
37+
#[serde(rename = "type")]
38+
pub type_: crate::datadogV2::model::ObservabilityPipelineGooglePubSubDestinationType,
39+
#[serde(flatten)]
40+
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
41+
#[serde(skip)]
42+
#[serde(default)]
43+
pub(crate) _unparsed: bool,
44+
}
45+
46+
impl ObservabilityPipelineGooglePubSubDestination {
47+
pub fn new(
48+
encoding: crate::datadogV2::model::ObservabilityPipelineGooglePubSubDestinationEncoding,
49+
id: String,
50+
inputs: Vec<String>,
51+
project: String,
52+
topic: String,
53+
type_: crate::datadogV2::model::ObservabilityPipelineGooglePubSubDestinationType,
54+
) -> ObservabilityPipelineGooglePubSubDestination {
55+
ObservabilityPipelineGooglePubSubDestination {
56+
auth: None,
57+
encoding,
58+
id,
59+
inputs,
60+
project,
61+
tls: None,
62+
topic,
63+
type_,
64+
additional_properties: std::collections::BTreeMap::new(),
65+
_unparsed: false,
66+
}
67+
}
68+
69+
pub fn auth(mut self, value: crate::datadogV2::model::ObservabilityPipelineGcpAuth) -> Self {
70+
self.auth = Some(value);
71+
self
72+
}
73+
74+
pub fn tls(mut self, value: crate::datadogV2::model::ObservabilityPipelineTls) -> Self {
75+
self.tls = Some(value);
76+
self
77+
}
78+
79+
pub fn additional_properties(
80+
mut self,
81+
value: std::collections::BTreeMap<String, serde_json::Value>,
82+
) -> Self {
83+
self.additional_properties = value;
84+
self
85+
}
86+
}
87+
88+
impl<'de> Deserialize<'de> for ObservabilityPipelineGooglePubSubDestination {
89+
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
90+
where
91+
D: Deserializer<'de>,
92+
{
93+
struct ObservabilityPipelineGooglePubSubDestinationVisitor;
94+
impl<'a> Visitor<'a> for ObservabilityPipelineGooglePubSubDestinationVisitor {
95+
type Value = ObservabilityPipelineGooglePubSubDestination;
96+
97+
fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result {
98+
f.write_str("a mapping")
99+
}
100+
101+
fn visit_map<M>(self, mut map: M) -> Result<Self::Value, M::Error>
102+
where
103+
M: MapAccess<'a>,
104+
{
105+
let mut auth: Option<crate::datadogV2::model::ObservabilityPipelineGcpAuth> = None;
106+
let mut encoding: Option<
107+
crate::datadogV2::model::ObservabilityPipelineGooglePubSubDestinationEncoding,
108+
> = None;
109+
let mut id: Option<String> = None;
110+
let mut inputs: Option<Vec<String>> = None;
111+
let mut project: Option<String> = None;
112+
let mut tls: Option<crate::datadogV2::model::ObservabilityPipelineTls> = None;
113+
let mut topic: Option<String> = None;
114+
let mut type_: Option<
115+
crate::datadogV2::model::ObservabilityPipelineGooglePubSubDestinationType,
116+
> = None;
117+
let mut additional_properties: std::collections::BTreeMap<
118+
String,
119+
serde_json::Value,
120+
> = std::collections::BTreeMap::new();
121+
let mut _unparsed = false;
122+
123+
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
124+
match k.as_str() {
125+
"auth" => {
126+
if v.is_null() {
127+
continue;
128+
}
129+
auth = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
130+
}
131+
"encoding" => {
132+
encoding = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
133+
if let Some(ref _encoding) = encoding {
134+
match _encoding {
135+
crate::datadogV2::model::ObservabilityPipelineGooglePubSubDestinationEncoding::UnparsedObject(_encoding) => {
136+
_unparsed = true;
137+
},
138+
_ => {}
139+
}
140+
}
141+
}
142+
"id" => {
143+
id = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
144+
}
145+
"inputs" => {
146+
inputs = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
147+
}
148+
"project" => {
149+
project = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
150+
}
151+
"tls" => {
152+
if v.is_null() {
153+
continue;
154+
}
155+
tls = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
156+
}
157+
"topic" => {
158+
topic = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
159+
}
160+
"type" => {
161+
type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
162+
if let Some(ref _type_) = type_ {
163+
match _type_ {
164+
crate::datadogV2::model::ObservabilityPipelineGooglePubSubDestinationType::UnparsedObject(_type_) => {
165+
_unparsed = true;
166+
},
167+
_ => {}
168+
}
169+
}
170+
}
171+
&_ => {
172+
if let Ok(value) = serde_json::from_value(v.clone()) {
173+
additional_properties.insert(k, value);
174+
}
175+
}
176+
}
177+
}
178+
let encoding = encoding.ok_or_else(|| M::Error::missing_field("encoding"))?;
179+
let id = id.ok_or_else(|| M::Error::missing_field("id"))?;
180+
let inputs = inputs.ok_or_else(|| M::Error::missing_field("inputs"))?;
181+
let project = project.ok_or_else(|| M::Error::missing_field("project"))?;
182+
let topic = topic.ok_or_else(|| M::Error::missing_field("topic"))?;
183+
let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?;
184+
185+
let content = ObservabilityPipelineGooglePubSubDestination {
186+
auth,
187+
encoding,
188+
id,
189+
inputs,
190+
project,
191+
tls,
192+
topic,
193+
type_,
194+
additional_properties,
195+
_unparsed,
196+
};
197+
198+
Ok(content)
199+
}
200+
}
201+
202+
deserializer.deserialize_any(ObservabilityPipelineGooglePubSubDestinationVisitor)
203+
}
204+
}

0 commit comments

Comments
 (0)