1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>An activation registers one or more on-premises servers or virtual machines (VMs) with Amazon Web Services so that you can configure those servers or VMs using Run Command. A server or VM that has been registered with Amazon Web Services Systems Manager is called a managed node.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct Activation {
|
7 + | /// <p>The ID created by Systems Manager when you submitted the activation.</p>
|
8 + | pub activation_id: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>A user defined description of the activation.</p>
|
10 + | pub description: ::std::option::Option<::std::string::String>,
|
11 + | /// <p>A name for the managed node when it is created.</p>
|
12 + | pub default_instance_name: ::std::option::Option<::std::string::String>,
|
13 + | /// <p>The Identity and Access Management (IAM) role to assign to the managed node.</p>
|
14 + | pub iam_role: ::std::option::Option<::std::string::String>,
|
15 + | /// <p>The maximum number of managed nodes that can be registered using this activation.</p>
|
16 + | pub registration_limit: ::std::option::Option<i32>,
|
17 + | /// <p>The number of managed nodes already registered with this activation.</p>
|
18 + | pub registrations_count: ::std::option::Option<i32>,
|
19 + | /// <p>The date when this activation can no longer be used to register managed nodes.</p>
|
20 + | pub expiration_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
21 + | /// <p>Whether or not the activation is expired.</p>
|
22 + | pub expired: bool,
|
23 + | /// <p>The date the activation was created.</p>
|
24 + | pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
25 + | /// <p>Tags assigned to the activation.</p>
|
26 + | pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
|
27 + | }
|
28 + | impl Activation {
|
29 + | /// <p>The ID created by Systems Manager when you submitted the activation.</p>
|
30 + | pub fn activation_id(&self) -> ::std::option::Option<&str> {
|
31 + | self.activation_id.as_deref()
|
32 + | }
|
33 + | /// <p>A user defined description of the activation.</p>
|
34 + | pub fn description(&self) -> ::std::option::Option<&str> {
|
35 + | self.description.as_deref()
|
36 + | }
|
37 + | /// <p>A name for the managed node when it is created.</p>
|
38 + | pub fn default_instance_name(&self) -> ::std::option::Option<&str> {
|
39 + | self.default_instance_name.as_deref()
|
40 + | }
|
41 + | /// <p>The Identity and Access Management (IAM) role to assign to the managed node.</p>
|
42 + | pub fn iam_role(&self) -> ::std::option::Option<&str> {
|
43 + | self.iam_role.as_deref()
|
44 + | }
|
45 + | /// <p>The maximum number of managed nodes that can be registered using this activation.</p>
|
46 + | pub fn registration_limit(&self) -> ::std::option::Option<i32> {
|
47 + | self.registration_limit
|
48 + | }
|
49 + | /// <p>The number of managed nodes already registered with this activation.</p>
|
50 + | pub fn registrations_count(&self) -> ::std::option::Option<i32> {
|
51 + | self.registrations_count
|
52 + | }
|
53 + | /// <p>The date when this activation can no longer be used to register managed nodes.</p>
|
54 + | pub fn expiration_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
55 + | self.expiration_date.as_ref()
|
56 + | }
|
57 + | /// <p>Whether or not the activation is expired.</p>
|
58 + | pub fn expired(&self) -> bool {
|
59 + | self.expired
|
60 + | }
|
61 + | /// <p>The date the activation was created.</p>
|
62 + | pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
63 + | self.created_date.as_ref()
|
64 + | }
|
65 + | /// <p>Tags assigned to the activation.</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 `.tags.is_none()`.
|
68 + | pub fn tags(&self) -> &[crate::types::Tag] {
|
69 + | self.tags.as_deref().unwrap_or_default()
|
70 + | }
|
71 + | }
|
72 + | static ACTIVATION_MEMBER_ACTIVATION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
73 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$ActivationId", "com.amazonaws.ssm", "Activation"),
|
74 + | ::aws_smithy_schema::ShapeType::String,
|
75 + | "ActivationId",
|
76 + | 0,
|
77 + | );
|
78 + | static ACTIVATION_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
79 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$Description", "com.amazonaws.ssm", "Activation"),
|
80 + | ::aws_smithy_schema::ShapeType::String,
|
81 + | "Description",
|
82 + | 1,
|
83 + | );
|
84 + | static ACTIVATION_MEMBER_DEFAULT_INSTANCE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
85 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$DefaultInstanceName", "com.amazonaws.ssm", "Activation"),
|
86 + | ::aws_smithy_schema::ShapeType::String,
|
87 + | "DefaultInstanceName",
|
88 + | 2,
|
89 + | );
|
90 + | static ACTIVATION_MEMBER_IAM_ROLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
91 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$IamRole", "com.amazonaws.ssm", "Activation"),
|
92 + | ::aws_smithy_schema::ShapeType::String,
|
93 + | "IamRole",
|
94 + | 3,
|
95 + | );
|
96 + | static ACTIVATION_MEMBER_REGISTRATION_LIMIT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
97 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$RegistrationLimit", "com.amazonaws.ssm", "Activation"),
|
98 + | ::aws_smithy_schema::ShapeType::Integer,
|
99 + | "RegistrationLimit",
|
100 + | 4,
|
101 + | );
|
102 + | static ACTIVATION_MEMBER_REGISTRATIONS_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
103 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$RegistrationsCount", "com.amazonaws.ssm", "Activation"),
|
104 + | ::aws_smithy_schema::ShapeType::Integer,
|
105 + | "RegistrationsCount",
|
106 + | 5,
|
107 + | );
|
108 + | static ACTIVATION_MEMBER_EXPIRATION_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
109 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$ExpirationDate", "com.amazonaws.ssm", "Activation"),
|
110 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
111 + | "ExpirationDate",
|
112 + | 6,
|
113 + | );
|
114 + | static ACTIVATION_MEMBER_EXPIRED: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
115 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$Expired", "com.amazonaws.ssm", "Activation"),
|
116 + | ::aws_smithy_schema::ShapeType::Boolean,
|
117 + | "Expired",
|
118 + | 7,
|
119 + | );
|
120 + | static ACTIVATION_MEMBER_CREATED_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
121 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$CreatedDate", "com.amazonaws.ssm", "Activation"),
|
122 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
123 + | "CreatedDate",
|
124 + | 8,
|
125 + | );
|
126 + | static ACTIVATION_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
127 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TagList$member", "com.amazonaws.ssm", "TagList"),
|
128 + | ::aws_smithy_schema::ShapeType::Structure,
|
129 + | "member",
|
130 + | 0,
|
131 + | );
|
132 + | static ACTIVATION_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
133 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation$Tags", "com.amazonaws.ssm", "Activation"),
|
134 + | ::aws_smithy_schema::ShapeType::List,
|
135 + | "Tags",
|
136 + | 9,
|
137 + | )
|
138 + | .with_list_member(&ACTIVATION_MEMBER_TAGS_MEMBER);
|
139 + | static ACTIVATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
140 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Activation", "com.amazonaws.ssm", "Activation"),
|
141 + | ::aws_smithy_schema::ShapeType::Structure,
|
142 + | &[
|
143 + | &ACTIVATION_MEMBER_ACTIVATION_ID,
|
144 + | &ACTIVATION_MEMBER_DESCRIPTION,
|
145 + | &ACTIVATION_MEMBER_DEFAULT_INSTANCE_NAME,
|
146 + | &ACTIVATION_MEMBER_IAM_ROLE,
|
147 + | &ACTIVATION_MEMBER_REGISTRATION_LIMIT,
|
148 + | &ACTIVATION_MEMBER_REGISTRATIONS_COUNT,
|
149 + | &ACTIVATION_MEMBER_EXPIRATION_DATE,
|
150 + | &ACTIVATION_MEMBER_EXPIRED,
|
151 + | &ACTIVATION_MEMBER_CREATED_DATE,
|
152 + | &ACTIVATION_MEMBER_TAGS,
|
153 + | ],
|
154 + | );
|
155 + | impl Activation {
|
156 + | /// The schema for this shape.
|
157 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ACTIVATION_SCHEMA;
|
158 + | }
|
159 + | impl ::aws_smithy_schema::serde::SerializableStruct for Activation {
|
160 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
161 + | fn serialize_members(
|
162 + | &self,
|
163 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
164 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
165 + | if let Some(ref val) = self.activation_id {
|
166 + | ser.write_string(&ACTIVATION_MEMBER_ACTIVATION_ID, val)?;
|
167 + | }
|
168 + | if let Some(ref val) = self.description {
|
169 + | ser.write_string(&ACTIVATION_MEMBER_DESCRIPTION, val)?;
|
170 + | }
|
171 + | if let Some(ref val) = self.default_instance_name {
|
172 + | ser.write_string(&ACTIVATION_MEMBER_DEFAULT_INSTANCE_NAME, val)?;
|
173 + | }
|
174 + | if let Some(ref val) = self.iam_role {
|
175 + | ser.write_string(&ACTIVATION_MEMBER_IAM_ROLE, val)?;
|
176 + | }
|
177 + | if let Some(ref val) = self.registration_limit {
|
178 + | ser.write_integer(&ACTIVATION_MEMBER_REGISTRATION_LIMIT, *val)?;
|
179 + | }
|
180 + | if let Some(ref val) = self.registrations_count {
|
181 + | ser.write_integer(&ACTIVATION_MEMBER_REGISTRATIONS_COUNT, *val)?;
|
182 + | }
|
183 + | if let Some(ref val) = self.expiration_date {
|
184 + | ser.write_timestamp(&ACTIVATION_MEMBER_EXPIRATION_DATE, val)?;
|
185 + | }
|
186 + | {
|
187 + | let val = &self.expired;
|
188 + | ser.write_boolean(&ACTIVATION_MEMBER_EXPIRED, *val)?;
|
189 + | }
|
190 + | if let Some(ref val) = self.created_date {
|
191 + | ser.write_timestamp(&ACTIVATION_MEMBER_CREATED_DATE, val)?;
|
192 + | }
|
193 + | if let Some(ref val) = self.tags {
|
194 + | ser.write_list(&ACTIVATION_MEMBER_TAGS, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
195 + | for item in val {
|
196 + | ser.write_struct(crate::types::Tag::SCHEMA, item)?;
|
197 + | }
|
198 + | Ok(())
|
199 + | })?;
|
200 + | }
|
201 + | Ok(())
|
202 + | }
|
203 + | }
|
204 + | impl Activation {
|
205 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
206 + | pub fn deserialize(
|
207 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
208 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
209 + | #[allow(unused_variables, unused_mut)]
|
210 + | let mut builder = Self::builder();
|
211 + | #[allow(
|
212 + | unused_variables,
|
213 + | unreachable_code,
|
214 + | clippy::single_match,
|
215 + | clippy::match_single_binding,
|
216 + | clippy::diverging_sub_expression
|
217 + | )]
|
218 + | deserializer.read_struct(&ACTIVATION_SCHEMA, &mut |member, deser| {
|
219 + | match member.member_index() {
|
220 + | Some(0) => {
|
221 + | if deser.is_null() {
|
222 + | deser.read_null()?;
|
223 + | } else {
|
224 + | builder.activation_id = Some(deser.read_string(member)?);
|
225 + | }
|
226 + | }
|
227 + | Some(1) => {
|
228 + | if deser.is_null() {
|
229 + | deser.read_null()?;
|
230 + | } else {
|
231 + | builder.description = Some(deser.read_string(member)?);
|
232 + | }
|
233 + | }
|
234 + | Some(2) => {
|
235 + | if deser.is_null() {
|
236 + | deser.read_null()?;
|
237 + | } else {
|
238 + | builder.default_instance_name = Some(deser.read_string(member)?);
|
239 + | }
|
240 + | }
|
241 + | Some(3) => {
|
242 + | if deser.is_null() {
|
243 + | deser.read_null()?;
|
244 + | } else {
|
245 + | builder.iam_role = Some(deser.read_string(member)?);
|
246 + | }
|
247 + | }
|
248 + | Some(4) => {
|
249 + | if deser.is_null() {
|
250 + | deser.read_null()?;
|
251 + | } else {
|
252 + | builder.registration_limit = Some(deser.read_integer(member)?);
|
253 + | }
|
254 + | }
|
255 + | Some(5) => {
|
256 + | if deser.is_null() {
|
257 + | deser.read_null()?;
|
258 + | } else {
|
259 + | builder.registrations_count = Some(deser.read_integer(member)?);
|
260 + | }
|
261 + | }
|
262 + | Some(6) => {
|
263 + | if deser.is_null() {
|
264 + | deser.read_null()?;
|
265 + | } else {
|
266 + | builder.expiration_date = Some(deser.read_timestamp(member)?);
|
267 + | }
|
268 + | }
|
269 + | Some(7) => {
|
270 + | builder.expired = Some(deser.read_boolean(member)?);
|
271 + | }
|
272 + | Some(8) => {
|
273 + | if deser.is_null() {
|
274 + | deser.read_null()?;
|
275 + | } else {
|
276 + | builder.created_date = Some(deser.read_timestamp(member)?);
|
277 + | }
|
278 + | }
|
279 + | Some(9) => {
|
280 + | if deser.is_null() {
|
281 + | deser.read_null()?;
|
282 + | } else {
|
283 + | builder.tags = Some({
|
284 + | let mut container = Vec::new();
|
285 + | deser.read_list(member, &mut |deser| {
|
286 + | container.push(crate::types::Tag::deserialize(deser)?);
|
287 + | Ok(())
|
288 + | })?;
|
289 + | container
|
290 + | });
|
291 + | }
|
292 + | }
|
293 + | _ => {}
|
294 + | }
|
295 + | Ok(())
|
296 + | })?;
|
297 + | Ok(builder.build())
|
298 + | }
|
299 + | }
|
300 + | impl Activation {
|
301 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
302 + | pub fn deserialize_with_response(
|
303 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
304 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
305 + | _status: u16,
|
306 + | _body: &[u8],
|
307 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
308 + | Self::deserialize(deserializer)
|
309 + | }
|
310 + | }
|
311 + | impl Activation {
|
312 + | /// Creates a new builder-style object to manufacture [`Activation`](crate::types::Activation).
|
313 + | pub fn builder() -> crate::types::builders::ActivationBuilder {
|
314 + | crate::types::builders::ActivationBuilder::default()
|
315 + | }
|
316 + | }
|
317 + |
|
318 + | /// A builder for [`Activation`](crate::types::Activation).
|
319 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
320 + | #[non_exhaustive]
|
321 + | pub struct ActivationBuilder {
|
322 + | pub(crate) activation_id: ::std::option::Option<::std::string::String>,
|
323 + | pub(crate) description: ::std::option::Option<::std::string::String>,
|
324 + | pub(crate) default_instance_name: ::std::option::Option<::std::string::String>,
|
325 + | pub(crate) iam_role: ::std::option::Option<::std::string::String>,
|
326 + | pub(crate) registration_limit: ::std::option::Option<i32>,
|
327 + | pub(crate) registrations_count: ::std::option::Option<i32>,
|
328 + | pub(crate) expiration_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
329 + | pub(crate) expired: ::std::option::Option<bool>,
|
330 + | pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
331 + | pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
|
332 + | }
|
333 + | impl ActivationBuilder {
|
334 + | /// <p>The ID created by Systems Manager when you submitted the activation.</p>
|
335 + | pub fn activation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
336 + | self.activation_id = ::std::option::Option::Some(input.into());
|
337 + | self
|
338 + | }
|
339 + | /// <p>The ID created by Systems Manager when you submitted the activation.</p>
|
340 + | pub fn set_activation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
341 + | self.activation_id = input;
|
342 + | self
|
343 + | }
|
344 + | /// <p>The ID created by Systems Manager when you submitted the activation.</p>
|
345 + | pub fn get_activation_id(&self) -> &::std::option::Option<::std::string::String> {
|
346 + | &self.activation_id
|
347 + | }
|
348 + | /// <p>A user defined description of the activation.</p>
|
349 + | pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
350 + | self.description = ::std::option::Option::Some(input.into());
|
351 + | self
|
352 + | }
|
353 + | /// <p>A user defined description of the activation.</p>
|
354 + | pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
355 + | self.description = input;
|
356 + | self
|
357 + | }
|
358 + | /// <p>A user defined description of the activation.</p>
|
359 + | pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
|
360 + | &self.description
|
361 + | }
|
362 + | /// <p>A name for the managed node when it is created.</p>
|
363 + | pub fn default_instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
364 + | self.default_instance_name = ::std::option::Option::Some(input.into());
|
365 + | self
|
366 + | }
|
367 + | /// <p>A name for the managed node when it is created.</p>
|
368 + | pub fn set_default_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
369 + | self.default_instance_name = input;
|
370 + | self
|
371 + | }
|
372 + | /// <p>A name for the managed node when it is created.</p>
|
373 + | pub fn get_default_instance_name(&self) -> &::std::option::Option<::std::string::String> {
|
374 + | &self.default_instance_name
|
375 + | }
|
376 + | /// <p>The Identity and Access Management (IAM) role to assign to the managed node.</p>
|
377 + | pub fn iam_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
378 + | self.iam_role = ::std::option::Option::Some(input.into());
|
379 + | self
|
380 + | }
|
381 + | /// <p>The Identity and Access Management (IAM) role to assign to the managed node.</p>
|
382 + | pub fn set_iam_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
383 + | self.iam_role = input;
|
384 + | self
|
385 + | }
|
386 + | /// <p>The Identity and Access Management (IAM) role to assign to the managed node.</p>
|
387 + | pub fn get_iam_role(&self) -> &::std::option::Option<::std::string::String> {
|
388 + | &self.iam_role
|
389 + | }
|
390 + | /// <p>The maximum number of managed nodes that can be registered using this activation.</p>
|
391 + | pub fn registration_limit(mut self, input: i32) -> Self {
|
392 + | self.registration_limit = ::std::option::Option::Some(input);
|
393 + | self
|
394 + | }
|
395 + | /// <p>The maximum number of managed nodes that can be registered using this activation.</p>
|
396 + | pub fn set_registration_limit(mut self, input: ::std::option::Option<i32>) -> Self {
|
397 + | self.registration_limit = input;
|
398 + | self
|
399 + | }
|
400 + | /// <p>The maximum number of managed nodes that can be registered using this activation.</p>
|
401 + | pub fn get_registration_limit(&self) -> &::std::option::Option<i32> {
|
402 + | &self.registration_limit
|
403 + | }
|
404 + | /// <p>The number of managed nodes already registered with this activation.</p>
|
405 + | pub fn registrations_count(mut self, input: i32) -> Self {
|
406 + | self.registrations_count = ::std::option::Option::Some(input);
|
407 + | self
|
408 + | }
|
409 + | /// <p>The number of managed nodes already registered with this activation.</p>
|
410 + | pub fn set_registrations_count(mut self, input: ::std::option::Option<i32>) -> Self {
|
411 + | self.registrations_count = input;
|
412 + | self
|
413 + | }
|
414 + | /// <p>The number of managed nodes already registered with this activation.</p>
|
415 + | pub fn get_registrations_count(&self) -> &::std::option::Option<i32> {
|
416 + | &self.registrations_count
|
417 + | }
|
418 + | /// <p>The date when this activation can no longer be used to register managed nodes.</p>
|
419 + | pub fn expiration_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
420 + | self.expiration_date = ::std::option::Option::Some(input);
|
421 + | self
|
422 + | }
|
423 + | /// <p>The date when this activation can no longer be used to register managed nodes.</p>
|
424 + | pub fn set_expiration_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
425 + | self.expiration_date = input;
|
426 + | self
|
427 + | }
|
428 + | /// <p>The date when this activation can no longer be used to register managed nodes.</p>
|
429 + | pub fn get_expiration_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
430 + | &self.expiration_date
|
431 + | }
|
432 + | /// <p>Whether or not the activation is expired.</p>
|
433 + | pub fn expired(mut self, input: bool) -> Self {
|
434 + | self.expired = ::std::option::Option::Some(input);
|
435 + | self
|
436 + | }
|
437 + | /// <p>Whether or not the activation is expired.</p>
|
438 + | pub fn set_expired(mut self, input: ::std::option::Option<bool>) -> Self {
|
439 + | self.expired = input;
|
440 + | self
|
441 + | }
|
442 + | /// <p>Whether or not the activation is expired.</p>
|
443 + | pub fn get_expired(&self) -> &::std::option::Option<bool> {
|
444 + | &self.expired
|
445 + | }
|
446 + | /// <p>The date the activation was created.</p>
|
447 + | pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
448 + | self.created_date = ::std::option::Option::Some(input);
|
449 + | self
|
450 + | }
|
451 + | /// <p>The date the activation was created.</p>
|
452 + | pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
453 + | self.created_date = input;
|
454 + | self
|
455 + | }
|
456 + | /// <p>The date the activation was created.</p>
|
457 + | pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
458 + | &self.created_date
|
459 + | }
|
460 + | /// Appends an item to `tags`.
|
461 + | ///
|
462 + | /// To override the contents of this collection use [`set_tags`](Self::set_tags).
|
463 + | ///
|
464 + | /// <p>Tags assigned to the activation.</p>
|
465 + | pub fn tags(mut self, input: crate::types::Tag) -> Self {
|
466 + | let mut v = self.tags.unwrap_or_default();
|
467 + | v.push(input);
|
468 + | self.tags = ::std::option::Option::Some(v);
|
469 + | self
|
470 + | }
|
471 + | /// <p>Tags assigned to the activation.</p>
|
472 + | pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
|
473 + | self.tags = input;
|
474 + | self
|
475 + | }
|
476 + | /// <p>Tags assigned to the activation.</p>
|
477 + | pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
|
478 + | &self.tags
|
479 + | }
|
480 + | /// Consumes the builder and constructs a [`Activation`](crate::types::Activation).
|
481 + | pub fn build(self) -> crate::types::Activation {
|
482 + | crate::types::Activation {
|
483 + | activation_id: self.activation_id,
|
484 + | description: self.description,
|
485 + | default_instance_name: self.default_instance_name,
|
486 + | iam_role: self.iam_role,
|
487 + | registration_limit: self.registration_limit,
|
488 + | registrations_count: self.registrations_count,
|
489 + | expiration_date: self.expiration_date,
|
490 + | expired: self.expired.unwrap_or_default(),
|
491 + | created_date: self.created_date,
|
492 + | tags: self.tags,
|
493 + | }
|
494 + | }
|
495 + | }
|