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
// 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 CreateUpdatedImageInput {
/// <p>The name of the image to update.</p>
pub existing_image_name: ::std::option::Option<::std::string::String>,
/// <p>The name of the new image. The name must be unique within the AWS account and Region.</p>
pub new_image_name: ::std::option::Option<::std::string::String>,
/// <p>The description to display for the new image.</p>
pub new_image_description: ::std::option::Option<::std::string::String>,
/// <p>The name to display for the new image.</p>
pub new_image_display_name: ::std::option::Option<::std::string::String>,
/// <p>The tags to associate with the new image. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
/// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
/// <p>_ . : / = + \ - @</p>
/// <p>If you do not specify a value, the value is set to an empty string.</p>
/// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon WorkSpaces Applications Administration Guide</i>.</p>
pub new_image_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>Indicates whether to display the status of image update availability before WorkSpaces Applications initiates the process of creating a new updated image. If this value is set to <code>true</code>, WorkSpaces Applications displays whether image updates are available. If this value is set to <code>false</code>, WorkSpaces Applications initiates the process of creating a new updated image without displaying whether image updates are available.</p>
pub dry_run: ::std::option::Option<bool>,
}
impl CreateUpdatedImageInput {
/// <p>The name of the image to update.</p>
pub fn existing_image_name(&self) -> ::std::option::Option<&str> {
self.existing_image_name.as_deref()
}
/// <p>The name of the new image. The name must be unique within the AWS account and Region.</p>
pub fn new_image_name(&self) -> ::std::option::Option<&str> {
self.new_image_name.as_deref()
}
/// <p>The description to display for the new image.</p>
pub fn new_image_description(&self) -> ::std::option::Option<&str> {
self.new_image_description.as_deref()
}
/// <p>The name to display for the new image.</p>
pub fn new_image_display_name(&self) -> ::std::option::Option<&str> {
self.new_image_display_name.as_deref()
}
/// <p>The tags to associate with the new image. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
/// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
/// <p>_ . : / = + \ - @</p>
/// <p>If you do not specify a value, the value is set to an empty string.</p>
/// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon WorkSpaces Applications Administration Guide</i>.</p>
pub fn new_image_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.new_image_tags.as_ref()
}
/// <p>Indicates whether to display the status of image update availability before WorkSpaces Applications initiates the process of creating a new updated image. If this value is set to <code>true</code>, WorkSpaces Applications displays whether image updates are available. If this value is set to <code>false</code>, WorkSpaces Applications initiates the process of creating a new updated image without displaying whether image updates are available.</p>
pub fn dry_run(&self) -> ::std::option::Option<bool> {
self.dry_run
}
}
impl CreateUpdatedImageInput {
/// Creates a new builder-style object to manufacture [`CreateUpdatedImageInput`](crate::operation::create_updated_image::CreateUpdatedImageInput).
pub fn builder() -> crate::operation::create_updated_image::builders::CreateUpdatedImageInputBuilder {
crate::operation::create_updated_image::builders::CreateUpdatedImageInputBuilder::default()
}
}
/// A builder for [`CreateUpdatedImageInput`](crate::operation::create_updated_image::CreateUpdatedImageInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateUpdatedImageInputBuilder {
pub(crate) existing_image_name: ::std::option::Option<::std::string::String>,
pub(crate) new_image_name: ::std::option::Option<::std::string::String>,
pub(crate) new_image_description: ::std::option::Option<::std::string::String>,
pub(crate) new_image_display_name: ::std::option::Option<::std::string::String>,
pub(crate) new_image_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) dry_run: ::std::option::Option<bool>,
}
impl CreateUpdatedImageInputBuilder {
/// <p>The name of the image to update.</p>
/// This field is required.
pub fn existing_image_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.existing_image_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the image to update.</p>
pub fn set_existing_image_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.existing_image_name = input;
self
}
/// <p>The name of the image to update.</p>
pub fn get_existing_image_name(&self) -> &::std::option::Option<::std::string::String> {
&self.existing_image_name
}
/// <p>The name of the new image. The name must be unique within the AWS account and Region.</p>
/// This field is required.
pub fn new_image_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.new_image_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the new image. The name must be unique within the AWS account and Region.</p>
pub fn set_new_image_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.new_image_name = input;
self
}
/// <p>The name of the new image. The name must be unique within the AWS account and Region.</p>
pub fn get_new_image_name(&self) -> &::std::option::Option<::std::string::String> {
&self.new_image_name
}
/// <p>The description to display for the new image.</p>
pub fn new_image_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.new_image_description = ::std::option::Option::Some(input.into());
self
}
/// <p>The description to display for the new image.</p>
pub fn set_new_image_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.new_image_description = input;
self
}
/// <p>The description to display for the new image.</p>
pub fn get_new_image_description(&self) -> &::std::option::Option<::std::string::String> {
&self.new_image_description
}
/// <p>The name to display for the new image.</p>
pub fn new_image_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.new_image_display_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name to display for the new image.</p>
pub fn set_new_image_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.new_image_display_name = input;
self
}
/// <p>The name to display for the new image.</p>
pub fn get_new_image_display_name(&self) -> &::std::option::Option<::std::string::String> {
&self.new_image_display_name
}
/// Adds a key-value pair to `new_image_tags`.
///
/// To override the contents of this collection use [`set_new_image_tags`](Self::set_new_image_tags).
///
/// <p>The tags to associate with the new image. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
/// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
/// <p>_ . : / = + \ - @</p>
/// <p>If you do not specify a value, the value is set to an empty string.</p>
/// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon WorkSpaces Applications Administration Guide</i>.</p>
pub fn new_image_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.new_image_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.new_image_tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>The tags to associate with the new image. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
/// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
/// <p>_ . : / = + \ - @</p>
/// <p>If you do not specify a value, the value is set to an empty string.</p>
/// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon WorkSpaces Applications Administration Guide</i>.</p>
pub fn set_new_image_tags(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.new_image_tags = input;
self
}
/// <p>The tags to associate with the new image. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
/// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
/// <p>_ . : / = + \ - @</p>
/// <p>If you do not specify a value, the value is set to an empty string.</p>
/// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon WorkSpaces Applications Administration Guide</i>.</p>
pub fn get_new_image_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.new_image_tags
}
/// <p>Indicates whether to display the status of image update availability before WorkSpaces Applications initiates the process of creating a new updated image. If this value is set to <code>true</code>, WorkSpaces Applications displays whether image updates are available. If this value is set to <code>false</code>, WorkSpaces Applications initiates the process of creating a new updated image without displaying whether image updates are available.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.dry_run = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether to display the status of image update availability before WorkSpaces Applications initiates the process of creating a new updated image. If this value is set to <code>true</code>, WorkSpaces Applications displays whether image updates are available. If this value is set to <code>false</code>, WorkSpaces Applications initiates the process of creating a new updated image without displaying whether image updates are available.</p>
pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
self.dry_run = input;
self
}
/// <p>Indicates whether to display the status of image update availability before WorkSpaces Applications initiates the process of creating a new updated image. If this value is set to <code>true</code>, WorkSpaces Applications displays whether image updates are available. If this value is set to <code>false</code>, WorkSpaces Applications initiates the process of creating a new updated image without displaying whether image updates are available.</p>
pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
&self.dry_run
}
/// Consumes the builder and constructs a [`CreateUpdatedImageInput`](crate::operation::create_updated_image::CreateUpdatedImageInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_updated_image::CreateUpdatedImageInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_updated_image::CreateUpdatedImageInput {
existing_image_name: self.existing_image_name,
new_image_name: self.new_image_name,
new_image_description: self.new_image_description,
new_image_display_name: self.new_image_display_name,
new_image_tags: self.new_image_tags,
dry_run: self.dry_run,
})
}
}