Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34514,7 +34514,6 @@ components:
- id
- type
- inputs
- auth
- customer_id
type: object
ObservabilityPipelineGoogleChronicleDestinationEncoding:
Expand Down Expand Up @@ -34580,9 +34579,7 @@ components:
- type
- inputs
- bucket
- auth
- storage_class
- acl
type: object
ObservabilityPipelineGoogleCloudStorageDestinationAcl:
description: Access control list setting for objects written to the bucket.
Expand Down Expand Up @@ -34713,7 +34710,6 @@ components:
required:
- id
- type
- auth
- decoding
- project
- subscription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::fmt::{self, Formatter};
pub struct ObservabilityPipelineGoogleChronicleDestination {
/// GCP credentials used to authenticate with Google Cloud Storage.
#[serde(rename = "auth")]
pub auth: crate::datadogV2::model::ObservabilityPipelineGcpAuth,
pub auth: Option<crate::datadogV2::model::ObservabilityPipelineGcpAuth>,
/// The Google Chronicle customer ID.
#[serde(rename = "customer_id")]
pub customer_id: String,
Expand Down Expand Up @@ -42,14 +42,13 @@ pub struct ObservabilityPipelineGoogleChronicleDestination {

impl ObservabilityPipelineGoogleChronicleDestination {
pub fn new(
auth: crate::datadogV2::model::ObservabilityPipelineGcpAuth,
customer_id: String,
id: String,
inputs: Vec<String>,
type_: crate::datadogV2::model::ObservabilityPipelineGoogleChronicleDestinationType,
) -> ObservabilityPipelineGoogleChronicleDestination {
ObservabilityPipelineGoogleChronicleDestination {
auth,
auth: None,
customer_id,
encoding: None,
id,
Expand All @@ -61,6 +60,11 @@ impl ObservabilityPipelineGoogleChronicleDestination {
}
}

pub fn auth(mut self, value: crate::datadogV2::model::ObservabilityPipelineGcpAuth) -> Self {
self.auth = Some(value);
self
}

pub fn encoding(
mut self,
value: crate::datadogV2::model::ObservabilityPipelineGoogleChronicleDestinationEncoding,
Expand Down Expand Up @@ -118,6 +122,9 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineGoogleChronicleDestination {
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
match k.as_str() {
"auth" => {
if v.is_null() {
continue;
}
auth = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"customer_id" => {
Expand Down Expand Up @@ -168,7 +175,6 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineGoogleChronicleDestination {
}
}
}
let auth = auth.ok_or_else(|| M::Error::missing_field("auth"))?;
let customer_id =
customer_id.ok_or_else(|| M::Error::missing_field("customer_id"))?;
let id = id.ok_or_else(|| M::Error::missing_field("id"))?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ use std::fmt::{self, Formatter};
pub struct ObservabilityPipelineGoogleCloudStorageDestination {
/// Access control list setting for objects written to the bucket.
#[serde(rename = "acl")]
pub acl: crate::datadogV2::model::ObservabilityPipelineGoogleCloudStorageDestinationAcl,
pub acl: Option<crate::datadogV2::model::ObservabilityPipelineGoogleCloudStorageDestinationAcl>,
/// GCP credentials used to authenticate with Google Cloud Storage.
#[serde(rename = "auth")]
pub auth: crate::datadogV2::model::ObservabilityPipelineGcpAuth,
pub auth: Option<crate::datadogV2::model::ObservabilityPipelineGcpAuth>,
/// Name of the GCS bucket.
#[serde(rename = "bucket")]
pub bucket: String,
Expand Down Expand Up @@ -49,17 +49,15 @@ pub struct ObservabilityPipelineGoogleCloudStorageDestination {

impl ObservabilityPipelineGoogleCloudStorageDestination {
pub fn new(
acl: crate::datadogV2::model::ObservabilityPipelineGoogleCloudStorageDestinationAcl,
auth: crate::datadogV2::model::ObservabilityPipelineGcpAuth,
bucket: String,
id: String,
inputs: Vec<String>,
storage_class: crate::datadogV2::model::ObservabilityPipelineGoogleCloudStorageDestinationStorageClass,
type_: crate::datadogV2::model::ObservabilityPipelineGoogleCloudStorageDestinationType,
) -> ObservabilityPipelineGoogleCloudStorageDestination {
ObservabilityPipelineGoogleCloudStorageDestination {
acl,
auth,
acl: None,
auth: None,
bucket,
id,
inputs,
Expand All @@ -72,6 +70,19 @@ impl ObservabilityPipelineGoogleCloudStorageDestination {
}
}

pub fn acl(
mut self,
value: crate::datadogV2::model::ObservabilityPipelineGoogleCloudStorageDestinationAcl,
) -> Self {
self.acl = Some(value);
self
}

pub fn auth(mut self, value: crate::datadogV2::model::ObservabilityPipelineGcpAuth) -> Self {
self.auth = Some(value);
self
}

pub fn key_prefix(mut self, value: String) -> Self {
self.key_prefix = Some(value);
self
Expand Down Expand Up @@ -135,6 +146,9 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineGoogleCloudStorageDestinatio
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
match k.as_str() {
"acl" => {
if v.is_null() {
continue;
}
acl = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
if let Some(ref _acl) = acl {
match _acl {
Expand All @@ -146,6 +160,9 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineGoogleCloudStorageDestinatio
}
}
"auth" => {
if v.is_null() {
continue;
}
auth = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"bucket" => {
Expand Down Expand Up @@ -199,8 +216,6 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineGoogleCloudStorageDestinatio
}
}
}
let acl = acl.ok_or_else(|| M::Error::missing_field("acl"))?;
let auth = auth.ok_or_else(|| M::Error::missing_field("auth"))?;
let bucket = bucket.ok_or_else(|| M::Error::missing_field("bucket"))?;
let id = id.ok_or_else(|| M::Error::missing_field("id"))?;
let inputs = inputs.ok_or_else(|| M::Error::missing_field("inputs"))?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::fmt::{self, Formatter};
pub struct ObservabilityPipelineGooglePubSubSource {
/// GCP credentials used to authenticate with Google Cloud Storage.
#[serde(rename = "auth")]
pub auth: crate::datadogV2::model::ObservabilityPipelineGcpAuth,
pub auth: Option<crate::datadogV2::model::ObservabilityPipelineGcpAuth>,
/// The decoding format used to interpret incoming logs.
#[serde(rename = "decoding")]
pub decoding: crate::datadogV2::model::ObservabilityPipelineDecoding,
Expand Down Expand Up @@ -41,15 +41,14 @@ pub struct ObservabilityPipelineGooglePubSubSource {

impl ObservabilityPipelineGooglePubSubSource {
pub fn new(
auth: crate::datadogV2::model::ObservabilityPipelineGcpAuth,
decoding: crate::datadogV2::model::ObservabilityPipelineDecoding,
id: String,
project: String,
subscription: String,
type_: crate::datadogV2::model::ObservabilityPipelineGooglePubSubSourceType,
) -> ObservabilityPipelineGooglePubSubSource {
ObservabilityPipelineGooglePubSubSource {
auth,
auth: None,
decoding,
id,
project,
Expand All @@ -61,6 +60,11 @@ impl ObservabilityPipelineGooglePubSubSource {
}
}

pub fn auth(mut self, value: crate::datadogV2::model::ObservabilityPipelineGcpAuth) -> Self {
self.auth = Some(value);
self
}

pub fn tls(mut self, value: crate::datadogV2::model::ObservabilityPipelineTls) -> Self {
self.tls = Some(value);
self
Expand Down Expand Up @@ -111,6 +115,9 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineGooglePubSubSource {
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
match k.as_str() {
"auth" => {
if v.is_null() {
continue;
}
auth = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"decoding" => {
Expand Down Expand Up @@ -158,7 +165,6 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineGooglePubSubSource {
}
}
}
let auth = auth.ok_or_else(|| M::Error::missing_field("auth"))?;
let decoding = decoding.ok_or_else(|| M::Error::missing_field("decoding"))?;
let id = id.ok_or_else(|| M::Error::missing_field("id"))?;
let project = project.ok_or_else(|| M::Error::missing_field("project"))?;
Expand Down