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

/// A builder for [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct UpdateGroupInputBuilder {
    pub(crate) group_id: std::option::Option<std::string::String>,
    pub(crate) name: std::option::Option<std::string::String>,
}
impl UpdateGroupInputBuilder {
    /// The ID of the Greengrass group.
    pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.group_id = Some(input.into());
        self
    }
    /// The ID of the Greengrass group.
    pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.group_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 [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::update_group::UpdateGroupInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::update_group::UpdateGroupInput {
            group_id: self.group_id,
            name: self.name,
        })
    }
}