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 CreateGrantVersionOutput {
    /// <p>Grant ARN.</p>
    pub grant_arn: ::std::option::Option<::std::string::String>,
    /// <p>Grant status.</p>
    pub status: ::std::option::Option<crate::types::GrantStatus>,
    /// <p>New version of the grant.</p>
    pub version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateGrantVersionOutput {
    /// <p>Grant ARN.</p>
    pub fn grant_arn(&self) -> ::std::option::Option<&str> {
        self.grant_arn.as_deref()
    }
    /// <p>Grant status.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::GrantStatus> {
        self.status.as_ref()
    }
    /// <p>New version of the grant.</p>
    pub fn version(&self) -> ::std::option::Option<&str> {
        self.version.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for CreateGrantVersionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateGrantVersionOutput {
    /// Creates a new builder-style object to manufacture [`CreateGrantVersionOutput`](crate::operation::create_grant_version::CreateGrantVersionOutput).
    pub fn builder() -> crate::operation::create_grant_version::builders::CreateGrantVersionOutputBuilder {
        crate::operation::create_grant_version::builders::CreateGrantVersionOutputBuilder::default()
    }
}

/// A builder for [`CreateGrantVersionOutput`](crate::operation::create_grant_version::CreateGrantVersionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateGrantVersionOutputBuilder {
    pub(crate) grant_arn: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::GrantStatus>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateGrantVersionOutputBuilder {
    /// <p>Grant ARN.</p>
    pub fn grant_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.grant_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Grant ARN.</p>
    pub fn set_grant_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.grant_arn = input;
        self
    }
    /// <p>Grant ARN.</p>
    pub fn get_grant_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.grant_arn
    }
    /// <p>Grant status.</p>
    pub fn status(mut self, input: crate::types::GrantStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Grant status.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::GrantStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Grant status.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::GrantStatus> {
        &self.status
    }
    /// <p>New version of the grant.</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>New version of the grant.</p>
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// <p>New version of the grant.</p>
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateGrantVersionOutput`](crate::operation::create_grant_version::CreateGrantVersionOutput).
    pub fn build(self) -> crate::operation::create_grant_version::CreateGrantVersionOutput {
        crate::operation::create_grant_version::CreateGrantVersionOutput {
            grant_arn: self.grant_arn,
            status: self.status,
            version: self.version,
            _request_id: self._request_id,
        }
    }
}