aws_sdk_s3/operation/delete_bucket_lifecycle/_delete_bucket_lifecycle_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 DeleteBucketLifecycleInput {
6 /// <p>The bucket name of the lifecycle to delete.</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><note>
9 /// <p>This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.</p>
10 /// </note>
11 pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
12}
13impl DeleteBucketLifecycleInput {
14 /// <p>The bucket name of the lifecycle to delete.</p>
15 pub fn bucket(&self) -> ::std::option::Option<&str> {
16 self.bucket.as_deref()
17 }
18 /// <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><note>
19 /// <p>This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.</p>
20 /// </note>
21 pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
22 self.expected_bucket_owner.as_deref()
23 }
24}
25impl DeleteBucketLifecycleInput {
26 /// Creates a new builder-style object to manufacture [`DeleteBucketLifecycleInput`](crate::operation::delete_bucket_lifecycle::DeleteBucketLifecycleInput).
27 pub fn builder() -> crate::operation::delete_bucket_lifecycle::builders::DeleteBucketLifecycleInputBuilder {
28 crate::operation::delete_bucket_lifecycle::builders::DeleteBucketLifecycleInputBuilder::default()
29 }
30}
31
32/// A builder for [`DeleteBucketLifecycleInput`](crate::operation::delete_bucket_lifecycle::DeleteBucketLifecycleInput).
33#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
34#[non_exhaustive]
35pub struct DeleteBucketLifecycleInputBuilder {
36 pub(crate) bucket: ::std::option::Option<::std::string::String>,
37 pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
38}
39impl DeleteBucketLifecycleInputBuilder {
40 /// <p>The bucket name of the lifecycle to delete.</p>
41 /// This field is required.
42 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
43 self.bucket = ::std::option::Option::Some(input.into());
44 self
45 }
46 /// <p>The bucket name of the lifecycle to delete.</p>
47 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
48 self.bucket = input;
49 self
50 }
51 /// <p>The bucket name of the lifecycle to delete.</p>
52 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
53 &self.bucket
54 }
55 /// <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><note>
56 /// <p>This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.</p>
57 /// </note>
58 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59 self.expected_bucket_owner = ::std::option::Option::Some(input.into());
60 self
61 }
62 /// <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><note>
63 /// <p>This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.</p>
64 /// </note>
65 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.expected_bucket_owner = input;
67 self
68 }
69 /// <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><note>
70 /// <p>This parameter applies to general purpose buckets only. It is not supported for directory bucket lifecycle configurations.</p>
71 /// </note>
72 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
73 &self.expected_bucket_owner
74 }
75 /// Consumes the builder and constructs a [`DeleteBucketLifecycleInput`](crate::operation::delete_bucket_lifecycle::DeleteBucketLifecycleInput).
76 pub fn build(
77 self,
78 ) -> ::std::result::Result<crate::operation::delete_bucket_lifecycle::DeleteBucketLifecycleInput, ::aws_smithy_types::error::operation::BuildError>
79 {
80 ::std::result::Result::Ok(crate::operation::delete_bucket_lifecycle::DeleteBucketLifecycleInput {
81 bucket: self.bucket,
82 expected_bucket_owner: self.expected_bucket_owner,
83 })
84 }
85}