1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetBucketsInput {
/// <p>The name of the bucket for which to return information.</p>
/// <p>When omitted, the response includes all of your buckets in the Amazon Web Services Region where the request is made.</p>
pub bucket_name: ::std::option::Option<::std::string::String>,
/// <p>The token to advance to the next page of results from your request.</p>
/// <p>To get a page token, perform an initial <code>GetBuckets</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
pub page_token: ::std::option::Option<::std::string::String>,
/// <p>A Boolean value that indicates whether to include Lightsail instances that were given access to the bucket using the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_SetResourceAccessForBucket.html">SetResourceAccessForBucket</a> action.</p>
pub include_connected_resources: ::std::option::Option<bool>,
/// <p>A Boolean value that indicates whether to include Lightsail bucket CORS configuration in the response. For more information, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/configure-cors.html">Configuring cross-origin resource sharing (CORS)</a>.</p><note>
/// <p>This parameter is only supported when getting a single bucket with <code>bucketName</code> specified. The default value for this parameter is <code>False</code>.</p>
/// </note>
pub include_cors: ::std::option::Option<bool>,
}
impl GetBucketsInput {
/// <p>The name of the bucket for which to return information.</p>
/// <p>When omitted, the response includes all of your buckets in the Amazon Web Services Region where the request is made.</p>
pub fn bucket_name(&self) -> ::std::option::Option<&str> {
self.bucket_name.as_deref()
}
/// <p>The token to advance to the next page of results from your request.</p>
/// <p>To get a page token, perform an initial <code>GetBuckets</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
pub fn page_token(&self) -> ::std::option::Option<&str> {
self.page_token.as_deref()
}
/// <p>A Boolean value that indicates whether to include Lightsail instances that were given access to the bucket using the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_SetResourceAccessForBucket.html">SetResourceAccessForBucket</a> action.</p>
pub fn include_connected_resources(&self) -> ::std::option::Option<bool> {
self.include_connected_resources
}
/// <p>A Boolean value that indicates whether to include Lightsail bucket CORS configuration in the response. For more information, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/configure-cors.html">Configuring cross-origin resource sharing (CORS)</a>.</p><note>
/// <p>This parameter is only supported when getting a single bucket with <code>bucketName</code> specified. The default value for this parameter is <code>False</code>.</p>
/// </note>
pub fn include_cors(&self) -> ::std::option::Option<bool> {
self.include_cors
}
}
impl GetBucketsInput {
/// Creates a new builder-style object to manufacture [`GetBucketsInput`](crate::operation::get_buckets::GetBucketsInput).
pub fn builder() -> crate::operation::get_buckets::builders::GetBucketsInputBuilder {
crate::operation::get_buckets::builders::GetBucketsInputBuilder::default()
}
}
/// A builder for [`GetBucketsInput`](crate::operation::get_buckets::GetBucketsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetBucketsInputBuilder {
pub(crate) bucket_name: ::std::option::Option<::std::string::String>,
pub(crate) page_token: ::std::option::Option<::std::string::String>,
pub(crate) include_connected_resources: ::std::option::Option<bool>,
pub(crate) include_cors: ::std::option::Option<bool>,
}
impl GetBucketsInputBuilder {
/// <p>The name of the bucket for which to return information.</p>
/// <p>When omitted, the response includes all of your buckets in the Amazon Web Services Region where the request is made.</p>
pub fn bucket_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bucket_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the bucket for which to return information.</p>
/// <p>When omitted, the response includes all of your buckets in the Amazon Web Services Region where the request is made.</p>
pub fn set_bucket_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bucket_name = input;
self
}
/// <p>The name of the bucket for which to return information.</p>
/// <p>When omitted, the response includes all of your buckets in the Amazon Web Services Region where the request is made.</p>
pub fn get_bucket_name(&self) -> &::std::option::Option<::std::string::String> {
&self.bucket_name
}
/// <p>The token to advance to the next page of results from your request.</p>
/// <p>To get a page token, perform an initial <code>GetBuckets</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
pub fn page_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.page_token = ::std::option::Option::Some(input.into());
self
}
/// <p>The token to advance to the next page of results from your request.</p>
/// <p>To get a page token, perform an initial <code>GetBuckets</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
pub fn set_page_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.page_token = input;
self
}
/// <p>The token to advance to the next page of results from your request.</p>
/// <p>To get a page token, perform an initial <code>GetBuckets</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
pub fn get_page_token(&self) -> &::std::option::Option<::std::string::String> {
&self.page_token
}
/// <p>A Boolean value that indicates whether to include Lightsail instances that were given access to the bucket using the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_SetResourceAccessForBucket.html">SetResourceAccessForBucket</a> action.</p>
pub fn include_connected_resources(mut self, input: bool) -> Self {
self.include_connected_resources = ::std::option::Option::Some(input);
self
}
/// <p>A Boolean value that indicates whether to include Lightsail instances that were given access to the bucket using the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_SetResourceAccessForBucket.html">SetResourceAccessForBucket</a> action.</p>
pub fn set_include_connected_resources(mut self, input: ::std::option::Option<bool>) -> Self {
self.include_connected_resources = input;
self
}
/// <p>A Boolean value that indicates whether to include Lightsail instances that were given access to the bucket using the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_SetResourceAccessForBucket.html">SetResourceAccessForBucket</a> action.</p>
pub fn get_include_connected_resources(&self) -> &::std::option::Option<bool> {
&self.include_connected_resources
}
/// <p>A Boolean value that indicates whether to include Lightsail bucket CORS configuration in the response. For more information, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/configure-cors.html">Configuring cross-origin resource sharing (CORS)</a>.</p><note>
/// <p>This parameter is only supported when getting a single bucket with <code>bucketName</code> specified. The default value for this parameter is <code>False</code>.</p>
/// </note>
pub fn include_cors(mut self, input: bool) -> Self {
self.include_cors = ::std::option::Option::Some(input);
self
}
/// <p>A Boolean value that indicates whether to include Lightsail bucket CORS configuration in the response. For more information, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/configure-cors.html">Configuring cross-origin resource sharing (CORS)</a>.</p><note>
/// <p>This parameter is only supported when getting a single bucket with <code>bucketName</code> specified. The default value for this parameter is <code>False</code>.</p>
/// </note>
pub fn set_include_cors(mut self, input: ::std::option::Option<bool>) -> Self {
self.include_cors = input;
self
}
/// <p>A Boolean value that indicates whether to include Lightsail bucket CORS configuration in the response. For more information, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/configure-cors.html">Configuring cross-origin resource sharing (CORS)</a>.</p><note>
/// <p>This parameter is only supported when getting a single bucket with <code>bucketName</code> specified. The default value for this parameter is <code>False</code>.</p>
/// </note>
pub fn get_include_cors(&self) -> &::std::option::Option<bool> {
&self.include_cors
}
/// Consumes the builder and constructs a [`GetBucketsInput`](crate::operation::get_buckets::GetBucketsInput).
pub fn build(self) -> ::std::result::Result<crate::operation::get_buckets::GetBucketsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_buckets::GetBucketsInput {
bucket_name: self.bucket_name,
page_token: self.page_token,
include_connected_resources: self.include_connected_resources,
include_cors: self.include_cors,
})
}
}