aws-sdk-greengrass 1.83.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 GetGroupVersionInput {
    /// The ID of the Greengrass group.
    pub group_id: ::std::option::Option<::std::string::String>,
    /// The ID of the group version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListGroupVersions'' requests. If the version is the last one that was associated with a group, the value also maps to the ''LatestVersion'' property of the corresponding ''GroupInformation'' object.
    pub group_version_id: ::std::option::Option<::std::string::String>,
}
impl GetGroupVersionInput {
    /// The ID of the Greengrass group.
    pub fn group_id(&self) -> ::std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// The ID of the group version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListGroupVersions'' requests. If the version is the last one that was associated with a group, the value also maps to the ''LatestVersion'' property of the corresponding ''GroupInformation'' object.
    pub fn group_version_id(&self) -> ::std::option::Option<&str> {
        self.group_version_id.as_deref()
    }
}
impl GetGroupVersionInput {
    /// Creates a new builder-style object to manufacture [`GetGroupVersionInput`](crate::operation::get_group_version::GetGroupVersionInput).
    pub fn builder() -> crate::operation::get_group_version::builders::GetGroupVersionInputBuilder {
        crate::operation::get_group_version::builders::GetGroupVersionInputBuilder::default()
    }
}

/// A builder for [`GetGroupVersionInput`](crate::operation::get_group_version::GetGroupVersionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetGroupVersionInputBuilder {
    pub(crate) group_id: ::std::option::Option<::std::string::String>,
    pub(crate) group_version_id: ::std::option::Option<::std::string::String>,
}
impl GetGroupVersionInputBuilder {
    /// The ID of the Greengrass group.
    /// This field is required.
    pub fn group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group_id = ::std::option::Option::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 ID of the Greengrass group.
    pub fn get_group_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.group_id
    }
    /// The ID of the group version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListGroupVersions'' requests. If the version is the last one that was associated with a group, the value also maps to the ''LatestVersion'' property of the corresponding ''GroupInformation'' object.
    /// This field is required.
    pub fn group_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group_version_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The ID of the group version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListGroupVersions'' requests. If the version is the last one that was associated with a group, the value also maps to the ''LatestVersion'' property of the corresponding ''GroupInformation'' object.
    pub fn set_group_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.group_version_id = input;
        self
    }
    /// The ID of the group version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListGroupVersions'' requests. If the version is the last one that was associated with a group, the value also maps to the ''LatestVersion'' property of the corresponding ''GroupInformation'' object.
    pub fn get_group_version_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.group_version_id
    }
    /// Consumes the builder and constructs a [`GetGroupVersionInput`](crate::operation::get_group_version::GetGroupVersionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_group_version::GetGroupVersionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_group_version::GetGroupVersionInput {
            group_id: self.group_id,
            group_version_id: self.group_version_id,
        })
    }
}