Skip to main content

aws_sdk_s3/operation/list_objects_v2/
_list_objects_v2_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 ListObjectsV2Input {
6    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
7    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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><note>
8    /// <p>Object Lambda access points are not supported by directory buckets.</p>
9    /// </note>
10    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
11    pub bucket: ::std::option::Option<::std::string::String>,
12    /// <p>A delimiter is a character that you use to group keys.</p>
13    /// <p><code>CommonPrefixes</code> is filtered out from results if it is not lexicographically greater than the <code>StartAfter</code> value.</p><note>
14    /// <ul>
15    /// <li>
16    /// <p><b>Directory buckets</b> - For directory buckets, <code>/</code> is the only supported delimiter.</p></li>
17    /// <li>
18    /// <p><b>Directory buckets </b> - When you query <code>ListObjectsV2</code> with a delimiter during in-progress multipart uploads, the <code>CommonPrefixes</code> response parameter contains the prefixes that are associated with the in-progress multipart uploads. For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a> in the <i>Amazon S3 User Guide</i>.</p></li>
19    /// </ul>
20    /// </note>
21    pub delimiter: ::std::option::Option<::std::string::String>,
22    /// <p>Encoding type used by Amazon S3 to encode the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html">object keys</a> in the response. Responses are encoded only in UTF-8. An object key can contain any Unicode character. However, the XML 1.0 parser can't parse certain characters, such as characters with an ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response. For more information about characters to avoid in object key names, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines">Object key naming guidelines</a>.</p><note>
23    /// <p>When using the URL encoding type, non-ASCII characters that are used in an object's key name will be percent-encoded according to UTF-8 code values. For example, the object <code>test_file(3).png</code> will appear as <code>test_file%283%29.png</code>.</p>
24    /// </note>
25    pub encoding_type: ::std::option::Option<crate::types::EncodingType>,
26    /// <p>Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.</p>
27    pub max_keys: ::std::option::Option<i32>,
28    /// <p>Limits the response to keys that begin with the specified prefix.</p><note>
29    /// <p><b>Directory buckets</b> - For directory buckets, only prefixes that end in a delimiter (<code>/</code>) are supported.</p>
30    /// </note>
31    pub prefix: ::std::option::Option<::std::string::String>,
32    /// <p><code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
33    pub continuation_token: ::std::option::Option<::std::string::String>,
34    /// <p>The owner field is not present in <code>ListObjectsV2</code> by default. If you want to return the owner field with each key in the result, then set the <code>FetchOwner</code> field to <code>true</code>.</p><note>
35    /// <p><b>Directory buckets</b> - For directory buckets, the bucket owner is returned as the object owner for all objects.</p>
36    /// </note>
37    pub fetch_owner: ::std::option::Option<bool>,
38    /// <p>StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket.</p><note>
39    /// <p>This functionality is not supported for directory buckets.</p>
40    /// </note>
41    pub start_after: ::std::option::Option<::std::string::String>,
42    /// <p>Confirms that the requester knows that she or he will be charged for the list objects request in V2 style. Bucket owners need not specify this parameter in their requests.</p><note>
43    /// <p>This functionality is not supported for directory buckets.</p>
44    /// </note>
45    pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
46    /// <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>
47    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
48    /// <p>Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.</p><note>
49    /// <p>This functionality is not supported for directory buckets.</p>
50    /// </note>
51    pub optional_object_attributes: ::std::option::Option<::std::vec::Vec<crate::types::OptionalObjectAttributes>>,
52}
53impl ListObjectsV2Input {
54    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
55    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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><note>
56    /// <p>Object Lambda access points are not supported by directory buckets.</p>
57    /// </note>
58    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
59    pub fn bucket(&self) -> ::std::option::Option<&str> {
60        self.bucket.as_deref()
61    }
62    /// <p>A delimiter is a character that you use to group keys.</p>
63    /// <p><code>CommonPrefixes</code> is filtered out from results if it is not lexicographically greater than the <code>StartAfter</code> value.</p><note>
64    /// <ul>
65    /// <li>
66    /// <p><b>Directory buckets</b> - For directory buckets, <code>/</code> is the only supported delimiter.</p></li>
67    /// <li>
68    /// <p><b>Directory buckets </b> - When you query <code>ListObjectsV2</code> with a delimiter during in-progress multipart uploads, the <code>CommonPrefixes</code> response parameter contains the prefixes that are associated with the in-progress multipart uploads. For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a> in the <i>Amazon S3 User Guide</i>.</p></li>
69    /// </ul>
70    /// </note>
71    pub fn delimiter(&self) -> ::std::option::Option<&str> {
72        self.delimiter.as_deref()
73    }
74    /// <p>Encoding type used by Amazon S3 to encode the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html">object keys</a> in the response. Responses are encoded only in UTF-8. An object key can contain any Unicode character. However, the XML 1.0 parser can't parse certain characters, such as characters with an ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response. For more information about characters to avoid in object key names, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines">Object key naming guidelines</a>.</p><note>
75    /// <p>When using the URL encoding type, non-ASCII characters that are used in an object's key name will be percent-encoded according to UTF-8 code values. For example, the object <code>test_file(3).png</code> will appear as <code>test_file%283%29.png</code>.</p>
76    /// </note>
77    pub fn encoding_type(&self) -> ::std::option::Option<&crate::types::EncodingType> {
78        self.encoding_type.as_ref()
79    }
80    /// <p>Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.</p>
81    pub fn max_keys(&self) -> ::std::option::Option<i32> {
82        self.max_keys
83    }
84    /// <p>Limits the response to keys that begin with the specified prefix.</p><note>
85    /// <p><b>Directory buckets</b> - For directory buckets, only prefixes that end in a delimiter (<code>/</code>) are supported.</p>
86    /// </note>
87    pub fn prefix(&self) -> ::std::option::Option<&str> {
88        self.prefix.as_deref()
89    }
90    /// <p><code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
91    pub fn continuation_token(&self) -> ::std::option::Option<&str> {
92        self.continuation_token.as_deref()
93    }
94    /// <p>The owner field is not present in <code>ListObjectsV2</code> by default. If you want to return the owner field with each key in the result, then set the <code>FetchOwner</code> field to <code>true</code>.</p><note>
95    /// <p><b>Directory buckets</b> - For directory buckets, the bucket owner is returned as the object owner for all objects.</p>
96    /// </note>
97    pub fn fetch_owner(&self) -> ::std::option::Option<bool> {
98        self.fetch_owner
99    }
100    /// <p>StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket.</p><note>
101    /// <p>This functionality is not supported for directory buckets.</p>
102    /// </note>
103    pub fn start_after(&self) -> ::std::option::Option<&str> {
104        self.start_after.as_deref()
105    }
106    /// <p>Confirms that the requester knows that she or he will be charged for the list objects request in V2 style. Bucket owners need not specify this parameter in their requests.</p><note>
107    /// <p>This functionality is not supported for directory buckets.</p>
108    /// </note>
109    pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
110        self.request_payer.as_ref()
111    }
112    /// <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>
113    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
114        self.expected_bucket_owner.as_deref()
115    }
116    /// <p>Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.</p><note>
117    /// <p>This functionality is not supported for directory buckets.</p>
118    /// </note>
119    ///
120    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.optional_object_attributes.is_none()`.
121    pub fn optional_object_attributes(&self) -> &[crate::types::OptionalObjectAttributes] {
122        self.optional_object_attributes.as_deref().unwrap_or_default()
123    }
124}
125impl ListObjectsV2Input {
126    /// Creates a new builder-style object to manufacture [`ListObjectsV2Input`](crate::operation::list_objects_v2::ListObjectsV2Input).
127    pub fn builder() -> crate::operation::list_objects_v2::builders::ListObjectsV2InputBuilder {
128        crate::operation::list_objects_v2::builders::ListObjectsV2InputBuilder::default()
129    }
130}
131
132/// A builder for [`ListObjectsV2Input`](crate::operation::list_objects_v2::ListObjectsV2Input).
133#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
134#[non_exhaustive]
135pub struct ListObjectsV2InputBuilder {
136    pub(crate) bucket: ::std::option::Option<::std::string::String>,
137    pub(crate) delimiter: ::std::option::Option<::std::string::String>,
138    pub(crate) encoding_type: ::std::option::Option<crate::types::EncodingType>,
139    pub(crate) max_keys: ::std::option::Option<i32>,
140    pub(crate) prefix: ::std::option::Option<::std::string::String>,
141    pub(crate) continuation_token: ::std::option::Option<::std::string::String>,
142    pub(crate) fetch_owner: ::std::option::Option<bool>,
143    pub(crate) start_after: ::std::option::Option<::std::string::String>,
144    pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
145    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
146    pub(crate) optional_object_attributes: ::std::option::Option<::std::vec::Vec<crate::types::OptionalObjectAttributes>>,
147}
148impl ListObjectsV2InputBuilder {
149    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
150    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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><note>
151    /// <p>Object Lambda access points are not supported by directory buckets.</p>
152    /// </note>
153    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
154    /// This field is required.
155    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156        self.bucket = ::std::option::Option::Some(input.into());
157        self
158    }
159    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
160    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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><note>
161    /// <p>Object Lambda access points are not supported by directory buckets.</p>
162    /// </note>
163    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
164    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.bucket = input;
166        self
167    }
168    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
169    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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><note>
170    /// <p>Object Lambda access points are not supported by directory buckets.</p>
171    /// </note>
172    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
173    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
174        &self.bucket
175    }
176    /// <p>A delimiter is a character that you use to group keys.</p>
177    /// <p><code>CommonPrefixes</code> is filtered out from results if it is not lexicographically greater than the <code>StartAfter</code> value.</p><note>
178    /// <ul>
179    /// <li>
180    /// <p><b>Directory buckets</b> - For directory buckets, <code>/</code> is the only supported delimiter.</p></li>
181    /// <li>
182    /// <p><b>Directory buckets </b> - When you query <code>ListObjectsV2</code> with a delimiter during in-progress multipart uploads, the <code>CommonPrefixes</code> response parameter contains the prefixes that are associated with the in-progress multipart uploads. For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a> in the <i>Amazon S3 User Guide</i>.</p></li>
183    /// </ul>
184    /// </note>
185    pub fn delimiter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186        self.delimiter = ::std::option::Option::Some(input.into());
187        self
188    }
189    /// <p>A delimiter is a character that you use to group keys.</p>
190    /// <p><code>CommonPrefixes</code> is filtered out from results if it is not lexicographically greater than the <code>StartAfter</code> value.</p><note>
191    /// <ul>
192    /// <li>
193    /// <p><b>Directory buckets</b> - For directory buckets, <code>/</code> is the only supported delimiter.</p></li>
194    /// <li>
195    /// <p><b>Directory buckets </b> - When you query <code>ListObjectsV2</code> with a delimiter during in-progress multipart uploads, the <code>CommonPrefixes</code> response parameter contains the prefixes that are associated with the in-progress multipart uploads. For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a> in the <i>Amazon S3 User Guide</i>.</p></li>
196    /// </ul>
197    /// </note>
198    pub fn set_delimiter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.delimiter = input;
200        self
201    }
202    /// <p>A delimiter is a character that you use to group keys.</p>
203    /// <p><code>CommonPrefixes</code> is filtered out from results if it is not lexicographically greater than the <code>StartAfter</code> value.</p><note>
204    /// <ul>
205    /// <li>
206    /// <p><b>Directory buckets</b> - For directory buckets, <code>/</code> is the only supported delimiter.</p></li>
207    /// <li>
208    /// <p><b>Directory buckets </b> - When you query <code>ListObjectsV2</code> with a delimiter during in-progress multipart uploads, the <code>CommonPrefixes</code> response parameter contains the prefixes that are associated with the in-progress multipart uploads. For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a> in the <i>Amazon S3 User Guide</i>.</p></li>
209    /// </ul>
210    /// </note>
211    pub fn get_delimiter(&self) -> &::std::option::Option<::std::string::String> {
212        &self.delimiter
213    }
214    /// <p>Encoding type used by Amazon S3 to encode the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html">object keys</a> in the response. Responses are encoded only in UTF-8. An object key can contain any Unicode character. However, the XML 1.0 parser can't parse certain characters, such as characters with an ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response. For more information about characters to avoid in object key names, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines">Object key naming guidelines</a>.</p><note>
215    /// <p>When using the URL encoding type, non-ASCII characters that are used in an object's key name will be percent-encoded according to UTF-8 code values. For example, the object <code>test_file(3).png</code> will appear as <code>test_file%283%29.png</code>.</p>
216    /// </note>
217    pub fn encoding_type(mut self, input: crate::types::EncodingType) -> Self {
218        self.encoding_type = ::std::option::Option::Some(input);
219        self
220    }
221    /// <p>Encoding type used by Amazon S3 to encode the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html">object keys</a> in the response. Responses are encoded only in UTF-8. An object key can contain any Unicode character. However, the XML 1.0 parser can't parse certain characters, such as characters with an ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response. For more information about characters to avoid in object key names, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines">Object key naming guidelines</a>.</p><note>
222    /// <p>When using the URL encoding type, non-ASCII characters that are used in an object's key name will be percent-encoded according to UTF-8 code values. For example, the object <code>test_file(3).png</code> will appear as <code>test_file%283%29.png</code>.</p>
223    /// </note>
224    pub fn set_encoding_type(mut self, input: ::std::option::Option<crate::types::EncodingType>) -> Self {
225        self.encoding_type = input;
226        self
227    }
228    /// <p>Encoding type used by Amazon S3 to encode the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html">object keys</a> in the response. Responses are encoded only in UTF-8. An object key can contain any Unicode character. However, the XML 1.0 parser can't parse certain characters, such as characters with an ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response. For more information about characters to avoid in object key names, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines">Object key naming guidelines</a>.</p><note>
229    /// <p>When using the URL encoding type, non-ASCII characters that are used in an object's key name will be percent-encoded according to UTF-8 code values. For example, the object <code>test_file(3).png</code> will appear as <code>test_file%283%29.png</code>.</p>
230    /// </note>
231    pub fn get_encoding_type(&self) -> &::std::option::Option<crate::types::EncodingType> {
232        &self.encoding_type
233    }
234    /// <p>Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.</p>
235    pub fn max_keys(mut self, input: i32) -> Self {
236        self.max_keys = ::std::option::Option::Some(input);
237        self
238    }
239    /// <p>Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.</p>
240    pub fn set_max_keys(mut self, input: ::std::option::Option<i32>) -> Self {
241        self.max_keys = input;
242        self
243    }
244    /// <p>Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.</p>
245    pub fn get_max_keys(&self) -> &::std::option::Option<i32> {
246        &self.max_keys
247    }
248    /// <p>Limits the response to keys that begin with the specified prefix.</p><note>
249    /// <p><b>Directory buckets</b> - For directory buckets, only prefixes that end in a delimiter (<code>/</code>) are supported.</p>
250    /// </note>
251    pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
252        self.prefix = ::std::option::Option::Some(input.into());
253        self
254    }
255    /// <p>Limits the response to keys that begin with the specified prefix.</p><note>
256    /// <p><b>Directory buckets</b> - For directory buckets, only prefixes that end in a delimiter (<code>/</code>) are supported.</p>
257    /// </note>
258    pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259        self.prefix = input;
260        self
261    }
262    /// <p>Limits the response to keys that begin with the specified prefix.</p><note>
263    /// <p><b>Directory buckets</b> - For directory buckets, only prefixes that end in a delimiter (<code>/</code>) are supported.</p>
264    /// </note>
265    pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> {
266        &self.prefix
267    }
268    /// <p><code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
269    pub fn continuation_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
270        self.continuation_token = ::std::option::Option::Some(input.into());
271        self
272    }
273    /// <p><code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
274    pub fn set_continuation_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
275        self.continuation_token = input;
276        self
277    }
278    /// <p><code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
279    pub fn get_continuation_token(&self) -> &::std::option::Option<::std::string::String> {
280        &self.continuation_token
281    }
282    /// <p>The owner field is not present in <code>ListObjectsV2</code> by default. If you want to return the owner field with each key in the result, then set the <code>FetchOwner</code> field to <code>true</code>.</p><note>
283    /// <p><b>Directory buckets</b> - For directory buckets, the bucket owner is returned as the object owner for all objects.</p>
284    /// </note>
285    pub fn fetch_owner(mut self, input: bool) -> Self {
286        self.fetch_owner = ::std::option::Option::Some(input);
287        self
288    }
289    /// <p>The owner field is not present in <code>ListObjectsV2</code> by default. If you want to return the owner field with each key in the result, then set the <code>FetchOwner</code> field to <code>true</code>.</p><note>
290    /// <p><b>Directory buckets</b> - For directory buckets, the bucket owner is returned as the object owner for all objects.</p>
291    /// </note>
292    pub fn set_fetch_owner(mut self, input: ::std::option::Option<bool>) -> Self {
293        self.fetch_owner = input;
294        self
295    }
296    /// <p>The owner field is not present in <code>ListObjectsV2</code> by default. If you want to return the owner field with each key in the result, then set the <code>FetchOwner</code> field to <code>true</code>.</p><note>
297    /// <p><b>Directory buckets</b> - For directory buckets, the bucket owner is returned as the object owner for all objects.</p>
298    /// </note>
299    pub fn get_fetch_owner(&self) -> &::std::option::Option<bool> {
300        &self.fetch_owner
301    }
302    /// <p>StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket.</p><note>
303    /// <p>This functionality is not supported for directory buckets.</p>
304    /// </note>
305    pub fn start_after(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
306        self.start_after = ::std::option::Option::Some(input.into());
307        self
308    }
309    /// <p>StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket.</p><note>
310    /// <p>This functionality is not supported for directory buckets.</p>
311    /// </note>
312    pub fn set_start_after(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313        self.start_after = input;
314        self
315    }
316    /// <p>StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket.</p><note>
317    /// <p>This functionality is not supported for directory buckets.</p>
318    /// </note>
319    pub fn get_start_after(&self) -> &::std::option::Option<::std::string::String> {
320        &self.start_after
321    }
322    /// <p>Confirms that the requester knows that she or he will be charged for the list objects request in V2 style. Bucket owners need not specify this parameter in their requests.</p><note>
323    /// <p>This functionality is not supported for directory buckets.</p>
324    /// </note>
325    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
326        self.request_payer = ::std::option::Option::Some(input);
327        self
328    }
329    /// <p>Confirms that the requester knows that she or he will be charged for the list objects request in V2 style. Bucket owners need not specify this parameter in their requests.</p><note>
330    /// <p>This functionality is not supported for directory buckets.</p>
331    /// </note>
332    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
333        self.request_payer = input;
334        self
335    }
336    /// <p>Confirms that the requester knows that she or he will be charged for the list objects request in V2 style. Bucket owners need not specify this parameter in their requests.</p><note>
337    /// <p>This functionality is not supported for directory buckets.</p>
338    /// </note>
339    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
340        &self.request_payer
341    }
342    /// <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>
343    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
344        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
345        self
346    }
347    /// <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>
348    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
349        self.expected_bucket_owner = input;
350        self
351    }
352    /// <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>
353    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
354        &self.expected_bucket_owner
355    }
356    /// Appends an item to `optional_object_attributes`.
357    ///
358    /// To override the contents of this collection use [`set_optional_object_attributes`](Self::set_optional_object_attributes).
359    ///
360    /// <p>Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.</p><note>
361    /// <p>This functionality is not supported for directory buckets.</p>
362    /// </note>
363    pub fn optional_object_attributes(mut self, input: crate::types::OptionalObjectAttributes) -> Self {
364        let mut v = self.optional_object_attributes.unwrap_or_default();
365        v.push(input);
366        self.optional_object_attributes = ::std::option::Option::Some(v);
367        self
368    }
369    /// <p>Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.</p><note>
370    /// <p>This functionality is not supported for directory buckets.</p>
371    /// </note>
372    pub fn set_optional_object_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OptionalObjectAttributes>>) -> Self {
373        self.optional_object_attributes = input;
374        self
375    }
376    /// <p>Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.</p><note>
377    /// <p>This functionality is not supported for directory buckets.</p>
378    /// </note>
379    pub fn get_optional_object_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OptionalObjectAttributes>> {
380        &self.optional_object_attributes
381    }
382    /// Consumes the builder and constructs a [`ListObjectsV2Input`](crate::operation::list_objects_v2::ListObjectsV2Input).
383    pub fn build(
384        self,
385    ) -> ::std::result::Result<crate::operation::list_objects_v2::ListObjectsV2Input, ::aws_smithy_types::error::operation::BuildError> {
386        ::std::result::Result::Ok(crate::operation::list_objects_v2::ListObjectsV2Input {
387            bucket: self.bucket,
388            delimiter: self.delimiter,
389            encoding_type: self.encoding_type,
390            max_keys: self.max_keys,
391            prefix: self.prefix,
392            continuation_token: self.continuation_token,
393            fetch_owner: self.fetch_owner,
394            start_after: self.start_after,
395            request_payer: self.request_payer,
396            expected_bucket_owner: self.expected_bucket_owner,
397            optional_object_attributes: self.optional_object_attributes,
398        })
399    }
400}