aws_sdk_cloudformation/types/_type_version_summary.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains summary information about a specific version of a CloudFormation extension.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TypeVersionSummary {
7 /// <p>The kind of extension.</p>
8 pub r#type: ::std::option::Option<crate::types::RegistryType>,
9 /// <p>The name of the extension.</p>
10 pub type_name: ::std::option::Option<::std::string::String>,
11 /// <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it's registered.</p>
12 pub version_id: ::std::option::Option<::std::string::String>,
13 /// <p>Whether the specified extension version is set as the default version.</p>
14 /// <p>This applies only to private extensions you have registered in your account, and extensions published by Amazon. For public third-party extensions, CloudFormation returns <code>null</code>.</p>
15 pub is_default_version: ::std::option::Option<bool>,
16 /// <p>The Amazon Resource Name (ARN) of the extension version.</p>
17 pub arn: ::std::option::Option<::std::string::String>,
18 /// <p>When the version was registered.</p>
19 pub time_created: ::std::option::Option<::aws_smithy_types::DateTime>,
20 /// <p>The description of the extension version.</p>
21 pub description: ::std::option::Option<::std::string::String>,
22 /// <p>For public extensions that have been activated for this account and Region, the version of the public extension to be used for CloudFormation operations in this account and Region. For any extensions other than activated third-party extensions, CloudFormation returns <code>null</code>.</p>
23 /// <p>How you specified <code>AutoUpdate</code> when enabling the extension affects whether CloudFormation automatically updates the extension in this account and Region when a new version is released. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto">Automatically use new versions of extensions</a> in the <i>CloudFormation User Guide</i>.</p>
24 pub public_version_number: ::std::option::Option<::std::string::String>,
25}
26impl TypeVersionSummary {
27 /// <p>The kind of extension.</p>
28 pub fn r#type(&self) -> ::std::option::Option<&crate::types::RegistryType> {
29 self.r#type.as_ref()
30 }
31 /// <p>The name of the extension.</p>
32 pub fn type_name(&self) -> ::std::option::Option<&str> {
33 self.type_name.as_deref()
34 }
35 /// <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it's registered.</p>
36 pub fn version_id(&self) -> ::std::option::Option<&str> {
37 self.version_id.as_deref()
38 }
39 /// <p>Whether the specified extension version is set as the default version.</p>
40 /// <p>This applies only to private extensions you have registered in your account, and extensions published by Amazon. For public third-party extensions, CloudFormation returns <code>null</code>.</p>
41 pub fn is_default_version(&self) -> ::std::option::Option<bool> {
42 self.is_default_version
43 }
44 /// <p>The Amazon Resource Name (ARN) of the extension version.</p>
45 pub fn arn(&self) -> ::std::option::Option<&str> {
46 self.arn.as_deref()
47 }
48 /// <p>When the version was registered.</p>
49 pub fn time_created(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
50 self.time_created.as_ref()
51 }
52 /// <p>The description of the extension version.</p>
53 pub fn description(&self) -> ::std::option::Option<&str> {
54 self.description.as_deref()
55 }
56 /// <p>For public extensions that have been activated for this account and Region, the version of the public extension to be used for CloudFormation operations in this account and Region. For any extensions other than activated third-party extensions, CloudFormation returns <code>null</code>.</p>
57 /// <p>How you specified <code>AutoUpdate</code> when enabling the extension affects whether CloudFormation automatically updates the extension in this account and Region when a new version is released. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto">Automatically use new versions of extensions</a> in the <i>CloudFormation User Guide</i>.</p>
58 pub fn public_version_number(&self) -> ::std::option::Option<&str> {
59 self.public_version_number.as_deref()
60 }
61}
62impl TypeVersionSummary {
63 /// Creates a new builder-style object to manufacture [`TypeVersionSummary`](crate::types::TypeVersionSummary).
64 pub fn builder() -> crate::types::builders::TypeVersionSummaryBuilder {
65 crate::types::builders::TypeVersionSummaryBuilder::default()
66 }
67}
68
69/// A builder for [`TypeVersionSummary`](crate::types::TypeVersionSummary).
70#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
71#[non_exhaustive]
72pub struct TypeVersionSummaryBuilder {
73 pub(crate) r#type: ::std::option::Option<crate::types::RegistryType>,
74 pub(crate) type_name: ::std::option::Option<::std::string::String>,
75 pub(crate) version_id: ::std::option::Option<::std::string::String>,
76 pub(crate) is_default_version: ::std::option::Option<bool>,
77 pub(crate) arn: ::std::option::Option<::std::string::String>,
78 pub(crate) time_created: ::std::option::Option<::aws_smithy_types::DateTime>,
79 pub(crate) description: ::std::option::Option<::std::string::String>,
80 pub(crate) public_version_number: ::std::option::Option<::std::string::String>,
81}
82impl TypeVersionSummaryBuilder {
83 /// <p>The kind of extension.</p>
84 pub fn r#type(mut self, input: crate::types::RegistryType) -> Self {
85 self.r#type = ::std::option::Option::Some(input);
86 self
87 }
88 /// <p>The kind of extension.</p>
89 pub fn set_type(mut self, input: ::std::option::Option<crate::types::RegistryType>) -> Self {
90 self.r#type = input;
91 self
92 }
93 /// <p>The kind of extension.</p>
94 pub fn get_type(&self) -> &::std::option::Option<crate::types::RegistryType> {
95 &self.r#type
96 }
97 /// <p>The name of the extension.</p>
98 pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99 self.type_name = ::std::option::Option::Some(input.into());
100 self
101 }
102 /// <p>The name of the extension.</p>
103 pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104 self.type_name = input;
105 self
106 }
107 /// <p>The name of the extension.</p>
108 pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
109 &self.type_name
110 }
111 /// <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it's registered.</p>
112 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.version_id = ::std::option::Option::Some(input.into());
114 self
115 }
116 /// <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it's registered.</p>
117 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.version_id = input;
119 self
120 }
121 /// <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it's registered.</p>
122 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
123 &self.version_id
124 }
125 /// <p>Whether the specified extension version is set as the default version.</p>
126 /// <p>This applies only to private extensions you have registered in your account, and extensions published by Amazon. For public third-party extensions, CloudFormation returns <code>null</code>.</p>
127 pub fn is_default_version(mut self, input: bool) -> Self {
128 self.is_default_version = ::std::option::Option::Some(input);
129 self
130 }
131 /// <p>Whether the specified extension version is set as the default version.</p>
132 /// <p>This applies only to private extensions you have registered in your account, and extensions published by Amazon. For public third-party extensions, CloudFormation returns <code>null</code>.</p>
133 pub fn set_is_default_version(mut self, input: ::std::option::Option<bool>) -> Self {
134 self.is_default_version = input;
135 self
136 }
137 /// <p>Whether the specified extension version is set as the default version.</p>
138 /// <p>This applies only to private extensions you have registered in your account, and extensions published by Amazon. For public third-party extensions, CloudFormation returns <code>null</code>.</p>
139 pub fn get_is_default_version(&self) -> &::std::option::Option<bool> {
140 &self.is_default_version
141 }
142 /// <p>The Amazon Resource Name (ARN) of the extension version.</p>
143 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144 self.arn = ::std::option::Option::Some(input.into());
145 self
146 }
147 /// <p>The Amazon Resource Name (ARN) of the extension version.</p>
148 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149 self.arn = input;
150 self
151 }
152 /// <p>The Amazon Resource Name (ARN) of the extension version.</p>
153 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
154 &self.arn
155 }
156 /// <p>When the version was registered.</p>
157 pub fn time_created(mut self, input: ::aws_smithy_types::DateTime) -> Self {
158 self.time_created = ::std::option::Option::Some(input);
159 self
160 }
161 /// <p>When the version was registered.</p>
162 pub fn set_time_created(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
163 self.time_created = input;
164 self
165 }
166 /// <p>When the version was registered.</p>
167 pub fn get_time_created(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
168 &self.time_created
169 }
170 /// <p>The description of the extension version.</p>
171 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172 self.description = ::std::option::Option::Some(input.into());
173 self
174 }
175 /// <p>The description of the extension version.</p>
176 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.description = input;
178 self
179 }
180 /// <p>The description of the extension version.</p>
181 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
182 &self.description
183 }
184 /// <p>For public extensions that have been activated for this account and Region, the version of the public extension to be used for CloudFormation operations in this account and Region. For any extensions other than activated third-party extensions, CloudFormation returns <code>null</code>.</p>
185 /// <p>How you specified <code>AutoUpdate</code> when enabling the extension affects whether CloudFormation automatically updates the extension in this account and Region when a new version is released. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto">Automatically use new versions of extensions</a> in the <i>CloudFormation User Guide</i>.</p>
186 pub fn public_version_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187 self.public_version_number = ::std::option::Option::Some(input.into());
188 self
189 }
190 /// <p>For public extensions that have been activated for this account and Region, the version of the public extension to be used for CloudFormation operations in this account and Region. For any extensions other than activated third-party extensions, CloudFormation returns <code>null</code>.</p>
191 /// <p>How you specified <code>AutoUpdate</code> when enabling the extension affects whether CloudFormation automatically updates the extension in this account and Region when a new version is released. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto">Automatically use new versions of extensions</a> in the <i>CloudFormation User Guide</i>.</p>
192 pub fn set_public_version_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193 self.public_version_number = input;
194 self
195 }
196 /// <p>For public extensions that have been activated for this account and Region, the version of the public extension to be used for CloudFormation operations in this account and Region. For any extensions other than activated third-party extensions, CloudFormation returns <code>null</code>.</p>
197 /// <p>How you specified <code>AutoUpdate</code> when enabling the extension affects whether CloudFormation automatically updates the extension in this account and Region when a new version is released. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto">Automatically use new versions of extensions</a> in the <i>CloudFormation User Guide</i>.</p>
198 pub fn get_public_version_number(&self) -> &::std::option::Option<::std::string::String> {
199 &self.public_version_number
200 }
201 /// Consumes the builder and constructs a [`TypeVersionSummary`](crate::types::TypeVersionSummary).
202 pub fn build(self) -> crate::types::TypeVersionSummary {
203 crate::types::TypeVersionSummary {
204 r#type: self.r#type,
205 type_name: self.type_name,
206 version_id: self.version_id,
207 is_default_version: self.is_default_version,
208 arn: self.arn,
209 time_created: self.time_created,
210 description: self.description,
211 public_version_number: self.public_version_number,
212 }
213 }
214}