aws_sdk_kinesisanalyticsv2/operation/create_application/_create_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 CreateApplicationInput {
6 /// <p>The name of your application (for example, <code>sample-app</code>).</p>
7 pub application_name: ::std::option::Option<::std::string::String>,
8 /// <p>A summary description of the application.</p>
9 pub application_description: ::std::option::Option<::std::string::String>,
10 /// <p>The runtime environment for the application.</p>
11 pub runtime_environment: ::std::option::Option<crate::types::RuntimeEnvironment>,
12 /// <p>The IAM role used by the application to access Kinesis data streams, Kinesis Data Firehose delivery streams, Amazon S3 objects, and other external resources.</p>
13 pub service_execution_role: ::std::option::Option<::std::string::String>,
14 /// <p>Use this parameter to configure the application.</p>
15 pub application_configuration: ::std::option::Option<crate::types::ApplicationConfiguration>,
16 /// <p>Use this parameter to configure an Amazon CloudWatch log stream to monitor application configuration errors.</p>
17 pub cloud_watch_logging_options: ::std::option::Option<::std::vec::Vec<crate::types::CloudWatchLoggingOption>>,
18 /// <p>A list of one or more tags to assign to the application. A tag is a key-value pair that identifies an application. Note that the maximum number of application tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see <a href="https://docs.aws.amazon.com/kinesisanalytics/latest/java/how-tagging.html">Using Tagging</a>.</p>
19 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
20 /// <p>Use the <code>STREAMING</code> mode to create a Managed Service for Apache Flink application. To create a Managed Service for Apache Flink Studio notebook, use the <code>INTERACTIVE</code> mode.</p>
21 pub application_mode: ::std::option::Option<crate::types::ApplicationMode>,
22}
23impl CreateApplicationInput {
24 /// <p>The name of your application (for example, <code>sample-app</code>).</p>
25 pub fn application_name(&self) -> ::std::option::Option<&str> {
26 self.application_name.as_deref()
27 }
28 /// <p>A summary description of the application.</p>
29 pub fn application_description(&self) -> ::std::option::Option<&str> {
30 self.application_description.as_deref()
31 }
32 /// <p>The runtime environment for the application.</p>
33 pub fn runtime_environment(&self) -> ::std::option::Option<&crate::types::RuntimeEnvironment> {
34 self.runtime_environment.as_ref()
35 }
36 /// <p>The IAM role used by the application to access Kinesis data streams, Kinesis Data Firehose delivery streams, Amazon S3 objects, and other external resources.</p>
37 pub fn service_execution_role(&self) -> ::std::option::Option<&str> {
38 self.service_execution_role.as_deref()
39 }
40 /// <p>Use this parameter to configure the application.</p>
41 pub fn application_configuration(&self) -> ::std::option::Option<&crate::types::ApplicationConfiguration> {
42 self.application_configuration.as_ref()
43 }
44 /// <p>Use this parameter to configure an Amazon CloudWatch log stream to monitor application configuration errors.</p>
45 ///
46 /// 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_options.is_none()`.
47 pub fn cloud_watch_logging_options(&self) -> &[crate::types::CloudWatchLoggingOption] {
48 self.cloud_watch_logging_options.as_deref().unwrap_or_default()
49 }
50 /// <p>A list of one or more tags to assign to the application. A tag is a key-value pair that identifies an application. Note that the maximum number of application tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see <a href="https://docs.aws.amazon.com/kinesisanalytics/latest/java/how-tagging.html">Using Tagging</a>.</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 `.tags.is_none()`.
53 pub fn tags(&self) -> &[crate::types::Tag] {
54 self.tags.as_deref().unwrap_or_default()
55 }
56 /// <p>Use the <code>STREAMING</code> mode to create a Managed Service for Apache Flink application. To create a Managed Service for Apache Flink Studio notebook, use the <code>INTERACTIVE</code> mode.</p>
57 pub fn application_mode(&self) -> ::std::option::Option<&crate::types::ApplicationMode> {
58 self.application_mode.as_ref()
59 }
60}
61impl CreateApplicationInput {
62 /// Creates a new builder-style object to manufacture [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
63 pub fn builder() -> crate::operation::create_application::builders::CreateApplicationInputBuilder {
64 crate::operation::create_application::builders::CreateApplicationInputBuilder::default()
65 }
66}
67
68/// A builder for [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
69#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
70#[non_exhaustive]
71pub struct CreateApplicationInputBuilder {
72 pub(crate) application_name: ::std::option::Option<::std::string::String>,
73 pub(crate) application_description: ::std::option::Option<::std::string::String>,
74 pub(crate) runtime_environment: ::std::option::Option<crate::types::RuntimeEnvironment>,
75 pub(crate) service_execution_role: ::std::option::Option<::std::string::String>,
76 pub(crate) application_configuration: ::std::option::Option<crate::types::ApplicationConfiguration>,
77 pub(crate) cloud_watch_logging_options: ::std::option::Option<::std::vec::Vec<crate::types::CloudWatchLoggingOption>>,
78 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
79 pub(crate) application_mode: ::std::option::Option<crate::types::ApplicationMode>,
80}
81impl CreateApplicationInputBuilder {
82 /// <p>The name of your application (for example, <code>sample-app</code>).</p>
83 /// This field is required.
84 pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85 self.application_name = ::std::option::Option::Some(input.into());
86 self
87 }
88 /// <p>The name of your application (for example, <code>sample-app</code>).</p>
89 pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90 self.application_name = input;
91 self
92 }
93 /// <p>The name of your application (for example, <code>sample-app</code>).</p>
94 pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
95 &self.application_name
96 }
97 /// <p>A summary description of the application.</p>
98 pub fn application_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99 self.application_description = ::std::option::Option::Some(input.into());
100 self
101 }
102 /// <p>A summary description of the application.</p>
103 pub fn set_application_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104 self.application_description = input;
105 self
106 }
107 /// <p>A summary description of the application.</p>
108 pub fn get_application_description(&self) -> &::std::option::Option<::std::string::String> {
109 &self.application_description
110 }
111 /// <p>The runtime environment for the application.</p>
112 /// This field is required.
113 pub fn runtime_environment(mut self, input: crate::types::RuntimeEnvironment) -> Self {
114 self.runtime_environment = ::std::option::Option::Some(input);
115 self
116 }
117 /// <p>The runtime environment for the application.</p>
118 pub fn set_runtime_environment(mut self, input: ::std::option::Option<crate::types::RuntimeEnvironment>) -> Self {
119 self.runtime_environment = input;
120 self
121 }
122 /// <p>The runtime environment for the application.</p>
123 pub fn get_runtime_environment(&self) -> &::std::option::Option<crate::types::RuntimeEnvironment> {
124 &self.runtime_environment
125 }
126 /// <p>The IAM role used by the application to access Kinesis data streams, Kinesis Data Firehose delivery streams, Amazon S3 objects, and other external resources.</p>
127 /// This field is required.
128 pub fn service_execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.service_execution_role = ::std::option::Option::Some(input.into());
130 self
131 }
132 /// <p>The IAM role used by the application to access Kinesis data streams, Kinesis Data Firehose delivery streams, Amazon S3 objects, and other external resources.</p>
133 pub fn set_service_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.service_execution_role = input;
135 self
136 }
137 /// <p>The IAM role used by the application to access Kinesis data streams, Kinesis Data Firehose delivery streams, Amazon S3 objects, and other external resources.</p>
138 pub fn get_service_execution_role(&self) -> &::std::option::Option<::std::string::String> {
139 &self.service_execution_role
140 }
141 /// <p>Use this parameter to configure the application.</p>
142 pub fn application_configuration(mut self, input: crate::types::ApplicationConfiguration) -> Self {
143 self.application_configuration = ::std::option::Option::Some(input);
144 self
145 }
146 /// <p>Use this parameter to configure the application.</p>
147 pub fn set_application_configuration(mut self, input: ::std::option::Option<crate::types::ApplicationConfiguration>) -> Self {
148 self.application_configuration = input;
149 self
150 }
151 /// <p>Use this parameter to configure the application.</p>
152 pub fn get_application_configuration(&self) -> &::std::option::Option<crate::types::ApplicationConfiguration> {
153 &self.application_configuration
154 }
155 /// Appends an item to `cloud_watch_logging_options`.
156 ///
157 /// To override the contents of this collection use [`set_cloud_watch_logging_options`](Self::set_cloud_watch_logging_options).
158 ///
159 /// <p>Use this parameter to configure an Amazon CloudWatch log stream to monitor application configuration errors.</p>
160 pub fn cloud_watch_logging_options(mut self, input: crate::types::CloudWatchLoggingOption) -> Self {
161 let mut v = self.cloud_watch_logging_options.unwrap_or_default();
162 v.push(input);
163 self.cloud_watch_logging_options = ::std::option::Option::Some(v);
164 self
165 }
166 /// <p>Use this parameter to configure an Amazon CloudWatch log stream to monitor application configuration errors.</p>
167 pub fn set_cloud_watch_logging_options(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CloudWatchLoggingOption>>) -> Self {
168 self.cloud_watch_logging_options = input;
169 self
170 }
171 /// <p>Use this parameter to configure an Amazon CloudWatch log stream to monitor application configuration errors.</p>
172 pub fn get_cloud_watch_logging_options(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CloudWatchLoggingOption>> {
173 &self.cloud_watch_logging_options
174 }
175 /// Appends an item to `tags`.
176 ///
177 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
178 ///
179 /// <p>A list of one or more tags to assign to the application. A tag is a key-value pair that identifies an application. Note that the maximum number of application tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see <a href="https://docs.aws.amazon.com/kinesisanalytics/latest/java/how-tagging.html">Using Tagging</a>.</p>
180 pub fn tags(mut self, input: crate::types::Tag) -> Self {
181 let mut v = self.tags.unwrap_or_default();
182 v.push(input);
183 self.tags = ::std::option::Option::Some(v);
184 self
185 }
186 /// <p>A list of one or more tags to assign to the application. A tag is a key-value pair that identifies an application. Note that the maximum number of application tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see <a href="https://docs.aws.amazon.com/kinesisanalytics/latest/java/how-tagging.html">Using Tagging</a>.</p>
187 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
188 self.tags = input;
189 self
190 }
191 /// <p>A list of one or more tags to assign to the application. A tag is a key-value pair that identifies an application. Note that the maximum number of application tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see <a href="https://docs.aws.amazon.com/kinesisanalytics/latest/java/how-tagging.html">Using Tagging</a>.</p>
192 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
193 &self.tags
194 }
195 /// <p>Use the <code>STREAMING</code> mode to create a Managed Service for Apache Flink application. To create a Managed Service for Apache Flink Studio notebook, use the <code>INTERACTIVE</code> mode.</p>
196 pub fn application_mode(mut self, input: crate::types::ApplicationMode) -> Self {
197 self.application_mode = ::std::option::Option::Some(input);
198 self
199 }
200 /// <p>Use the <code>STREAMING</code> mode to create a Managed Service for Apache Flink application. To create a Managed Service for Apache Flink Studio notebook, use the <code>INTERACTIVE</code> mode.</p>
201 pub fn set_application_mode(mut self, input: ::std::option::Option<crate::types::ApplicationMode>) -> Self {
202 self.application_mode = input;
203 self
204 }
205 /// <p>Use the <code>STREAMING</code> mode to create a Managed Service for Apache Flink application. To create a Managed Service for Apache Flink Studio notebook, use the <code>INTERACTIVE</code> mode.</p>
206 pub fn get_application_mode(&self) -> &::std::option::Option<crate::types::ApplicationMode> {
207 &self.application_mode
208 }
209 /// Consumes the builder and constructs a [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
210 pub fn build(
211 self,
212 ) -> ::std::result::Result<crate::operation::create_application::CreateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
213 ::std::result::Result::Ok(crate::operation::create_application::CreateApplicationInput {
214 application_name: self.application_name,
215 application_description: self.application_description,
216 runtime_environment: self.runtime_environment,
217 service_execution_role: self.service_execution_role,
218 application_configuration: self.application_configuration,
219 cloud_watch_logging_options: self.cloud_watch_logging_options,
220 tags: self.tags,
221 application_mode: self.application_mode,
222 })
223 }
224}