Skip to content
Open
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
676 changes: 582 additions & 94 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

472 changes: 250 additions & 222 deletions src/datadogV2/model/mod.rs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/datadogV2/model/model_azure_storage_destination.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use serde_with::skip_serializing_none;
use std::fmt::{self, Formatter};

/// The `azure_storage` destination forwards logs to an Azure Blob Storage container.
///
/// **Supported pipeline types:** logs
#[non_exhaustive]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
Expand Down
2 changes: 2 additions & 0 deletions src/datadogV2/model/model_microsoft_sentinel_destination.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use serde_with::skip_serializing_none;
use std::fmt::{self, Formatter};

/// The `microsoft_sentinel` destination forwards logs to Microsoft Sentinel.
///
/// **Supported pipeline types:** logs
#[non_exhaustive]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use serde_with::skip_serializing_none;
use std::fmt::{self, Formatter};

/// The `add_env_vars` processor adds environment variable values to log events.
///
/// **Supported pipeline types:** logs
#[non_exhaustive]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use serde_with::skip_serializing_none;
use std::fmt::{self, Formatter};

/// The `add_fields` processor adds static key-value fields to logs.
///
/// **Supported pipeline types:** logs
#[non_exhaustive]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use serde_with::skip_serializing_none;
use std::fmt::{self, Formatter};

/// The `amazon_data_firehose` source ingests logs from AWS Data Firehose.
///
/// **Supported pipeline types:** logs
#[non_exhaustive]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use serde_with::skip_serializing_none;
use std::fmt::{self, Formatter};

/// The `amazon_opensearch` destination writes logs to Amazon OpenSearch.
///
/// **Supported pipeline types:** logs
#[non_exhaustive]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use serde_with::skip_serializing_none;
use std::fmt::{self, Formatter};

/// The `amazon_s3` destination sends your logs in Datadog-rehydratable format to an Amazon S3 bucket for archiving.
///
/// **Supported pipeline types:** logs
#[non_exhaustive]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use std::fmt::{self, Formatter};

/// The `amazon_s3` source ingests logs from an Amazon S3 bucket.
/// It supports AWS authentication and TLS encryption.
///
/// **Supported pipeline types:** logs
#[non_exhaustive]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use serde_with::skip_serializing_none;
use std::fmt::{self, Formatter};

/// The `amazon_security_lake` destination sends your logs to Amazon Security Lake.
///
/// **Supported pipeline types:** logs
#[non_exhaustive]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
Expand Down
31 changes: 31 additions & 0 deletions src/datadogV2/model/model_observability_pipeline_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pub struct ObservabilityPipelineConfig {
/// A list of destination components where processed logs are sent.
#[serde(rename = "destinations")]
pub destinations: Vec<crate::datadogV2::model::ObservabilityPipelineConfigDestinationItem>,
/// The type of data being ingested. Defaults to `logs` if not specified.
#[serde(rename = "pipeline_type")]
pub pipeline_type: Option<crate::datadogV2::model::ObservabilityPipelineConfigPipelineType>,
/// A list of processor groups that transform or enrich log data.
#[serde(rename = "processors")]
pub processors: Option<Vec<crate::datadogV2::model::ObservabilityPipelineConfigProcessorGroup>>,
Expand All @@ -34,13 +37,22 @@ impl ObservabilityPipelineConfig {
) -> ObservabilityPipelineConfig {
ObservabilityPipelineConfig {
destinations,
pipeline_type: None,
processors: None,
sources,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
}
}

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

pub fn processors(
mut self,
value: Vec<crate::datadogV2::model::ObservabilityPipelineConfigProcessorGroup>,
Expand Down Expand Up @@ -78,6 +90,9 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineConfig {
let mut destinations: Option<
Vec<crate::datadogV2::model::ObservabilityPipelineConfigDestinationItem>,
> = None;
let mut pipeline_type: Option<
crate::datadogV2::model::ObservabilityPipelineConfigPipelineType,
> = None;
let mut processors: Option<
Vec<crate::datadogV2::model::ObservabilityPipelineConfigProcessorGroup>,
> = None;
Expand All @@ -96,6 +111,21 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineConfig {
destinations =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"pipeline_type" => {
if v.is_null() {
continue;
}
pipeline_type =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
if let Some(ref _pipeline_type) = pipeline_type {
match _pipeline_type {
crate::datadogV2::model::ObservabilityPipelineConfigPipelineType::UnparsedObject(_pipeline_type) => {
_unparsed = true;
},
_ => {}
}
}
}
"processors" => {
if v.is_null() {
continue;
Expand All @@ -118,6 +148,7 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineConfig {

let content = ObservabilityPipelineConfig {
destinations,
pipeline_type,
processors,
sources,
additional_properties,
Expand Down
Loading