aws-sdk-cloudextensions 1.0.0

AWS SDK for AWS Cloud Extensions
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Identifies the extension and optionally a specific version to retrieve.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetExtensionInput {
    /// The id of the extension, such as aws:secretsmanager.
    pub identifier: ::std::option::Option<::std::string::String>,
    /// The version to retrieve. Omit it to retrieve the latest release.
    pub extension_version: ::std::option::Option<::std::string::String>,
}
impl GetExtensionInput {
    /// The id of the extension, such as aws:secretsmanager.
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// The version to retrieve. Omit it to retrieve the latest release.
    pub fn extension_version(&self) -> ::std::option::Option<&str> {
        self.extension_version.as_deref()
    }
}
impl GetExtensionInput {
    /// Creates a new builder-style object to manufacture [`GetExtensionInput`](crate::operation::get_extension::GetExtensionInput).
    pub fn builder() -> crate::operation::get_extension::builders::GetExtensionInputBuilder {
        crate::operation::get_extension::builders::GetExtensionInputBuilder::default()
    }
}

/// A builder for [`GetExtensionInput`](crate::operation::get_extension::GetExtensionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetExtensionInputBuilder {
    pub(crate) identifier: ::std::option::Option<::std::string::String>,
    pub(crate) extension_version: ::std::option::Option<::std::string::String>,
}
impl GetExtensionInputBuilder {
    /// The id of the extension, such as aws:secretsmanager.
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// The id of the extension, such as aws:secretsmanager.
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// The id of the extension, such as aws:secretsmanager.
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// The version to retrieve. Omit it to retrieve the latest release.
    pub fn extension_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.extension_version = ::std::option::Option::Some(input.into());
        self
    }
    /// The version to retrieve. Omit it to retrieve the latest release.
    pub fn set_extension_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.extension_version = input;
        self
    }
    /// The version to retrieve. Omit it to retrieve the latest release.
    pub fn get_extension_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.extension_version
    }
    /// Consumes the builder and constructs a [`GetExtensionInput`](crate::operation::get_extension::GetExtensionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_extension::GetExtensionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_extension::GetExtensionInput {
            identifier: self.identifier,
            extension_version: self.extension_version,
        })
    }
}