aws-sdk-greengrass 0.26.0

AWS SDK for AWS Greengrass
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 UpdateLoggerDefinitionInput {
    /// The ID of the logger definition.
    #[doc(hidden)]
    pub logger_definition_id: std::option::Option<std::string::String>,
    /// The name of the definition.
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
}
impl UpdateLoggerDefinitionInput {
    /// The ID of the logger definition.
    pub fn logger_definition_id(&self) -> std::option::Option<&str> {
        self.logger_definition_id.as_deref()
    }
    /// The name of the definition.
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
}
impl UpdateLoggerDefinitionInput {
    /// Creates a new builder-style object to manufacture [`UpdateLoggerDefinitionInput`](crate::operation::update_logger_definition::UpdateLoggerDefinitionInput).
    pub fn builder(
    ) -> crate::operation::update_logger_definition::builders::UpdateLoggerDefinitionInputBuilder
    {
        crate::operation::update_logger_definition::builders::UpdateLoggerDefinitionInputBuilder::default()
    }
}

/// A builder for [`UpdateLoggerDefinitionInput`](crate::operation::update_logger_definition::UpdateLoggerDefinitionInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct UpdateLoggerDefinitionInputBuilder {
    pub(crate) logger_definition_id: std::option::Option<std::string::String>,
    pub(crate) name: std::option::Option<std::string::String>,
}
impl UpdateLoggerDefinitionInputBuilder {
    /// The ID of the logger definition.
    pub fn logger_definition_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.logger_definition_id = Some(input.into());
        self
    }
    /// The ID of the logger definition.
    pub fn set_logger_definition_id(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.logger_definition_id = input;
        self
    }
    /// The name of the definition.
    pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
        self.name = Some(input.into());
        self
    }
    /// The name of the definition.
    pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// Consumes the builder and constructs a [`UpdateLoggerDefinitionInput`](crate::operation::update_logger_definition::UpdateLoggerDefinitionInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::update_logger_definition::UpdateLoggerDefinitionInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(
            crate::operation::update_logger_definition::UpdateLoggerDefinitionInput {
                logger_definition_id: self.logger_definition_id,
                name: self.name,
            },
        )
    }
}