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
// 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>,
}
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
}
}
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).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
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>,
}
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
}
/// 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,
})
}
}