aws_sdk_kinesisanalyticsv2/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 to update.</p>
7 pub application_name: ::std::option::Option<::std::string::String>,
8 /// <p>The current application version ID. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>.You can retrieve the application version ID using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
9 pub current_application_version_id: ::std::option::Option<i64>,
10 /// <p>Describes application configuration updates.</p>
11 pub application_configuration_update: ::std::option::Option<crate::types::ApplicationConfigurationUpdate>,
12 /// <p>Describes updates to the service execution role.</p>
13 pub service_execution_role_update: ::std::option::Option<::std::string::String>,
14 /// <p>Describes updates to the application's starting parameters.</p>
15 pub run_configuration_update: ::std::option::Option<crate::types::RunConfigurationUpdate>,
16 /// <p>Describes application Amazon CloudWatch logging option updates. You can only update existing CloudWatch logging options with this action. To add a new CloudWatch logging option, use <code>AddApplicationCloudWatchLoggingOption</code>.</p>
17 pub cloud_watch_logging_option_updates: ::std::option::Option<::std::vec::Vec<crate::types::CloudWatchLoggingOptionUpdate>>,
18 /// <p>A value you use to implement strong concurrency for application updates. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>. You get the application's current <code>ConditionalToken</code> using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
19 pub conditional_token: ::std::option::Option<::std::string::String>,
20 /// <p>Updates the Managed Service for Apache Flink runtime environment used to run your code. To avoid issues you must:</p>
21 /// <ul>
22 /// <li>
23 /// <p>Ensure your new jar and dependencies are compatible with the new runtime selected.</p></li>
24 /// <li>
25 /// <p>Ensure your new code's state is compatible with the snapshot from which your application will start</p></li>
26 /// </ul>
27 pub runtime_environment_update: ::std::option::Option<crate::types::RuntimeEnvironment>,
28}
29impl UpdateApplicationInput {
30 /// <p>The name of the application to update.</p>
31 pub fn application_name(&self) -> ::std::option::Option<&str> {
32 self.application_name.as_deref()
33 }
34 /// <p>The current application version ID. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>.You can retrieve the application version ID using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
35 pub fn current_application_version_id(&self) -> ::std::option::Option<i64> {
36 self.current_application_version_id
37 }
38 /// <p>Describes application configuration updates.</p>
39 pub fn application_configuration_update(&self) -> ::std::option::Option<&crate::types::ApplicationConfigurationUpdate> {
40 self.application_configuration_update.as_ref()
41 }
42 /// <p>Describes updates to the service execution role.</p>
43 pub fn service_execution_role_update(&self) -> ::std::option::Option<&str> {
44 self.service_execution_role_update.as_deref()
45 }
46 /// <p>Describes updates to the application's starting parameters.</p>
47 pub fn run_configuration_update(&self) -> ::std::option::Option<&crate::types::RunConfigurationUpdate> {
48 self.run_configuration_update.as_ref()
49 }
50 /// <p>Describes application Amazon CloudWatch logging option updates. You can only update existing CloudWatch logging options with this action. To add a new CloudWatch logging option, use <code>AddApplicationCloudWatchLoggingOption</code>.</p>
51 ///
52 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.cloud_watch_logging_option_updates.is_none()`.
53 pub fn cloud_watch_logging_option_updates(&self) -> &[crate::types::CloudWatchLoggingOptionUpdate] {
54 self.cloud_watch_logging_option_updates.as_deref().unwrap_or_default()
55 }
56 /// <p>A value you use to implement strong concurrency for application updates. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>. You get the application's current <code>ConditionalToken</code> using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
57 pub fn conditional_token(&self) -> ::std::option::Option<&str> {
58 self.conditional_token.as_deref()
59 }
60 /// <p>Updates the Managed Service for Apache Flink runtime environment used to run your code. To avoid issues you must:</p>
61 /// <ul>
62 /// <li>
63 /// <p>Ensure your new jar and dependencies are compatible with the new runtime selected.</p></li>
64 /// <li>
65 /// <p>Ensure your new code's state is compatible with the snapshot from which your application will start</p></li>
66 /// </ul>
67 pub fn runtime_environment_update(&self) -> ::std::option::Option<&crate::types::RuntimeEnvironment> {
68 self.runtime_environment_update.as_ref()
69 }
70}
71impl UpdateApplicationInput {
72 /// Creates a new builder-style object to manufacture [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
73 pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
74 crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
75 }
76}
77
78/// A builder for [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
79#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
80#[non_exhaustive]
81pub struct UpdateApplicationInputBuilder {
82 pub(crate) application_name: ::std::option::Option<::std::string::String>,
83 pub(crate) current_application_version_id: ::std::option::Option<i64>,
84 pub(crate) application_configuration_update: ::std::option::Option<crate::types::ApplicationConfigurationUpdate>,
85 pub(crate) service_execution_role_update: ::std::option::Option<::std::string::String>,
86 pub(crate) run_configuration_update: ::std::option::Option<crate::types::RunConfigurationUpdate>,
87 pub(crate) cloud_watch_logging_option_updates: ::std::option::Option<::std::vec::Vec<crate::types::CloudWatchLoggingOptionUpdate>>,
88 pub(crate) conditional_token: ::std::option::Option<::std::string::String>,
89 pub(crate) runtime_environment_update: ::std::option::Option<crate::types::RuntimeEnvironment>,
90}
91impl UpdateApplicationInputBuilder {
92 /// <p>The name of the application to update.</p>
93 /// This field is required.
94 pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.application_name = ::std::option::Option::Some(input.into());
96 self
97 }
98 /// <p>The name of the application to update.</p>
99 pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.application_name = input;
101 self
102 }
103 /// <p>The name of the application to update.</p>
104 pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
105 &self.application_name
106 }
107 /// <p>The current application version ID. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>.You can retrieve the application version ID using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
108 pub fn current_application_version_id(mut self, input: i64) -> Self {
109 self.current_application_version_id = ::std::option::Option::Some(input);
110 self
111 }
112 /// <p>The current application version ID. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>.You can retrieve the application version ID using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
113 pub fn set_current_application_version_id(mut self, input: ::std::option::Option<i64>) -> Self {
114 self.current_application_version_id = input;
115 self
116 }
117 /// <p>The current application version ID. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>.You can retrieve the application version ID using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
118 pub fn get_current_application_version_id(&self) -> &::std::option::Option<i64> {
119 &self.current_application_version_id
120 }
121 /// <p>Describes application configuration updates.</p>
122 pub fn application_configuration_update(mut self, input: crate::types::ApplicationConfigurationUpdate) -> Self {
123 self.application_configuration_update = ::std::option::Option::Some(input);
124 self
125 }
126 /// <p>Describes application configuration updates.</p>
127 pub fn set_application_configuration_update(mut self, input: ::std::option::Option<crate::types::ApplicationConfigurationUpdate>) -> Self {
128 self.application_configuration_update = input;
129 self
130 }
131 /// <p>Describes application configuration updates.</p>
132 pub fn get_application_configuration_update(&self) -> &::std::option::Option<crate::types::ApplicationConfigurationUpdate> {
133 &self.application_configuration_update
134 }
135 /// <p>Describes updates to the service execution role.</p>
136 pub fn service_execution_role_update(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.service_execution_role_update = ::std::option::Option::Some(input.into());
138 self
139 }
140 /// <p>Describes updates to the service execution role.</p>
141 pub fn set_service_execution_role_update(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142 self.service_execution_role_update = input;
143 self
144 }
145 /// <p>Describes updates to the service execution role.</p>
146 pub fn get_service_execution_role_update(&self) -> &::std::option::Option<::std::string::String> {
147 &self.service_execution_role_update
148 }
149 /// <p>Describes updates to the application's starting parameters.</p>
150 pub fn run_configuration_update(mut self, input: crate::types::RunConfigurationUpdate) -> Self {
151 self.run_configuration_update = ::std::option::Option::Some(input);
152 self
153 }
154 /// <p>Describes updates to the application's starting parameters.</p>
155 pub fn set_run_configuration_update(mut self, input: ::std::option::Option<crate::types::RunConfigurationUpdate>) -> Self {
156 self.run_configuration_update = input;
157 self
158 }
159 /// <p>Describes updates to the application's starting parameters.</p>
160 pub fn get_run_configuration_update(&self) -> &::std::option::Option<crate::types::RunConfigurationUpdate> {
161 &self.run_configuration_update
162 }
163 /// Appends an item to `cloud_watch_logging_option_updates`.
164 ///
165 /// To override the contents of this collection use [`set_cloud_watch_logging_option_updates`](Self::set_cloud_watch_logging_option_updates).
166 ///
167 /// <p>Describes application Amazon CloudWatch logging option updates. You can only update existing CloudWatch logging options with this action. To add a new CloudWatch logging option, use <code>AddApplicationCloudWatchLoggingOption</code>.</p>
168 pub fn cloud_watch_logging_option_updates(mut self, input: crate::types::CloudWatchLoggingOptionUpdate) -> Self {
169 let mut v = self.cloud_watch_logging_option_updates.unwrap_or_default();
170 v.push(input);
171 self.cloud_watch_logging_option_updates = ::std::option::Option::Some(v);
172 self
173 }
174 /// <p>Describes application Amazon CloudWatch logging option updates. You can only update existing CloudWatch logging options with this action. To add a new CloudWatch logging option, use <code>AddApplicationCloudWatchLoggingOption</code>.</p>
175 pub fn set_cloud_watch_logging_option_updates(
176 mut self,
177 input: ::std::option::Option<::std::vec::Vec<crate::types::CloudWatchLoggingOptionUpdate>>,
178 ) -> Self {
179 self.cloud_watch_logging_option_updates = input;
180 self
181 }
182 /// <p>Describes application Amazon CloudWatch logging option updates. You can only update existing CloudWatch logging options with this action. To add a new CloudWatch logging option, use <code>AddApplicationCloudWatchLoggingOption</code>.</p>
183 pub fn get_cloud_watch_logging_option_updates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CloudWatchLoggingOptionUpdate>> {
184 &self.cloud_watch_logging_option_updates
185 }
186 /// <p>A value you use to implement strong concurrency for application updates. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>. You get the application's current <code>ConditionalToken</code> using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
187 pub fn conditional_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188 self.conditional_token = ::std::option::Option::Some(input.into());
189 self
190 }
191 /// <p>A value you use to implement strong concurrency for application updates. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>. You get the application's current <code>ConditionalToken</code> using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
192 pub fn set_conditional_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193 self.conditional_token = input;
194 self
195 }
196 /// <p>A value you use to implement strong concurrency for application updates. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>. You get the application's current <code>ConditionalToken</code> using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
197 pub fn get_conditional_token(&self) -> &::std::option::Option<::std::string::String> {
198 &self.conditional_token
199 }
200 /// <p>Updates the Managed Service for Apache Flink runtime environment used to run your code. To avoid issues you must:</p>
201 /// <ul>
202 /// <li>
203 /// <p>Ensure your new jar and dependencies are compatible with the new runtime selected.</p></li>
204 /// <li>
205 /// <p>Ensure your new code's state is compatible with the snapshot from which your application will start</p></li>
206 /// </ul>
207 pub fn runtime_environment_update(mut self, input: crate::types::RuntimeEnvironment) -> Self {
208 self.runtime_environment_update = ::std::option::Option::Some(input);
209 self
210 }
211 /// <p>Updates the Managed Service for Apache Flink runtime environment used to run your code. To avoid issues you must:</p>
212 /// <ul>
213 /// <li>
214 /// <p>Ensure your new jar and dependencies are compatible with the new runtime selected.</p></li>
215 /// <li>
216 /// <p>Ensure your new code's state is compatible with the snapshot from which your application will start</p></li>
217 /// </ul>
218 pub fn set_runtime_environment_update(mut self, input: ::std::option::Option<crate::types::RuntimeEnvironment>) -> Self {
219 self.runtime_environment_update = input;
220 self
221 }
222 /// <p>Updates the Managed Service for Apache Flink runtime environment used to run your code. To avoid issues you must:</p>
223 /// <ul>
224 /// <li>
225 /// <p>Ensure your new jar and dependencies are compatible with the new runtime selected.</p></li>
226 /// <li>
227 /// <p>Ensure your new code's state is compatible with the snapshot from which your application will start</p></li>
228 /// </ul>
229 pub fn get_runtime_environment_update(&self) -> &::std::option::Option<crate::types::RuntimeEnvironment> {
230 &self.runtime_environment_update
231 }
232 /// Consumes the builder and constructs a [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
233 pub fn build(
234 self,
235 ) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
236 ::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
237 application_name: self.application_name,
238 current_application_version_id: self.current_application_version_id,
239 application_configuration_update: self.application_configuration_update,
240 service_execution_role_update: self.service_execution_role_update,
241 run_configuration_update: self.run_configuration_update,
242 cloud_watch_logging_option_updates: self.cloud_watch_logging_option_updates,
243 conditional_token: self.conditional_token,
244 runtime_environment_update: self.runtime_environment_update,
245 })
246 }
247}