Skip to main content

aws_sdk_lambda/operation/publish_layer_version/
_publish_layer_version_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 PublishLayerVersionOutput {
6    /// <p>Details about the layer version.</p>
7    pub content: ::std::option::Option<crate::types::LayerVersionContentOutput>,
8    /// <p>The ARN of the layer.</p>
9    pub layer_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The ARN of the layer version.</p>
11    pub layer_version_arn: ::std::option::Option<::std::string::String>,
12    /// <p>The description of the version.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The date that the layer version was created, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
15    pub created_date: ::std::option::Option<::std::string::String>,
16    /// <p>The version number.</p>
17    pub version: i64,
18    /// <p>The layer's compatible runtimes.</p>
19    /// <p>The following list includes deprecated runtimes. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime use after deprecation</a>.</p>
20    /// <p>For a list of all currently supported runtimes, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported runtimes</a>.</p>
21    pub compatible_runtimes: ::std::option::Option<::std::vec::Vec<crate::types::Runtime>>,
22    /// <p>The layer's software license.</p>
23    pub license_info: ::std::option::Option<::std::string::String>,
24    /// <p>A list of compatible <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html">instruction set architectures</a>.</p>
25    pub compatible_architectures: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>,
26    _request_id: Option<String>,
27}
28impl PublishLayerVersionOutput {
29    /// <p>Details about the layer version.</p>
30    pub fn content(&self) -> ::std::option::Option<&crate::types::LayerVersionContentOutput> {
31        self.content.as_ref()
32    }
33    /// <p>The ARN of the layer.</p>
34    pub fn layer_arn(&self) -> ::std::option::Option<&str> {
35        self.layer_arn.as_deref()
36    }
37    /// <p>The ARN of the layer version.</p>
38    pub fn layer_version_arn(&self) -> ::std::option::Option<&str> {
39        self.layer_version_arn.as_deref()
40    }
41    /// <p>The description of the version.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45    /// <p>The date that the layer version was created, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
46    pub fn created_date(&self) -> ::std::option::Option<&str> {
47        self.created_date.as_deref()
48    }
49    /// <p>The version number.</p>
50    pub fn version(&self) -> i64 {
51        self.version
52    }
53    /// <p>The layer's compatible runtimes.</p>
54    /// <p>The following list includes deprecated runtimes. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime use after deprecation</a>.</p>
55    /// <p>For a list of all currently supported runtimes, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported runtimes</a>.</p>
56    ///
57    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.compatible_runtimes.is_none()`.
58    pub fn compatible_runtimes(&self) -> &[crate::types::Runtime] {
59        self.compatible_runtimes.as_deref().unwrap_or_default()
60    }
61    /// <p>The layer's software license.</p>
62    pub fn license_info(&self) -> ::std::option::Option<&str> {
63        self.license_info.as_deref()
64    }
65    /// <p>A list of compatible <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html">instruction set architectures</a>.</p>
66    ///
67    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.compatible_architectures.is_none()`.
68    pub fn compatible_architectures(&self) -> &[crate::types::Architecture] {
69        self.compatible_architectures.as_deref().unwrap_or_default()
70    }
71}
72impl ::aws_types::request_id::RequestId for PublishLayerVersionOutput {
73    fn request_id(&self) -> Option<&str> {
74        self._request_id.as_deref()
75    }
76}
77impl PublishLayerVersionOutput {
78    /// Creates a new builder-style object to manufacture [`PublishLayerVersionOutput`](crate::operation::publish_layer_version::PublishLayerVersionOutput).
79    pub fn builder() -> crate::operation::publish_layer_version::builders::PublishLayerVersionOutputBuilder {
80        crate::operation::publish_layer_version::builders::PublishLayerVersionOutputBuilder::default()
81    }
82}
83
84/// A builder for [`PublishLayerVersionOutput`](crate::operation::publish_layer_version::PublishLayerVersionOutput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct PublishLayerVersionOutputBuilder {
88    pub(crate) content: ::std::option::Option<crate::types::LayerVersionContentOutput>,
89    pub(crate) layer_arn: ::std::option::Option<::std::string::String>,
90    pub(crate) layer_version_arn: ::std::option::Option<::std::string::String>,
91    pub(crate) description: ::std::option::Option<::std::string::String>,
92    pub(crate) created_date: ::std::option::Option<::std::string::String>,
93    pub(crate) version: ::std::option::Option<i64>,
94    pub(crate) compatible_runtimes: ::std::option::Option<::std::vec::Vec<crate::types::Runtime>>,
95    pub(crate) license_info: ::std::option::Option<::std::string::String>,
96    pub(crate) compatible_architectures: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>,
97    _request_id: Option<String>,
98}
99impl PublishLayerVersionOutputBuilder {
100    /// <p>Details about the layer version.</p>
101    pub fn content(mut self, input: crate::types::LayerVersionContentOutput) -> Self {
102        self.content = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>Details about the layer version.</p>
106    pub fn set_content(mut self, input: ::std::option::Option<crate::types::LayerVersionContentOutput>) -> Self {
107        self.content = input;
108        self
109    }
110    /// <p>Details about the layer version.</p>
111    pub fn get_content(&self) -> &::std::option::Option<crate::types::LayerVersionContentOutput> {
112        &self.content
113    }
114    /// <p>The ARN of the layer.</p>
115    pub fn layer_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.layer_arn = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The ARN of the layer.</p>
120    pub fn set_layer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.layer_arn = input;
122        self
123    }
124    /// <p>The ARN of the layer.</p>
125    pub fn get_layer_arn(&self) -> &::std::option::Option<::std::string::String> {
126        &self.layer_arn
127    }
128    /// <p>The ARN of the layer version.</p>
129    pub fn layer_version_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.layer_version_arn = ::std::option::Option::Some(input.into());
131        self
132    }
133    /// <p>The ARN of the layer version.</p>
134    pub fn set_layer_version_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.layer_version_arn = input;
136        self
137    }
138    /// <p>The ARN of the layer version.</p>
139    pub fn get_layer_version_arn(&self) -> &::std::option::Option<::std::string::String> {
140        &self.layer_version_arn
141    }
142    /// <p>The description of the version.</p>
143    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.description = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>The description of the version.</p>
148    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.description = input;
150        self
151    }
152    /// <p>The description of the version.</p>
153    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
154        &self.description
155    }
156    /// <p>The date that the layer version was created, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
157    pub fn created_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.created_date = ::std::option::Option::Some(input.into());
159        self
160    }
161    /// <p>The date that the layer version was created, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
162    pub fn set_created_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.created_date = input;
164        self
165    }
166    /// <p>The date that the layer version was created, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
167    pub fn get_created_date(&self) -> &::std::option::Option<::std::string::String> {
168        &self.created_date
169    }
170    /// <p>The version number.</p>
171    pub fn version(mut self, input: i64) -> Self {
172        self.version = ::std::option::Option::Some(input);
173        self
174    }
175    /// <p>The version number.</p>
176    pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
177        self.version = input;
178        self
179    }
180    /// <p>The version number.</p>
181    pub fn get_version(&self) -> &::std::option::Option<i64> {
182        &self.version
183    }
184    /// Appends an item to `compatible_runtimes`.
185    ///
186    /// To override the contents of this collection use [`set_compatible_runtimes`](Self::set_compatible_runtimes).
187    ///
188    /// <p>The layer's compatible runtimes.</p>
189    /// <p>The following list includes deprecated runtimes. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime use after deprecation</a>.</p>
190    /// <p>For a list of all currently supported runtimes, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported runtimes</a>.</p>
191    pub fn compatible_runtimes(mut self, input: crate::types::Runtime) -> Self {
192        let mut v = self.compatible_runtimes.unwrap_or_default();
193        v.push(input);
194        self.compatible_runtimes = ::std::option::Option::Some(v);
195        self
196    }
197    /// <p>The layer's compatible runtimes.</p>
198    /// <p>The following list includes deprecated runtimes. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime use after deprecation</a>.</p>
199    /// <p>For a list of all currently supported runtimes, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported runtimes</a>.</p>
200    pub fn set_compatible_runtimes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Runtime>>) -> Self {
201        self.compatible_runtimes = input;
202        self
203    }
204    /// <p>The layer's compatible runtimes.</p>
205    /// <p>The following list includes deprecated runtimes. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime use after deprecation</a>.</p>
206    /// <p>For a list of all currently supported runtimes, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported runtimes</a>.</p>
207    pub fn get_compatible_runtimes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Runtime>> {
208        &self.compatible_runtimes
209    }
210    /// <p>The layer's software license.</p>
211    pub fn license_info(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
212        self.license_info = ::std::option::Option::Some(input.into());
213        self
214    }
215    /// <p>The layer's software license.</p>
216    pub fn set_license_info(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
217        self.license_info = input;
218        self
219    }
220    /// <p>The layer's software license.</p>
221    pub fn get_license_info(&self) -> &::std::option::Option<::std::string::String> {
222        &self.license_info
223    }
224    /// Appends an item to `compatible_architectures`.
225    ///
226    /// To override the contents of this collection use [`set_compatible_architectures`](Self::set_compatible_architectures).
227    ///
228    /// <p>A list of compatible <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html">instruction set architectures</a>.</p>
229    pub fn compatible_architectures(mut self, input: crate::types::Architecture) -> Self {
230        let mut v = self.compatible_architectures.unwrap_or_default();
231        v.push(input);
232        self.compatible_architectures = ::std::option::Option::Some(v);
233        self
234    }
235    /// <p>A list of compatible <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html">instruction set architectures</a>.</p>
236    pub fn set_compatible_architectures(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>) -> Self {
237        self.compatible_architectures = input;
238        self
239    }
240    /// <p>A list of compatible <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html">instruction set architectures</a>.</p>
241    pub fn get_compatible_architectures(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Architecture>> {
242        &self.compatible_architectures
243    }
244    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
245        self._request_id = Some(request_id.into());
246        self
247    }
248
249    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
250        self._request_id = request_id;
251        self
252    }
253    /// Consumes the builder and constructs a [`PublishLayerVersionOutput`](crate::operation::publish_layer_version::PublishLayerVersionOutput).
254    pub fn build(self) -> crate::operation::publish_layer_version::PublishLayerVersionOutput {
255        crate::operation::publish_layer_version::PublishLayerVersionOutput {
256            content: self.content,
257            layer_arn: self.layer_arn,
258            layer_version_arn: self.layer_version_arn,
259            description: self.description,
260            created_date: self.created_date,
261            version: self.version.unwrap_or_default(),
262            compatible_runtimes: self.compatible_runtimes,
263            license_info: self.license_info,
264            compatible_architectures: self.compatible_architectures,
265            _request_id: self._request_id,
266        }
267    }
268}