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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// 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 CreateFrameworkInput {
/// <p>The unique name of the framework. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
pub framework_name: ::std::option::Option<::std::string::String>,
/// <p>An optional description of the framework with a maximum of 1,024 characters.</p>
pub framework_description: ::std::option::Option<::std::string::String>,
/// <p>The controls that make up the framework. Each control in the list has a name, input parameters, and scope.</p>
pub framework_controls: ::std::option::Option<::std::vec::Vec<crate::types::FrameworkControl>>,
/// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>CreateFrameworkInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
pub idempotency_token: ::std::option::Option<::std::string::String>,
/// <p>The tags to assign to the framework.</p>
pub framework_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateFrameworkInput {
/// <p>The unique name of the framework. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
pub fn framework_name(&self) -> ::std::option::Option<&str> {
self.framework_name.as_deref()
}
/// <p>An optional description of the framework with a maximum of 1,024 characters.</p>
pub fn framework_description(&self) -> ::std::option::Option<&str> {
self.framework_description.as_deref()
}
/// <p>The controls that make up the framework. Each control in the list has a name, input parameters, and scope.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.framework_controls.is_none()`.
pub fn framework_controls(&self) -> &[crate::types::FrameworkControl] {
self.framework_controls.as_deref().unwrap_or_default()
}
/// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>CreateFrameworkInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
pub fn idempotency_token(&self) -> ::std::option::Option<&str> {
self.idempotency_token.as_deref()
}
/// <p>The tags to assign to the framework.</p>
pub fn framework_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.framework_tags.as_ref()
}
}
impl CreateFrameworkInput {
/// Creates a new builder-style object to manufacture [`CreateFrameworkInput`](crate::operation::create_framework::CreateFrameworkInput).
pub fn builder() -> crate::operation::create_framework::builders::CreateFrameworkInputBuilder {
crate::operation::create_framework::builders::CreateFrameworkInputBuilder::default()
}
}
/// A builder for [`CreateFrameworkInput`](crate::operation::create_framework::CreateFrameworkInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateFrameworkInputBuilder {
pub(crate) framework_name: ::std::option::Option<::std::string::String>,
pub(crate) framework_description: ::std::option::Option<::std::string::String>,
pub(crate) framework_controls: ::std::option::Option<::std::vec::Vec<crate::types::FrameworkControl>>,
pub(crate) idempotency_token: ::std::option::Option<::std::string::String>,
pub(crate) framework_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateFrameworkInputBuilder {
/// <p>The unique name of the framework. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
/// This field is required.
pub fn framework_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.framework_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique name of the framework. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
pub fn set_framework_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.framework_name = input;
self
}
/// <p>The unique name of the framework. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
pub fn get_framework_name(&self) -> &::std::option::Option<::std::string::String> {
&self.framework_name
}
/// <p>An optional description of the framework with a maximum of 1,024 characters.</p>
pub fn framework_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.framework_description = ::std::option::Option::Some(input.into());
self
}
/// <p>An optional description of the framework with a maximum of 1,024 characters.</p>
pub fn set_framework_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.framework_description = input;
self
}
/// <p>An optional description of the framework with a maximum of 1,024 characters.</p>
pub fn get_framework_description(&self) -> &::std::option::Option<::std::string::String> {
&self.framework_description
}
/// Appends an item to `framework_controls`.
///
/// To override the contents of this collection use [`set_framework_controls`](Self::set_framework_controls).
///
/// <p>The controls that make up the framework. Each control in the list has a name, input parameters, and scope.</p>
pub fn framework_controls(mut self, input: crate::types::FrameworkControl) -> Self {
let mut v = self.framework_controls.unwrap_or_default();
v.push(input);
self.framework_controls = ::std::option::Option::Some(v);
self
}
/// <p>The controls that make up the framework. Each control in the list has a name, input parameters, and scope.</p>
pub fn set_framework_controls(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FrameworkControl>>) -> Self {
self.framework_controls = input;
self
}
/// <p>The controls that make up the framework. Each control in the list has a name, input parameters, and scope.</p>
pub fn get_framework_controls(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FrameworkControl>> {
&self.framework_controls
}
/// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>CreateFrameworkInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
pub fn idempotency_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.idempotency_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>CreateFrameworkInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
pub fn set_idempotency_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.idempotency_token = input;
self
}
/// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>CreateFrameworkInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
pub fn get_idempotency_token(&self) -> &::std::option::Option<::std::string::String> {
&self.idempotency_token
}
/// Adds a key-value pair to `framework_tags`.
///
/// To override the contents of this collection use [`set_framework_tags`](Self::set_framework_tags).
///
/// <p>The tags to assign to the framework.</p>
pub fn framework_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.framework_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.framework_tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>The tags to assign to the framework.</p>
pub fn set_framework_tags(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.framework_tags = input;
self
}
/// <p>The tags to assign to the framework.</p>
pub fn get_framework_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.framework_tags
}
/// Consumes the builder and constructs a [`CreateFrameworkInput`](crate::operation::create_framework::CreateFrameworkInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_framework::CreateFrameworkInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_framework::CreateFrameworkInput {
framework_name: self.framework_name,
framework_description: self.framework_description,
framework_controls: self.framework_controls,
idempotency_token: self.idempotency_token,
framework_tags: self.framework_tags,
})
}
}