aws_sdk_lambda/operation/publish_layer_version/
_publish_layer_version_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct PublishLayerVersionOutput {
6 pub content: ::std::option::Option<crate::types::LayerVersionContentOutput>,
8 pub layer_arn: ::std::option::Option<::std::string::String>,
10 pub layer_version_arn: ::std::option::Option<::std::string::String>,
12 pub description: ::std::option::Option<::std::string::String>,
14 pub created_date: ::std::option::Option<::std::string::String>,
16 pub version: i64,
18 pub compatible_runtimes: ::std::option::Option<::std::vec::Vec<crate::types::Runtime>>,
22 pub license_info: ::std::option::Option<::std::string::String>,
24 pub compatible_architectures: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>,
26 _request_id: Option<String>,
27}
28impl PublishLayerVersionOutput {
29 pub fn content(&self) -> ::std::option::Option<&crate::types::LayerVersionContentOutput> {
31 self.content.as_ref()
32 }
33 pub fn layer_arn(&self) -> ::std::option::Option<&str> {
35 self.layer_arn.as_deref()
36 }
37 pub fn layer_version_arn(&self) -> ::std::option::Option<&str> {
39 self.layer_version_arn.as_deref()
40 }
41 pub fn description(&self) -> ::std::option::Option<&str> {
43 self.description.as_deref()
44 }
45 pub fn created_date(&self) -> ::std::option::Option<&str> {
47 self.created_date.as_deref()
48 }
49 pub fn version(&self) -> i64 {
51 self.version
52 }
53 pub fn compatible_runtimes(&self) -> &[crate::types::Runtime] {
59 self.compatible_runtimes.as_deref().unwrap_or_default()
60 }
61 pub fn license_info(&self) -> ::std::option::Option<&str> {
63 self.license_info.as_deref()
64 }
65 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 pub fn builder() -> crate::operation::publish_layer_version::builders::PublishLayerVersionOutputBuilder {
80 crate::operation::publish_layer_version::builders::PublishLayerVersionOutputBuilder::default()
81 }
82}
83
84#[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 pub fn content(mut self, input: crate::types::LayerVersionContentOutput) -> Self {
102 self.content = ::std::option::Option::Some(input);
103 self
104 }
105 pub fn set_content(mut self, input: ::std::option::Option<crate::types::LayerVersionContentOutput>) -> Self {
107 self.content = input;
108 self
109 }
110 pub fn get_content(&self) -> &::std::option::Option<crate::types::LayerVersionContentOutput> {
112 &self.content
113 }
114 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 pub fn set_layer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.layer_arn = input;
122 self
123 }
124 pub fn get_layer_arn(&self) -> &::std::option::Option<::std::string::String> {
126 &self.layer_arn
127 }
128 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 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 pub fn get_layer_version_arn(&self) -> &::std::option::Option<::std::string::String> {
140 &self.layer_version_arn
141 }
142 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149 self.description = input;
150 self
151 }
152 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
154 &self.description
155 }
156 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 pub fn set_created_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.created_date = input;
164 self
165 }
166 pub fn get_created_date(&self) -> &::std::option::Option<::std::string::String> {
168 &self.created_date
169 }
170 pub fn version(mut self, input: i64) -> Self {
172 self.version = ::std::option::Option::Some(input);
173 self
174 }
175 pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
177 self.version = input;
178 self
179 }
180 pub fn get_version(&self) -> &::std::option::Option<i64> {
182 &self.version
183 }
184 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 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 pub fn get_compatible_runtimes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Runtime>> {
208 &self.compatible_runtimes
209 }
210 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 pub fn set_license_info(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
217 self.license_info = input;
218 self
219 }
220 pub fn get_license_info(&self) -> &::std::option::Option<::std::string::String> {
222 &self.license_info
223 }
224 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 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 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 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}