aws_sdk_sms/operation/get_app_launch_configuration/
_get_app_launch_configuration_output.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 GetAppLaunchConfigurationOutput {
6    /// <p>The ID of the application.</p>
7    pub app_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the service role in the customer's account that CloudFormation uses to launch the application.</p>
9    pub role_name: ::std::option::Option<::std::string::String>,
10    /// <p>Indicates whether the application is configured to launch automatically after replication is complete.</p>
11    pub auto_launch: ::std::option::Option<bool>,
12    /// <p>The launch configurations for server groups in this application.</p>
13    pub server_group_launch_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ServerGroupLaunchConfiguration>>,
14    _request_id: Option<String>,
15}
16impl GetAppLaunchConfigurationOutput {
17    /// <p>The ID of the application.</p>
18    pub fn app_id(&self) -> ::std::option::Option<&str> {
19        self.app_id.as_deref()
20    }
21    /// <p>The name of the service role in the customer's account that CloudFormation uses to launch the application.</p>
22    pub fn role_name(&self) -> ::std::option::Option<&str> {
23        self.role_name.as_deref()
24    }
25    /// <p>Indicates whether the application is configured to launch automatically after replication is complete.</p>
26    pub fn auto_launch(&self) -> ::std::option::Option<bool> {
27        self.auto_launch
28    }
29    /// <p>The launch configurations for server groups in this application.</p>
30    ///
31    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.server_group_launch_configurations.is_none()`.
32    pub fn server_group_launch_configurations(&self) -> &[crate::types::ServerGroupLaunchConfiguration] {
33        self.server_group_launch_configurations.as_deref().unwrap_or_default()
34    }
35}
36impl ::aws_types::request_id::RequestId for GetAppLaunchConfigurationOutput {
37    fn request_id(&self) -> Option<&str> {
38        self._request_id.as_deref()
39    }
40}
41impl GetAppLaunchConfigurationOutput {
42    /// Creates a new builder-style object to manufacture [`GetAppLaunchConfigurationOutput`](crate::operation::get_app_launch_configuration::GetAppLaunchConfigurationOutput).
43    pub fn builder() -> crate::operation::get_app_launch_configuration::builders::GetAppLaunchConfigurationOutputBuilder {
44        crate::operation::get_app_launch_configuration::builders::GetAppLaunchConfigurationOutputBuilder::default()
45    }
46}
47
48/// A builder for [`GetAppLaunchConfigurationOutput`](crate::operation::get_app_launch_configuration::GetAppLaunchConfigurationOutput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct GetAppLaunchConfigurationOutputBuilder {
52    pub(crate) app_id: ::std::option::Option<::std::string::String>,
53    pub(crate) role_name: ::std::option::Option<::std::string::String>,
54    pub(crate) auto_launch: ::std::option::Option<bool>,
55    pub(crate) server_group_launch_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ServerGroupLaunchConfiguration>>,
56    _request_id: Option<String>,
57}
58impl GetAppLaunchConfigurationOutputBuilder {
59    /// <p>The ID of the application.</p>
60    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.app_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The ID of the application.</p>
65    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.app_id = input;
67        self
68    }
69    /// <p>The ID of the application.</p>
70    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.app_id
72    }
73    /// <p>The name of the service role in the customer's account that CloudFormation uses to launch the application.</p>
74    pub fn role_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.role_name = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The name of the service role in the customer's account that CloudFormation uses to launch the application.</p>
79    pub fn set_role_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.role_name = input;
81        self
82    }
83    /// <p>The name of the service role in the customer's account that CloudFormation uses to launch the application.</p>
84    pub fn get_role_name(&self) -> &::std::option::Option<::std::string::String> {
85        &self.role_name
86    }
87    /// <p>Indicates whether the application is configured to launch automatically after replication is complete.</p>
88    pub fn auto_launch(mut self, input: bool) -> Self {
89        self.auto_launch = ::std::option::Option::Some(input);
90        self
91    }
92    /// <p>Indicates whether the application is configured to launch automatically after replication is complete.</p>
93    pub fn set_auto_launch(mut self, input: ::std::option::Option<bool>) -> Self {
94        self.auto_launch = input;
95        self
96    }
97    /// <p>Indicates whether the application is configured to launch automatically after replication is complete.</p>
98    pub fn get_auto_launch(&self) -> &::std::option::Option<bool> {
99        &self.auto_launch
100    }
101    /// Appends an item to `server_group_launch_configurations`.
102    ///
103    /// To override the contents of this collection use [`set_server_group_launch_configurations`](Self::set_server_group_launch_configurations).
104    ///
105    /// <p>The launch configurations for server groups in this application.</p>
106    pub fn server_group_launch_configurations(mut self, input: crate::types::ServerGroupLaunchConfiguration) -> Self {
107        let mut v = self.server_group_launch_configurations.unwrap_or_default();
108        v.push(input);
109        self.server_group_launch_configurations = ::std::option::Option::Some(v);
110        self
111    }
112    /// <p>The launch configurations for server groups in this application.</p>
113    pub fn set_server_group_launch_configurations(
114        mut self,
115        input: ::std::option::Option<::std::vec::Vec<crate::types::ServerGroupLaunchConfiguration>>,
116    ) -> Self {
117        self.server_group_launch_configurations = input;
118        self
119    }
120    /// <p>The launch configurations for server groups in this application.</p>
121    pub fn get_server_group_launch_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServerGroupLaunchConfiguration>> {
122        &self.server_group_launch_configurations
123    }
124    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
125        self._request_id = Some(request_id.into());
126        self
127    }
128
129    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
130        self._request_id = request_id;
131        self
132    }
133    /// Consumes the builder and constructs a [`GetAppLaunchConfigurationOutput`](crate::operation::get_app_launch_configuration::GetAppLaunchConfigurationOutput).
134    pub fn build(self) -> crate::operation::get_app_launch_configuration::GetAppLaunchConfigurationOutput {
135        crate::operation::get_app_launch_configuration::GetAppLaunchConfigurationOutput {
136            app_id: self.app_id,
137            role_name: self.role_name,
138            auto_launch: self.auto_launch,
139            server_group_launch_configurations: self.server_group_launch_configurations,
140            _request_id: self._request_id,
141        }
142    }
143}