aws-sdk-licensemanager 1.95.0

AWS SDK for AWS License Manager
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 GetLicenseInput {
    /// <p>Amazon Resource Name (ARN) of the license.</p>
    pub license_arn: ::std::option::Option<::std::string::String>,
    /// <p>License version.</p>
    pub version: ::std::option::Option<::std::string::String>,
}
impl GetLicenseInput {
    /// <p>Amazon Resource Name (ARN) of the license.</p>
    pub fn license_arn(&self) -> ::std::option::Option<&str> {
        self.license_arn.as_deref()
    }
    /// <p>License version.</p>
    pub fn version(&self) -> ::std::option::Option<&str> {
        self.version.as_deref()
    }
}
impl GetLicenseInput {
    /// Creates a new builder-style object to manufacture [`GetLicenseInput`](crate::operation::get_license::GetLicenseInput).
    pub fn builder() -> crate::operation::get_license::builders::GetLicenseInputBuilder {
        crate::operation::get_license::builders::GetLicenseInputBuilder::default()
    }
}

/// A builder for [`GetLicenseInput`](crate::operation::get_license::GetLicenseInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetLicenseInputBuilder {
    pub(crate) license_arn: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
}
impl GetLicenseInputBuilder {
    /// <p>Amazon Resource Name (ARN) of the license.</p>
    /// This field is required.
    pub fn license_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.license_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Amazon Resource Name (ARN) of the license.</p>
    pub fn set_license_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.license_arn = input;
        self
    }
    /// <p>Amazon Resource Name (ARN) of the license.</p>
    pub fn get_license_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.license_arn
    }
    /// <p>License version.</p>
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>License version.</p>
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// <p>License version.</p>
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    /// Consumes the builder and constructs a [`GetLicenseInput`](crate::operation::get_license::GetLicenseInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_license::GetLicenseInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_license::GetLicenseInput {
            license_arn: self.license_arn,
            version: self.version,
        })
    }
}