aws-sdk-s3control 1.115.0

AWS SDK for AWS S3 Control
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 GetAccessGrantInput {
    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
    pub access_grant_id: ::std::option::Option<::std::string::String>,
}
impl GetAccessGrantInput {
    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
    pub fn access_grant_id(&self) -> ::std::option::Option<&str> {
        self.access_grant_id.as_deref()
    }
}
impl GetAccessGrantInput {
    /// Creates a new builder-style object to manufacture [`GetAccessGrantInput`](crate::operation::get_access_grant::GetAccessGrantInput).
    pub fn builder() -> crate::operation::get_access_grant::builders::GetAccessGrantInputBuilder {
        crate::operation::get_access_grant::builders::GetAccessGrantInputBuilder::default()
    }
}

/// A builder for [`GetAccessGrantInput`](crate::operation::get_access_grant::GetAccessGrantInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAccessGrantInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) access_grant_id: ::std::option::Option<::std::string::String>,
}
impl GetAccessGrantInputBuilder {
    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
    /// This field is required.
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
    /// This field is required.
    pub fn access_grant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.access_grant_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
    pub fn set_access_grant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.access_grant_id = input;
        self
    }
    /// <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</p>
    pub fn get_access_grant_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.access_grant_id
    }
    /// Consumes the builder and constructs a [`GetAccessGrantInput`](crate::operation::get_access_grant::GetAccessGrantInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_access_grant::GetAccessGrantInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_access_grant::GetAccessGrantInput {
            account_id: self.account_id,
            access_grant_id: self.access_grant_id,
        })
    }
}