/* * 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; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateOTAUpdateResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The OTA update ID. *

*/ private String otaUpdateId; /** *

* The IoT job ID associated with the OTA update. *

*/ private String awsIotJobId; /** *

* The OTA update ARN. *

*/ private String otaUpdateArn; /** *

* The IoT job ARN associated with the OTA update. *

*/ private String awsIotJobArn; /** *

* The OTA update status. *

*/ private String otaUpdateStatus; /** *

* 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 CreateOTAUpdateResult withOtaUpdateId(String otaUpdateId) { setOtaUpdateId(otaUpdateId); 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 CreateOTAUpdateResult withAwsIotJobId(String awsIotJobId) { setAwsIotJobId(awsIotJobId); 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 CreateOTAUpdateResult withOtaUpdateArn(String otaUpdateArn) { setOtaUpdateArn(otaUpdateArn); 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 CreateOTAUpdateResult withAwsIotJobArn(String awsIotJobArn) { setAwsIotJobArn(awsIotJobArn); return this; } /** *

* The OTA update status. *

* * @param otaUpdateStatus * The OTA update status. * @see OTAUpdateStatus */ public void setOtaUpdateStatus(String otaUpdateStatus) { this.otaUpdateStatus = otaUpdateStatus; } /** *

* The OTA update status. *

* * @return The OTA update status. * @see OTAUpdateStatus */ public String getOtaUpdateStatus() { return this.otaUpdateStatus; } /** *

* The OTA update status. *

* * @param otaUpdateStatus * The OTA update status. * @return Returns a reference to this object so that method calls can be chained together. * @see OTAUpdateStatus */ public CreateOTAUpdateResult withOtaUpdateStatus(String otaUpdateStatus) { setOtaUpdateStatus(otaUpdateStatus); return this; } /** *

* The OTA update status. *

* * @param otaUpdateStatus * The OTA update status. * @return Returns a reference to this object so that method calls can be chained together. * @see OTAUpdateStatus */ public CreateOTAUpdateResult withOtaUpdateStatus(OTAUpdateStatus otaUpdateStatus) { this.otaUpdateStatus = otaUpdateStatus.toString(); 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 (getOtaUpdateId() != null) sb.append("OtaUpdateId: ").append(getOtaUpdateId()).append(","); if (getAwsIotJobId() != null) sb.append("AwsIotJobId: ").append(getAwsIotJobId()).append(","); if (getOtaUpdateArn() != null) sb.append("OtaUpdateArn: ").append(getOtaUpdateArn()).append(","); if (getAwsIotJobArn() != null) sb.append("AwsIotJobArn: ").append(getAwsIotJobArn()).append(","); if (getOtaUpdateStatus() != null) sb.append("OtaUpdateStatus: ").append(getOtaUpdateStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateOTAUpdateResult == false) return false; CreateOTAUpdateResult other = (CreateOTAUpdateResult) obj; if (other.getOtaUpdateId() == null ^ this.getOtaUpdateId() == null) return false; if (other.getOtaUpdateId() != null && other.getOtaUpdateId().equals(this.getOtaUpdateId()) == false) return false; if (other.getAwsIotJobId() == null ^ this.getAwsIotJobId() == null) return false; if (other.getAwsIotJobId() != null && other.getAwsIotJobId().equals(this.getAwsIotJobId()) == false) return false; if (other.getOtaUpdateArn() == null ^ this.getOtaUpdateArn() == null) return false; if (other.getOtaUpdateArn() != null && other.getOtaUpdateArn().equals(this.getOtaUpdateArn()) == false) return false; if (other.getAwsIotJobArn() == null ^ this.getAwsIotJobArn() == null) return false; if (other.getAwsIotJobArn() != null && other.getAwsIotJobArn().equals(this.getAwsIotJobArn()) == false) return false; if (other.getOtaUpdateStatus() == null ^ this.getOtaUpdateStatus() == null) return false; if (other.getOtaUpdateStatus() != null && other.getOtaUpdateStatus().equals(this.getOtaUpdateStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOtaUpdateId() == null) ? 0 : getOtaUpdateId().hashCode()); hashCode = prime * hashCode + ((getAwsIotJobId() == null) ? 0 : getAwsIotJobId().hashCode()); hashCode = prime * hashCode + ((getOtaUpdateArn() == null) ? 0 : getOtaUpdateArn().hashCode()); hashCode = prime * hashCode + ((getAwsIotJobArn() == null) ? 0 : getAwsIotJobArn().hashCode()); hashCode = prime * hashCode + ((getOtaUpdateStatus() == null) ? 0 : getOtaUpdateStatus().hashCode()); return hashCode; } @Override public CreateOTAUpdateResult clone() { try { return (CreateOTAUpdateResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }