aws_sdk_m2/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 unique identifier of the application you want to stop.</p>
7 pub application_id: ::std::option::Option<::std::string::String>,
8 /// <p>Stopping an application process can take a long time. Setting this parameter to true lets you force stop the application so you don't need to wait until the process finishes to apply another action on the application. The default value is false.</p>
9 pub force_stop: ::std::option::Option<bool>,
10}
11impl StopApplicationInput {
12 /// <p>The unique identifier of the application you want to stop.</p>
13 pub fn application_id(&self) -> ::std::option::Option<&str> {
14 self.application_id.as_deref()
15 }
16 /// <p>Stopping an application process can take a long time. Setting this parameter to true lets you force stop the application so you don't need to wait until the process finishes to apply another action on the application. The default value is false.</p>
17 pub fn force_stop(&self) -> ::std::option::Option<bool> {
18 self.force_stop
19 }
20}
21impl StopApplicationInput {
22 /// Creates a new builder-style object to manufacture [`StopApplicationInput`](crate::operation::stop_application::StopApplicationInput).
23 pub fn builder() -> crate::operation::stop_application::builders::StopApplicationInputBuilder {
24 crate::operation::stop_application::builders::StopApplicationInputBuilder::default()
25 }
26}
27
28/// A builder for [`StopApplicationInput`](crate::operation::stop_application::StopApplicationInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct StopApplicationInputBuilder {
32 pub(crate) application_id: ::std::option::Option<::std::string::String>,
33 pub(crate) force_stop: ::std::option::Option<bool>,
34}
35impl StopApplicationInputBuilder {
36 /// <p>The unique identifier of the application you want to stop.</p>
37 /// This field is required.
38 pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.application_id = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The unique identifier of the application you want to stop.</p>
43 pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.application_id = input;
45 self
46 }
47 /// <p>The unique identifier of the application you want to stop.</p>
48 pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
49 &self.application_id
50 }
51 /// <p>Stopping an application process can take a long time. Setting this parameter to true lets you force stop the application so you don't need to wait until the process finishes to apply another action on the application. The default value is false.</p>
52 pub fn force_stop(mut self, input: bool) -> Self {
53 self.force_stop = ::std::option::Option::Some(input);
54 self
55 }
56 /// <p>Stopping an application process can take a long time. Setting this parameter to true lets you force stop the application so you don't need to wait until the process finishes to apply another action on the application. The default value is false.</p>
57 pub fn set_force_stop(mut self, input: ::std::option::Option<bool>) -> Self {
58 self.force_stop = input;
59 self
60 }
61 /// <p>Stopping an application process can take a long time. Setting this parameter to true lets you force stop the application so you don't need to wait until the process finishes to apply another action on the application. The default value is false.</p>
62 pub fn get_force_stop(&self) -> &::std::option::Option<bool> {
63 &self.force_stop
64 }
65 /// Consumes the builder and constructs a [`StopApplicationInput`](crate::operation::stop_application::StopApplicationInput).
66 pub fn build(
67 self,
68 ) -> ::std::result::Result<crate::operation::stop_application::StopApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
69 ::std::result::Result::Ok(crate::operation::stop_application::StopApplicationInput {
70 application_id: self.application_id,
71 force_stop: self.force_stop,
72 })
73 }
74}