Skip to main content

aws_sdk_iot/types/
_provisioning_template_version_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A summary of information about a fleet provision template version.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ProvisioningTemplateVersionSummary {
7    /// <p>The ID of the fleet provisioning template version.</p>
8    pub version_id: ::std::option::Option<i32>,
9    /// <p>The date when the provisioning template version was created</p>
10    pub creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
11    /// <p>True if the provisioning template version is the default version, otherwise false.</p>
12    pub is_default_version: bool,
13}
14impl ProvisioningTemplateVersionSummary {
15    /// <p>The ID of the fleet provisioning template version.</p>
16    pub fn version_id(&self) -> ::std::option::Option<i32> {
17        self.version_id
18    }
19    /// <p>The date when the provisioning template version was created</p>
20    pub fn creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
21        self.creation_date.as_ref()
22    }
23    /// <p>True if the provisioning template version is the default version, otherwise false.</p>
24    pub fn is_default_version(&self) -> bool {
25        self.is_default_version
26    }
27}
28impl ProvisioningTemplateVersionSummary {
29    /// Creates a new builder-style object to manufacture [`ProvisioningTemplateVersionSummary`](crate::types::ProvisioningTemplateVersionSummary).
30    pub fn builder() -> crate::types::builders::ProvisioningTemplateVersionSummaryBuilder {
31        crate::types::builders::ProvisioningTemplateVersionSummaryBuilder::default()
32    }
33}
34
35/// A builder for [`ProvisioningTemplateVersionSummary`](crate::types::ProvisioningTemplateVersionSummary).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct ProvisioningTemplateVersionSummaryBuilder {
39    pub(crate) version_id: ::std::option::Option<i32>,
40    pub(crate) creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
41    pub(crate) is_default_version: ::std::option::Option<bool>,
42}
43impl ProvisioningTemplateVersionSummaryBuilder {
44    /// <p>The ID of the fleet provisioning template version.</p>
45    pub fn version_id(mut self, input: i32) -> Self {
46        self.version_id = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>The ID of the fleet provisioning template version.</p>
50    pub fn set_version_id(mut self, input: ::std::option::Option<i32>) -> Self {
51        self.version_id = input;
52        self
53    }
54    /// <p>The ID of the fleet provisioning template version.</p>
55    pub fn get_version_id(&self) -> &::std::option::Option<i32> {
56        &self.version_id
57    }
58    /// <p>The date when the provisioning template version was created</p>
59    pub fn creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
60        self.creation_date = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The date when the provisioning template version was created</p>
64    pub fn set_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
65        self.creation_date = input;
66        self
67    }
68    /// <p>The date when the provisioning template version was created</p>
69    pub fn get_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
70        &self.creation_date
71    }
72    /// <p>True if the provisioning template version is the default version, otherwise false.</p>
73    pub fn is_default_version(mut self, input: bool) -> Self {
74        self.is_default_version = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>True if the provisioning template version is the default version, otherwise false.</p>
78    pub fn set_is_default_version(mut self, input: ::std::option::Option<bool>) -> Self {
79        self.is_default_version = input;
80        self
81    }
82    /// <p>True if the provisioning template version is the default version, otherwise false.</p>
83    pub fn get_is_default_version(&self) -> &::std::option::Option<bool> {
84        &self.is_default_version
85    }
86    /// Consumes the builder and constructs a [`ProvisioningTemplateVersionSummary`](crate::types::ProvisioningTemplateVersionSummary).
87    pub fn build(self) -> crate::types::ProvisioningTemplateVersionSummary {
88        crate::types::ProvisioningTemplateVersionSummary {
89            version_id: self.version_id,
90            creation_date: self.creation_date,
91            is_default_version: self.is_default_version.unwrap_or_default(),
92        }
93    }
94}