/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.iot.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* The Job object contains details about a job. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Job implements Serializable, Cloneable, StructuredPojo { /** *

* An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId". *

*/ private String jobArn; /** *

* The unique identifier you assigned to this job when it was created. *

*/ private String jobId; /** *

* Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified * as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is * detected in a target. For example, a job will run on a device when the thing representing the device is added to * a target group, even after the job was completed by all things originally in the group. *

* *

* We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using * continuous jobs, devices that join the group receive the job execution even after the job has been created. *

*
*/ private String targetSelection; /** *

* The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS * or COMPLETED. *

*/ private String status; /** *

* Will be true if the job was canceled with the optional force parameter set to * true. *

*/ private Boolean forceCanceled; /** *

* If the job was updated, provides the reason code for the update. *

*/ private String reasonCode; /** *

* If the job was updated, describes the reason for the update. *

*/ private String comment; /** *

* A list of IoT things and thing groups to which the job should be sent. *

*/ private java.util.List targets; /** *

* A short text description of the job. *

*/ private String description; /** *

* Configuration for pre-signed S3 URLs. *

*/ private PresignedUrlConfig presignedUrlConfig; /** *

* Allows you to create a staged rollout of a job. *

*/ private JobExecutionsRolloutConfig jobExecutionsRolloutConfig; /** *

* Configuration for criteria to abort the job. *

*/ private AbortConfig abortConfig; /** *

* The time, in seconds since the epoch, when the job was created. *

*/ private java.util.Date createdAt; /** *

* The time, in seconds since the epoch, when the job was last updated. *

*/ private java.util.Date lastUpdatedAt; /** *

* The time, in seconds since the epoch, when the job was completed. *

*/ private java.util.Date completedAt; /** *

* Details about the job process. *

*/ private JobProcessDetails jobProcessDetails; /** *

* Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job * execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal * state before the timer expires, it will be automatically set to TIMED_OUT. *

*/ private TimeoutConfig timeoutConfig; /** *

* The namespace used to indicate that a job is a customer-managed job. *

*

* 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. *

*

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

* *

* The namespaceId feature is in public preview. *

*
*/ private String namespaceId; /** *

* The ARN of the job template used to create the job. *

*/ private String jobTemplateArn; /** *

* The configuration for the criteria to retry the job. *

*/ private JobExecutionsRetryConfig jobExecutionsRetryConfig; /** *

* A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You * can use the description of each key as a guidance to specify the inputs during runtime when creating a job. *

* *

* documentParameters can only be used when creating jobs from Amazon Web Services managed templates. * This parameter can't be used with custom job templates or to create jobs from them. *

*
*/ private java.util.Map documentParameters; /** *

* Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling * previously created executions, otherwise false. *

*/ private Boolean isConcurrent; /** *

* The configuration that allows you to schedule a job for a future date and time in addition to specifying the end * behavior for each job execution. *

*/ private SchedulingConfig schedulingConfig; /** *

* Displays the next seven maintenance window occurrences and their start times. *

*/ private java.util.List scheduledJobRollouts; /** *

* The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully * completes. *

*

* Note:The following Length Constraints relates to a single string. Up to five strings are allowed. *

*/ private java.util.List destinationPackageVersions; /** *

* An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId". *

* * @param jobArn * An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId". */ public void setJobArn(String jobArn) { this.jobArn = jobArn; } /** *

* An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId". *

* * @return An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId". */ public String getJobArn() { return this.jobArn; } /** *

* An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId". *

* * @param jobArn * An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId". * @return Returns a reference to this object so that method calls can be chained together. */ public Job withJobArn(String jobArn) { setJobArn(jobArn); return this; } /** *

* The unique identifier you assigned to this job when it was created. *

* * @param jobId * The unique identifier you assigned to this job when it was created. */ public void setJobId(String jobId) { this.jobId = jobId; } /** *

* The unique identifier you assigned to this job when it was created. *

* * @return The unique identifier you assigned to this job when it was created. */ public String getJobId() { return this.jobId; } /** *

* The unique identifier you assigned to this job when it was created. *

* * @param jobId * The unique identifier you assigned to this job when it was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withJobId(String jobId) { setJobId(jobId); return this; } /** *

* Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified * as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is * detected in a target. For example, a job will run on a device when the thing representing the device is added to * a target group, even after the job was completed by all things originally in the group. *

* *

* We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using * continuous jobs, devices that join the group receive the job execution even after the job has been created. *

*
* * @param targetSelection * Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things * specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing * when a change is detected in a target. For example, a job will run on a device when the thing representing * the device is added to a target group, even after the job was completed by all things originally in the * group.

*

* We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By * using continuous jobs, devices that join the group receive the job execution even after the job has been * created. *

* @see TargetSelection */ public void setTargetSelection(String targetSelection) { this.targetSelection = targetSelection; } /** *

* Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified * as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is * detected in a target. For example, a job will run on a device when the thing representing the device is added to * a target group, even after the job was completed by all things originally in the group. *

* *

* We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using * continuous jobs, devices that join the group receive the job execution even after the job has been created. *

*
* * @return Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things * specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing * when a change is detected in a target. For example, a job will run on a device when the thing * representing the device is added to a target group, even after the job was completed by all things * originally in the group.

*

* We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By * using continuous jobs, devices that join the group receive the job execution even after the job has been * created. *

* @see TargetSelection */ public String getTargetSelection() { return this.targetSelection; } /** *

* Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified * as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is * detected in a target. For example, a job will run on a device when the thing representing the device is added to * a target group, even after the job was completed by all things originally in the group. *

* *

* We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using * continuous jobs, devices that join the group receive the job execution even after the job has been created. *

*
* * @param targetSelection * Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things * specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing * when a change is detected in a target. For example, a job will run on a device when the thing representing * the device is added to a target group, even after the job was completed by all things originally in the * group.

*

* We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By * using continuous jobs, devices that join the group receive the job execution even after the job has been * created. *

* @return Returns a reference to this object so that method calls can be chained together. * @see TargetSelection */ public Job withTargetSelection(String targetSelection) { setTargetSelection(targetSelection); return this; } /** *

* Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified * as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is * detected in a target. For example, a job will run on a device when the thing representing the device is added to * a target group, even after the job was completed by all things originally in the group. *

* *

* We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using * continuous jobs, devices that join the group receive the job execution even after the job has been created. *

*
* * @param targetSelection * Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things * specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing * when a change is detected in a target. For example, a job will run on a device when the thing representing * the device is added to a target group, even after the job was completed by all things originally in the * group.

*

* We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By * using continuous jobs, devices that join the group receive the job execution even after the job has been * created. *

* @return Returns a reference to this object so that method calls can be chained together. * @see TargetSelection */ public Job withTargetSelection(TargetSelection targetSelection) { this.targetSelection = targetSelection.toString(); return this; } /** *

* The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS * or COMPLETED. *

* * @param status * The status of the job, one of IN_PROGRESS, CANCELED, * DELETION_IN_PROGRESS or COMPLETED. * @see JobStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS * or COMPLETED. *

* * @return The status of the job, one of IN_PROGRESS, CANCELED, * DELETION_IN_PROGRESS or COMPLETED. * @see JobStatus */ public String getStatus() { return this.status; } /** *

* The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS * or COMPLETED. *

* * @param status * The status of the job, one of IN_PROGRESS, CANCELED, * DELETION_IN_PROGRESS or COMPLETED. * @return Returns a reference to this object so that method calls can be chained together. * @see JobStatus */ public Job withStatus(String status) { setStatus(status); return this; } /** *

* The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS * or COMPLETED. *

* * @param status * The status of the job, one of IN_PROGRESS, CANCELED, * DELETION_IN_PROGRESS or COMPLETED. * @return Returns a reference to this object so that method calls can be chained together. * @see JobStatus */ public Job withStatus(JobStatus status) { this.status = status.toString(); return this; } /** *

* Will be true if the job was canceled with the optional force parameter set to * true. *

* * @param forceCanceled * Will be true if the job was canceled with the optional force parameter set to * true. */ public void setForceCanceled(Boolean forceCanceled) { this.forceCanceled = forceCanceled; } /** *

* Will be true if the job was canceled with the optional force parameter set to * true. *

* * @return Will be true if the job was canceled with the optional force parameter set to * true. */ public Boolean getForceCanceled() { return this.forceCanceled; } /** *

* Will be true if the job was canceled with the optional force parameter set to * true. *

* * @param forceCanceled * Will be true if the job was canceled with the optional force parameter set to * true. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withForceCanceled(Boolean forceCanceled) { setForceCanceled(forceCanceled); return this; } /** *

* Will be true if the job was canceled with the optional force parameter set to * true. *

* * @return Will be true if the job was canceled with the optional force parameter set to * true. */ public Boolean isForceCanceled() { return this.forceCanceled; } /** *

* If the job was updated, provides the reason code for the update. *

* * @param reasonCode * If the job was updated, provides the reason code for the update. */ public void setReasonCode(String reasonCode) { this.reasonCode = reasonCode; } /** *

* If the job was updated, provides the reason code for the update. *

* * @return If the job was updated, provides the reason code for the update. */ public String getReasonCode() { return this.reasonCode; } /** *

* If the job was updated, provides the reason code for the update. *

* * @param reasonCode * If the job was updated, provides the reason code for the update. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withReasonCode(String reasonCode) { setReasonCode(reasonCode); return this; } /** *

* If the job was updated, describes the reason for the update. *

* * @param comment * If the job was updated, describes the reason for the update. */ public void setComment(String comment) { this.comment = comment; } /** *

* If the job was updated, describes the reason for the update. *

* * @return If the job was updated, describes the reason for the update. */ public String getComment() { return this.comment; } /** *

* If the job was updated, describes the reason for the update. *

* * @param comment * If the job was updated, describes the reason for the update. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withComment(String comment) { setComment(comment); return this; } /** *

* A list of IoT things and thing groups to which the job should be sent. *

* * @return A list of IoT things and thing groups to which the job should be sent. */ public java.util.List getTargets() { return targets; } /** *

* A list of IoT things and thing groups to which the job should be sent. *

* * @param targets * A list of IoT things and thing groups to which the job should be sent. */ public void setTargets(java.util.Collection targets) { if (targets == null) { this.targets = null; return; } this.targets = new java.util.ArrayList(targets); } /** *

* A list of IoT things and thing groups to which the job should be sent. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTargets(java.util.Collection)} or {@link #withTargets(java.util.Collection)} if you want to override * the existing values. *

* * @param targets * A list of IoT things and thing groups to which the job should be sent. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withTargets(String... targets) { if (this.targets == null) { setTargets(new java.util.ArrayList(targets.length)); } for (String ele : targets) { this.targets.add(ele); } return this; } /** *

* A list of IoT things and thing groups to which the job should be sent. *

* * @param targets * A list of IoT things and thing groups to which the job should be sent. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withTargets(java.util.Collection targets) { setTargets(targets); return this; } /** *

* A short text description of the job. *

* * @param description * A short text description of the job. */ public void setDescription(String description) { this.description = description; } /** *

* A short text description of the job. *

* * @return A short text description of the job. */ public String getDescription() { return this.description; } /** *

* A short text description of the job. *

* * @param description * A short text description of the job. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withDescription(String description) { setDescription(description); return this; } /** *

* Configuration for pre-signed S3 URLs. *

* * @param presignedUrlConfig * Configuration for pre-signed S3 URLs. */ public void setPresignedUrlConfig(PresignedUrlConfig presignedUrlConfig) { this.presignedUrlConfig = presignedUrlConfig; } /** *

* Configuration for pre-signed S3 URLs. *

* * @return Configuration for pre-signed S3 URLs. */ public PresignedUrlConfig getPresignedUrlConfig() { return this.presignedUrlConfig; } /** *

* Configuration for pre-signed S3 URLs. *

* * @param presignedUrlConfig * Configuration for pre-signed S3 URLs. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withPresignedUrlConfig(PresignedUrlConfig presignedUrlConfig) { setPresignedUrlConfig(presignedUrlConfig); return this; } /** *

* Allows you to create a staged rollout of a job. *

* * @param jobExecutionsRolloutConfig * Allows you to create a staged rollout of a job. */ public void setJobExecutionsRolloutConfig(JobExecutionsRolloutConfig jobExecutionsRolloutConfig) { this.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig; } /** *

* Allows you to create a staged rollout of a job. *

* * @return Allows you to create a staged rollout of a job. */ public JobExecutionsRolloutConfig getJobExecutionsRolloutConfig() { return this.jobExecutionsRolloutConfig; } /** *

* Allows you to create a staged rollout of a job. *

* * @param jobExecutionsRolloutConfig * Allows you to create a staged rollout of a job. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withJobExecutionsRolloutConfig(JobExecutionsRolloutConfig jobExecutionsRolloutConfig) { setJobExecutionsRolloutConfig(jobExecutionsRolloutConfig); return this; } /** *

* Configuration for criteria to abort the job. *

* * @param abortConfig * Configuration for criteria to abort the job. */ public void setAbortConfig(AbortConfig abortConfig) { this.abortConfig = abortConfig; } /** *

* Configuration for criteria to abort the job. *

* * @return Configuration for criteria to abort the job. */ public AbortConfig getAbortConfig() { return this.abortConfig; } /** *

* Configuration for criteria to abort the job. *

* * @param abortConfig * Configuration for criteria to abort the job. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withAbortConfig(AbortConfig abortConfig) { setAbortConfig(abortConfig); return this; } /** *

* The time, in seconds since the epoch, when the job was created. *

* * @param createdAt * The time, in seconds since the epoch, when the job was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* The time, in seconds since the epoch, when the job was created. *

* * @return The time, in seconds since the epoch, when the job was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

* The time, in seconds since the epoch, when the job was created. *

* * @param createdAt * The time, in seconds since the epoch, when the job was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** *

* The time, in seconds since the epoch, when the job was last updated. *

* * @param lastUpdatedAt * The time, in seconds since the epoch, when the job was last updated. */ public void setLastUpdatedAt(java.util.Date lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; } /** *

* The time, in seconds since the epoch, when the job was last updated. *

* * @return The time, in seconds since the epoch, when the job was last updated. */ public java.util.Date getLastUpdatedAt() { return this.lastUpdatedAt; } /** *

* The time, in seconds since the epoch, when the job was last updated. *

* * @param lastUpdatedAt * The time, in seconds since the epoch, when the job was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withLastUpdatedAt(java.util.Date lastUpdatedAt) { setLastUpdatedAt(lastUpdatedAt); return this; } /** *

* The time, in seconds since the epoch, when the job was completed. *

* * @param completedAt * The time, in seconds since the epoch, when the job was completed. */ public void setCompletedAt(java.util.Date completedAt) { this.completedAt = completedAt; } /** *

* The time, in seconds since the epoch, when the job was completed. *

* * @return The time, in seconds since the epoch, when the job was completed. */ public java.util.Date getCompletedAt() { return this.completedAt; } /** *

* The time, in seconds since the epoch, when the job was completed. *

* * @param completedAt * The time, in seconds since the epoch, when the job was completed. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withCompletedAt(java.util.Date completedAt) { setCompletedAt(completedAt); return this; } /** *

* Details about the job process. *

* * @param jobProcessDetails * Details about the job process. */ public void setJobProcessDetails(JobProcessDetails jobProcessDetails) { this.jobProcessDetails = jobProcessDetails; } /** *

* Details about the job process. *

* * @return Details about the job process. */ public JobProcessDetails getJobProcessDetails() { return this.jobProcessDetails; } /** *

* Details about the job process. *

* * @param jobProcessDetails * Details about the job process. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withJobProcessDetails(JobProcessDetails jobProcessDetails) { setJobProcessDetails(jobProcessDetails); return this; } /** *

* Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job * execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal * state before the timer expires, it will be automatically set to TIMED_OUT. *

* * @param timeoutConfig * Specifies the amount of time each device has to finish its execution of the job. A timer is started when * the job execution status is set to IN_PROGRESS. If the job execution status is not set to * another terminal state before the timer expires, it will be automatically set to TIMED_OUT. */ public void setTimeoutConfig(TimeoutConfig timeoutConfig) { this.timeoutConfig = timeoutConfig; } /** *

* Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job * execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal * state before the timer expires, it will be automatically set to TIMED_OUT. *

* * @return Specifies the amount of time each device has to finish its execution of the job. A timer is started when * the job execution status is set to IN_PROGRESS. If the job execution status is not set to * another terminal state before the timer expires, it will be automatically set to TIMED_OUT. */ public TimeoutConfig getTimeoutConfig() { return this.timeoutConfig; } /** *

* Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job * execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal * state before the timer expires, it will be automatically set to TIMED_OUT. *

* * @param timeoutConfig * Specifies the amount of time each device has to finish its execution of the job. A timer is started when * the job execution status is set to IN_PROGRESS. If the job execution status is not set to * another terminal state before the timer expires, it will be automatically set to TIMED_OUT. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withTimeoutConfig(TimeoutConfig timeoutConfig) { setTimeoutConfig(timeoutConfig); return this; } /** *

* The namespace used to indicate that a job is a customer-managed job. *

*

* 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. *

*

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

* *

* The namespaceId feature is in public preview. *

*
* * @param namespaceId * The namespace used to indicate that a job is a customer-managed job.

*

* 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. *

*

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

* *

* The namespaceId feature is in public preview. *

*/ public void setNamespaceId(String namespaceId) { this.namespaceId = namespaceId; } /** *

* The namespace used to indicate that a job is a customer-managed job. *

*

* 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. *

*

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

* *

* The namespaceId feature is in public preview. *

*
* * @return The namespace used to indicate that a job is a customer-managed job.

*

* 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. *

*

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

* *

* The namespaceId feature is in public preview. *

*/ public String getNamespaceId() { return this.namespaceId; } /** *

* The namespace used to indicate that a job is a customer-managed job. *

*

* 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. *

*

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

* *

* The namespaceId feature is in public preview. *

*
* * @param namespaceId * The namespace used to indicate that a job is a customer-managed job.

*

* 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. *

*

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

* *

* The namespaceId feature is in public preview. *

* @return Returns a reference to this object so that method calls can be chained together. */ public Job withNamespaceId(String namespaceId) { setNamespaceId(namespaceId); return this; } /** *

* The ARN of the job template used to create the job. *

* * @param jobTemplateArn * The ARN of the job template used to create the job. */ public void setJobTemplateArn(String jobTemplateArn) { this.jobTemplateArn = jobTemplateArn; } /** *

* The ARN of the job template used to create the job. *

* * @return The ARN of the job template used to create the job. */ public String getJobTemplateArn() { return this.jobTemplateArn; } /** *

* The ARN of the job template used to create the job. *

* * @param jobTemplateArn * The ARN of the job template used to create the job. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withJobTemplateArn(String jobTemplateArn) { setJobTemplateArn(jobTemplateArn); return this; } /** *

* The configuration for the criteria to retry the job. *

* * @param jobExecutionsRetryConfig * The configuration for the criteria to retry the job. */ public void setJobExecutionsRetryConfig(JobExecutionsRetryConfig jobExecutionsRetryConfig) { this.jobExecutionsRetryConfig = jobExecutionsRetryConfig; } /** *

* The configuration for the criteria to retry the job. *

* * @return The configuration for the criteria to retry the job. */ public JobExecutionsRetryConfig getJobExecutionsRetryConfig() { return this.jobExecutionsRetryConfig; } /** *

* The configuration for the criteria to retry the job. *

* * @param jobExecutionsRetryConfig * The configuration for the criteria to retry the job. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withJobExecutionsRetryConfig(JobExecutionsRetryConfig jobExecutionsRetryConfig) { setJobExecutionsRetryConfig(jobExecutionsRetryConfig); return this; } /** *

* A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You * can use the description of each key as a guidance to specify the inputs during runtime when creating a job. *

* *

* documentParameters can only be used when creating jobs from Amazon Web Services managed templates. * This parameter can't be used with custom job templates or to create jobs from them. *

*
* * @return A key-value map that pairs the patterns that need to be replaced in a managed template job document * schema. You can use the description of each key as a guidance to specify the inputs during runtime when * creating a job.

*

* documentParameters can only be used when creating jobs from Amazon Web Services managed * templates. This parameter can't be used with custom job templates or to create jobs from them. *

*/ public java.util.Map getDocumentParameters() { return documentParameters; } /** *

* A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You * can use the description of each key as a guidance to specify the inputs during runtime when creating a job. *

* *

* documentParameters can only be used when creating jobs from Amazon Web Services managed templates. * This parameter can't be used with custom job templates or to create jobs from them. *

*
* * @param documentParameters * A key-value map that pairs the patterns that need to be replaced in a managed template job document * schema. You can use the description of each key as a guidance to specify the inputs during runtime when * creating a job.

*

* documentParameters can only be used when creating jobs from Amazon Web Services managed * templates. This parameter can't be used with custom job templates or to create jobs from them. *

*/ public void setDocumentParameters(java.util.Map documentParameters) { this.documentParameters = documentParameters; } /** *

* A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You * can use the description of each key as a guidance to specify the inputs during runtime when creating a job. *

* *

* documentParameters can only be used when creating jobs from Amazon Web Services managed templates. * This parameter can't be used with custom job templates or to create jobs from them. *

*
* * @param documentParameters * A key-value map that pairs the patterns that need to be replaced in a managed template job document * schema. You can use the description of each key as a guidance to specify the inputs during runtime when * creating a job.

*

* documentParameters can only be used when creating jobs from Amazon Web Services managed * templates. This parameter can't be used with custom job templates or to create jobs from them. *

* @return Returns a reference to this object so that method calls can be chained together. */ public Job withDocumentParameters(java.util.Map documentParameters) { setDocumentParameters(documentParameters); return this; } /** * Add a single DocumentParameters entry * * @see Job#withDocumentParameters * @returns a reference to this object so that method calls can be chained together. */ public Job addDocumentParametersEntry(String key, String value) { if (null == this.documentParameters) { this.documentParameters = new java.util.HashMap(); } if (this.documentParameters.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.documentParameters.put(key, value); return this; } /** * Removes all the entries added into DocumentParameters. * * @return Returns a reference to this object so that method calls can be chained together. */ public Job clearDocumentParametersEntries() { this.documentParameters = null; return this; } /** *

* Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling * previously created executions, otherwise false. *

* * @param isConcurrent * Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or * canceling previously created executions, otherwise false. */ public void setIsConcurrent(Boolean isConcurrent) { this.isConcurrent = isConcurrent; } /** *

* Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling * previously created executions, otherwise false. *

* * @return Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or * canceling previously created executions, otherwise false. */ public Boolean getIsConcurrent() { return this.isConcurrent; } /** *

* Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling * previously created executions, otherwise false. *

* * @param isConcurrent * Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or * canceling previously created executions, otherwise false. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withIsConcurrent(Boolean isConcurrent) { setIsConcurrent(isConcurrent); return this; } /** *

* Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling * previously created executions, otherwise false. *

* * @return Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or * canceling previously created executions, otherwise false. */ public Boolean isConcurrent() { return this.isConcurrent; } /** *

* The configuration that allows you to schedule a job for a future date and time in addition to specifying the end * behavior for each job execution. *

* * @param schedulingConfig * The configuration that allows you to schedule a job for a future date and time in addition to specifying * the end behavior for each job execution. */ public void setSchedulingConfig(SchedulingConfig schedulingConfig) { this.schedulingConfig = schedulingConfig; } /** *

* The configuration that allows you to schedule a job for a future date and time in addition to specifying the end * behavior for each job execution. *

* * @return The configuration that allows you to schedule a job for a future date and time in addition to specifying * the end behavior for each job execution. */ public SchedulingConfig getSchedulingConfig() { return this.schedulingConfig; } /** *

* The configuration that allows you to schedule a job for a future date and time in addition to specifying the end * behavior for each job execution. *

* * @param schedulingConfig * The configuration that allows you to schedule a job for a future date and time in addition to specifying * the end behavior for each job execution. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withSchedulingConfig(SchedulingConfig schedulingConfig) { setSchedulingConfig(schedulingConfig); return this; } /** *

* Displays the next seven maintenance window occurrences and their start times. *

* * @return Displays the next seven maintenance window occurrences and their start times. */ public java.util.List getScheduledJobRollouts() { return scheduledJobRollouts; } /** *

* Displays the next seven maintenance window occurrences and their start times. *

* * @param scheduledJobRollouts * Displays the next seven maintenance window occurrences and their start times. */ public void setScheduledJobRollouts(java.util.Collection scheduledJobRollouts) { if (scheduledJobRollouts == null) { this.scheduledJobRollouts = null; return; } this.scheduledJobRollouts = new java.util.ArrayList(scheduledJobRollouts); } /** *

* Displays the next seven maintenance window occurrences and their start times. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setScheduledJobRollouts(java.util.Collection)} or {@link #withScheduledJobRollouts(java.util.Collection)} * if you want to override the existing values. *

* * @param scheduledJobRollouts * Displays the next seven maintenance window occurrences and their start times. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withScheduledJobRollouts(ScheduledJobRollout... scheduledJobRollouts) { if (this.scheduledJobRollouts == null) { setScheduledJobRollouts(new java.util.ArrayList(scheduledJobRollouts.length)); } for (ScheduledJobRollout ele : scheduledJobRollouts) { this.scheduledJobRollouts.add(ele); } return this; } /** *

* Displays the next seven maintenance window occurrences and their start times. *

* * @param scheduledJobRollouts * Displays the next seven maintenance window occurrences and their start times. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withScheduledJobRollouts(java.util.Collection scheduledJobRollouts) { setScheduledJobRollouts(scheduledJobRollouts); return this; } /** *

* The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully * completes. *

*

* Note:The following Length Constraints relates to a single string. Up to five strings are allowed. *

* * @return The package version Amazon Resource Names (ARNs) that are installed on the device when the job * successfully completes.

*

* Note:The following Length Constraints relates to a single string. Up to five strings are allowed. */ public java.util.List getDestinationPackageVersions() { return destinationPackageVersions; } /** *

* The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully * completes. *

*

* Note:The following Length Constraints relates to a single string. Up to five strings are allowed. *

* * @param destinationPackageVersions * The package version Amazon Resource Names (ARNs) that are installed on the device when the job * successfully completes.

*

* Note:The following Length Constraints relates to a single string. Up to five strings are allowed. */ public void setDestinationPackageVersions(java.util.Collection destinationPackageVersions) { if (destinationPackageVersions == null) { this.destinationPackageVersions = null; return; } this.destinationPackageVersions = new java.util.ArrayList(destinationPackageVersions); } /** *

* The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully * completes. *

*

* Note:The following Length Constraints relates to a single string. Up to five strings are allowed. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDestinationPackageVersions(java.util.Collection)} or * {@link #withDestinationPackageVersions(java.util.Collection)} if you want to override the existing values. *

* * @param destinationPackageVersions * The package version Amazon Resource Names (ARNs) that are installed on the device when the job * successfully completes.

*

* Note:The following Length Constraints relates to a single string. Up to five strings are allowed. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withDestinationPackageVersions(String... destinationPackageVersions) { if (this.destinationPackageVersions == null) { setDestinationPackageVersions(new java.util.ArrayList(destinationPackageVersions.length)); } for (String ele : destinationPackageVersions) { this.destinationPackageVersions.add(ele); } return this; } /** *

* The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully * completes. *

*

* Note:The following Length Constraints relates to a single string. Up to five strings are allowed. *

* * @param destinationPackageVersions * The package version Amazon Resource Names (ARNs) that are installed on the device when the job * successfully completes.

*

* Note:The following Length Constraints relates to a single string. Up to five strings are allowed. * @return Returns a reference to this object so that method calls can be chained together. */ public Job withDestinationPackageVersions(java.util.Collection destinationPackageVersions) { setDestinationPackageVersions(destinationPackageVersions); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getJobArn() != null) sb.append("JobArn: ").append(getJobArn()).append(","); if (getJobId() != null) sb.append("JobId: ").append(getJobId()).append(","); if (getTargetSelection() != null) sb.append("TargetSelection: ").append(getTargetSelection()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getForceCanceled() != null) sb.append("ForceCanceled: ").append(getForceCanceled()).append(","); if (getReasonCode() != null) sb.append("ReasonCode: ").append(getReasonCode()).append(","); if (getComment() != null) sb.append("Comment: ").append(getComment()).append(","); if (getTargets() != null) sb.append("Targets: ").append(getTargets()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getPresignedUrlConfig() != null) sb.append("PresignedUrlConfig: ").append(getPresignedUrlConfig()).append(","); if (getJobExecutionsRolloutConfig() != null) sb.append("JobExecutionsRolloutConfig: ").append(getJobExecutionsRolloutConfig()).append(","); if (getAbortConfig() != null) sb.append("AbortConfig: ").append(getAbortConfig()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getLastUpdatedAt() != null) sb.append("LastUpdatedAt: ").append(getLastUpdatedAt()).append(","); if (getCompletedAt() != null) sb.append("CompletedAt: ").append(getCompletedAt()).append(","); if (getJobProcessDetails() != null) sb.append("JobProcessDetails: ").append(getJobProcessDetails()).append(","); if (getTimeoutConfig() != null) sb.append("TimeoutConfig: ").append(getTimeoutConfig()).append(","); if (getNamespaceId() != null) sb.append("NamespaceId: ").append(getNamespaceId()).append(","); if (getJobTemplateArn() != null) sb.append("JobTemplateArn: ").append(getJobTemplateArn()).append(","); if (getJobExecutionsRetryConfig() != null) sb.append("JobExecutionsRetryConfig: ").append(getJobExecutionsRetryConfig()).append(","); if (getDocumentParameters() != null) sb.append("DocumentParameters: ").append(getDocumentParameters()).append(","); if (getIsConcurrent() != null) sb.append("IsConcurrent: ").append(getIsConcurrent()).append(","); if (getSchedulingConfig() != null) sb.append("SchedulingConfig: ").append(getSchedulingConfig()).append(","); if (getScheduledJobRollouts() != null) sb.append("ScheduledJobRollouts: ").append(getScheduledJobRollouts()).append(","); if (getDestinationPackageVersions() != null) sb.append("DestinationPackageVersions: ").append(getDestinationPackageVersions()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Job == false) return false; Job other = (Job) obj; if (other.getJobArn() == null ^ this.getJobArn() == null) return false; if (other.getJobArn() != null && other.getJobArn().equals(this.getJobArn()) == false) return false; if (other.getJobId() == null ^ this.getJobId() == null) return false; if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false) return false; if (other.getTargetSelection() == null ^ this.getTargetSelection() == null) return false; if (other.getTargetSelection() != null && other.getTargetSelection().equals(this.getTargetSelection()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getForceCanceled() == null ^ this.getForceCanceled() == null) return false; if (other.getForceCanceled() != null && other.getForceCanceled().equals(this.getForceCanceled()) == false) return false; if (other.getReasonCode() == null ^ this.getReasonCode() == null) return false; if (other.getReasonCode() != null && other.getReasonCode().equals(this.getReasonCode()) == false) return false; if (other.getComment() == null ^ this.getComment() == null) return false; if (other.getComment() != null && other.getComment().equals(this.getComment()) == false) return false; if (other.getTargets() == null ^ this.getTargets() == null) return false; if (other.getTargets() != null && other.getTargets().equals(this.getTargets()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getPresignedUrlConfig() == null ^ this.getPresignedUrlConfig() == null) return false; if (other.getPresignedUrlConfig() != null && other.getPresignedUrlConfig().equals(this.getPresignedUrlConfig()) == false) return false; if (other.getJobExecutionsRolloutConfig() == null ^ this.getJobExecutionsRolloutConfig() == null) return false; if (other.getJobExecutionsRolloutConfig() != null && other.getJobExecutionsRolloutConfig().equals(this.getJobExecutionsRolloutConfig()) == false) return false; if (other.getAbortConfig() == null ^ this.getAbortConfig() == null) return false; if (other.getAbortConfig() != null && other.getAbortConfig().equals(this.getAbortConfig()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getLastUpdatedAt() == null ^ this.getLastUpdatedAt() == null) return false; if (other.getLastUpdatedAt() != null && other.getLastUpdatedAt().equals(this.getLastUpdatedAt()) == false) return false; if (other.getCompletedAt() == null ^ this.getCompletedAt() == null) return false; if (other.getCompletedAt() != null && other.getCompletedAt().equals(this.getCompletedAt()) == false) return false; if (other.getJobProcessDetails() == null ^ this.getJobProcessDetails() == null) return false; if (other.getJobProcessDetails() != null && other.getJobProcessDetails().equals(this.getJobProcessDetails()) == false) return false; if (other.getTimeoutConfig() == null ^ this.getTimeoutConfig() == null) return false; if (other.getTimeoutConfig() != null && other.getTimeoutConfig().equals(this.getTimeoutConfig()) == false) return false; if (other.getNamespaceId() == null ^ this.getNamespaceId() == null) return false; if (other.getNamespaceId() != null && other.getNamespaceId().equals(this.getNamespaceId()) == false) return false; if (other.getJobTemplateArn() == null ^ this.getJobTemplateArn() == null) return false; if (other.getJobTemplateArn() != null && other.getJobTemplateArn().equals(this.getJobTemplateArn()) == false) return false; if (other.getJobExecutionsRetryConfig() == null ^ this.getJobExecutionsRetryConfig() == null) return false; if (other.getJobExecutionsRetryConfig() != null && other.getJobExecutionsRetryConfig().equals(this.getJobExecutionsRetryConfig()) == false) return false; if (other.getDocumentParameters() == null ^ this.getDocumentParameters() == null) return false; if (other.getDocumentParameters() != null && other.getDocumentParameters().equals(this.getDocumentParameters()) == false) return false; if (other.getIsConcurrent() == null ^ this.getIsConcurrent() == null) return false; if (other.getIsConcurrent() != null && other.getIsConcurrent().equals(this.getIsConcurrent()) == false) return false; if (other.getSchedulingConfig() == null ^ this.getSchedulingConfig() == null) return false; if (other.getSchedulingConfig() != null && other.getSchedulingConfig().equals(this.getSchedulingConfig()) == false) return false; if (other.getScheduledJobRollouts() == null ^ this.getScheduledJobRollouts() == null) return false; if (other.getScheduledJobRollouts() != null && other.getScheduledJobRollouts().equals(this.getScheduledJobRollouts()) == false) return false; if (other.getDestinationPackageVersions() == null ^ this.getDestinationPackageVersions() == null) return false; if (other.getDestinationPackageVersions() != null && other.getDestinationPackageVersions().equals(this.getDestinationPackageVersions()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobArn() == null) ? 0 : getJobArn().hashCode()); hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode()); hashCode = prime * hashCode + ((getTargetSelection() == null) ? 0 : getTargetSelection().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getForceCanceled() == null) ? 0 : getForceCanceled().hashCode()); hashCode = prime * hashCode + ((getReasonCode() == null) ? 0 : getReasonCode().hashCode()); hashCode = prime * hashCode + ((getComment() == null) ? 0 : getComment().hashCode()); hashCode = prime * hashCode + ((getTargets() == null) ? 0 : getTargets().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getPresignedUrlConfig() == null) ? 0 : getPresignedUrlConfig().hashCode()); hashCode = prime * hashCode + ((getJobExecutionsRolloutConfig() == null) ? 0 : getJobExecutionsRolloutConfig().hashCode()); hashCode = prime * hashCode + ((getAbortConfig() == null) ? 0 : getAbortConfig().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getCompletedAt() == null) ? 0 : getCompletedAt().hashCode()); hashCode = prime * hashCode + ((getJobProcessDetails() == null) ? 0 : getJobProcessDetails().hashCode()); hashCode = prime * hashCode + ((getTimeoutConfig() == null) ? 0 : getTimeoutConfig().hashCode()); hashCode = prime * hashCode + ((getNamespaceId() == null) ? 0 : getNamespaceId().hashCode()); hashCode = prime * hashCode + ((getJobTemplateArn() == null) ? 0 : getJobTemplateArn().hashCode()); hashCode = prime * hashCode + ((getJobExecutionsRetryConfig() == null) ? 0 : getJobExecutionsRetryConfig().hashCode()); hashCode = prime * hashCode + ((getDocumentParameters() == null) ? 0 : getDocumentParameters().hashCode()); hashCode = prime * hashCode + ((getIsConcurrent() == null) ? 0 : getIsConcurrent().hashCode()); hashCode = prime * hashCode + ((getSchedulingConfig() == null) ? 0 : getSchedulingConfig().hashCode()); hashCode = prime * hashCode + ((getScheduledJobRollouts() == null) ? 0 : getScheduledJobRollouts().hashCode()); hashCode = prime * hashCode + ((getDestinationPackageVersions() == null) ? 0 : getDestinationPackageVersions().hashCode()); return hashCode; } @Override public Job clone() { try { return (Job) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.iot.model.transform.JobMarshaller.getInstance().marshall(this, protocolMarshaller); } }