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 GetBucketWebsiteInput {
6/// <p>The bucket name for which to get the website configuration.</p>
7pub bucket: ::std::option::Option<::std::string::String>,
8/// <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>
9pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
10}
11impl GetBucketWebsiteInput {
12/// <p>The bucket name for which to get the website configuration.</p>
13pub fn bucket(&self) -> ::std::option::Option<&str> {
14self.bucket.as_deref()
15 }
16/// <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>
17pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
18self.expected_bucket_owner.as_deref()
19 }
20}
21impl GetBucketWebsiteInput {
22/// Creates a new builder-style object to manufacture [`GetBucketWebsiteInput`](crate::operation::get_bucket_website::GetBucketWebsiteInput).
23pub fn builder() -> crate::operation::get_bucket_website::builders::GetBucketWebsiteInputBuilder {
24crate::operation::get_bucket_website::builders::GetBucketWebsiteInputBuilder::default()
25 }
26}
2728/// A builder for [`GetBucketWebsiteInput`](crate::operation::get_bucket_website::GetBucketWebsiteInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct GetBucketWebsiteInputBuilder {
32pub(crate) bucket: ::std::option::Option<::std::string::String>,
33pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
34}
35impl GetBucketWebsiteInputBuilder {
36/// <p>The bucket name for which to get the website configuration.</p>
37 /// This field is required.
38pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39self.bucket = ::std::option::Option::Some(input.into());
40self
41}
42/// <p>The bucket name for which to get the website configuration.</p>
43pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44self.bucket = input;
45self
46}
47/// <p>The bucket name for which to get the website configuration.</p>
48pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
49&self.bucket
50 }
51/// <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>
52pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53self.expected_bucket_owner = ::std::option::Option::Some(input.into());
54self
55}
56/// <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>
57pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58self.expected_bucket_owner = input;
59self
60}
61/// <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>
62pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
63&self.expected_bucket_owner
64 }
65/// Consumes the builder and constructs a [`GetBucketWebsiteInput`](crate::operation::get_bucket_website::GetBucketWebsiteInput).
66pub fn build(
67self,
68 ) -> ::std::result::Result<crate::operation::get_bucket_website::GetBucketWebsiteInput, ::aws_smithy_types::error::operation::BuildError> {
69 ::std::result::Result::Ok(crate::operation::get_bucket_website::GetBucketWebsiteInput {
70 bucket: self.bucket,
71 expected_bucket_owner: self.expected_bucket_owner,
72 })
73 }
74}