aws_sdk_s3/operation/get_object_acl/
_get_object_acl_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 GetObjectAclInput {
6    /// <p>The bucket name that contains the object for which to get the ACL information.</p>
7    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
8    pub bucket: ::std::option::Option<::std::string::String>,
9    /// <p>The key of the object for which to get the ACL information.</p>
10    pub key: ::std::option::Option<::std::string::String>,
11    /// <p>Version ID used to reference a specific version of the object.</p><note>
12    /// <p>This functionality is not supported for directory buckets.</p>
13    /// </note>
14    pub version_id: ::std::option::Option<::std::string::String>,
15    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
16    /// <p>This functionality is not supported for directory buckets.</p>
17    /// </note>
18    pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
19    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
20    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
21}
22impl GetObjectAclInput {
23    /// <p>The bucket name that contains the object for which to get the ACL information.</p>
24    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
25    pub fn bucket(&self) -> ::std::option::Option<&str> {
26        self.bucket.as_deref()
27    }
28    /// <p>The key of the object for which to get the ACL information.</p>
29    pub fn key(&self) -> ::std::option::Option<&str> {
30        self.key.as_deref()
31    }
32    /// <p>Version ID used to reference a specific version of the object.</p><note>
33    /// <p>This functionality is not supported for directory buckets.</p>
34    /// </note>
35    pub fn version_id(&self) -> ::std::option::Option<&str> {
36        self.version_id.as_deref()
37    }
38    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
39    /// <p>This functionality is not supported for directory buckets.</p>
40    /// </note>
41    pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
42        self.request_payer.as_ref()
43    }
44    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
45    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
46        self.expected_bucket_owner.as_deref()
47    }
48}
49impl GetObjectAclInput {
50    /// Creates a new builder-style object to manufacture [`GetObjectAclInput`](crate::operation::get_object_acl::GetObjectAclInput).
51    pub fn builder() -> crate::operation::get_object_acl::builders::GetObjectAclInputBuilder {
52        crate::operation::get_object_acl::builders::GetObjectAclInputBuilder::default()
53    }
54}
55
56/// A builder for [`GetObjectAclInput`](crate::operation::get_object_acl::GetObjectAclInput).
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct GetObjectAclInputBuilder {
60    pub(crate) bucket: ::std::option::Option<::std::string::String>,
61    pub(crate) key: ::std::option::Option<::std::string::String>,
62    pub(crate) version_id: ::std::option::Option<::std::string::String>,
63    pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
64    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
65}
66impl GetObjectAclInputBuilder {
67    /// <p>The bucket name that contains the object for which to get the ACL information.</p>
68    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
69    /// This field is required.
70    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71        self.bucket = ::std::option::Option::Some(input.into());
72        self
73    }
74    /// <p>The bucket name that contains the object for which to get the ACL information.</p>
75    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
76    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77        self.bucket = input;
78        self
79    }
80    /// <p>The bucket name that contains the object for which to get the ACL information.</p>
81    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
82    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
83        &self.bucket
84    }
85    /// <p>The key of the object for which to get the ACL information.</p>
86    /// This field is required.
87    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.key = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The key of the object for which to get the ACL information.</p>
92    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.key = input;
94        self
95    }
96    /// <p>The key of the object for which to get the ACL information.</p>
97    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
98        &self.key
99    }
100    /// <p>Version ID used to reference a specific version of the object.</p><note>
101    /// <p>This functionality is not supported for directory buckets.</p>
102    /// </note>
103    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.version_id = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>Version ID used to reference a specific version of the object.</p><note>
108    /// <p>This functionality is not supported for directory buckets.</p>
109    /// </note>
110    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111        self.version_id = input;
112        self
113    }
114    /// <p>Version ID used to reference a specific version of the object.</p><note>
115    /// <p>This functionality is not supported for directory buckets.</p>
116    /// </note>
117    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
118        &self.version_id
119    }
120    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
121    /// <p>This functionality is not supported for directory buckets.</p>
122    /// </note>
123    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
124        self.request_payer = ::std::option::Option::Some(input);
125        self
126    }
127    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
128    /// <p>This functionality is not supported for directory buckets.</p>
129    /// </note>
130    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
131        self.request_payer = input;
132        self
133    }
134    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
135    /// <p>This functionality is not supported for directory buckets.</p>
136    /// </note>
137    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
138        &self.request_payer
139    }
140    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
141    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
143        self
144    }
145    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
146    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.expected_bucket_owner = input;
148        self
149    }
150    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
151    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
152        &self.expected_bucket_owner
153    }
154    /// Consumes the builder and constructs a [`GetObjectAclInput`](crate::operation::get_object_acl::GetObjectAclInput).
155    pub fn build(
156        self,
157    ) -> ::std::result::Result<crate::operation::get_object_acl::GetObjectAclInput, ::aws_smithy_types::error::operation::BuildError> {
158        ::std::result::Result::Ok(crate::operation::get_object_acl::GetObjectAclInput {
159            bucket: self.bucket,
160            key: self.key,
161            version_id: self.version_id,
162            request_payer: self.request_payer,
163            expected_bucket_owner: self.expected_bucket_owner,
164        })
165    }
166}