Skip to main content

aws_sdk_cloudextensions/operation/get_extension/
_get_extension_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// A released, immutable extension package. Represents a versioned unit of compute that can be deployed to profiles via profile entries. Each extension version is a published snapshot of an extension draft.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetExtensionOutput {
7    /// The extension's id, in the form namespace:name, such as aws:secretsmanager.
8    pub id: ::std::string::String,
9    /// The extension's display name.
10    pub display_name: ::std::string::String,
11    /// The Amazon Resource Name (ARN) of the extension.
12    pub arn: ::std::string::String,
13    /// The semantic version of this release.
14    pub version: ::std::string::String,
15    /// A short summary of what the extension does, suitable for a catalog listing.
16    pub overview: ::std::option::Option<::std::string::String>,
17    /// A link to external documentation for this extension.
18    pub documentation_link: ::std::option::Option<::std::string::String>,
19    /// Author-provided notes describing what changed in this release.
20    pub release_notes: ::std::option::Option<::std::string::String>,
21    /// The timestamp when this version was released.
22    pub released_at: ::aws_smithy_types::DateTime,
23    /// A full description of the extension's purpose and functionality.
24    pub description: ::std::option::Option<::std::string::String>,
25    /// The settings, capabilities and interfaces declared by this extension version.
26    pub configuration: ::std::option::Option<crate::types::ExtensionConfiguration>,
27    _request_id: Option<String>,
28}
29impl GetExtensionOutput {
30    /// The extension's id, in the form namespace:name, such as aws:secretsmanager.
31    pub fn id(&self) -> &str {
32        use std::ops::Deref;
33        self.id.deref()
34    }
35    /// The extension's display name.
36    pub fn display_name(&self) -> &str {
37        use std::ops::Deref;
38        self.display_name.deref()
39    }
40    /// The Amazon Resource Name (ARN) of the extension.
41    pub fn arn(&self) -> &str {
42        use std::ops::Deref;
43        self.arn.deref()
44    }
45    /// The semantic version of this release.
46    pub fn version(&self) -> &str {
47        use std::ops::Deref;
48        self.version.deref()
49    }
50    /// A short summary of what the extension does, suitable for a catalog listing.
51    pub fn overview(&self) -> ::std::option::Option<&str> {
52        self.overview.as_deref()
53    }
54    /// A link to external documentation for this extension.
55    pub fn documentation_link(&self) -> ::std::option::Option<&str> {
56        self.documentation_link.as_deref()
57    }
58    /// Author-provided notes describing what changed in this release.
59    pub fn release_notes(&self) -> ::std::option::Option<&str> {
60        self.release_notes.as_deref()
61    }
62    /// The timestamp when this version was released.
63    pub fn released_at(&self) -> &::aws_smithy_types::DateTime {
64        &self.released_at
65    }
66    /// A full description of the extension's purpose and functionality.
67    pub fn description(&self) -> ::std::option::Option<&str> {
68        self.description.as_deref()
69    }
70    /// The settings, capabilities and interfaces declared by this extension version.
71    pub fn configuration(&self) -> ::std::option::Option<&crate::types::ExtensionConfiguration> {
72        self.configuration.as_ref()
73    }
74}
75impl ::aws_types::request_id::RequestId for GetExtensionOutput {
76    fn request_id(&self) -> Option<&str> {
77        self._request_id.as_deref()
78    }
79}
80impl GetExtensionOutput {
81    /// Creates a new builder-style object to manufacture [`GetExtensionOutput`](crate::operation::get_extension::GetExtensionOutput).
82    pub fn builder() -> crate::operation::get_extension::builders::GetExtensionOutputBuilder {
83        crate::operation::get_extension::builders::GetExtensionOutputBuilder::default()
84    }
85}
86
87/// A builder for [`GetExtensionOutput`](crate::operation::get_extension::GetExtensionOutput).
88#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
89#[non_exhaustive]
90pub struct GetExtensionOutputBuilder {
91    pub(crate) id: ::std::option::Option<::std::string::String>,
92    pub(crate) display_name: ::std::option::Option<::std::string::String>,
93    pub(crate) arn: ::std::option::Option<::std::string::String>,
94    pub(crate) version: ::std::option::Option<::std::string::String>,
95    pub(crate) overview: ::std::option::Option<::std::string::String>,
96    pub(crate) documentation_link: ::std::option::Option<::std::string::String>,
97    pub(crate) release_notes: ::std::option::Option<::std::string::String>,
98    pub(crate) released_at: ::std::option::Option<::aws_smithy_types::DateTime>,
99    pub(crate) description: ::std::option::Option<::std::string::String>,
100    pub(crate) configuration: ::std::option::Option<crate::types::ExtensionConfiguration>,
101    _request_id: Option<String>,
102}
103impl GetExtensionOutputBuilder {
104    /// The extension's id, in the form namespace:name, such as aws:secretsmanager.
105    /// This field is required.
106    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        self.id = ::std::option::Option::Some(input.into());
108        self
109    }
110    /// The extension's id, in the form namespace:name, such as aws:secretsmanager.
111    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.id = input;
113        self
114    }
115    /// The extension's id, in the form namespace:name, such as aws:secretsmanager.
116    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
117        &self.id
118    }
119    /// The extension's display name.
120    /// This field is required.
121    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.display_name = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// The extension's display name.
126    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.display_name = input;
128        self
129    }
130    /// The extension's display name.
131    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
132        &self.display_name
133    }
134    /// The Amazon Resource Name (ARN) of the extension.
135    /// This field is required.
136    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137        self.arn = ::std::option::Option::Some(input.into());
138        self
139    }
140    /// The Amazon Resource Name (ARN) of the extension.
141    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142        self.arn = input;
143        self
144    }
145    /// The Amazon Resource Name (ARN) of the extension.
146    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
147        &self.arn
148    }
149    /// The semantic version of this release.
150    /// This field is required.
151    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.version = ::std::option::Option::Some(input.into());
153        self
154    }
155    /// The semantic version of this release.
156    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157        self.version = input;
158        self
159    }
160    /// The semantic version of this release.
161    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
162        &self.version
163    }
164    /// A short summary of what the extension does, suitable for a catalog listing.
165    pub fn overview(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166        self.overview = ::std::option::Option::Some(input.into());
167        self
168    }
169    /// A short summary of what the extension does, suitable for a catalog listing.
170    pub fn set_overview(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171        self.overview = input;
172        self
173    }
174    /// A short summary of what the extension does, suitable for a catalog listing.
175    pub fn get_overview(&self) -> &::std::option::Option<::std::string::String> {
176        &self.overview
177    }
178    /// A link to external documentation for this extension.
179    pub fn documentation_link(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180        self.documentation_link = ::std::option::Option::Some(input.into());
181        self
182    }
183    /// A link to external documentation for this extension.
184    pub fn set_documentation_link(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185        self.documentation_link = input;
186        self
187    }
188    /// A link to external documentation for this extension.
189    pub fn get_documentation_link(&self) -> &::std::option::Option<::std::string::String> {
190        &self.documentation_link
191    }
192    /// Author-provided notes describing what changed in this release.
193    pub fn release_notes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        self.release_notes = ::std::option::Option::Some(input.into());
195        self
196    }
197    /// Author-provided notes describing what changed in this release.
198    pub fn set_release_notes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.release_notes = input;
200        self
201    }
202    /// Author-provided notes describing what changed in this release.
203    pub fn get_release_notes(&self) -> &::std::option::Option<::std::string::String> {
204        &self.release_notes
205    }
206    /// The timestamp when this version was released.
207    /// This field is required.
208    pub fn released_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
209        self.released_at = ::std::option::Option::Some(input);
210        self
211    }
212    /// The timestamp when this version was released.
213    pub fn set_released_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
214        self.released_at = input;
215        self
216    }
217    /// The timestamp when this version was released.
218    pub fn get_released_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
219        &self.released_at
220    }
221    /// A full description of the extension's purpose and functionality.
222    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.description = ::std::option::Option::Some(input.into());
224        self
225    }
226    /// A full description of the extension's purpose and functionality.
227    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228        self.description = input;
229        self
230    }
231    /// A full description of the extension's purpose and functionality.
232    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
233        &self.description
234    }
235    /// The settings, capabilities and interfaces declared by this extension version.
236    pub fn configuration(mut self, input: crate::types::ExtensionConfiguration) -> Self {
237        self.configuration = ::std::option::Option::Some(input);
238        self
239    }
240    /// The settings, capabilities and interfaces declared by this extension version.
241    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ExtensionConfiguration>) -> Self {
242        self.configuration = input;
243        self
244    }
245    /// The settings, capabilities and interfaces declared by this extension version.
246    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ExtensionConfiguration> {
247        &self.configuration
248    }
249    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
250        self._request_id = Some(request_id.into());
251        self
252    }
253
254    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
255        self._request_id = request_id;
256        self
257    }
258    /// Consumes the builder and constructs a [`GetExtensionOutput`](crate::operation::get_extension::GetExtensionOutput).
259    /// This method will fail if any of the following fields are not set:
260    /// - [`id`](crate::operation::get_extension::builders::GetExtensionOutputBuilder::id)
261    /// - [`display_name`](crate::operation::get_extension::builders::GetExtensionOutputBuilder::display_name)
262    /// - [`arn`](crate::operation::get_extension::builders::GetExtensionOutputBuilder::arn)
263    /// - [`version`](crate::operation::get_extension::builders::GetExtensionOutputBuilder::version)
264    /// - [`released_at`](crate::operation::get_extension::builders::GetExtensionOutputBuilder::released_at)
265    pub fn build(
266        self,
267    ) -> ::std::result::Result<crate::operation::get_extension::GetExtensionOutput, ::aws_smithy_types::error::operation::BuildError> {
268        ::std::result::Result::Ok(crate::operation::get_extension::GetExtensionOutput {
269            id: self.id.ok_or_else(|| {
270                ::aws_smithy_types::error::operation::BuildError::missing_field(
271                    "id",
272                    "id was not specified but it is required when building GetExtensionOutput",
273                )
274            })?,
275            display_name: self.display_name.ok_or_else(|| {
276                ::aws_smithy_types::error::operation::BuildError::missing_field(
277                    "display_name",
278                    "display_name was not specified but it is required when building GetExtensionOutput",
279                )
280            })?,
281            arn: self.arn.ok_or_else(|| {
282                ::aws_smithy_types::error::operation::BuildError::missing_field(
283                    "arn",
284                    "arn was not specified but it is required when building GetExtensionOutput",
285                )
286            })?,
287            version: self.version.ok_or_else(|| {
288                ::aws_smithy_types::error::operation::BuildError::missing_field(
289                    "version",
290                    "version was not specified but it is required when building GetExtensionOutput",
291                )
292            })?,
293            overview: self.overview,
294            documentation_link: self.documentation_link,
295            release_notes: self.release_notes,
296            released_at: self.released_at.ok_or_else(|| {
297                ::aws_smithy_types::error::operation::BuildError::missing_field(
298                    "released_at",
299                    "released_at was not specified but it is required when building GetExtensionOutput",
300                )
301            })?,
302            description: self.description,
303            configuration: self.configuration,
304            _request_id: self._request_id,
305        })
306    }
307}