aws_sdk_iot/operation/create_provisioning_template_version/
_create_provisioning_template_version_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateProvisioningTemplateVersionOutput {
6    /// <p>The ARN that identifies the provisioning template.</p>
7    pub template_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the provisioning template.</p>
9    pub template_name: ::std::option::Option<::std::string::String>,
10    /// <p>The version of the provisioning template.</p>
11    pub version_id: ::std::option::Option<i32>,
12    /// <p>True if the provisioning template version is the default version, otherwise false.</p>
13    pub is_default_version: bool,
14    _request_id: Option<String>,
15}
16impl CreateProvisioningTemplateVersionOutput {
17    /// <p>The ARN that identifies the provisioning template.</p>
18    pub fn template_arn(&self) -> ::std::option::Option<&str> {
19        self.template_arn.as_deref()
20    }
21    /// <p>The name of the provisioning template.</p>
22    pub fn template_name(&self) -> ::std::option::Option<&str> {
23        self.template_name.as_deref()
24    }
25    /// <p>The version of the provisioning template.</p>
26    pub fn version_id(&self) -> ::std::option::Option<i32> {
27        self.version_id
28    }
29    /// <p>True if the provisioning template version is the default version, otherwise false.</p>
30    pub fn is_default_version(&self) -> bool {
31        self.is_default_version
32    }
33}
34impl ::aws_types::request_id::RequestId for CreateProvisioningTemplateVersionOutput {
35    fn request_id(&self) -> Option<&str> {
36        self._request_id.as_deref()
37    }
38}
39impl CreateProvisioningTemplateVersionOutput {
40    /// Creates a new builder-style object to manufacture [`CreateProvisioningTemplateVersionOutput`](crate::operation::create_provisioning_template_version::CreateProvisioningTemplateVersionOutput).
41    pub fn builder() -> crate::operation::create_provisioning_template_version::builders::CreateProvisioningTemplateVersionOutputBuilder {
42        crate::operation::create_provisioning_template_version::builders::CreateProvisioningTemplateVersionOutputBuilder::default()
43    }
44}
45
46/// A builder for [`CreateProvisioningTemplateVersionOutput`](crate::operation::create_provisioning_template_version::CreateProvisioningTemplateVersionOutput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct CreateProvisioningTemplateVersionOutputBuilder {
50    pub(crate) template_arn: ::std::option::Option<::std::string::String>,
51    pub(crate) template_name: ::std::option::Option<::std::string::String>,
52    pub(crate) version_id: ::std::option::Option<i32>,
53    pub(crate) is_default_version: ::std::option::Option<bool>,
54    _request_id: Option<String>,
55}
56impl CreateProvisioningTemplateVersionOutputBuilder {
57    /// <p>The ARN that identifies the provisioning template.</p>
58    pub fn template_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.template_arn = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The ARN that identifies the provisioning template.</p>
63    pub fn set_template_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.template_arn = input;
65        self
66    }
67    /// <p>The ARN that identifies the provisioning template.</p>
68    pub fn get_template_arn(&self) -> &::std::option::Option<::std::string::String> {
69        &self.template_arn
70    }
71    /// <p>The name of the provisioning template.</p>
72    pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.template_name = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The name of the provisioning template.</p>
77    pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.template_name = input;
79        self
80    }
81    /// <p>The name of the provisioning template.</p>
82    pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
83        &self.template_name
84    }
85    /// <p>The version of the provisioning template.</p>
86    pub fn version_id(mut self, input: i32) -> Self {
87        self.version_id = ::std::option::Option::Some(input);
88        self
89    }
90    /// <p>The version of the provisioning template.</p>
91    pub fn set_version_id(mut self, input: ::std::option::Option<i32>) -> Self {
92        self.version_id = input;
93        self
94    }
95    /// <p>The version of the provisioning template.</p>
96    pub fn get_version_id(&self) -> &::std::option::Option<i32> {
97        &self.version_id
98    }
99    /// <p>True if the provisioning template version is the default version, otherwise false.</p>
100    pub fn is_default_version(mut self, input: bool) -> Self {
101        self.is_default_version = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>True if the provisioning template version is the default version, otherwise false.</p>
105    pub fn set_is_default_version(mut self, input: ::std::option::Option<bool>) -> Self {
106        self.is_default_version = input;
107        self
108    }
109    /// <p>True if the provisioning template version is the default version, otherwise false.</p>
110    pub fn get_is_default_version(&self) -> &::std::option::Option<bool> {
111        &self.is_default_version
112    }
113    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
114        self._request_id = Some(request_id.into());
115        self
116    }
117
118    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
119        self._request_id = request_id;
120        self
121    }
122    /// Consumes the builder and constructs a [`CreateProvisioningTemplateVersionOutput`](crate::operation::create_provisioning_template_version::CreateProvisioningTemplateVersionOutput).
123    pub fn build(self) -> crate::operation::create_provisioning_template_version::CreateProvisioningTemplateVersionOutput {
124        crate::operation::create_provisioning_template_version::CreateProvisioningTemplateVersionOutput {
125            template_arn: self.template_arn,
126            template_name: self.template_name,
127            version_id: self.version_id,
128            is_default_version: self.is_default_version.unwrap_or_default(),
129            _request_id: self._request_id,
130        }
131    }
132}