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
// 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 GetBucketsOutput {
/// <p>An array of objects that describe buckets.</p>
pub buckets: ::std::option::Option<::std::vec::Vec<crate::types::Bucket>>,
/// <p>The token to advance to the next page of results from your request.</p>
/// <p>A next page token is not returned if there are no more results to display.</p>
/// <p>To get the next page of results, perform another <code>GetBuckets</code> request and specify the next page token using the <code>pageToken</code> parameter.</p>
pub next_page_token: ::std::option::Option<::std::string::String>,
/// <p>An object that describes the synchronization status of the Amazon S3 account-level block public access feature for your Lightsail buckets.</p>
/// <p>For more information about this feature and how it affects Lightsail buckets, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-block-public-access-for-buckets">Block public access for buckets in Amazon Lightsail</a>.</p>
pub account_level_bpa_sync: ::std::option::Option<crate::types::AccountLevelBpaSync>,
_request_id: Option<String>,
}
impl GetBucketsOutput {
/// <p>An array of objects that describe buckets.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.buckets.is_none()`.
pub fn buckets(&self) -> &[crate::types::Bucket] {
self.buckets.as_deref().unwrap_or_default()
}
/// <p>The token to advance to the next page of results from your request.</p>
/// <p>A next page token is not returned if there are no more results to display.</p>
/// <p>To get the next page of results, perform another <code>GetBuckets</code> request and specify the next page token using the <code>pageToken</code> parameter.</p>
pub fn next_page_token(&self) -> ::std::option::Option<&str> {
self.next_page_token.as_deref()
}
/// <p>An object that describes the synchronization status of the Amazon S3 account-level block public access feature for your Lightsail buckets.</p>
/// <p>For more information about this feature and how it affects Lightsail buckets, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-block-public-access-for-buckets">Block public access for buckets in Amazon Lightsail</a>.</p>
pub fn account_level_bpa_sync(&self) -> ::std::option::Option<&crate::types::AccountLevelBpaSync> {
self.account_level_bpa_sync.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetBucketsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetBucketsOutput {
/// Creates a new builder-style object to manufacture [`GetBucketsOutput`](crate::operation::get_buckets::GetBucketsOutput).
pub fn builder() -> crate::operation::get_buckets::builders::GetBucketsOutputBuilder {
crate::operation::get_buckets::builders::GetBucketsOutputBuilder::default()
}
}
/// A builder for [`GetBucketsOutput`](crate::operation::get_buckets::GetBucketsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetBucketsOutputBuilder {
pub(crate) buckets: ::std::option::Option<::std::vec::Vec<crate::types::Bucket>>,
pub(crate) next_page_token: ::std::option::Option<::std::string::String>,
pub(crate) account_level_bpa_sync: ::std::option::Option<crate::types::AccountLevelBpaSync>,
_request_id: Option<String>,
}
impl GetBucketsOutputBuilder {
/// Appends an item to `buckets`.
///
/// To override the contents of this collection use [`set_buckets`](Self::set_buckets).
///
/// <p>An array of objects that describe buckets.</p>
pub fn buckets(mut self, input: crate::types::Bucket) -> Self {
let mut v = self.buckets.unwrap_or_default();
v.push(input);
self.buckets = ::std::option::Option::Some(v);
self
}
/// <p>An array of objects that describe buckets.</p>
pub fn set_buckets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Bucket>>) -> Self {
self.buckets = input;
self
}
/// <p>An array of objects that describe buckets.</p>
pub fn get_buckets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Bucket>> {
&self.buckets
}
/// <p>The token to advance to the next page of results from your request.</p>
/// <p>A next page token is not returned if there are no more results to display.</p>
/// <p>To get the next page of results, perform another <code>GetBuckets</code> request and specify the next page token using the <code>pageToken</code> parameter.</p>
pub fn next_page_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_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>A next page token is not returned if there are no more results to display.</p>
/// <p>To get the next page of results, perform another <code>GetBuckets</code> request and specify the next page token using the <code>pageToken</code> parameter.</p>
pub fn set_next_page_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_page_token = input;
self
}
/// <p>The token to advance to the next page of results from your request.</p>
/// <p>A next page token is not returned if there are no more results to display.</p>
/// <p>To get the next page of results, perform another <code>GetBuckets</code> request and specify the next page token using the <code>pageToken</code> parameter.</p>
pub fn get_next_page_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_page_token
}
/// <p>An object that describes the synchronization status of the Amazon S3 account-level block public access feature for your Lightsail buckets.</p>
/// <p>For more information about this feature and how it affects Lightsail buckets, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-block-public-access-for-buckets">Block public access for buckets in Amazon Lightsail</a>.</p>
pub fn account_level_bpa_sync(mut self, input: crate::types::AccountLevelBpaSync) -> Self {
self.account_level_bpa_sync = ::std::option::Option::Some(input);
self
}
/// <p>An object that describes the synchronization status of the Amazon S3 account-level block public access feature for your Lightsail buckets.</p>
/// <p>For more information about this feature and how it affects Lightsail buckets, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-block-public-access-for-buckets">Block public access for buckets in Amazon Lightsail</a>.</p>
pub fn set_account_level_bpa_sync(mut self, input: ::std::option::Option<crate::types::AccountLevelBpaSync>) -> Self {
self.account_level_bpa_sync = input;
self
}
/// <p>An object that describes the synchronization status of the Amazon S3 account-level block public access feature for your Lightsail buckets.</p>
/// <p>For more information about this feature and how it affects Lightsail buckets, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-block-public-access-for-buckets">Block public access for buckets in Amazon Lightsail</a>.</p>
pub fn get_account_level_bpa_sync(&self) -> &::std::option::Option<crate::types::AccountLevelBpaSync> {
&self.account_level_bpa_sync
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetBucketsOutput`](crate::operation::get_buckets::GetBucketsOutput).
pub fn build(self) -> crate::operation::get_buckets::GetBucketsOutput {
crate::operation::get_buckets::GetBucketsOutput {
buckets: self.buckets,
next_page_token: self.next_page_token,
account_level_bpa_sync: self.account_level_bpa_sync,
_request_id: self._request_id,
}
}
}