aws_sdk_lightsail/operation/delete_bucket_access_key/_delete_bucket_access_key_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 DeleteBucketAccessKeyInput {
6 /// <p>The name of the bucket that the access key belongs to.</p>
7 pub bucket_name: ::std::option::Option<::std::string::String>,
8 /// <p>The ID of the access key to delete.</p>
9 /// <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetBucketAccessKeys.html">GetBucketAccessKeys</a> action to get a list of access key IDs that you can specify.</p>
10 pub access_key_id: ::std::option::Option<::std::string::String>,
11}
12impl DeleteBucketAccessKeyInput {
13 /// <p>The name of the bucket that the access key belongs to.</p>
14 pub fn bucket_name(&self) -> ::std::option::Option<&str> {
15 self.bucket_name.as_deref()
16 }
17 /// <p>The ID of the access key to delete.</p>
18 /// <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetBucketAccessKeys.html">GetBucketAccessKeys</a> action to get a list of access key IDs that you can specify.</p>
19 pub fn access_key_id(&self) -> ::std::option::Option<&str> {
20 self.access_key_id.as_deref()
21 }
22}
23impl DeleteBucketAccessKeyInput {
24 /// Creates a new builder-style object to manufacture [`DeleteBucketAccessKeyInput`](crate::operation::delete_bucket_access_key::DeleteBucketAccessKeyInput).
25 pub fn builder() -> crate::operation::delete_bucket_access_key::builders::DeleteBucketAccessKeyInputBuilder {
26 crate::operation::delete_bucket_access_key::builders::DeleteBucketAccessKeyInputBuilder::default()
27 }
28}
29
30/// A builder for [`DeleteBucketAccessKeyInput`](crate::operation::delete_bucket_access_key::DeleteBucketAccessKeyInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct DeleteBucketAccessKeyInputBuilder {
34 pub(crate) bucket_name: ::std::option::Option<::std::string::String>,
35 pub(crate) access_key_id: ::std::option::Option<::std::string::String>,
36}
37impl DeleteBucketAccessKeyInputBuilder {
38 /// <p>The name of the bucket that the access key belongs to.</p>
39 /// This field is required.
40 pub fn bucket_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41 self.bucket_name = ::std::option::Option::Some(input.into());
42 self
43 }
44 /// <p>The name of the bucket that the access key belongs to.</p>
45 pub fn set_bucket_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46 self.bucket_name = input;
47 self
48 }
49 /// <p>The name of the bucket that the access key belongs to.</p>
50 pub fn get_bucket_name(&self) -> &::std::option::Option<::std::string::String> {
51 &self.bucket_name
52 }
53 /// <p>The ID of the access key to delete.</p>
54 /// <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetBucketAccessKeys.html">GetBucketAccessKeys</a> action to get a list of access key IDs that you can specify.</p>
55 /// This field is required.
56 pub fn access_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57 self.access_key_id = ::std::option::Option::Some(input.into());
58 self
59 }
60 /// <p>The ID of the access key to delete.</p>
61 /// <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetBucketAccessKeys.html">GetBucketAccessKeys</a> action to get a list of access key IDs that you can specify.</p>
62 pub fn set_access_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
63 self.access_key_id = input;
64 self
65 }
66 /// <p>The ID of the access key to delete.</p>
67 /// <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetBucketAccessKeys.html">GetBucketAccessKeys</a> action to get a list of access key IDs that you can specify.</p>
68 pub fn get_access_key_id(&self) -> &::std::option::Option<::std::string::String> {
69 &self.access_key_id
70 }
71 /// Consumes the builder and constructs a [`DeleteBucketAccessKeyInput`](crate::operation::delete_bucket_access_key::DeleteBucketAccessKeyInput).
72 pub fn build(
73 self,
74 ) -> ::std::result::Result<crate::operation::delete_bucket_access_key::DeleteBucketAccessKeyInput, ::aws_smithy_types::error::operation::BuildError>
75 {
76 ::std::result::Result::Ok(crate::operation::delete_bucket_access_key::DeleteBucketAccessKeyInput {
77 bucket_name: self.bucket_name,
78 access_key_id: self.access_key_id,
79 })
80 }
81}