aws-sdk-observabilityadmin 1.55.0

AWS SDK for CloudWatch Observability Admin Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A list of source plugin types used in the pipeline configuration (such as <code>cloudwatch_logs</code> or <code>s3</code>). Currently supports a single source per pipeline, but is structured as a list to accommodate multiple pipelines in the configuration.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Source {
    /// <p>The plugin name of the source, such as <code>cloudwatch_logs</code> or <code>s3</code>.</p>
    pub r#type: ::std::option::Option<::std::string::String>,
}
impl Source {
    /// <p>The plugin name of the source, such as <code>cloudwatch_logs</code> or <code>s3</code>.</p>
    pub fn r#type(&self) -> ::std::option::Option<&str> {
        self.r#type.as_deref()
    }
}
impl Source {
    /// Creates a new builder-style object to manufacture [`Source`](crate::types::Source).
    pub fn builder() -> crate::types::builders::SourceBuilder {
        crate::types::builders::SourceBuilder::default()
    }
}

/// A builder for [`Source`](crate::types::Source).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SourceBuilder {
    pub(crate) r#type: ::std::option::Option<::std::string::String>,
}
impl SourceBuilder {
    /// <p>The plugin name of the source, such as <code>cloudwatch_logs</code> or <code>s3</code>.</p>
    pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.r#type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The plugin name of the source, such as <code>cloudwatch_logs</code> or <code>s3</code>.</p>
    pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The plugin name of the source, such as <code>cloudwatch_logs</code> or <code>s3</code>.</p>
    pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.r#type
    }
    /// Consumes the builder and constructs a [`Source`](crate::types::Source).
    pub fn build(self) -> crate::types::Source {
        crate::types::Source { r#type: self.r#type }
    }
}