aws_sdk_kinesisanalyticsv2/operation/stop_application/_stop_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 StopApplicationInput {
6 /// <p>The name of the running application to stop.</p>
7 pub application_name: ::std::option::Option<::std::string::String>,
8 /// <p>Set to <code>true</code> to force the application to stop. If you set <code>Force</code> to <code>true</code>, Managed Service for Apache Flink stops the application without taking a snapshot.</p><note>
9 /// <p>Force-stopping your application may lead to data loss or duplication. To prevent data loss or duplicate processing of data during application restarts, we recommend you to take frequent snapshots of your application.</p>
10 /// </note>
11 /// <p>You can only force stop a Managed Service for Apache Flink application. You can't force stop a SQL-based Kinesis Data Analytics application.</p>
12 /// <p>The application must be in the <code>STARTING</code>, <code>UPDATING</code>, <code>STOPPING</code>, <code>AUTOSCALING</code>, or <code>RUNNING</code> status.</p>
13 pub force: ::std::option::Option<bool>,
14}
15impl StopApplicationInput {
16 /// <p>The name of the running application to stop.</p>
17 pub fn application_name(&self) -> ::std::option::Option<&str> {
18 self.application_name.as_deref()
19 }
20 /// <p>Set to <code>true</code> to force the application to stop. If you set <code>Force</code> to <code>true</code>, Managed Service for Apache Flink stops the application without taking a snapshot.</p><note>
21 /// <p>Force-stopping your application may lead to data loss or duplication. To prevent data loss or duplicate processing of data during application restarts, we recommend you to take frequent snapshots of your application.</p>
22 /// </note>
23 /// <p>You can only force stop a Managed Service for Apache Flink application. You can't force stop a SQL-based Kinesis Data Analytics application.</p>
24 /// <p>The application must be in the <code>STARTING</code>, <code>UPDATING</code>, <code>STOPPING</code>, <code>AUTOSCALING</code>, or <code>RUNNING</code> status.</p>
25 pub fn force(&self) -> ::std::option::Option<bool> {
26 self.force
27 }
28}
29impl StopApplicationInput {
30 /// Creates a new builder-style object to manufacture [`StopApplicationInput`](crate::operation::stop_application::StopApplicationInput).
31 pub fn builder() -> crate::operation::stop_application::builders::StopApplicationInputBuilder {
32 crate::operation::stop_application::builders::StopApplicationInputBuilder::default()
33 }
34}
35
36/// A builder for [`StopApplicationInput`](crate::operation::stop_application::StopApplicationInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct StopApplicationInputBuilder {
40 pub(crate) application_name: ::std::option::Option<::std::string::String>,
41 pub(crate) force: ::std::option::Option<bool>,
42}
43impl StopApplicationInputBuilder {
44 /// <p>The name of the running application to stop.</p>
45 /// This field is required.
46 pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.application_name = ::std::option::Option::Some(input.into());
48 self
49 }
50 /// <p>The name of the running application to stop.</p>
51 pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.application_name = input;
53 self
54 }
55 /// <p>The name of the running application to stop.</p>
56 pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
57 &self.application_name
58 }
59 /// <p>Set to <code>true</code> to force the application to stop. If you set <code>Force</code> to <code>true</code>, Managed Service for Apache Flink stops the application without taking a snapshot.</p><note>
60 /// <p>Force-stopping your application may lead to data loss or duplication. To prevent data loss or duplicate processing of data during application restarts, we recommend you to take frequent snapshots of your application.</p>
61 /// </note>
62 /// <p>You can only force stop a Managed Service for Apache Flink application. You can't force stop a SQL-based Kinesis Data Analytics application.</p>
63 /// <p>The application must be in the <code>STARTING</code>, <code>UPDATING</code>, <code>STOPPING</code>, <code>AUTOSCALING</code>, or <code>RUNNING</code> status.</p>
64 pub fn force(mut self, input: bool) -> Self {
65 self.force = ::std::option::Option::Some(input);
66 self
67 }
68 /// <p>Set to <code>true</code> to force the application to stop. If you set <code>Force</code> to <code>true</code>, Managed Service for Apache Flink stops the application without taking a snapshot.</p><note>
69 /// <p>Force-stopping your application may lead to data loss or duplication. To prevent data loss or duplicate processing of data during application restarts, we recommend you to take frequent snapshots of your application.</p>
70 /// </note>
71 /// <p>You can only force stop a Managed Service for Apache Flink application. You can't force stop a SQL-based Kinesis Data Analytics application.</p>
72 /// <p>The application must be in the <code>STARTING</code>, <code>UPDATING</code>, <code>STOPPING</code>, <code>AUTOSCALING</code>, or <code>RUNNING</code> status.</p>
73 pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
74 self.force = input;
75 self
76 }
77 /// <p>Set to <code>true</code> to force the application to stop. If you set <code>Force</code> to <code>true</code>, Managed Service for Apache Flink stops the application without taking a snapshot.</p><note>
78 /// <p>Force-stopping your application may lead to data loss or duplication. To prevent data loss or duplicate processing of data during application restarts, we recommend you to take frequent snapshots of your application.</p>
79 /// </note>
80 /// <p>You can only force stop a Managed Service for Apache Flink application. You can't force stop a SQL-based Kinesis Data Analytics application.</p>
81 /// <p>The application must be in the <code>STARTING</code>, <code>UPDATING</code>, <code>STOPPING</code>, <code>AUTOSCALING</code>, or <code>RUNNING</code> status.</p>
82 pub fn get_force(&self) -> &::std::option::Option<bool> {
83 &self.force
84 }
85 /// Consumes the builder and constructs a [`StopApplicationInput`](crate::operation::stop_application::StopApplicationInput).
86 pub fn build(
87 self,
88 ) -> ::std::result::Result<crate::operation::stop_application::StopApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
89 ::std::result::Result::Ok(crate::operation::stop_application::StopApplicationInput {
90 application_name: self.application_name,
91 force: self.force,
92 })
93 }
94}