aws_sdk_iot/operation/update_job/
_update_job_input.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateJobInput {
    /// <p>The ID of the job to be updated.</p>
    pub job_id: ::std::option::Option<::std::string::String>,
    /// <p>A short text description of the job.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Configuration information for pre-signed S3 URLs.</p>
    pub presigned_url_config: ::std::option::Option<crate::types::PresignedUrlConfig>,
    /// <p>Allows you to create a staged rollout of the job.</p>
    pub job_executions_rollout_config: ::std::option::Option<crate::types::JobExecutionsRolloutConfig>,
    /// <p>Allows you to create criteria to abort a job.</p>
    pub abort_config: ::std::option::Option<crate::types::AbortConfig>,
    /// <p>Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to <code>IN_PROGRESS</code>. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to <code>TIMED_OUT</code>.</p>
    pub timeout_config: ::std::option::Option<crate::types::TimeoutConfig>,
    /// <p>The namespace used to indicate that a job is a customer-managed job.</p>
    /// <p>When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.</p>
    /// <p><code>$aws/things/<i>THING_NAME</i>/jobs/<i>JOB_ID</i>/notify-namespace-<i>NAMESPACE_ID</i>/</code></p><note>
    /// <p>The <code>namespaceId</code> feature is only supported by IoT Greengrass at this time. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html">Setting up IoT Greengrass core devices.</a></p>
    /// </note>
    pub namespace_id: ::std::option::Option<::std::string::String>,
    /// <p>Allows you to create the criteria to retry a job.</p>
    pub job_executions_retry_config: ::std::option::Option<crate::types::JobExecutionsRetryConfig>,
}
impl UpdateJobInput {
    /// <p>The ID of the job to be updated.</p>
    pub fn job_id(&self) -> ::std::option::Option<&str> {
        self.job_id.as_deref()
    }
    /// <p>A short text description of the job.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Configuration information for pre-signed S3 URLs.</p>
    pub fn presigned_url_config(&self) -> ::std::option::Option<&crate::types::PresignedUrlConfig> {
        self.presigned_url_config.as_ref()
    }
    /// <p>Allows you to create a staged rollout of the job.</p>
    pub fn job_executions_rollout_config(&self) -> ::std::option::Option<&crate::types::JobExecutionsRolloutConfig> {
        self.job_executions_rollout_config.as_ref()
    }
    /// <p>Allows you to create criteria to abort a job.</p>
    pub fn abort_config(&self) -> ::std::option::Option<&crate::types::AbortConfig> {
        self.abort_config.as_ref()
    }
    /// <p>Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to <code>IN_PROGRESS</code>. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to <code>TIMED_OUT</code>.</p>
    pub fn timeout_config(&self) -> ::std::option::Option<&crate::types::TimeoutConfig> {
        self.timeout_config.as_ref()
    }
    /// <p>The namespace used to indicate that a job is a customer-managed job.</p>
    /// <p>When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.</p>
    /// <p><code>$aws/things/<i>THING_NAME</i>/jobs/<i>JOB_ID</i>/notify-namespace-<i>NAMESPACE_ID</i>/</code></p><note>
    /// <p>The <code>namespaceId</code> feature is only supported by IoT Greengrass at this time. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html">Setting up IoT Greengrass core devices.</a></p>
    /// </note>
    pub fn namespace_id(&self) -> ::std::option::Option<&str> {
        self.namespace_id.as_deref()
    }
    /// <p>Allows you to create the criteria to retry a job.</p>
    pub fn job_executions_retry_config(&self) -> ::std::option::Option<&crate::types::JobExecutionsRetryConfig> {
        self.job_executions_retry_config.as_ref()
    }
}
impl UpdateJobInput {
    /// Creates a new builder-style object to manufacture [`UpdateJobInput`](crate::operation::update_job::UpdateJobInput).
    pub fn builder() -> crate::operation::update_job::builders::UpdateJobInputBuilder {
        crate::operation::update_job::builders::UpdateJobInputBuilder::default()
    }
}

/// A builder for [`UpdateJobInput`](crate::operation::update_job::UpdateJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateJobInputBuilder {
    pub(crate) job_id: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) presigned_url_config: ::std::option::Option<crate::types::PresignedUrlConfig>,
    pub(crate) job_executions_rollout_config: ::std::option::Option<crate::types::JobExecutionsRolloutConfig>,
    pub(crate) abort_config: ::std::option::Option<crate::types::AbortConfig>,
    pub(crate) timeout_config: ::std::option::Option<crate::types::TimeoutConfig>,
    pub(crate) namespace_id: ::std::option::Option<::std::string::String>,
    pub(crate) job_executions_retry_config: ::std::option::Option<crate::types::JobExecutionsRetryConfig>,
}
impl UpdateJobInputBuilder {
    /// <p>The ID of the job to be updated.</p>
    /// This field is required.
    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.job_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the job to be updated.</p>
    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.job_id = input;
        self
    }
    /// <p>The ID of the job to be updated.</p>
    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_id
    }
    /// <p>A short text description of the job.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A short text description of the job.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A short text description of the job.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Configuration information for pre-signed S3 URLs.</p>
    pub fn presigned_url_config(mut self, input: crate::types::PresignedUrlConfig) -> Self {
        self.presigned_url_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration information for pre-signed S3 URLs.</p>
    pub fn set_presigned_url_config(mut self, input: ::std::option::Option<crate::types::PresignedUrlConfig>) -> Self {
        self.presigned_url_config = input;
        self
    }
    /// <p>Configuration information for pre-signed S3 URLs.</p>
    pub fn get_presigned_url_config(&self) -> &::std::option::Option<crate::types::PresignedUrlConfig> {
        &self.presigned_url_config
    }
    /// <p>Allows you to create a staged rollout of the job.</p>
    pub fn job_executions_rollout_config(mut self, input: crate::types::JobExecutionsRolloutConfig) -> Self {
        self.job_executions_rollout_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Allows you to create a staged rollout of the job.</p>
    pub fn set_job_executions_rollout_config(mut self, input: ::std::option::Option<crate::types::JobExecutionsRolloutConfig>) -> Self {
        self.job_executions_rollout_config = input;
        self
    }
    /// <p>Allows you to create a staged rollout of the job.</p>
    pub fn get_job_executions_rollout_config(&self) -> &::std::option::Option<crate::types::JobExecutionsRolloutConfig> {
        &self.job_executions_rollout_config
    }
    /// <p>Allows you to create criteria to abort a job.</p>
    pub fn abort_config(mut self, input: crate::types::AbortConfig) -> Self {
        self.abort_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Allows you to create criteria to abort a job.</p>
    pub fn set_abort_config(mut self, input: ::std::option::Option<crate::types::AbortConfig>) -> Self {
        self.abort_config = input;
        self
    }
    /// <p>Allows you to create criteria to abort a job.</p>
    pub fn get_abort_config(&self) -> &::std::option::Option<crate::types::AbortConfig> {
        &self.abort_config
    }
    /// <p>Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to <code>IN_PROGRESS</code>. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to <code>TIMED_OUT</code>.</p>
    pub fn timeout_config(mut self, input: crate::types::TimeoutConfig) -> Self {
        self.timeout_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to <code>IN_PROGRESS</code>. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to <code>TIMED_OUT</code>.</p>
    pub fn set_timeout_config(mut self, input: ::std::option::Option<crate::types::TimeoutConfig>) -> Self {
        self.timeout_config = input;
        self
    }
    /// <p>Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to <code>IN_PROGRESS</code>. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to <code>TIMED_OUT</code>.</p>
    pub fn get_timeout_config(&self) -> &::std::option::Option<crate::types::TimeoutConfig> {
        &self.timeout_config
    }
    /// <p>The namespace used to indicate that a job is a customer-managed job.</p>
    /// <p>When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.</p>
    /// <p><code>$aws/things/<i>THING_NAME</i>/jobs/<i>JOB_ID</i>/notify-namespace-<i>NAMESPACE_ID</i>/</code></p><note>
    /// <p>The <code>namespaceId</code> feature is only supported by IoT Greengrass at this time. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html">Setting up IoT Greengrass core devices.</a></p>
    /// </note>
    pub fn namespace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.namespace_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The namespace used to indicate that a job is a customer-managed job.</p>
    /// <p>When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.</p>
    /// <p><code>$aws/things/<i>THING_NAME</i>/jobs/<i>JOB_ID</i>/notify-namespace-<i>NAMESPACE_ID</i>/</code></p><note>
    /// <p>The <code>namespaceId</code> feature is only supported by IoT Greengrass at this time. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html">Setting up IoT Greengrass core devices.</a></p>
    /// </note>
    pub fn set_namespace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.namespace_id = input;
        self
    }
    /// <p>The namespace used to indicate that a job is a customer-managed job.</p>
    /// <p>When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.</p>
    /// <p><code>$aws/things/<i>THING_NAME</i>/jobs/<i>JOB_ID</i>/notify-namespace-<i>NAMESPACE_ID</i>/</code></p><note>
    /// <p>The <code>namespaceId</code> feature is only supported by IoT Greengrass at this time. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html">Setting up IoT Greengrass core devices.</a></p>
    /// </note>
    pub fn get_namespace_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.namespace_id
    }
    /// <p>Allows you to create the criteria to retry a job.</p>
    pub fn job_executions_retry_config(mut self, input: crate::types::JobExecutionsRetryConfig) -> Self {
        self.job_executions_retry_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Allows you to create the criteria to retry a job.</p>
    pub fn set_job_executions_retry_config(mut self, input: ::std::option::Option<crate::types::JobExecutionsRetryConfig>) -> Self {
        self.job_executions_retry_config = input;
        self
    }
    /// <p>Allows you to create the criteria to retry a job.</p>
    pub fn get_job_executions_retry_config(&self) -> &::std::option::Option<crate::types::JobExecutionsRetryConfig> {
        &self.job_executions_retry_config
    }
    /// Consumes the builder and constructs a [`UpdateJobInput`](crate::operation::update_job::UpdateJobInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_job::UpdateJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_job::UpdateJobInput {
            job_id: self.job_id,
            description: self.description,
            presigned_url_config: self.presigned_url_config,
            job_executions_rollout_config: self.job_executions_rollout_config,
            abort_config: self.abort_config,
            timeout_config: self.timeout_config,
            namespace_id: self.namespace_id,
            job_executions_retry_config: self.job_executions_retry_config,
        })
    }
}