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