aws_sdk_serverlessapplicationrepository/operation/create_cloud_formation_template/
_create_cloud_formation_template_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 CreateCloudFormationTemplateOutput {
6    /// <p>The application Amazon Resource Name (ARN).</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The date and time this resource was created.</p>
9    pub creation_time: ::std::option::Option<::std::string::String>,
10    /// <p>The date and time this template expires. Templates expire 1 hour after creation.</p>
11    pub expiration_time: ::std::option::Option<::std::string::String>,
12    /// <p>The semantic version of the application:</p>
13    /// <p><a href="https://semver.org/">https://semver.org/</a></p>
14    pub semantic_version: ::std::option::Option<::std::string::String>,
15    /// <p>Status of the template creation workflow.</p>
16    /// <p>Possible values: PREPARING | ACTIVE | EXPIRED</p>
17    pub status: ::std::option::Option<crate::types::Status>,
18    /// <p>The UUID returned by CreateCloudFormationTemplate.</p>
19    /// <p>Pattern: \[0-9a-fA-F\]{8}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{12}</p>
20    pub template_id: ::std::option::Option<::std::string::String>,
21    /// <p>A link to the template that can be used to deploy the application using AWS CloudFormation.</p>
22    pub template_url: ::std::option::Option<::std::string::String>,
23    _request_id: Option<String>,
24}
25impl CreateCloudFormationTemplateOutput {
26    /// <p>The application Amazon Resource Name (ARN).</p>
27    pub fn application_id(&self) -> ::std::option::Option<&str> {
28        self.application_id.as_deref()
29    }
30    /// <p>The date and time this resource was created.</p>
31    pub fn creation_time(&self) -> ::std::option::Option<&str> {
32        self.creation_time.as_deref()
33    }
34    /// <p>The date and time this template expires. Templates expire 1 hour after creation.</p>
35    pub fn expiration_time(&self) -> ::std::option::Option<&str> {
36        self.expiration_time.as_deref()
37    }
38    /// <p>The semantic version of the application:</p>
39    /// <p><a href="https://semver.org/">https://semver.org/</a></p>
40    pub fn semantic_version(&self) -> ::std::option::Option<&str> {
41        self.semantic_version.as_deref()
42    }
43    /// <p>Status of the template creation workflow.</p>
44    /// <p>Possible values: PREPARING | ACTIVE | EXPIRED</p>
45    pub fn status(&self) -> ::std::option::Option<&crate::types::Status> {
46        self.status.as_ref()
47    }
48    /// <p>The UUID returned by CreateCloudFormationTemplate.</p>
49    /// <p>Pattern: \[0-9a-fA-F\]{8}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{12}</p>
50    pub fn template_id(&self) -> ::std::option::Option<&str> {
51        self.template_id.as_deref()
52    }
53    /// <p>A link to the template that can be used to deploy the application using AWS CloudFormation.</p>
54    pub fn template_url(&self) -> ::std::option::Option<&str> {
55        self.template_url.as_deref()
56    }
57}
58impl ::aws_types::request_id::RequestId for CreateCloudFormationTemplateOutput {
59    fn request_id(&self) -> Option<&str> {
60        self._request_id.as_deref()
61    }
62}
63impl CreateCloudFormationTemplateOutput {
64    /// Creates a new builder-style object to manufacture [`CreateCloudFormationTemplateOutput`](crate::operation::create_cloud_formation_template::CreateCloudFormationTemplateOutput).
65    pub fn builder() -> crate::operation::create_cloud_formation_template::builders::CreateCloudFormationTemplateOutputBuilder {
66        crate::operation::create_cloud_formation_template::builders::CreateCloudFormationTemplateOutputBuilder::default()
67    }
68}
69
70/// A builder for [`CreateCloudFormationTemplateOutput`](crate::operation::create_cloud_formation_template::CreateCloudFormationTemplateOutput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct CreateCloudFormationTemplateOutputBuilder {
74    pub(crate) application_id: ::std::option::Option<::std::string::String>,
75    pub(crate) creation_time: ::std::option::Option<::std::string::String>,
76    pub(crate) expiration_time: ::std::option::Option<::std::string::String>,
77    pub(crate) semantic_version: ::std::option::Option<::std::string::String>,
78    pub(crate) status: ::std::option::Option<crate::types::Status>,
79    pub(crate) template_id: ::std::option::Option<::std::string::String>,
80    pub(crate) template_url: ::std::option::Option<::std::string::String>,
81    _request_id: Option<String>,
82}
83impl CreateCloudFormationTemplateOutputBuilder {
84    /// <p>The application Amazon Resource Name (ARN).</p>
85    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.application_id = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>The application Amazon Resource Name (ARN).</p>
90    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.application_id = input;
92        self
93    }
94    /// <p>The application Amazon Resource Name (ARN).</p>
95    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
96        &self.application_id
97    }
98    /// <p>The date and time this resource was created.</p>
99    pub fn creation_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        self.creation_time = ::std::option::Option::Some(input.into());
101        self
102    }
103    /// <p>The date and time this resource was created.</p>
104    pub fn set_creation_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.creation_time = input;
106        self
107    }
108    /// <p>The date and time this resource was created.</p>
109    pub fn get_creation_time(&self) -> &::std::option::Option<::std::string::String> {
110        &self.creation_time
111    }
112    /// <p>The date and time this template expires. Templates expire 1 hour after creation.</p>
113    pub fn expiration_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.expiration_time = ::std::option::Option::Some(input.into());
115        self
116    }
117    /// <p>The date and time this template expires. Templates expire 1 hour after creation.</p>
118    pub fn set_expiration_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.expiration_time = input;
120        self
121    }
122    /// <p>The date and time this template expires. Templates expire 1 hour after creation.</p>
123    pub fn get_expiration_time(&self) -> &::std::option::Option<::std::string::String> {
124        &self.expiration_time
125    }
126    /// <p>The semantic version of the application:</p>
127    /// <p><a href="https://semver.org/">https://semver.org/</a></p>
128    pub fn semantic_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.semantic_version = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The semantic version of the application:</p>
133    /// <p><a href="https://semver.org/">https://semver.org/</a></p>
134    pub fn set_semantic_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.semantic_version = input;
136        self
137    }
138    /// <p>The semantic version of the application:</p>
139    /// <p><a href="https://semver.org/">https://semver.org/</a></p>
140    pub fn get_semantic_version(&self) -> &::std::option::Option<::std::string::String> {
141        &self.semantic_version
142    }
143    /// <p>Status of the template creation workflow.</p>
144    /// <p>Possible values: PREPARING | ACTIVE | EXPIRED</p>
145    pub fn status(mut self, input: crate::types::Status) -> Self {
146        self.status = ::std::option::Option::Some(input);
147        self
148    }
149    /// <p>Status of the template creation workflow.</p>
150    /// <p>Possible values: PREPARING | ACTIVE | EXPIRED</p>
151    pub fn set_status(mut self, input: ::std::option::Option<crate::types::Status>) -> Self {
152        self.status = input;
153        self
154    }
155    /// <p>Status of the template creation workflow.</p>
156    /// <p>Possible values: PREPARING | ACTIVE | EXPIRED</p>
157    pub fn get_status(&self) -> &::std::option::Option<crate::types::Status> {
158        &self.status
159    }
160    /// <p>The UUID returned by CreateCloudFormationTemplate.</p>
161    /// <p>Pattern: \[0-9a-fA-F\]{8}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{12}</p>
162    pub fn template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.template_id = ::std::option::Option::Some(input.into());
164        self
165    }
166    /// <p>The UUID returned by CreateCloudFormationTemplate.</p>
167    /// <p>Pattern: \[0-9a-fA-F\]{8}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{12}</p>
168    pub fn set_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.template_id = input;
170        self
171    }
172    /// <p>The UUID returned by CreateCloudFormationTemplate.</p>
173    /// <p>Pattern: \[0-9a-fA-F\]{8}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{4}\-\[0-9a-fA-F\]{12}</p>
174    pub fn get_template_id(&self) -> &::std::option::Option<::std::string::String> {
175        &self.template_id
176    }
177    /// <p>A link to the template that can be used to deploy the application using AWS CloudFormation.</p>
178    pub fn template_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.template_url = ::std::option::Option::Some(input.into());
180        self
181    }
182    /// <p>A link to the template that can be used to deploy the application using AWS CloudFormation.</p>
183    pub fn set_template_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.template_url = input;
185        self
186    }
187    /// <p>A link to the template that can be used to deploy the application using AWS CloudFormation.</p>
188    pub fn get_template_url(&self) -> &::std::option::Option<::std::string::String> {
189        &self.template_url
190    }
191    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
192        self._request_id = Some(request_id.into());
193        self
194    }
195
196    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
197        self._request_id = request_id;
198        self
199    }
200    /// Consumes the builder and constructs a [`CreateCloudFormationTemplateOutput`](crate::operation::create_cloud_formation_template::CreateCloudFormationTemplateOutput).
201    pub fn build(self) -> crate::operation::create_cloud_formation_template::CreateCloudFormationTemplateOutput {
202        crate::operation::create_cloud_formation_template::CreateCloudFormationTemplateOutput {
203            application_id: self.application_id,
204            creation_time: self.creation_time,
205            expiration_time: self.expiration_time,
206            semantic_version: self.semantic_version,
207            status: self.status,
208            template_id: self.template_id,
209            template_url: self.template_url,
210            _request_id: self._request_id,
211        }
212    }
213}