aws_sdk_iot/types/
_job_template_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>An object that contains information about the job template.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct JobTemplateSummary {
7    /// <p>The ARN of the job template.</p>
8    pub job_template_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The unique identifier of the job template.</p>
10    pub job_template_id: ::std::option::Option<::std::string::String>,
11    /// <p>A description of the job template.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13    /// <p>The time, in seconds since the epoch, when the job template was created.</p>
14    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
15}
16impl JobTemplateSummary {
17    /// <p>The ARN of the job template.</p>
18    pub fn job_template_arn(&self) -> ::std::option::Option<&str> {
19        self.job_template_arn.as_deref()
20    }
21    /// <p>The unique identifier of the job template.</p>
22    pub fn job_template_id(&self) -> ::std::option::Option<&str> {
23        self.job_template_id.as_deref()
24    }
25    /// <p>A description of the job template.</p>
26    pub fn description(&self) -> ::std::option::Option<&str> {
27        self.description.as_deref()
28    }
29    /// <p>The time, in seconds since the epoch, when the job template was created.</p>
30    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31        self.created_at.as_ref()
32    }
33}
34impl JobTemplateSummary {
35    /// Creates a new builder-style object to manufacture [`JobTemplateSummary`](crate::types::JobTemplateSummary).
36    pub fn builder() -> crate::types::builders::JobTemplateSummaryBuilder {
37        crate::types::builders::JobTemplateSummaryBuilder::default()
38    }
39}
40
41/// A builder for [`JobTemplateSummary`](crate::types::JobTemplateSummary).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct JobTemplateSummaryBuilder {
45    pub(crate) job_template_arn: ::std::option::Option<::std::string::String>,
46    pub(crate) job_template_id: ::std::option::Option<::std::string::String>,
47    pub(crate) description: ::std::option::Option<::std::string::String>,
48    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
49}
50impl JobTemplateSummaryBuilder {
51    /// <p>The ARN of the job template.</p>
52    pub fn job_template_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.job_template_arn = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The ARN of the job template.</p>
57    pub fn set_job_template_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.job_template_arn = input;
59        self
60    }
61    /// <p>The ARN of the job template.</p>
62    pub fn get_job_template_arn(&self) -> &::std::option::Option<::std::string::String> {
63        &self.job_template_arn
64    }
65    /// <p>The unique identifier of the job template.</p>
66    pub fn job_template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.job_template_id = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The unique identifier of the job template.</p>
71    pub fn set_job_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.job_template_id = input;
73        self
74    }
75    /// <p>The unique identifier of the job template.</p>
76    pub fn get_job_template_id(&self) -> &::std::option::Option<::std::string::String> {
77        &self.job_template_id
78    }
79    /// <p>A description of the job template.</p>
80    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.description = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>A description of the job template.</p>
85    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.description = input;
87        self
88    }
89    /// <p>A description of the job template.</p>
90    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.description
92    }
93    /// <p>The time, in seconds since the epoch, when the job template was created.</p>
94    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
95        self.created_at = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The time, in seconds since the epoch, when the job template was created.</p>
99    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
100        self.created_at = input;
101        self
102    }
103    /// <p>The time, in seconds since the epoch, when the job template was created.</p>
104    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
105        &self.created_at
106    }
107    /// Consumes the builder and constructs a [`JobTemplateSummary`](crate::types::JobTemplateSummary).
108    pub fn build(self) -> crate::types::JobTemplateSummary {
109        crate::types::JobTemplateSummary {
110            job_template_arn: self.job_template_arn,
111            job_template_id: self.job_template_id,
112            description: self.description,
113            created_at: self.created_at,
114        }
115    }
116}