Skip to main content

aws_sdk_s3control/operation/delete_access_grants_location/
_delete_access_grants_location_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteAccessGrantsLocationInput {
6    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
7    pub account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the registered location that you are deregistering from your S3 Access Grants instance. S3 Access Grants assigned this ID when you registered the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
9    pub access_grants_location_id: ::std::option::Option<::std::string::String>,
10}
11impl DeleteAccessGrantsLocationInput {
12    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
13    pub fn account_id(&self) -> ::std::option::Option<&str> {
14        self.account_id.as_deref()
15    }
16    /// <p>The ID of the registered location that you are deregistering from your S3 Access Grants instance. S3 Access Grants assigned this ID when you registered the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
17    pub fn access_grants_location_id(&self) -> ::std::option::Option<&str> {
18        self.access_grants_location_id.as_deref()
19    }
20}
21impl DeleteAccessGrantsLocationInput {
22    /// Creates a new builder-style object to manufacture [`DeleteAccessGrantsLocationInput`](crate::operation::delete_access_grants_location::DeleteAccessGrantsLocationInput).
23    pub fn builder() -> crate::operation::delete_access_grants_location::builders::DeleteAccessGrantsLocationInputBuilder {
24        crate::operation::delete_access_grants_location::builders::DeleteAccessGrantsLocationInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteAccessGrantsLocationInput`](crate::operation::delete_access_grants_location::DeleteAccessGrantsLocationInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteAccessGrantsLocationInputBuilder {
32    pub(crate) account_id: ::std::option::Option<::std::string::String>,
33    pub(crate) access_grants_location_id: ::std::option::Option<::std::string::String>,
34}
35impl DeleteAccessGrantsLocationInputBuilder {
36    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
37    /// This field is required.
38    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.account_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
43    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.account_id = input;
45        self
46    }
47    /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
48    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.account_id
50    }
51    /// <p>The ID of the registered location that you are deregistering from your S3 Access Grants instance. S3 Access Grants assigned this ID when you registered the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
52    /// This field is required.
53    pub fn access_grants_location_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.access_grants_location_id = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The ID of the registered location that you are deregistering from your S3 Access Grants instance. S3 Access Grants assigned this ID when you registered the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
58    pub fn set_access_grants_location_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.access_grants_location_id = input;
60        self
61    }
62    /// <p>The ID of the registered location that you are deregistering from your S3 Access Grants instance. S3 Access Grants assigned this ID when you registered the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
63    pub fn get_access_grants_location_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.access_grants_location_id
65    }
66    /// Consumes the builder and constructs a [`DeleteAccessGrantsLocationInput`](crate::operation::delete_access_grants_location::DeleteAccessGrantsLocationInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<
70        crate::operation::delete_access_grants_location::DeleteAccessGrantsLocationInput,
71        ::aws_smithy_types::error::operation::BuildError,
72    > {
73        ::std::result::Result::Ok(crate::operation::delete_access_grants_location::DeleteAccessGrantsLocationInput {
74            account_id: self.account_id,
75            access_grants_location_id: self.access_grants_location_id,
76        })
77    }
78}