aws-sdk-cloudwatchlogs 1.116.0

AWS SDK for Amazon CloudWatch Logs
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 GetLogFieldsInput {
    /// <p>The name of the data source to retrieve log fields for.</p>
    pub data_source_name: ::std::option::Option<::std::string::String>,
    /// <p>The type of the data source to retrieve log fields for.</p>
    pub data_source_type: ::std::option::Option<::std::string::String>,
}
impl GetLogFieldsInput {
    /// <p>The name of the data source to retrieve log fields for.</p>
    pub fn data_source_name(&self) -> ::std::option::Option<&str> {
        self.data_source_name.as_deref()
    }
    /// <p>The type of the data source to retrieve log fields for.</p>
    pub fn data_source_type(&self) -> ::std::option::Option<&str> {
        self.data_source_type.as_deref()
    }
}
impl GetLogFieldsInput {
    /// Creates a new builder-style object to manufacture [`GetLogFieldsInput`](crate::operation::get_log_fields::GetLogFieldsInput).
    pub fn builder() -> crate::operation::get_log_fields::builders::GetLogFieldsInputBuilder {
        crate::operation::get_log_fields::builders::GetLogFieldsInputBuilder::default()
    }
}

/// A builder for [`GetLogFieldsInput`](crate::operation::get_log_fields::GetLogFieldsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetLogFieldsInputBuilder {
    pub(crate) data_source_name: ::std::option::Option<::std::string::String>,
    pub(crate) data_source_type: ::std::option::Option<::std::string::String>,
}
impl GetLogFieldsInputBuilder {
    /// <p>The name of the data source to retrieve log fields for.</p>
    /// This field is required.
    pub fn data_source_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_source_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the data source to retrieve log fields for.</p>
    pub fn set_data_source_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_source_name = input;
        self
    }
    /// <p>The name of the data source to retrieve log fields for.</p>
    pub fn get_data_source_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_source_name
    }
    /// <p>The type of the data source to retrieve log fields for.</p>
    /// This field is required.
    pub fn data_source_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_source_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of the data source to retrieve log fields for.</p>
    pub fn set_data_source_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_source_type = input;
        self
    }
    /// <p>The type of the data source to retrieve log fields for.</p>
    pub fn get_data_source_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_source_type
    }
    /// Consumes the builder and constructs a [`GetLogFieldsInput`](crate::operation::get_log_fields::GetLogFieldsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_log_fields::GetLogFieldsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_log_fields::GetLogFieldsInput {
            data_source_name: self.data_source_name,
            data_source_type: self.data_source_type,
        })
    }
}