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
// 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 DeleteCapacityProviderInput {
/// <p>The short name or full Amazon Resource Name (ARN) of the capacity provider to delete.</p>
pub capacity_provider: ::std::option::Option<::std::string::String>,
/// <p>The name of the cluster that contains the capacity provider to delete. Managed instances capacity providers are cluster-scoped and can only be deleted from their associated cluster.</p>
pub cluster: ::std::option::Option<::std::string::String>,
}
impl DeleteCapacityProviderInput {
/// <p>The short name or full Amazon Resource Name (ARN) of the capacity provider to delete.</p>
pub fn capacity_provider(&self) -> ::std::option::Option<&str> {
self.capacity_provider.as_deref()
}
/// <p>The name of the cluster that contains the capacity provider to delete. Managed instances capacity providers are cluster-scoped and can only be deleted from their associated cluster.</p>
pub fn cluster(&self) -> ::std::option::Option<&str> {
self.cluster.as_deref()
}
}
impl DeleteCapacityProviderInput {
/// Creates a new builder-style object to manufacture [`DeleteCapacityProviderInput`](crate::operation::delete_capacity_provider::DeleteCapacityProviderInput).
pub fn builder() -> crate::operation::delete_capacity_provider::builders::DeleteCapacityProviderInputBuilder {
crate::operation::delete_capacity_provider::builders::DeleteCapacityProviderInputBuilder::default()
}
}
/// A builder for [`DeleteCapacityProviderInput`](crate::operation::delete_capacity_provider::DeleteCapacityProviderInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteCapacityProviderInputBuilder {
pub(crate) capacity_provider: ::std::option::Option<::std::string::String>,
pub(crate) cluster: ::std::option::Option<::std::string::String>,
}
impl DeleteCapacityProviderInputBuilder {
/// <p>The short name or full Amazon Resource Name (ARN) of the capacity provider to delete.</p>
/// This field is required.
pub fn capacity_provider(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.capacity_provider = ::std::option::Option::Some(input.into());
self
}
/// <p>The short name or full Amazon Resource Name (ARN) of the capacity provider to delete.</p>
pub fn set_capacity_provider(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.capacity_provider = input;
self
}
/// <p>The short name or full Amazon Resource Name (ARN) of the capacity provider to delete.</p>
pub fn get_capacity_provider(&self) -> &::std::option::Option<::std::string::String> {
&self.capacity_provider
}
/// <p>The name of the cluster that contains the capacity provider to delete. Managed instances capacity providers are cluster-scoped and can only be deleted from their associated cluster.</p>
pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the cluster that contains the capacity provider to delete. Managed instances capacity providers are cluster-scoped and can only be deleted from their associated cluster.</p>
pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster = input;
self
}
/// <p>The name of the cluster that contains the capacity provider to delete. Managed instances capacity providers are cluster-scoped and can only be deleted from their associated cluster.</p>
pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster
}
/// Consumes the builder and constructs a [`DeleteCapacityProviderInput`](crate::operation::delete_capacity_provider::DeleteCapacityProviderInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::delete_capacity_provider::DeleteCapacityProviderInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::delete_capacity_provider::DeleteCapacityProviderInput {
capacity_provider: self.capacity_provider,
cluster: self.cluster,
})
}
}