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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// The identifier of the profile entry to update and the fields to change.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UpdateProfileEntryInput {
/// The identifier of the profile entry
pub identifier: ::std::option::Option<::std::string::String>,
/// The identifier of the owning profile.
pub profile_identifier: ::std::option::Option<::std::string::String>,
/// A new name for the entry, unique within the profile.
pub name: ::std::option::Option<::std::string::String>,
/// A new description of the entry's purpose. An empty string removes the description.
pub description: ::std::option::Option<::std::string::String>,
/// Per-interface options, keyed by the id of an interface the extension declares.
pub interfaces: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::InterfaceOptions>>,
/// The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime's principal. An empty string removes the entry's role, so the profile's default applies.
pub execution_role: ::std::option::Option<::std::string::String>,
/// Controls which extension version this entry tracks and how it adopts new releases.
pub version_policy: ::std::option::Option<crate::types::VersionPolicy>,
/// Changes to the entry's setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group's stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension's setting ids and the merged values are validated against the extension's settings definitions.
pub settings: ::std::option::Option<::aws_smithy_types::Document>,
/// The complete list of capability paths to approve, replacing the entry's current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.
pub approve: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateProfileEntryInput {
/// The identifier of the profile entry
pub fn identifier(&self) -> ::std::option::Option<&str> {
self.identifier.as_deref()
}
/// The identifier of the owning profile.
pub fn profile_identifier(&self) -> ::std::option::Option<&str> {
self.profile_identifier.as_deref()
}
/// A new name for the entry, unique within the profile.
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// A new description of the entry's purpose. An empty string removes the description.
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// Per-interface options, keyed by the id of an interface the extension declares.
pub fn interfaces(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::InterfaceOptions>> {
self.interfaces.as_ref()
}
/// The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime's principal. An empty string removes the entry's role, so the profile's default applies.
pub fn execution_role(&self) -> ::std::option::Option<&str> {
self.execution_role.as_deref()
}
/// Controls which extension version this entry tracks and how it adopts new releases.
pub fn version_policy(&self) -> ::std::option::Option<&crate::types::VersionPolicy> {
self.version_policy.as_ref()
}
/// Changes to the entry's setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group's stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension's setting ids and the merged values are validated against the extension's settings definitions.
pub fn settings(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
self.settings.as_ref()
}
/// The complete list of capability paths to approve, replacing the entry's current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.approve.is_none()`.
pub fn approve(&self) -> &[::std::string::String] {
self.approve.as_deref().unwrap_or_default()
}
}
impl ::std::fmt::Debug for UpdateProfileEntryInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateProfileEntryInput");
formatter.field("identifier", &self.identifier);
formatter.field("profile_identifier", &self.profile_identifier);
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("interfaces", &self.interfaces);
formatter.field("execution_role", &self.execution_role);
formatter.field("version_policy", &self.version_policy);
formatter.field("settings", &"*** Sensitive Data Redacted ***");
formatter.field("approve", &self.approve);
formatter.finish()
}
}
impl UpdateProfileEntryInput {
/// Creates a new builder-style object to manufacture [`UpdateProfileEntryInput`](crate::operation::update_profile_entry::UpdateProfileEntryInput).
pub fn builder() -> crate::operation::update_profile_entry::builders::UpdateProfileEntryInputBuilder {
crate::operation::update_profile_entry::builders::UpdateProfileEntryInputBuilder::default()
}
}
/// A builder for [`UpdateProfileEntryInput`](crate::operation::update_profile_entry::UpdateProfileEntryInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateProfileEntryInputBuilder {
pub(crate) identifier: ::std::option::Option<::std::string::String>,
pub(crate) profile_identifier: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) interfaces: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::InterfaceOptions>>,
pub(crate) execution_role: ::std::option::Option<::std::string::String>,
pub(crate) version_policy: ::std::option::Option<crate::types::VersionPolicy>,
pub(crate) settings: ::std::option::Option<::aws_smithy_types::Document>,
pub(crate) approve: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateProfileEntryInputBuilder {
/// The identifier of the profile entry
/// This field is required.
pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.identifier = ::std::option::Option::Some(input.into());
self
}
/// The identifier of the profile entry
pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.identifier = input;
self
}
/// The identifier of the profile entry
pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.identifier
}
/// The identifier of the owning profile.
/// This field is required.
pub fn profile_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.profile_identifier = ::std::option::Option::Some(input.into());
self
}
/// The identifier of the owning profile.
pub fn set_profile_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_identifier = input;
self
}
/// The identifier of the owning profile.
pub fn get_profile_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_identifier
}
/// A new name for the entry, unique within the profile.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// A new name for the entry, unique within the profile.
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// A new name for the entry, unique within the profile.
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// A new description of the entry's purpose. An empty string removes the description.
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// A new description of the entry's purpose. An empty string removes the description.
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// A new description of the entry's purpose. An empty string removes the description.
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// Adds a key-value pair to `interfaces`.
///
/// To override the contents of this collection use [`set_interfaces`](Self::set_interfaces).
///
/// Per-interface options, keyed by the id of an interface the extension declares.
pub fn interfaces(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::InterfaceOptions) -> Self {
let mut hash_map = self.interfaces.unwrap_or_default();
hash_map.insert(k.into(), v);
self.interfaces = ::std::option::Option::Some(hash_map);
self
}
/// Per-interface options, keyed by the id of an interface the extension declares.
pub fn set_interfaces(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::InterfaceOptions>>,
) -> Self {
self.interfaces = input;
self
}
/// Per-interface options, keyed by the id of an interface the extension declares.
pub fn get_interfaces(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::InterfaceOptions>> {
&self.interfaces
}
/// The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime's principal. An empty string removes the entry's role, so the profile's default applies.
pub fn execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.execution_role = ::std::option::Option::Some(input.into());
self
}
/// The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime's principal. An empty string removes the entry's role, so the profile's default applies.
pub fn set_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.execution_role = input;
self
}
/// The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime's principal. An empty string removes the entry's role, so the profile's default applies.
pub fn get_execution_role(&self) -> &::std::option::Option<::std::string::String> {
&self.execution_role
}
/// Controls which extension version this entry tracks and how it adopts new releases.
pub fn version_policy(mut self, input: crate::types::VersionPolicy) -> Self {
self.version_policy = ::std::option::Option::Some(input);
self
}
/// Controls which extension version this entry tracks and how it adopts new releases.
pub fn set_version_policy(mut self, input: ::std::option::Option<crate::types::VersionPolicy>) -> Self {
self.version_policy = input;
self
}
/// Controls which extension version this entry tracks and how it adopts new releases.
pub fn get_version_policy(&self) -> &::std::option::Option<crate::types::VersionPolicy> {
&self.version_policy
}
/// Changes to the entry's setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group's stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension's setting ids and the merged values are validated against the extension's settings definitions.
pub fn settings(mut self, input: ::aws_smithy_types::Document) -> Self {
self.settings = ::std::option::Option::Some(input);
self
}
/// Changes to the entry's setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group's stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension's setting ids and the merged values are validated against the extension's settings definitions.
pub fn set_settings(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
self.settings = input;
self
}
/// Changes to the entry's setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group's stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension's setting ids and the merged values are validated against the extension's settings definitions.
pub fn get_settings(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
&self.settings
}
/// Appends an item to `approve`.
///
/// To override the contents of this collection use [`set_approve`](Self::set_approve).
///
/// The complete list of capability paths to approve, replacing the entry's current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.
pub fn approve(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.approve.unwrap_or_default();
v.push(input.into());
self.approve = ::std::option::Option::Some(v);
self
}
/// The complete list of capability paths to approve, replacing the entry's current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.
pub fn set_approve(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.approve = input;
self
}
/// The complete list of capability paths to approve, replacing the entry's current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.
pub fn get_approve(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.approve
}
/// Consumes the builder and constructs a [`UpdateProfileEntryInput`](crate::operation::update_profile_entry::UpdateProfileEntryInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_profile_entry::UpdateProfileEntryInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::update_profile_entry::UpdateProfileEntryInput {
identifier: self.identifier,
profile_identifier: self.profile_identifier,
name: self.name,
description: self.description,
interfaces: self.interfaces,
execution_role: self.execution_role,
version_policy: self.version_policy,
settings: self.settings,
approve: self.approve,
})
}
}
impl ::std::fmt::Debug for UpdateProfileEntryInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateProfileEntryInputBuilder");
formatter.field("identifier", &self.identifier);
formatter.field("profile_identifier", &self.profile_identifier);
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("interfaces", &self.interfaces);
formatter.field("execution_role", &self.execution_role);
formatter.field("version_policy", &self.version_policy);
formatter.field("settings", &"*** Sensitive Data Redacted ***");
formatter.field("approve", &self.approve);
formatter.finish()
}
}