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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// 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)]
pub struct CreateTieringConfigurationInput {
/// <p>A tiering configuration must contain a unique <code>TieringConfigurationName</code> string you create and must contain a <code>BackupVaultName</code> and <code>ResourceSelection</code>. You may optionally include a <code>CreatorRequestId</code> string.</p>
/// <p>The <code>TieringConfigurationName</code> is a unique string that is the name of the tiering configuration. This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.</p>
pub tiering_configuration: ::std::option::Option<crate::types::TieringConfigurationInputForCreate>,
/// <p>The tags to assign to the tiering configuration.</p>
pub tiering_configuration_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>This is a unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.</p>
pub creator_request_id: ::std::option::Option<::std::string::String>,
}
impl CreateTieringConfigurationInput {
/// <p>A tiering configuration must contain a unique <code>TieringConfigurationName</code> string you create and must contain a <code>BackupVaultName</code> and <code>ResourceSelection</code>. You may optionally include a <code>CreatorRequestId</code> string.</p>
/// <p>The <code>TieringConfigurationName</code> is a unique string that is the name of the tiering configuration. This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.</p>
pub fn tiering_configuration(&self) -> ::std::option::Option<&crate::types::TieringConfigurationInputForCreate> {
self.tiering_configuration.as_ref()
}
/// <p>The tags to assign to the tiering configuration.</p>
pub fn tiering_configuration_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tiering_configuration_tags.as_ref()
}
/// <p>This is a unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.</p>
pub fn creator_request_id(&self) -> ::std::option::Option<&str> {
self.creator_request_id.as_deref()
}
}
impl ::std::fmt::Debug for CreateTieringConfigurationInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateTieringConfigurationInput");
formatter.field("tiering_configuration", &self.tiering_configuration);
formatter.field("tiering_configuration_tags", &"*** Sensitive Data Redacted ***");
formatter.field("creator_request_id", &self.creator_request_id);
formatter.finish()
}
}
impl CreateTieringConfigurationInput {
/// Creates a new builder-style object to manufacture [`CreateTieringConfigurationInput`](crate::operation::create_tiering_configuration::CreateTieringConfigurationInput).
pub fn builder() -> crate::operation::create_tiering_configuration::builders::CreateTieringConfigurationInputBuilder {
crate::operation::create_tiering_configuration::builders::CreateTieringConfigurationInputBuilder::default()
}
}
/// A builder for [`CreateTieringConfigurationInput`](crate::operation::create_tiering_configuration::CreateTieringConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateTieringConfigurationInputBuilder {
pub(crate) tiering_configuration: ::std::option::Option<crate::types::TieringConfigurationInputForCreate>,
pub(crate) tiering_configuration_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) creator_request_id: ::std::option::Option<::std::string::String>,
}
impl CreateTieringConfigurationInputBuilder {
/// <p>A tiering configuration must contain a unique <code>TieringConfigurationName</code> string you create and must contain a <code>BackupVaultName</code> and <code>ResourceSelection</code>. You may optionally include a <code>CreatorRequestId</code> string.</p>
/// <p>The <code>TieringConfigurationName</code> is a unique string that is the name of the tiering configuration. This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.</p>
/// This field is required.
pub fn tiering_configuration(mut self, input: crate::types::TieringConfigurationInputForCreate) -> Self {
self.tiering_configuration = ::std::option::Option::Some(input);
self
}
/// <p>A tiering configuration must contain a unique <code>TieringConfigurationName</code> string you create and must contain a <code>BackupVaultName</code> and <code>ResourceSelection</code>. You may optionally include a <code>CreatorRequestId</code> string.</p>
/// <p>The <code>TieringConfigurationName</code> is a unique string that is the name of the tiering configuration. This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.</p>
pub fn set_tiering_configuration(mut self, input: ::std::option::Option<crate::types::TieringConfigurationInputForCreate>) -> Self {
self.tiering_configuration = input;
self
}
/// <p>A tiering configuration must contain a unique <code>TieringConfigurationName</code> string you create and must contain a <code>BackupVaultName</code> and <code>ResourceSelection</code>. You may optionally include a <code>CreatorRequestId</code> string.</p>
/// <p>The <code>TieringConfigurationName</code> is a unique string that is the name of the tiering configuration. This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.</p>
pub fn get_tiering_configuration(&self) -> &::std::option::Option<crate::types::TieringConfigurationInputForCreate> {
&self.tiering_configuration
}
/// Adds a key-value pair to `tiering_configuration_tags`.
///
/// To override the contents of this collection use [`set_tiering_configuration_tags`](Self::set_tiering_configuration_tags).
///
/// <p>The tags to assign to the tiering configuration.</p>
pub fn tiering_configuration_tags(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.tiering_configuration_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tiering_configuration_tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>The tags to assign to the tiering configuration.</p>
pub fn set_tiering_configuration_tags(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.tiering_configuration_tags = input;
self
}
/// <p>The tags to assign to the tiering configuration.</p>
pub fn get_tiering_configuration_tags(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tiering_configuration_tags
}
/// <p>This is a unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.</p>
pub fn creator_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.creator_request_id = ::std::option::Option::Some(input.into());
self
}
/// <p>This is a unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.</p>
pub fn set_creator_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.creator_request_id = input;
self
}
/// <p>This is a unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.</p>
pub fn get_creator_request_id(&self) -> &::std::option::Option<::std::string::String> {
&self.creator_request_id
}
/// Consumes the builder and constructs a [`CreateTieringConfigurationInput`](crate::operation::create_tiering_configuration::CreateTieringConfigurationInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_tiering_configuration::CreateTieringConfigurationInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_tiering_configuration::CreateTieringConfigurationInput {
tiering_configuration: self.tiering_configuration,
tiering_configuration_tags: self.tiering_configuration_tags,
creator_request_id: self.creator_request_id,
})
}
}
impl ::std::fmt::Debug for CreateTieringConfigurationInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateTieringConfigurationInputBuilder");
formatter.field("tiering_configuration", &self.tiering_configuration);
formatter.field("tiering_configuration_tags", &"*** Sensitive Data Redacted ***");
formatter.field("creator_request_id", &self.creator_request_id);
formatter.finish()
}
}