/* * Copyright 2010-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 com.amazonaws.AmazonWebServiceRequest; /** *

* Creates an IoT OTA update on a target group of things or groups. *

*

* Requires permission to access the CreateOTAUpdate action. *

*/ public class CreateOTAUpdateRequest extends AmazonWebServiceRequest implements Serializable { /** *

* The ID of the OTA update to be created. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
*/ private String otaUpdateId; /** *

* The description of the OTA update. *

*

* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
*/ private String description; /** *

* The devices targeted to receive OTA updates. *

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

* 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 protocols; /** *

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

*

* Constraints:
* Allowed 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. *

*/ private AwsJobTimeoutConfig awsJobTimeoutConfig; /** *

* The files to be streamed by the OTA update. *

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

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

*

* Constraints:
* Length: 20 - 2048
*/ private String roleArn; /** *

* A list of additional OTA update parameters which are name-value pairs. *

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

* Metadata which can be used to manage updates. *

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

* The ID of the OTA update to be created. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
* * @return

* The ID of the OTA update to be created. *

*/ public String getOtaUpdateId() { return otaUpdateId; } /** *

* The ID of the OTA update to be created. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
* * @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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
* * @param otaUpdateId

* The ID of the OTA update to be created. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withOtaUpdateId(String otaUpdateId) { this.otaUpdateId = otaUpdateId; return this; } /** *

* The description of the OTA update. *

*

* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
* * @return

* The description of the OTA update. *

*/ public String getDescription() { return description; } /** *

* The description of the OTA update. *

*

* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
* * @param description

* The description of the OTA update. *

*/ public void setDescription(String description) { this.description = description; } /** *

* The description of the OTA update. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: - 2028
* Pattern: [^\p{C}]+
* * @param description

* The description of the OTA update. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withDescription(String description) { this.description = description; return this; } /** *

* The devices targeted to receive OTA updates. *

* * @return

* The devices targeted to receive OTA updates. *

*/ public java.util.List getTargets() { return targets; } /** *

* The devices targeted to receive OTA updates. *

* * @param targets

* The devices targeted to receive OTA updates. *

*/ public void setTargets(java.util.Collection targets) { if (targets == null) { this.targets = null; return; } this.targets = new java.util.ArrayList(targets); } /** *

* The devices targeted to receive OTA updates. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param targets

* The devices targeted to receive OTA updates. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withTargets(String... targets) { if (getTargets() == null) { this.targets = new java.util.ArrayList(targets.length); } for (String value : targets) { this.targets.add(value); } return this; } /** *

* The devices targeted to receive OTA updates. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param targets

* The devices targeted to receive OTA updates. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withTargets(java.util.Collection targets) { setTargets(targets); return this; } /** *

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

*/ public java.util.List getProtocols() { return 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. *

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

*/ public void setProtocols(java.util.Collection protocols) { if (protocols == null) { this.protocols = null; return; } this.protocols = new java.util.ArrayList(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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @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 A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withProtocols(String... protocols) { if (getProtocols() == null) { this.protocols = new java.util.ArrayList(protocols.length); } for (String value : protocols) { this.protocols.add(value); } return this; } /** *

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

*

* Returns a reference to this object so that method calls can be chained * together. * * @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 A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withProtocols(java.util.Collection protocols) { setProtocols(protocols); 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. *

*

* Constraints:
* Allowed 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 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. *

*

* Constraints:
* Allowed 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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed 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 A reference to this updated object so that method calls can be * chained together. * @see TargetSelection */ public CreateOTAUpdateRequest withTargetSelection(String targetSelection) { this.targetSelection = 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. *

*

* Constraints:
* Allowed 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(TargetSelection targetSelection) { this.targetSelection = targetSelection.toString(); } /** *

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

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed 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 A reference to this updated 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. *

* * @return

* Configuration for the rollout of OTA updates. *

*/ public AwsJobExecutionsRolloutConfig getAwsJobExecutionsRolloutConfig() { return awsJobExecutionsRolloutConfig; } /** *

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

*

* Returns a reference to this object so that method calls can be chained * together. * * @param awsJobExecutionsRolloutConfig

* Configuration for the rollout of OTA updates. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withAwsJobExecutionsRolloutConfig( AwsJobExecutionsRolloutConfig awsJobExecutionsRolloutConfig) { this.awsJobExecutionsRolloutConfig = awsJobExecutionsRolloutConfig; return this; } /** *

* Configuration information for pre-signed URLs. *

* * @return

* Configuration information for pre-signed URLs. *

*/ public AwsJobPresignedUrlConfig getAwsJobPresignedUrlConfig() { return awsJobPresignedUrlConfig; } /** *

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

*

* Returns a reference to this object so that method calls can be chained * together. * * @param awsJobPresignedUrlConfig

* Configuration information for pre-signed URLs. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withAwsJobPresignedUrlConfig( AwsJobPresignedUrlConfig awsJobPresignedUrlConfig) { this.awsJobPresignedUrlConfig = awsJobPresignedUrlConfig; return this; } /** *

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

*/ public void setAwsJobAbortConfig(AwsJobAbortConfig awsJobAbortConfig) { this.awsJobAbortConfig = awsJobAbortConfig; } /** *

* The criteria that determine when and how a job abort takes place. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param awsJobAbortConfig

* The criteria that determine when and how a job abort takes * place. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withAwsJobAbortConfig(AwsJobAbortConfig awsJobAbortConfig) { this.awsJobAbortConfig = 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. *

* * @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 AwsJobTimeoutConfig getAwsJobTimeoutConfig() { return 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. *

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

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

*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withAwsJobTimeoutConfig(AwsJobTimeoutConfig awsJobTimeoutConfig) { this.awsJobTimeoutConfig = 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 getFiles() { return files; } /** *

* 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 files) { if (files == null) { this.files = null; return; } this.files = new java.util.ArrayList(files); } /** *

* The files to be streamed by the OTA update. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param files

* The files to be streamed by the OTA update. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withFiles(OTAUpdateFile... files) { if (getFiles() == null) { this.files = new java.util.ArrayList(files.length); } for (OTAUpdateFile value : files) { this.files.add(value); } return this; } /** *

* The files to be streamed by the OTA update. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param files

* The files to be streamed by the OTA update. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withFiles(java.util.Collection files) { setFiles(files); return this; } /** *

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

*

* Constraints:
* Length: 20 - 2048
* * @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 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. *

*

* Constraints:
* Length: 20 - 2048
* * @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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 20 - 2048
* * @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 A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withRoleArn(String roleArn) { this.roleArn = 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 getAdditionalParameters() { return additionalParameters; } /** *

* 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 additionalParameters) { this.additionalParameters = additionalParameters; } /** *

* A list of additional OTA update parameters which are name-value pairs. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param additionalParameters

* A list of additional OTA update parameters which are * name-value pairs. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withAdditionalParameters( java.util.Map additionalParameters) { this.additionalParameters = additionalParameters; return this; } /** *

* A list of additional OTA update parameters which are name-value pairs. *

*

* The method adds a new key-value pair into additionalParameters parameter, * and returns a reference to this object so that method calls can be * chained together. * * @param key The key of the entry to be added into additionalParameters. * @param value The corresponding value of the entry to be added into * additionalParameters. * @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest addadditionalParametersEntry(String key, String value) { if (null == this.additionalParameters) { this.additionalParameters = new java.util.HashMap(); } if (this.additionalParameters.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.additionalParameters.put(key, value); return this; } /** * Removes all the entries added into additionalParameters. *

* Returns a reference to this object so that method calls can be chained * together. */ public CreateOTAUpdateRequest clearadditionalParametersEntries() { this.additionalParameters = null; return this; } /** *

* Metadata which can be used to manage updates. *

* * @return

* Metadata which can be used to manage updates. *

*/ public java.util.List getTags() { return tags; } /** *

* Metadata which can be used to manage updates. *

* * @param tags

* Metadata which can be used to manage updates. *

*/ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* Metadata which can be used to manage updates. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param tags

* Metadata which can be used to manage updates. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withTags(Tag... tags) { if (getTags() == null) { this.tags = new java.util.ArrayList(tags.length); } for (Tag value : tags) { this.tags.add(value); } return this; } /** *

* Metadata which can be used to manage updates. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param tags

* Metadata which can be used to manage updates. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateOTAUpdateRequest withTags(java.util.Collection tags) { setTags(tags); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getOtaUpdateId() != null) sb.append("otaUpdateId: " + getOtaUpdateId() + ","); if (getDescription() != null) sb.append("description: " + getDescription() + ","); if (getTargets() != null) sb.append("targets: " + getTargets() + ","); if (getProtocols() != null) sb.append("protocols: " + getProtocols() + ","); if (getTargetSelection() != null) sb.append("targetSelection: " + getTargetSelection() + ","); if (getAwsJobExecutionsRolloutConfig() != null) sb.append("awsJobExecutionsRolloutConfig: " + getAwsJobExecutionsRolloutConfig() + ","); if (getAwsJobPresignedUrlConfig() != null) sb.append("awsJobPresignedUrlConfig: " + getAwsJobPresignedUrlConfig() + ","); if (getAwsJobAbortConfig() != null) sb.append("awsJobAbortConfig: " + getAwsJobAbortConfig() + ","); if (getAwsJobTimeoutConfig() != null) sb.append("awsJobTimeoutConfig: " + getAwsJobTimeoutConfig() + ","); if (getFiles() != null) sb.append("files: " + getFiles() + ","); if (getRoleArn() != null) sb.append("roleArn: " + getRoleArn() + ","); if (getAdditionalParameters() != null) sb.append("additionalParameters: " + getAdditionalParameters() + ","); if (getTags() != null) sb.append("tags: " + getTags()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOtaUpdateId() == null) ? 0 : getOtaUpdateId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getTargets() == null) ? 0 : getTargets().hashCode()); hashCode = prime * hashCode + ((getProtocols() == null) ? 0 : getProtocols().hashCode()); hashCode = prime * hashCode + ((getTargetSelection() == null) ? 0 : getTargetSelection().hashCode()); hashCode = prime * hashCode + ((getAwsJobExecutionsRolloutConfig() == null) ? 0 : getAwsJobExecutionsRolloutConfig().hashCode()); hashCode = prime * hashCode + ((getAwsJobPresignedUrlConfig() == null) ? 0 : getAwsJobPresignedUrlConfig() .hashCode()); hashCode = prime * hashCode + ((getAwsJobAbortConfig() == null) ? 0 : getAwsJobAbortConfig().hashCode()); hashCode = prime * hashCode + ((getAwsJobTimeoutConfig() == null) ? 0 : getAwsJobTimeoutConfig().hashCode()); hashCode = prime * hashCode + ((getFiles() == null) ? 0 : getFiles().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getAdditionalParameters() == null) ? 0 : getAdditionalParameters().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateOTAUpdateRequest == false) return false; CreateOTAUpdateRequest other = (CreateOTAUpdateRequest) obj; if (other.getOtaUpdateId() == null ^ this.getOtaUpdateId() == null) return false; if (other.getOtaUpdateId() != null && other.getOtaUpdateId().equals(this.getOtaUpdateId()) == 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.getTargets() == null ^ this.getTargets() == null) return false; if (other.getTargets() != null && other.getTargets().equals(this.getTargets()) == false) return false; if (other.getProtocols() == null ^ this.getProtocols() == null) return false; if (other.getProtocols() != null && other.getProtocols().equals(this.getProtocols()) == 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.getAwsJobExecutionsRolloutConfig() == null ^ this.getAwsJobExecutionsRolloutConfig() == null) return false; if (other.getAwsJobExecutionsRolloutConfig() != null && other.getAwsJobExecutionsRolloutConfig().equals( this.getAwsJobExecutionsRolloutConfig()) == false) return false; if (other.getAwsJobPresignedUrlConfig() == null ^ this.getAwsJobPresignedUrlConfig() == null) return false; if (other.getAwsJobPresignedUrlConfig() != null && other.getAwsJobPresignedUrlConfig().equals(this.getAwsJobPresignedUrlConfig()) == false) return false; if (other.getAwsJobAbortConfig() == null ^ this.getAwsJobAbortConfig() == null) return false; if (other.getAwsJobAbortConfig() != null && other.getAwsJobAbortConfig().equals(this.getAwsJobAbortConfig()) == false) return false; if (other.getAwsJobTimeoutConfig() == null ^ this.getAwsJobTimeoutConfig() == null) return false; if (other.getAwsJobTimeoutConfig() != null && other.getAwsJobTimeoutConfig().equals(this.getAwsJobTimeoutConfig()) == false) return false; if (other.getFiles() == null ^ this.getFiles() == null) return false; if (other.getFiles() != null && other.getFiles().equals(this.getFiles()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getAdditionalParameters() == null ^ this.getAdditionalParameters() == null) return false; if (other.getAdditionalParameters() != null && other.getAdditionalParameters().equals(this.getAdditionalParameters()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } }