aws_sdk_elasticbeanstalk/types/
_application_description.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes the properties of an application.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ApplicationDescription {
7    /// <p>The Amazon Resource Name (ARN) of the application.</p>
8    pub application_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the application.</p>
10    pub application_name: ::std::option::Option<::std::string::String>,
11    /// <p>User-defined description of the application.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13    /// <p>The date when the application was created.</p>
14    pub date_created: ::std::option::Option<::aws_smithy_types::DateTime>,
15    /// <p>The date when the application was last modified.</p>
16    pub date_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
17    /// <p>The names of the versions for this application.</p>
18    pub versions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
19    /// <p>The names of the configuration templates associated with this application.</p>
20    pub configuration_templates: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
21    /// <p>The lifecycle settings for the application.</p>
22    pub resource_lifecycle_config: ::std::option::Option<crate::types::ApplicationResourceLifecycleConfig>,
23}
24impl ApplicationDescription {
25    /// <p>The Amazon Resource Name (ARN) of the application.</p>
26    pub fn application_arn(&self) -> ::std::option::Option<&str> {
27        self.application_arn.as_deref()
28    }
29    /// <p>The name of the application.</p>
30    pub fn application_name(&self) -> ::std::option::Option<&str> {
31        self.application_name.as_deref()
32    }
33    /// <p>User-defined description of the application.</p>
34    pub fn description(&self) -> ::std::option::Option<&str> {
35        self.description.as_deref()
36    }
37    /// <p>The date when the application was created.</p>
38    pub fn date_created(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
39        self.date_created.as_ref()
40    }
41    /// <p>The date when the application was last modified.</p>
42    pub fn date_updated(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
43        self.date_updated.as_ref()
44    }
45    /// <p>The names of the versions for this application.</p>
46    ///
47    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.versions.is_none()`.
48    pub fn versions(&self) -> &[::std::string::String] {
49        self.versions.as_deref().unwrap_or_default()
50    }
51    /// <p>The names of the configuration templates associated with this application.</p>
52    ///
53    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.configuration_templates.is_none()`.
54    pub fn configuration_templates(&self) -> &[::std::string::String] {
55        self.configuration_templates.as_deref().unwrap_or_default()
56    }
57    /// <p>The lifecycle settings for the application.</p>
58    pub fn resource_lifecycle_config(&self) -> ::std::option::Option<&crate::types::ApplicationResourceLifecycleConfig> {
59        self.resource_lifecycle_config.as_ref()
60    }
61}
62impl ApplicationDescription {
63    /// Creates a new builder-style object to manufacture [`ApplicationDescription`](crate::types::ApplicationDescription).
64    pub fn builder() -> crate::types::builders::ApplicationDescriptionBuilder {
65        crate::types::builders::ApplicationDescriptionBuilder::default()
66    }
67}
68
69/// A builder for [`ApplicationDescription`](crate::types::ApplicationDescription).
70#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
71#[non_exhaustive]
72pub struct ApplicationDescriptionBuilder {
73    pub(crate) application_arn: ::std::option::Option<::std::string::String>,
74    pub(crate) application_name: ::std::option::Option<::std::string::String>,
75    pub(crate) description: ::std::option::Option<::std::string::String>,
76    pub(crate) date_created: ::std::option::Option<::aws_smithy_types::DateTime>,
77    pub(crate) date_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
78    pub(crate) versions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
79    pub(crate) configuration_templates: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
80    pub(crate) resource_lifecycle_config: ::std::option::Option<crate::types::ApplicationResourceLifecycleConfig>,
81}
82impl ApplicationDescriptionBuilder {
83    /// <p>The Amazon Resource Name (ARN) of the application.</p>
84    pub fn application_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.application_arn = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>The Amazon Resource Name (ARN) of the application.</p>
89    pub fn set_application_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.application_arn = input;
91        self
92    }
93    /// <p>The Amazon Resource Name (ARN) of the application.</p>
94    pub fn get_application_arn(&self) -> &::std::option::Option<::std::string::String> {
95        &self.application_arn
96    }
97    /// <p>The name of the application.</p>
98    pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99        self.application_name = ::std::option::Option::Some(input.into());
100        self
101    }
102    /// <p>The name of the application.</p>
103    pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.application_name = input;
105        self
106    }
107    /// <p>The name of the application.</p>
108    pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
109        &self.application_name
110    }
111    /// <p>User-defined description of the application.</p>
112    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.description = ::std::option::Option::Some(input.into());
114        self
115    }
116    /// <p>User-defined description of the application.</p>
117    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.description = input;
119        self
120    }
121    /// <p>User-defined description of the application.</p>
122    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
123        &self.description
124    }
125    /// <p>The date when the application was created.</p>
126    pub fn date_created(mut self, input: ::aws_smithy_types::DateTime) -> Self {
127        self.date_created = ::std::option::Option::Some(input);
128        self
129    }
130    /// <p>The date when the application was created.</p>
131    pub fn set_date_created(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
132        self.date_created = input;
133        self
134    }
135    /// <p>The date when the application was created.</p>
136    pub fn get_date_created(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
137        &self.date_created
138    }
139    /// <p>The date when the application was last modified.</p>
140    pub fn date_updated(mut self, input: ::aws_smithy_types::DateTime) -> Self {
141        self.date_updated = ::std::option::Option::Some(input);
142        self
143    }
144    /// <p>The date when the application was last modified.</p>
145    pub fn set_date_updated(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
146        self.date_updated = input;
147        self
148    }
149    /// <p>The date when the application was last modified.</p>
150    pub fn get_date_updated(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
151        &self.date_updated
152    }
153    /// Appends an item to `versions`.
154    ///
155    /// To override the contents of this collection use [`set_versions`](Self::set_versions).
156    ///
157    /// <p>The names of the versions for this application.</p>
158    pub fn versions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        let mut v = self.versions.unwrap_or_default();
160        v.push(input.into());
161        self.versions = ::std::option::Option::Some(v);
162        self
163    }
164    /// <p>The names of the versions for this application.</p>
165    pub fn set_versions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
166        self.versions = input;
167        self
168    }
169    /// <p>The names of the versions for this application.</p>
170    pub fn get_versions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
171        &self.versions
172    }
173    /// Appends an item to `configuration_templates`.
174    ///
175    /// To override the contents of this collection use [`set_configuration_templates`](Self::set_configuration_templates).
176    ///
177    /// <p>The names of the configuration templates associated with this application.</p>
178    pub fn configuration_templates(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        let mut v = self.configuration_templates.unwrap_or_default();
180        v.push(input.into());
181        self.configuration_templates = ::std::option::Option::Some(v);
182        self
183    }
184    /// <p>The names of the configuration templates associated with this application.</p>
185    pub fn set_configuration_templates(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
186        self.configuration_templates = input;
187        self
188    }
189    /// <p>The names of the configuration templates associated with this application.</p>
190    pub fn get_configuration_templates(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
191        &self.configuration_templates
192    }
193    /// <p>The lifecycle settings for the application.</p>
194    pub fn resource_lifecycle_config(mut self, input: crate::types::ApplicationResourceLifecycleConfig) -> Self {
195        self.resource_lifecycle_config = ::std::option::Option::Some(input);
196        self
197    }
198    /// <p>The lifecycle settings for the application.</p>
199    pub fn set_resource_lifecycle_config(mut self, input: ::std::option::Option<crate::types::ApplicationResourceLifecycleConfig>) -> Self {
200        self.resource_lifecycle_config = input;
201        self
202    }
203    /// <p>The lifecycle settings for the application.</p>
204    pub fn get_resource_lifecycle_config(&self) -> &::std::option::Option<crate::types::ApplicationResourceLifecycleConfig> {
205        &self.resource_lifecycle_config
206    }
207    /// Consumes the builder and constructs a [`ApplicationDescription`](crate::types::ApplicationDescription).
208    pub fn build(self) -> crate::types::ApplicationDescription {
209        crate::types::ApplicationDescription {
210            application_arn: self.application_arn,
211            application_name: self.application_name,
212            description: self.description,
213            date_created: self.date_created,
214            date_updated: self.date_updated,
215            versions: self.versions,
216            configuration_templates: self.configuration_templates,
217            resource_lifecycle_config: self.resource_lifecycle_config,
218        }
219    }
220}