aws_sdk_s3/operation/list_objects/
_list_objects_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 ListObjectsInput {
6    /// <p>The name of the bucket containing the objects.</p>
7    /// <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>
8    /// <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><note>
9    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
10    /// </note>
11    /// <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>
12    pub bucket: ::std::option::Option<::std::string::String>,
13    /// <p>A delimiter is a character that you use to group keys.</p>
14    pub delimiter: ::std::option::Option<::std::string::String>,
15    /// <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>
16    /// <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>
17    /// </note>
18    pub encoding_type: ::std::option::Option<crate::types::EncodingType>,
19    /// <p>Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. Marker can be any key in the bucket.</p>
20    pub marker: ::std::option::Option<::std::string::String>,
21    /// <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>
22    pub max_keys: ::std::option::Option<i32>,
23    /// <p>Limits the response to keys that begin with the specified prefix.</p>
24    pub prefix: ::std::option::Option<::std::string::String>,
25    /// <p>Confirms that the requester knows that she or he will be charged for the list objects request. Bucket owners need not specify this parameter in their requests.</p>
26    pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
27    /// <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>
28    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
29    /// <p>Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.</p>
30    pub optional_object_attributes: ::std::option::Option<::std::vec::Vec<crate::types::OptionalObjectAttributes>>,
31}
32impl ListObjectsInput {
33    /// <p>The name of the bucket containing the objects.</p>
34    /// <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>
35    /// <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><note>
36    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
37    /// </note>
38    /// <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>
39    pub fn bucket(&self) -> ::std::option::Option<&str> {
40        self.bucket.as_deref()
41    }
42    /// <p>A delimiter is a character that you use to group keys.</p>
43    pub fn delimiter(&self) -> ::std::option::Option<&str> {
44        self.delimiter.as_deref()
45    }
46    /// <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>
47    /// <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>
48    /// </note>
49    pub fn encoding_type(&self) -> ::std::option::Option<&crate::types::EncodingType> {
50        self.encoding_type.as_ref()
51    }
52    /// <p>Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. Marker can be any key in the bucket.</p>
53    pub fn marker(&self) -> ::std::option::Option<&str> {
54        self.marker.as_deref()
55    }
56    /// <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>
57    pub fn max_keys(&self) -> ::std::option::Option<i32> {
58        self.max_keys
59    }
60    /// <p>Limits the response to keys that begin with the specified prefix.</p>
61    pub fn prefix(&self) -> ::std::option::Option<&str> {
62        self.prefix.as_deref()
63    }
64    /// <p>Confirms that the requester knows that she or he will be charged for the list objects request. Bucket owners need not specify this parameter in their requests.</p>
65    pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
66        self.request_payer.as_ref()
67    }
68    /// <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>
69    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
70        self.expected_bucket_owner.as_deref()
71    }
72    /// <p>Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.</p>
73    ///
74    /// 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()`.
75    pub fn optional_object_attributes(&self) -> &[crate::types::OptionalObjectAttributes] {
76        self.optional_object_attributes.as_deref().unwrap_or_default()
77    }
78}
79impl ListObjectsInput {
80    /// Creates a new builder-style object to manufacture [`ListObjectsInput`](crate::operation::list_objects::ListObjectsInput).
81    pub fn builder() -> crate::operation::list_objects::builders::ListObjectsInputBuilder {
82        crate::operation::list_objects::builders::ListObjectsInputBuilder::default()
83    }
84}
85
86/// A builder for [`ListObjectsInput`](crate::operation::list_objects::ListObjectsInput).
87#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
88#[non_exhaustive]
89pub struct ListObjectsInputBuilder {
90    pub(crate) bucket: ::std::option::Option<::std::string::String>,
91    pub(crate) delimiter: ::std::option::Option<::std::string::String>,
92    pub(crate) encoding_type: ::std::option::Option<crate::types::EncodingType>,
93    pub(crate) marker: ::std::option::Option<::std::string::String>,
94    pub(crate) max_keys: ::std::option::Option<i32>,
95    pub(crate) prefix: ::std::option::Option<::std::string::String>,
96    pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
97    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
98    pub(crate) optional_object_attributes: ::std::option::Option<::std::vec::Vec<crate::types::OptionalObjectAttributes>>,
99}
100impl ListObjectsInputBuilder {
101    /// <p>The name of the bucket containing the objects.</p>
102    /// <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>
103    /// <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><note>
104    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
105    /// </note>
106    /// <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>
107    /// This field is required.
108    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.bucket = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The name of the bucket containing the objects.</p>
113    /// <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>
114    /// <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><note>
115    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
116    /// </note>
117    /// <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>
118    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.bucket = input;
120        self
121    }
122    /// <p>The name of the bucket containing the objects.</p>
123    /// <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>
124    /// <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><note>
125    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
126    /// </note>
127    /// <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>
128    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
129        &self.bucket
130    }
131    /// <p>A delimiter is a character that you use to group keys.</p>
132    pub fn delimiter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.delimiter = ::std::option::Option::Some(input.into());
134        self
135    }
136    /// <p>A delimiter is a character that you use to group keys.</p>
137    pub fn set_delimiter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.delimiter = input;
139        self
140    }
141    /// <p>A delimiter is a character that you use to group keys.</p>
142    pub fn get_delimiter(&self) -> &::std::option::Option<::std::string::String> {
143        &self.delimiter
144    }
145    /// <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>
146    /// <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>
147    /// </note>
148    pub fn encoding_type(mut self, input: crate::types::EncodingType) -> Self {
149        self.encoding_type = ::std::option::Option::Some(input);
150        self
151    }
152    /// <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>
153    /// <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>
154    /// </note>
155    pub fn set_encoding_type(mut self, input: ::std::option::Option<crate::types::EncodingType>) -> Self {
156        self.encoding_type = input;
157        self
158    }
159    /// <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>
160    /// <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>
161    /// </note>
162    pub fn get_encoding_type(&self) -> &::std::option::Option<crate::types::EncodingType> {
163        &self.encoding_type
164    }
165    /// <p>Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. Marker can be any key in the bucket.</p>
166    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167        self.marker = ::std::option::Option::Some(input.into());
168        self
169    }
170    /// <p>Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. Marker can be any key in the bucket.</p>
171    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172        self.marker = input;
173        self
174    }
175    /// <p>Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. Marker can be any key in the bucket.</p>
176    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
177        &self.marker
178    }
179    /// <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>
180    pub fn max_keys(mut self, input: i32) -> Self {
181        self.max_keys = ::std::option::Option::Some(input);
182        self
183    }
184    /// <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>
185    pub fn set_max_keys(mut self, input: ::std::option::Option<i32>) -> Self {
186        self.max_keys = input;
187        self
188    }
189    /// <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>
190    pub fn get_max_keys(&self) -> &::std::option::Option<i32> {
191        &self.max_keys
192    }
193    /// <p>Limits the response to keys that begin with the specified prefix.</p>
194    pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.prefix = ::std::option::Option::Some(input.into());
196        self
197    }
198    /// <p>Limits the response to keys that begin with the specified prefix.</p>
199    pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200        self.prefix = input;
201        self
202    }
203    /// <p>Limits the response to keys that begin with the specified prefix.</p>
204    pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> {
205        &self.prefix
206    }
207    /// <p>Confirms that the requester knows that she or he will be charged for the list objects request. Bucket owners need not specify this parameter in their requests.</p>
208    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
209        self.request_payer = ::std::option::Option::Some(input);
210        self
211    }
212    /// <p>Confirms that the requester knows that she or he will be charged for the list objects request. Bucket owners need not specify this parameter in their requests.</p>
213    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
214        self.request_payer = input;
215        self
216    }
217    /// <p>Confirms that the requester knows that she or he will be charged for the list objects request. Bucket owners need not specify this parameter in their requests.</p>
218    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
219        &self.request_payer
220    }
221    /// <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>
222    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
224        self
225    }
226    /// <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>
227    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228        self.expected_bucket_owner = input;
229        self
230    }
231    /// <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>
232    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
233        &self.expected_bucket_owner
234    }
235    /// Appends an item to `optional_object_attributes`.
236    ///
237    /// To override the contents of this collection use [`set_optional_object_attributes`](Self::set_optional_object_attributes).
238    ///
239    /// <p>Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.</p>
240    pub fn optional_object_attributes(mut self, input: crate::types::OptionalObjectAttributes) -> Self {
241        let mut v = self.optional_object_attributes.unwrap_or_default();
242        v.push(input);
243        self.optional_object_attributes = ::std::option::Option::Some(v);
244        self
245    }
246    /// <p>Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.</p>
247    pub fn set_optional_object_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OptionalObjectAttributes>>) -> Self {
248        self.optional_object_attributes = input;
249        self
250    }
251    /// <p>Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.</p>
252    pub fn get_optional_object_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OptionalObjectAttributes>> {
253        &self.optional_object_attributes
254    }
255    /// Consumes the builder and constructs a [`ListObjectsInput`](crate::operation::list_objects::ListObjectsInput).
256    pub fn build(self) -> ::std::result::Result<crate::operation::list_objects::ListObjectsInput, ::aws_smithy_types::error::operation::BuildError> {
257        ::std::result::Result::Ok(crate::operation::list_objects::ListObjectsInput {
258            bucket: self.bucket,
259            delimiter: self.delimiter,
260            encoding_type: self.encoding_type,
261            marker: self.marker,
262            max_keys: self.max_keys,
263            prefix: self.prefix,
264            request_payer: self.request_payer,
265            expected_bucket_owner: self.expected_bucket_owner,
266            optional_object_attributes: self.optional_object_attributes,
267        })
268    }
269}