aws-sdk-observabilityadmin 1.53.0

AWS SDK for CloudWatch Observability Admin Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TestTelemetryPipelineInput {
    /// <p>The sample records to process through the pipeline configuration for testing purposes.</p>
    pub records: ::std::option::Option<::std::vec::Vec<crate::types::Record>>,
    /// <p>The pipeline configuration to test with the provided sample records.</p>
    pub configuration: ::std::option::Option<crate::types::TelemetryPipelineConfiguration>,
}
impl TestTelemetryPipelineInput {
    /// <p>The sample records to process through the pipeline configuration for testing purposes.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.records.is_none()`.
    pub fn records(&self) -> &[crate::types::Record] {
        self.records.as_deref().unwrap_or_default()
    }
    /// <p>The pipeline configuration to test with the provided sample records.</p>
    pub fn configuration(&self) -> ::std::option::Option<&crate::types::TelemetryPipelineConfiguration> {
        self.configuration.as_ref()
    }
}
impl TestTelemetryPipelineInput {
    /// Creates a new builder-style object to manufacture [`TestTelemetryPipelineInput`](crate::operation::test_telemetry_pipeline::TestTelemetryPipelineInput).
    pub fn builder() -> crate::operation::test_telemetry_pipeline::builders::TestTelemetryPipelineInputBuilder {
        crate::operation::test_telemetry_pipeline::builders::TestTelemetryPipelineInputBuilder::default()
    }
}

/// A builder for [`TestTelemetryPipelineInput`](crate::operation::test_telemetry_pipeline::TestTelemetryPipelineInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TestTelemetryPipelineInputBuilder {
    pub(crate) records: ::std::option::Option<::std::vec::Vec<crate::types::Record>>,
    pub(crate) configuration: ::std::option::Option<crate::types::TelemetryPipelineConfiguration>,
}
impl TestTelemetryPipelineInputBuilder {
    /// Appends an item to `records`.
    ///
    /// To override the contents of this collection use [`set_records`](Self::set_records).
    ///
    /// <p>The sample records to process through the pipeline configuration for testing purposes.</p>
    pub fn records(mut self, input: crate::types::Record) -> Self {
        let mut v = self.records.unwrap_or_default();
        v.push(input);
        self.records = ::std::option::Option::Some(v);
        self
    }
    /// <p>The sample records to process through the pipeline configuration for testing purposes.</p>
    pub fn set_records(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Record>>) -> Self {
        self.records = input;
        self
    }
    /// <p>The sample records to process through the pipeline configuration for testing purposes.</p>
    pub fn get_records(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Record>> {
        &self.records
    }
    /// <p>The pipeline configuration to test with the provided sample records.</p>
    /// This field is required.
    pub fn configuration(mut self, input: crate::types::TelemetryPipelineConfiguration) -> Self {
        self.configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The pipeline configuration to test with the provided sample records.</p>
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::TelemetryPipelineConfiguration>) -> Self {
        self.configuration = input;
        self
    }
    /// <p>The pipeline configuration to test with the provided sample records.</p>
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::TelemetryPipelineConfiguration> {
        &self.configuration
    }
    /// Consumes the builder and constructs a [`TestTelemetryPipelineInput`](crate::operation::test_telemetry_pipeline::TestTelemetryPipelineInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::test_telemetry_pipeline::TestTelemetryPipelineInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::test_telemetry_pipeline::TestTelemetryPipelineInput {
            records: self.records,
            configuration: self.configuration,
        })
    }
}