/* * 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; /** *
* Information about an OTA update. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class OTAUpdateInfo implements Serializable, Cloneable, StructuredPojo { /** ** The OTA update ID. *
*/ private String otaUpdateId; /** ** The OTA update ARN. *
*/ private String otaUpdateArn; /** ** The date when the OTA update was created. *
*/ private java.util.Date creationDate; /** ** The date when the OTA update was last updated. *
*/ private java.util.Date lastModifiedDate; /** ** A description of the OTA update. *
*/ private String description; /** ** The targets of the OTA update. *
*/ 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* Configuration for the rollout of OTA updates. *
*/ private AwsJobExecutionsRolloutConfig awsJobExecutionsRolloutConfig; /** *
* Configuration information for pre-signed URLs. Valid when protocols
contains HTTP.
*
* Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those things * specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may also be run on a * thing when a change is detected in a target. For example, an OTA update will run on a thing when the thing is * added to a target group, even after the OTA update was completed by all things originally in the group. *
*/ private String targetSelection; /** ** A list of files associated with the OTA update. *
*/ private java.util.List* The status of the OTA update. *
*/ private String otaUpdateStatus; /** ** The IoT job ID associated with the OTA update. *
*/ private String awsIotJobId; /** ** The IoT job ARN associated with the OTA update. *
*/ private String awsIotJobArn; /** ** Error information associated with the OTA update. *
*/ private ErrorInfo errorInfo; /** ** A collection of name/value pairs *
*/ private java.util.Map* The OTA update ID. *
* * @param otaUpdateId * The OTA update ID. */ public void setOtaUpdateId(String otaUpdateId) { this.otaUpdateId = otaUpdateId; } /** ** The OTA update ID. *
* * @return The OTA update ID. */ public String getOtaUpdateId() { return this.otaUpdateId; } /** ** The OTA update ID. *
* * @param otaUpdateId * The OTA update ID. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withOtaUpdateId(String otaUpdateId) { setOtaUpdateId(otaUpdateId); return this; } /** ** The OTA update ARN. *
* * @param otaUpdateArn * The OTA update ARN. */ public void setOtaUpdateArn(String otaUpdateArn) { this.otaUpdateArn = otaUpdateArn; } /** ** The OTA update ARN. *
* * @return The OTA update ARN. */ public String getOtaUpdateArn() { return this.otaUpdateArn; } /** ** The OTA update ARN. *
* * @param otaUpdateArn * The OTA update ARN. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withOtaUpdateArn(String otaUpdateArn) { setOtaUpdateArn(otaUpdateArn); return this; } /** ** The date when the OTA update was created. *
* * @param creationDate * The date when the OTA update was created. */ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** ** The date when the OTA update was created. *
* * @return The date when the OTA update was created. */ public java.util.Date getCreationDate() { return this.creationDate; } /** ** The date when the OTA update was created. *
* * @param creationDate * The date when the OTA update was created. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withCreationDate(java.util.Date creationDate) { setCreationDate(creationDate); return this; } /** ** The date when the OTA update was last updated. *
* * @param lastModifiedDate * The date when the OTA update was last updated. */ public void setLastModifiedDate(java.util.Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** ** The date when the OTA update was last updated. *
* * @return The date when the OTA update was last updated. */ public java.util.Date getLastModifiedDate() { return this.lastModifiedDate; } /** ** The date when the OTA update was last updated. *
* * @param lastModifiedDate * The date when the OTA update was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withLastModifiedDate(java.util.Date lastModifiedDate) { setLastModifiedDate(lastModifiedDate); return this; } /** ** A description of the OTA update. *
* * @param description * A description of the OTA update. */ public void setDescription(String description) { this.description = description; } /** ** A description of the OTA update. *
* * @return A description of the OTA update. */ public String getDescription() { return this.description; } /** ** A description of the OTA update. *
* * @param description * A description of the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withDescription(String description) { setDescription(description); return this; } /** ** The targets of the OTA update. *
* * @return The targets of the OTA update. */ public java.util.List* The targets of the OTA update. *
* * @param targets * The targets of the OTA update. */ public void setTargets(java.util.Collection* The targets of the OTA update. *
** 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 targets of the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withTargets(String... targets) { if (this.targets == null) { setTargets(new java.util.ArrayList* The targets of the OTA update. *
* * @param targets * The targets of the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo 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 OTAUpdateInfo 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 OTAUpdateInfo 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 OTAUpdateInfo withProtocols(Protocol... protocols) { java.util.ArrayList* 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 OTAUpdateInfo withAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfig awsJobExecutionsRolloutConfig) { setAwsJobExecutionsRolloutConfig(awsJobExecutionsRolloutConfig); return this; } /** *
* Configuration information for pre-signed URLs. Valid when protocols
contains HTTP.
*
protocols
contains HTTP.
*/
public void setAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfig awsJobPresignedUrlConfig) {
this.awsJobPresignedUrlConfig = awsJobPresignedUrlConfig;
}
/**
*
* Configuration information for pre-signed URLs. Valid when protocols
contains HTTP.
*
protocols
contains HTTP.
*/
public AwsJobPresignedUrlConfig getAwsJobPresignedUrlConfig() {
return this.awsJobPresignedUrlConfig;
}
/**
*
* Configuration information for pre-signed URLs. Valid when protocols
contains HTTP.
*
protocols
contains HTTP.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OTAUpdateInfo withAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfig awsJobPresignedUrlConfig) {
setAwsJobPresignedUrlConfig(awsJobPresignedUrlConfig);
return this;
}
/**
* * Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those things * specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may also be run on a * thing when a change is detected in a target. For example, an OTA update will run on a thing when the thing is * added to a target group, even after the OTA update was completed by all things originally in the group. *
* * @param targetSelection * Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those * things specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may * also be run on a thing when a change is detected in a target. For example, an OTA update will run on a * thing when the thing is added to a target group, even after the OTA update was completed by all things * originally in the group. * @see TargetSelection */ public void setTargetSelection(String targetSelection) { this.targetSelection = targetSelection; } /** ** Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those things * specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may also be run on a * thing when a change is detected in a target. For example, an OTA update will run on a thing when the thing is * added to a target group, even after the OTA update was completed by all things originally in the group. *
* * @return Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those * things specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may * also be run on a thing when a change is detected in a target. For example, an OTA update will run on a * thing when the thing is added to a target group, even after the OTA update was completed by all things * originally in the group. * @see TargetSelection */ public String getTargetSelection() { return this.targetSelection; } /** ** Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those things * specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may also be run on a * thing when a change is detected in a target. For example, an OTA update will run on a thing when the thing is * added to a target group, even after the OTA update was completed by all things originally in the group. *
* * @param targetSelection * Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those * things specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may * also be run on a thing when a change is detected in a target. For example, an OTA update will run on a * thing when the thing is added to a target group, even after the OTA update was completed by all things * originally in the group. * @return Returns a reference to this object so that method calls can be chained together. * @see TargetSelection */ public OTAUpdateInfo withTargetSelection(String targetSelection) { setTargetSelection(targetSelection); return this; } /** ** Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those things * specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may also be run on a * thing when a change is detected in a target. For example, an OTA update will run on a thing when the thing is * added to a target group, even after the OTA update was completed by all things originally in the group. *
* * @param targetSelection * Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those * things specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may * also be run on a thing when a change is detected in a target. For example, an OTA update will run on a * thing when the thing is added to a target group, even after the OTA update was completed by all things * originally in the group. * @return Returns a reference to this object so that method calls can be chained together. * @see TargetSelection */ public OTAUpdateInfo withTargetSelection(TargetSelection targetSelection) { this.targetSelection = targetSelection.toString(); return this; } /** ** A list of files associated with the OTA update. *
* * @return A list of files associated with the OTA update. */ public java.util.List* A list of files associated with the OTA update. *
* * @param otaUpdateFiles * A list of files associated with the OTA update. */ public void setOtaUpdateFiles(java.util.Collection* A list of files associated with the OTA update. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setOtaUpdateFiles(java.util.Collection)} or {@link #withOtaUpdateFiles(java.util.Collection)} if you want * to override the existing values. *
* * @param otaUpdateFiles * A list of files associated with the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withOtaUpdateFiles(OTAUpdateFile... otaUpdateFiles) { if (this.otaUpdateFiles == null) { setOtaUpdateFiles(new java.util.ArrayList* A list of files associated with the OTA update. *
* * @param otaUpdateFiles * A list of files associated with the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withOtaUpdateFiles(java.util.Collection* The status of the OTA update. *
* * @param otaUpdateStatus * The status of the OTA update. * @see OTAUpdateStatus */ public void setOtaUpdateStatus(String otaUpdateStatus) { this.otaUpdateStatus = otaUpdateStatus; } /** ** The status of the OTA update. *
* * @return The status of the OTA update. * @see OTAUpdateStatus */ public String getOtaUpdateStatus() { return this.otaUpdateStatus; } /** ** The status of the OTA update. *
* * @param otaUpdateStatus * The status of the OTA update. * @return Returns a reference to this object so that method calls can be chained together. * @see OTAUpdateStatus */ public OTAUpdateInfo withOtaUpdateStatus(String otaUpdateStatus) { setOtaUpdateStatus(otaUpdateStatus); return this; } /** ** The status of the OTA update. *
* * @param otaUpdateStatus * The status of the OTA update. * @return Returns a reference to this object so that method calls can be chained together. * @see OTAUpdateStatus */ public OTAUpdateInfo withOtaUpdateStatus(OTAUpdateStatus otaUpdateStatus) { this.otaUpdateStatus = otaUpdateStatus.toString(); return this; } /** ** The IoT job ID associated with the OTA update. *
* * @param awsIotJobId * The IoT job ID associated with the OTA update. */ public void setAwsIotJobId(String awsIotJobId) { this.awsIotJobId = awsIotJobId; } /** ** The IoT job ID associated with the OTA update. *
* * @return The IoT job ID associated with the OTA update. */ public String getAwsIotJobId() { return this.awsIotJobId; } /** ** The IoT job ID associated with the OTA update. *
* * @param awsIotJobId * The IoT job ID associated with the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withAwsIotJobId(String awsIotJobId) { setAwsIotJobId(awsIotJobId); return this; } /** ** The IoT job ARN associated with the OTA update. *
* * @param awsIotJobArn * The IoT job ARN associated with the OTA update. */ public void setAwsIotJobArn(String awsIotJobArn) { this.awsIotJobArn = awsIotJobArn; } /** ** The IoT job ARN associated with the OTA update. *
* * @return The IoT job ARN associated with the OTA update. */ public String getAwsIotJobArn() { return this.awsIotJobArn; } /** ** The IoT job ARN associated with the OTA update. *
* * @param awsIotJobArn * The IoT job ARN associated with the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withAwsIotJobArn(String awsIotJobArn) { setAwsIotJobArn(awsIotJobArn); return this; } /** ** Error information associated with the OTA update. *
* * @param errorInfo * Error information associated with the OTA update. */ public void setErrorInfo(ErrorInfo errorInfo) { this.errorInfo = errorInfo; } /** ** Error information associated with the OTA update. *
* * @return Error information associated with the OTA update. */ public ErrorInfo getErrorInfo() { return this.errorInfo; } /** ** Error information associated with the OTA update. *
* * @param errorInfo * Error information associated with the OTA update. * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withErrorInfo(ErrorInfo errorInfo) { setErrorInfo(errorInfo); return this; } /** ** A collection of name/value pairs *
* * @return A collection of name/value pairs */ public java.util.Map* A collection of name/value pairs *
* * @param additionalParameters * A collection of name/value pairs */ public void setAdditionalParameters(java.util.Map* A collection of name/value pairs *
* * @param additionalParameters * A collection of name/value pairs * @return Returns a reference to this object so that method calls can be chained together. */ public OTAUpdateInfo withAdditionalParameters(java.util.Map