aws_sdk_appstream/operation/update_application/
_update_application_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateApplicationInput {
6    /// <p>The name of the application. This name is visible to users when display name is not specified.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The display name of the application. This name is visible to users in the application catalog.</p>
9    pub display_name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the application.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The icon S3 location of the application.</p>
13    pub icon_s3_location: ::std::option::Option<crate::types::S3Location>,
14    /// <p>The launch path of the application.</p>
15    pub launch_path: ::std::option::Option<::std::string::String>,
16    /// <p>The working directory of the application.</p>
17    pub working_directory: ::std::option::Option<::std::string::String>,
18    /// <p>The launch parameters of the application.</p>
19    pub launch_parameters: ::std::option::Option<::std::string::String>,
20    /// <p>The ARN of the app block.</p>
21    pub app_block_arn: ::std::option::Option<::std::string::String>,
22    /// <p>The attributes to delete for an application.</p>
23    pub attributes_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationAttribute>>,
24}
25impl UpdateApplicationInput {
26    /// <p>The name of the application. This name is visible to users when display name is not specified.</p>
27    pub fn name(&self) -> ::std::option::Option<&str> {
28        self.name.as_deref()
29    }
30    /// <p>The display name of the application. This name is visible to users in the application catalog.</p>
31    pub fn display_name(&self) -> ::std::option::Option<&str> {
32        self.display_name.as_deref()
33    }
34    /// <p>The description of the application.</p>
35    pub fn description(&self) -> ::std::option::Option<&str> {
36        self.description.as_deref()
37    }
38    /// <p>The icon S3 location of the application.</p>
39    pub fn icon_s3_location(&self) -> ::std::option::Option<&crate::types::S3Location> {
40        self.icon_s3_location.as_ref()
41    }
42    /// <p>The launch path of the application.</p>
43    pub fn launch_path(&self) -> ::std::option::Option<&str> {
44        self.launch_path.as_deref()
45    }
46    /// <p>The working directory of the application.</p>
47    pub fn working_directory(&self) -> ::std::option::Option<&str> {
48        self.working_directory.as_deref()
49    }
50    /// <p>The launch parameters of the application.</p>
51    pub fn launch_parameters(&self) -> ::std::option::Option<&str> {
52        self.launch_parameters.as_deref()
53    }
54    /// <p>The ARN of the app block.</p>
55    pub fn app_block_arn(&self) -> ::std::option::Option<&str> {
56        self.app_block_arn.as_deref()
57    }
58    /// <p>The attributes to delete for an application.</p>
59    ///
60    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attributes_to_delete.is_none()`.
61    pub fn attributes_to_delete(&self) -> &[crate::types::ApplicationAttribute] {
62        self.attributes_to_delete.as_deref().unwrap_or_default()
63    }
64}
65impl UpdateApplicationInput {
66    /// Creates a new builder-style object to manufacture [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
67    pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
68        crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
69    }
70}
71
72/// A builder for [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct UpdateApplicationInputBuilder {
76    pub(crate) name: ::std::option::Option<::std::string::String>,
77    pub(crate) display_name: ::std::option::Option<::std::string::String>,
78    pub(crate) description: ::std::option::Option<::std::string::String>,
79    pub(crate) icon_s3_location: ::std::option::Option<crate::types::S3Location>,
80    pub(crate) launch_path: ::std::option::Option<::std::string::String>,
81    pub(crate) working_directory: ::std::option::Option<::std::string::String>,
82    pub(crate) launch_parameters: ::std::option::Option<::std::string::String>,
83    pub(crate) app_block_arn: ::std::option::Option<::std::string::String>,
84    pub(crate) attributes_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationAttribute>>,
85}
86impl UpdateApplicationInputBuilder {
87    /// <p>The name of the application. This name is visible to users when display name is not specified.</p>
88    /// This field is required.
89    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.name = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The name of the application. This name is visible to users when display name is not specified.</p>
94    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.name = input;
96        self
97    }
98    /// <p>The name of the application. This name is visible to users when display name is not specified.</p>
99    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
100        &self.name
101    }
102    /// <p>The display name of the application. This name is visible to users in the application catalog.</p>
103    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.display_name = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The display name of the application. This name is visible to users in the application catalog.</p>
108    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.display_name = input;
110        self
111    }
112    /// <p>The display name of the application. This name is visible to users in the application catalog.</p>
113    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
114        &self.display_name
115    }
116    /// <p>The description of the application.</p>
117    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.description = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The description of the application.</p>
122    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.description = input;
124        self
125    }
126    /// <p>The description of the application.</p>
127    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
128        &self.description
129    }
130    /// <p>The icon S3 location of the application.</p>
131    pub fn icon_s3_location(mut self, input: crate::types::S3Location) -> Self {
132        self.icon_s3_location = ::std::option::Option::Some(input);
133        self
134    }
135    /// <p>The icon S3 location of the application.</p>
136    pub fn set_icon_s3_location(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
137        self.icon_s3_location = input;
138        self
139    }
140    /// <p>The icon S3 location of the application.</p>
141    pub fn get_icon_s3_location(&self) -> &::std::option::Option<crate::types::S3Location> {
142        &self.icon_s3_location
143    }
144    /// <p>The launch path of the application.</p>
145    pub fn launch_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.launch_path = ::std::option::Option::Some(input.into());
147        self
148    }
149    /// <p>The launch path of the application.</p>
150    pub fn set_launch_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.launch_path = input;
152        self
153    }
154    /// <p>The launch path of the application.</p>
155    pub fn get_launch_path(&self) -> &::std::option::Option<::std::string::String> {
156        &self.launch_path
157    }
158    /// <p>The working directory of the application.</p>
159    pub fn working_directory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.working_directory = ::std::option::Option::Some(input.into());
161        self
162    }
163    /// <p>The working directory of the application.</p>
164    pub fn set_working_directory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.working_directory = input;
166        self
167    }
168    /// <p>The working directory of the application.</p>
169    pub fn get_working_directory(&self) -> &::std::option::Option<::std::string::String> {
170        &self.working_directory
171    }
172    /// <p>The launch parameters of the application.</p>
173    pub fn launch_parameters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.launch_parameters = ::std::option::Option::Some(input.into());
175        self
176    }
177    /// <p>The launch parameters of the application.</p>
178    pub fn set_launch_parameters(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179        self.launch_parameters = input;
180        self
181    }
182    /// <p>The launch parameters of the application.</p>
183    pub fn get_launch_parameters(&self) -> &::std::option::Option<::std::string::String> {
184        &self.launch_parameters
185    }
186    /// <p>The ARN of the app block.</p>
187    pub fn app_block_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188        self.app_block_arn = ::std::option::Option::Some(input.into());
189        self
190    }
191    /// <p>The ARN of the app block.</p>
192    pub fn set_app_block_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.app_block_arn = input;
194        self
195    }
196    /// <p>The ARN of the app block.</p>
197    pub fn get_app_block_arn(&self) -> &::std::option::Option<::std::string::String> {
198        &self.app_block_arn
199    }
200    /// Appends an item to `attributes_to_delete`.
201    ///
202    /// To override the contents of this collection use [`set_attributes_to_delete`](Self::set_attributes_to_delete).
203    ///
204    /// <p>The attributes to delete for an application.</p>
205    pub fn attributes_to_delete(mut self, input: crate::types::ApplicationAttribute) -> Self {
206        let mut v = self.attributes_to_delete.unwrap_or_default();
207        v.push(input);
208        self.attributes_to_delete = ::std::option::Option::Some(v);
209        self
210    }
211    /// <p>The attributes to delete for an application.</p>
212    pub fn set_attributes_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationAttribute>>) -> Self {
213        self.attributes_to_delete = input;
214        self
215    }
216    /// <p>The attributes to delete for an application.</p>
217    pub fn get_attributes_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ApplicationAttribute>> {
218        &self.attributes_to_delete
219    }
220    /// Consumes the builder and constructs a [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
221    pub fn build(
222        self,
223    ) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
224        ::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
225            name: self.name,
226            display_name: self.display_name,
227            description: self.description,
228            icon_s3_location: self.icon_s3_location,
229            launch_path: self.launch_path,
230            working_directory: self.working_directory,
231            launch_parameters: self.launch_parameters,
232            app_block_arn: self.app_block_arn,
233            attributes_to_delete: self.attributes_to_delete,
234        })
235    }
236}