/* * 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.AmazonWebServiceRequest; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateOTAUpdateRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The ID of the OTA update to be created. *
*/ private String otaUpdateId; /** ** The description of the OTA update. *
*/ private String description; /** ** The devices targeted to receive OTA updates. *
*/ private java.util.List* The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP * and MQTT are specified, the target device can choose the protocol. *
*/ private java.util.List* Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things * specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a thing * when a change is detected in a target. For example, an update will run on a thing when the thing is added to a * target group, even after the update was completed by all things originally in the group. Valid values: CONTINUOUS * | SNAPSHOT. *
*/ private String targetSelection; /** ** Configuration for the rollout of OTA updates. *
*/ private AwsJobExecutionsRolloutConfig awsJobExecutionsRolloutConfig; /** ** Configuration information for pre-signed URLs. *
*/ private AwsJobPresignedUrlConfig awsJobPresignedUrlConfig; /** ** The criteria that determine when and how a job abort takes place. *
*/ private AwsJobAbortConfig awsJobAbortConfig; /** *
* 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
.
*
* The files to be streamed by the OTA update. *
*/ private java.util.List* The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web Services * Code Signing resources to create an OTA update job. *
*/ private String roleArn; /** ** A list of additional OTA update parameters which are name-value pairs. *
*/ private java.util.Map* Metadata which can be used to manage updates. *
*/ private java.util.List* The ID of the OTA update to be created. *
* * @param otaUpdateId * The ID of the OTA update to be created. */ public void setOtaUpdateId(String otaUpdateId) { this.otaUpdateId = otaUpdateId; } /** ** The ID of the OTA update to be created. *
* * @return The ID of the OTA update to be created. */ public String getOtaUpdateId() { return this.otaUpdateId; } /** ** The ID of the OTA update to be created. *
* * @param otaUpdateId * The ID of the OTA update to be created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withOtaUpdateId(String otaUpdateId) { setOtaUpdateId(otaUpdateId); return this; } /** ** The description of the OTA update. *
* * @param description * The description of the OTA update. */ public void setDescription(String description) { this.description = description; } /** ** The description of the OTA update. *
* * @return The description of the OTA update. */ public String getDescription() { return this.description; } /** ** The description of the OTA update. *
* * @param description * The description of the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withDescription(String description) { setDescription(description); return this; } /** ** The devices targeted to receive OTA updates. *
* * @return The devices targeted to receive OTA updates. */ public java.util.List* The devices targeted to receive OTA updates. *
* * @param targets * The devices targeted to receive OTA updates. */ public void setTargets(java.util.Collection* The devices targeted to receive OTA updates. *
** 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 * The devices targeted to receive OTA updates. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withTargets(String... targets) { if (this.targets == null) { setTargets(new java.util.ArrayList* The devices targeted to receive OTA updates. *
* * @param targets * The devices targeted to receive OTA updates. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withTargets(java.util.Collection* The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP * and MQTT are specified, the target device can choose the protocol. *
* * @return The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When * both HTTP and MQTT are specified, the target device can choose the protocol. * @see Protocol */ public java.util.List* The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP * and MQTT are specified, the target device can choose the protocol. *
* * @param protocols * The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When * both HTTP and MQTT are specified, the target device can choose the protocol. * @see Protocol */ public void setProtocols(java.util.Collection* The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP * and MQTT are specified, the target device can choose the protocol. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setProtocols(java.util.Collection)} or {@link #withProtocols(java.util.Collection)} if you want to * override the existing values. *
* * @param protocols * The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When * both HTTP and MQTT are specified, the target device can choose the protocol. * @return Returns a reference to this object so that method calls can be chained together. * @see Protocol */ public CreateOTAUpdateRequest withProtocols(String... protocols) { if (this.protocols == null) { setProtocols(new java.util.ArrayList* The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP * and MQTT are specified, the target device can choose the protocol. *
* * @param protocols * The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When * both HTTP and MQTT are specified, the target device can choose the protocol. * @return Returns a reference to this object so that method calls can be chained together. * @see Protocol */ public CreateOTAUpdateRequest withProtocols(java.util.Collection* The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP * and MQTT are specified, the target device can choose the protocol. *
* * @param protocols * The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When * both HTTP and MQTT are specified, the target device can choose the protocol. * @return Returns a reference to this object so that method calls can be chained together. * @see Protocol */ public CreateOTAUpdateRequest withProtocols(Protocol... protocols) { java.util.ArrayList* Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things * specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a thing * when a change is detected in a target. For example, an update will run on a thing when the thing is added to a * target group, even after the update was completed by all things originally in the group. Valid values: CONTINUOUS * | SNAPSHOT. *
* * @param targetSelection * Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things * specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a * thing when a change is detected in a target. For example, an update will run on a thing when the thing is * added to a target group, even after the update was completed by all things originally in the group. Valid * values: CONTINUOUS | SNAPSHOT. * @see TargetSelection */ public void setTargetSelection(String targetSelection) { this.targetSelection = targetSelection; } /** ** Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things * specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a thing * when a change is detected in a target. For example, an update will run on a thing when the thing is added to a * target group, even after the update was completed by all things originally in the group. Valid values: CONTINUOUS * | SNAPSHOT. *
* * @return Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things * specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a * thing when a change is detected in a target. For example, an update will run on a thing when the thing is * added to a target group, even after the update was completed by all things originally in the group. Valid * values: CONTINUOUS | SNAPSHOT. * @see TargetSelection */ public String getTargetSelection() { return this.targetSelection; } /** ** Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things * specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a thing * when a change is detected in a target. For example, an update will run on a thing when the thing is added to a * target group, even after the update was completed by all things originally in the group. Valid values: CONTINUOUS * | SNAPSHOT. *
* * @param targetSelection * Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things * specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a * thing when a change is detected in a target. For example, an update will run on a thing when the thing is * added to a target group, even after the update was completed by all things originally in the group. Valid * values: CONTINUOUS | SNAPSHOT. * @return Returns a reference to this object so that method calls can be chained together. * @see TargetSelection */ public CreateOTAUpdateRequest withTargetSelection(String targetSelection) { setTargetSelection(targetSelection); return this; } /** ** Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things * specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a thing * when a change is detected in a target. For example, an update will run on a thing when the thing is added to a * target group, even after the update was completed by all things originally in the group. Valid values: CONTINUOUS * | SNAPSHOT. *
* * @param targetSelection * Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things * specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a * thing when a change is detected in a target. For example, an update will run on a thing when the thing is * added to a target group, even after the update was completed by all things originally in the group. Valid * values: CONTINUOUS | SNAPSHOT. * @return Returns a reference to this object so that method calls can be chained together. * @see TargetSelection */ public CreateOTAUpdateRequest withTargetSelection(TargetSelection targetSelection) { this.targetSelection = targetSelection.toString(); return this; } /** ** Configuration for the rollout of OTA updates. *
* * @param awsJobExecutionsRolloutConfig * Configuration for the rollout of OTA updates. */ public void setAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfig awsJobExecutionsRolloutConfig) { this.awsJobExecutionsRolloutConfig = awsJobExecutionsRolloutConfig; } /** ** Configuration for the rollout of OTA updates. *
* * @return Configuration for the rollout of OTA updates. */ public AwsJobExecutionsRolloutConfig getAwsJobExecutionsRolloutConfig() { return this.awsJobExecutionsRolloutConfig; } /** ** Configuration for the rollout of OTA updates. *
* * @param awsJobExecutionsRolloutConfig * Configuration for the rollout of OTA updates. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfig awsJobExecutionsRolloutConfig) { setAwsJobExecutionsRolloutConfig(awsJobExecutionsRolloutConfig); return this; } /** ** Configuration information for pre-signed URLs. *
* * @param awsJobPresignedUrlConfig * Configuration information for pre-signed URLs. */ public void setAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfig awsJobPresignedUrlConfig) { this.awsJobPresignedUrlConfig = awsJobPresignedUrlConfig; } /** ** Configuration information for pre-signed URLs. *
* * @return Configuration information for pre-signed URLs. */ public AwsJobPresignedUrlConfig getAwsJobPresignedUrlConfig() { return this.awsJobPresignedUrlConfig; } /** ** Configuration information for pre-signed URLs. *
* * @param awsJobPresignedUrlConfig * Configuration information for pre-signed URLs. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfig awsJobPresignedUrlConfig) { setAwsJobPresignedUrlConfig(awsJobPresignedUrlConfig); return this; } /** ** The criteria that determine when and how a job abort takes place. *
* * @param awsJobAbortConfig * The criteria that determine when and how a job abort takes place. */ public void setAwsJobAbortConfig(AwsJobAbortConfig awsJobAbortConfig) { this.awsJobAbortConfig = awsJobAbortConfig; } /** ** The criteria that determine when and how a job abort takes place. *
* * @return The criteria that determine when and how a job abort takes place. */ public AwsJobAbortConfig getAwsJobAbortConfig() { return this.awsJobAbortConfig; } /** ** The criteria that determine when and how a job abort takes place. *
* * @param awsJobAbortConfig * The criteria that determine when and how a job abort takes place. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withAwsJobAbortConfig(AwsJobAbortConfig awsJobAbortConfig) { setAwsJobAbortConfig(awsJobAbortConfig); 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
.
*
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 setAwsJobTimeoutConfig(AwsJobTimeoutConfig awsJobTimeoutConfig) {
this.awsJobTimeoutConfig = awsJobTimeoutConfig;
}
/**
*
* 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
.
*
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 AwsJobTimeoutConfig getAwsJobTimeoutConfig() {
return this.awsJobTimeoutConfig;
}
/**
*
* 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
.
*
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 CreateOTAUpdateRequest withAwsJobTimeoutConfig(AwsJobTimeoutConfig awsJobTimeoutConfig) {
setAwsJobTimeoutConfig(awsJobTimeoutConfig);
return this;
}
/**
* * The files to be streamed by the OTA update. *
* * @return The files to be streamed by the OTA update. */ public java.util.List* The files to be streamed by the OTA update. *
* * @param files * The files to be streamed by the OTA update. */ public void setFiles(java.util.Collection* The files to be streamed by the OTA update. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setFiles(java.util.Collection)} or {@link #withFiles(java.util.Collection)} if you want to override the * existing values. *
* * @param files * The files to be streamed by the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withFiles(OTAUpdateFile... files) { if (this.files == null) { setFiles(new java.util.ArrayList* The files to be streamed by the OTA update. *
* * @param files * The files to be streamed by the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withFiles(java.util.Collection* The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web Services * Code Signing resources to create an OTA update job. *
* * @param roleArn * The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web * Services Code Signing resources to create an OTA update job. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** ** The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web Services * Code Signing resources to create an OTA update job. *
* * @return The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web * Services Code Signing resources to create an OTA update job. */ public String getRoleArn() { return this.roleArn; } /** ** The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web Services * Code Signing resources to create an OTA update job. *
* * @param roleArn * The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web * Services Code Signing resources to create an OTA update job. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** ** A list of additional OTA update parameters which are name-value pairs. *
* * @return A list of additional OTA update parameters which are name-value pairs. */ public java.util.Map* A list of additional OTA update parameters which are name-value pairs. *
* * @param additionalParameters * A list of additional OTA update parameters which are name-value pairs. */ public void setAdditionalParameters(java.util.Map* A list of additional OTA update parameters which are name-value pairs. *
* * @param additionalParameters * A list of additional OTA update parameters which are name-value pairs. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withAdditionalParameters(java.util.Map* Metadata which can be used to manage updates. *
* * @return Metadata which can be used to manage updates. */ public java.util.List* Metadata which can be used to manage updates. *
* * @param tags * Metadata which can be used to manage updates. */ public void setTags(java.util.Collection* Metadata which can be used to manage updates. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * Metadata which can be used to manage updates. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* Metadata which can be used to manage updates. *
* * @param tags * Metadata which can be used to manage updates. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOTAUpdateRequest withTags(java.util.Collection