Skip to content

Commit 9dc8cfa

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b914c06 of spec repo
1 parent 0bc1c26 commit 9dc8cfa

4 files changed

Lines changed: 18 additions & 51 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39639,6 +39639,8 @@ components:
3963939639
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsDiskType'
3964039640
when_full:
3964139641
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
39642+
required:
39643+
- max_size
3964239644
type: object
3964339645
ObservabilityPipelineElasticsearchDestination:
3964439646
description: 'The `elasticsearch` destination writes logs to an Elasticsearch
@@ -40892,6 +40894,8 @@ components:
4089240894
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType'
4089340895
when_full:
4089440896
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
40897+
required:
40898+
- max_size
4089540899
type: object
4089640900
ObservabilityPipelineMemoryBufferSizeOptions:
4089740901
description: Options for configuring a memory buffer by queue length.
@@ -40905,6 +40909,8 @@ components:
4090540909
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType'
4090640910
when_full:
4090740911
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
40912+
required:
40913+
- max_events
4090840914
type: object
4090940915
ObservabilityPipelineMetadataEntry:
4091040916
description: A custom metadata entry.

src/datadogV2/model/model_observability_pipeline_disk_buffer_options.rs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::fmt::{self, Formatter};
1313
pub struct ObservabilityPipelineDiskBufferOptions {
1414
/// Maximum size of the disk buffer.
1515
#[serde(rename = "max_size")]
16-
pub max_size: Option<i64>,
16+
pub max_size: i64,
1717
/// The type of the buffer that will be configured, a disk buffer.
1818
#[serde(rename = "type")]
1919
pub type_: Option<crate::datadogV2::model::ObservabilityPipelineBufferOptionsDiskType>,
@@ -28,21 +28,16 @@ pub struct ObservabilityPipelineDiskBufferOptions {
2828
}
2929

3030
impl ObservabilityPipelineDiskBufferOptions {
31-
pub fn new() -> ObservabilityPipelineDiskBufferOptions {
31+
pub fn new(max_size: i64) -> ObservabilityPipelineDiskBufferOptions {
3232
ObservabilityPipelineDiskBufferOptions {
33-
max_size: None,
33+
max_size,
3434
type_: None,
3535
when_full: None,
3636
additional_properties: std::collections::BTreeMap::new(),
3737
_unparsed: false,
3838
}
3939
}
4040

41-
pub fn max_size(mut self, value: i64) -> Self {
42-
self.max_size = Some(value);
43-
self
44-
}
45-
4641
pub fn type_(
4742
mut self,
4843
value: crate::datadogV2::model::ObservabilityPipelineBufferOptionsDiskType,
@@ -68,12 +63,6 @@ impl ObservabilityPipelineDiskBufferOptions {
6863
}
6964
}
7065

71-
impl Default for ObservabilityPipelineDiskBufferOptions {
72-
fn default() -> Self {
73-
Self::new()
74-
}
75-
}
76-
7766
impl<'de> Deserialize<'de> for ObservabilityPipelineDiskBufferOptions {
7867
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
7968
where
@@ -107,9 +96,6 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineDiskBufferOptions {
10796
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
10897
match k.as_str() {
10998
"max_size" => {
110-
if v.is_null() {
111-
continue;
112-
}
11399
max_size = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
114100
}
115101
"type" => {
@@ -147,6 +133,7 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineDiskBufferOptions {
147133
}
148134
}
149135
}
136+
let max_size = max_size.ok_or_else(|| M::Error::missing_field("max_size"))?;
150137

151138
let content = ObservabilityPipelineDiskBufferOptions {
152139
max_size,

src/datadogV2/model/model_observability_pipeline_memory_buffer_options.rs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::fmt::{self, Formatter};
1313
pub struct ObservabilityPipelineMemoryBufferOptions {
1414
/// Maximum size of the memory buffer.
1515
#[serde(rename = "max_size")]
16-
pub max_size: Option<i64>,
16+
pub max_size: i64,
1717
/// The type of the buffer that will be configured, a memory buffer.
1818
#[serde(rename = "type")]
1919
pub type_: Option<crate::datadogV2::model::ObservabilityPipelineBufferOptionsMemoryType>,
@@ -28,21 +28,16 @@ pub struct ObservabilityPipelineMemoryBufferOptions {
2828
}
2929

3030
impl ObservabilityPipelineMemoryBufferOptions {
31-
pub fn new() -> ObservabilityPipelineMemoryBufferOptions {
31+
pub fn new(max_size: i64) -> ObservabilityPipelineMemoryBufferOptions {
3232
ObservabilityPipelineMemoryBufferOptions {
33-
max_size: None,
33+
max_size,
3434
type_: None,
3535
when_full: None,
3636
additional_properties: std::collections::BTreeMap::new(),
3737
_unparsed: false,
3838
}
3939
}
4040

41-
pub fn max_size(mut self, value: i64) -> Self {
42-
self.max_size = Some(value);
43-
self
44-
}
45-
4641
pub fn type_(
4742
mut self,
4843
value: crate::datadogV2::model::ObservabilityPipelineBufferOptionsMemoryType,
@@ -68,12 +63,6 @@ impl ObservabilityPipelineMemoryBufferOptions {
6863
}
6964
}
7065

71-
impl Default for ObservabilityPipelineMemoryBufferOptions {
72-
fn default() -> Self {
73-
Self::new()
74-
}
75-
}
76-
7766
impl<'de> Deserialize<'de> for ObservabilityPipelineMemoryBufferOptions {
7867
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
7968
where
@@ -107,9 +96,6 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineMemoryBufferOptions {
10796
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
10897
match k.as_str() {
10998
"max_size" => {
110-
if v.is_null() {
111-
continue;
112-
}
11399
max_size = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
114100
}
115101
"type" => {
@@ -147,6 +133,7 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineMemoryBufferOptions {
147133
}
148134
}
149135
}
136+
let max_size = max_size.ok_or_else(|| M::Error::missing_field("max_size"))?;
150137

151138
let content = ObservabilityPipelineMemoryBufferOptions {
152139
max_size,

src/datadogV2/model/model_observability_pipeline_memory_buffer_size_options.rs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::fmt::{self, Formatter};
1313
pub struct ObservabilityPipelineMemoryBufferSizeOptions {
1414
/// Maximum events for the memory buffer.
1515
#[serde(rename = "max_events")]
16-
pub max_events: Option<i64>,
16+
pub max_events: i64,
1717
/// The type of the buffer that will be configured, a memory buffer.
1818
#[serde(rename = "type")]
1919
pub type_: Option<crate::datadogV2::model::ObservabilityPipelineBufferOptionsMemoryType>,
@@ -28,21 +28,16 @@ pub struct ObservabilityPipelineMemoryBufferSizeOptions {
2828
}
2929

3030
impl ObservabilityPipelineMemoryBufferSizeOptions {
31-
pub fn new() -> ObservabilityPipelineMemoryBufferSizeOptions {
31+
pub fn new(max_events: i64) -> ObservabilityPipelineMemoryBufferSizeOptions {
3232
ObservabilityPipelineMemoryBufferSizeOptions {
33-
max_events: None,
33+
max_events,
3434
type_: None,
3535
when_full: None,
3636
additional_properties: std::collections::BTreeMap::new(),
3737
_unparsed: false,
3838
}
3939
}
4040

41-
pub fn max_events(mut self, value: i64) -> Self {
42-
self.max_events = Some(value);
43-
self
44-
}
45-
4641
pub fn type_(
4742
mut self,
4843
value: crate::datadogV2::model::ObservabilityPipelineBufferOptionsMemoryType,
@@ -68,12 +63,6 @@ impl ObservabilityPipelineMemoryBufferSizeOptions {
6863
}
6964
}
7065

71-
impl Default for ObservabilityPipelineMemoryBufferSizeOptions {
72-
fn default() -> Self {
73-
Self::new()
74-
}
75-
}
76-
7766
impl<'de> Deserialize<'de> for ObservabilityPipelineMemoryBufferSizeOptions {
7867
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
7968
where
@@ -107,9 +96,6 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineMemoryBufferSizeOptions {
10796
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
10897
match k.as_str() {
10998
"max_events" => {
110-
if v.is_null() {
111-
continue;
112-
}
11399
max_events = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
114100
}
115101
"type" => {
@@ -147,6 +133,7 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineMemoryBufferSizeOptions {
147133
}
148134
}
149135
}
136+
let max_events = max_events.ok_or_else(|| M::Error::missing_field("max_events"))?;
150137

151138
let content = ObservabilityPipelineMemoryBufferSizeOptions {
152139
max_events,

0 commit comments

Comments
 (0)