aws_sdk_ssmsap/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 ID of the application.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>Specify the <code>ConnectedEntityType</code>. Accepted type is <code>DBMS</code>.</p>
9    /// <p>If this parameter is included, the connected DBMS (Database Management System) will be stopped.</p>
10    pub stop_connected_entity: ::std::option::Option<crate::types::ConnectedEntityType>,
11    /// <p>Boolean. If included and if set to <code>True</code>, the StopApplication operation will shut down the associated Amazon EC2 instance in addition to the application.</p>
12    pub include_ec2_instance_shutdown: ::std::option::Option<bool>,
13}
14impl StopApplicationInput {
15    /// <p>The ID of the application.</p>
16    pub fn application_id(&self) -> ::std::option::Option<&str> {
17        self.application_id.as_deref()
18    }
19    /// <p>Specify the <code>ConnectedEntityType</code>. Accepted type is <code>DBMS</code>.</p>
20    /// <p>If this parameter is included, the connected DBMS (Database Management System) will be stopped.</p>
21    pub fn stop_connected_entity(&self) -> ::std::option::Option<&crate::types::ConnectedEntityType> {
22        self.stop_connected_entity.as_ref()
23    }
24    /// <p>Boolean. If included and if set to <code>True</code>, the StopApplication operation will shut down the associated Amazon EC2 instance in addition to the application.</p>
25    pub fn include_ec2_instance_shutdown(&self) -> ::std::option::Option<bool> {
26        self.include_ec2_instance_shutdown
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_id: ::std::option::Option<::std::string::String>,
41    pub(crate) stop_connected_entity: ::std::option::Option<crate::types::ConnectedEntityType>,
42    pub(crate) include_ec2_instance_shutdown: ::std::option::Option<bool>,
43}
44impl StopApplicationInputBuilder {
45    /// <p>The ID of the application.</p>
46    /// This field is required.
47    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.application_id = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>The ID of the application.</p>
52    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.application_id = input;
54        self
55    }
56    /// <p>The ID of the application.</p>
57    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
58        &self.application_id
59    }
60    /// <p>Specify the <code>ConnectedEntityType</code>. Accepted type is <code>DBMS</code>.</p>
61    /// <p>If this parameter is included, the connected DBMS (Database Management System) will be stopped.</p>
62    pub fn stop_connected_entity(mut self, input: crate::types::ConnectedEntityType) -> Self {
63        self.stop_connected_entity = ::std::option::Option::Some(input);
64        self
65    }
66    /// <p>Specify the <code>ConnectedEntityType</code>. Accepted type is <code>DBMS</code>.</p>
67    /// <p>If this parameter is included, the connected DBMS (Database Management System) will be stopped.</p>
68    pub fn set_stop_connected_entity(mut self, input: ::std::option::Option<crate::types::ConnectedEntityType>) -> Self {
69        self.stop_connected_entity = input;
70        self
71    }
72    /// <p>Specify the <code>ConnectedEntityType</code>. Accepted type is <code>DBMS</code>.</p>
73    /// <p>If this parameter is included, the connected DBMS (Database Management System) will be stopped.</p>
74    pub fn get_stop_connected_entity(&self) -> &::std::option::Option<crate::types::ConnectedEntityType> {
75        &self.stop_connected_entity
76    }
77    /// <p>Boolean. If included and if set to <code>True</code>, the StopApplication operation will shut down the associated Amazon EC2 instance in addition to the application.</p>
78    pub fn include_ec2_instance_shutdown(mut self, input: bool) -> Self {
79        self.include_ec2_instance_shutdown = ::std::option::Option::Some(input);
80        self
81    }
82    /// <p>Boolean. If included and if set to <code>True</code>, the StopApplication operation will shut down the associated Amazon EC2 instance in addition to the application.</p>
83    pub fn set_include_ec2_instance_shutdown(mut self, input: ::std::option::Option<bool>) -> Self {
84        self.include_ec2_instance_shutdown = input;
85        self
86    }
87    /// <p>Boolean. If included and if set to <code>True</code>, the StopApplication operation will shut down the associated Amazon EC2 instance in addition to the application.</p>
88    pub fn get_include_ec2_instance_shutdown(&self) -> &::std::option::Option<bool> {
89        &self.include_ec2_instance_shutdown
90    }
91    /// Consumes the builder and constructs a [`StopApplicationInput`](crate::operation::stop_application::StopApplicationInput).
92    pub fn build(
93        self,
94    ) -> ::std::result::Result<crate::operation::stop_application::StopApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
95        ::std::result::Result::Ok(crate::operation::stop_application::StopApplicationInput {
96            application_id: self.application_id,
97            stop_connected_entity: self.stop_connected_entity,
98            include_ec2_instance_shutdown: self.include_ec2_instance_shutdown,
99        })
100    }
101}