com.amazonaws.services.iot.model.CreateOTAUpdateResult Maven / Gradle / Ivy
Show all versions of aws-android-sdk-iot Show documentation
/*
* Copyright 2010-2018 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;
public class CreateOTAUpdateResult implements Serializable {
/**
*
* The OTA update ID.
*
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
*/
private String otaUpdateId;
/**
*
* The AWS IoT job ID associated with the OTA update.
*
*/
private String awsIotJobId;
/**
*
* The OTA update ARN.
*
*/
private String otaUpdateArn;
/**
*
* The AWS IoT job ARN associated with the OTA update.
*
*/
private String awsIotJobArn;
/**
*
* The OTA update status.
*
*
* Constraints:
* Allowed Values: CREATE_PENDING, CREATE_IN_PROGRESS,
* CREATE_COMPLETE, CREATE_FAILED
*/
private String otaUpdateStatus;
/**
*
* The OTA update ID.
*
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
*
* @return
* The OTA update ID.
*
*/
public String getOtaUpdateId() {
return otaUpdateId;
}
/**
*
* The OTA update ID.
*
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
*
* @param otaUpdateId
* The OTA update ID.
*
*/
public void setOtaUpdateId(String otaUpdateId) {
this.otaUpdateId = otaUpdateId;
}
/**
*
* The OTA update ID.
*
*
* 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 OTA update ID.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public CreateOTAUpdateResult withOtaUpdateId(String otaUpdateId) {
this.otaUpdateId = otaUpdateId;
return this;
}
/**
*
* The AWS IoT job ID associated with the OTA update.
*
*
* @return
* The AWS IoT job ID associated with the OTA update.
*
*/
public String getAwsIotJobId() {
return awsIotJobId;
}
/**
*
* The AWS IoT job ID associated with the OTA update.
*
*
* @param awsIotJobId
* The AWS IoT job ID associated with the OTA update.
*
*/
public void setAwsIotJobId(String awsIotJobId) {
this.awsIotJobId = awsIotJobId;
}
/**
*
* The AWS IoT job ID associated with the OTA update.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param awsIotJobId
* The AWS IoT job ID associated with the OTA update.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public CreateOTAUpdateResult withAwsIotJobId(String awsIotJobId) {
this.awsIotJobId = awsIotJobId;
return this;
}
/**
*
* The OTA update ARN.
*
*
* @return
* The OTA update ARN.
*
*/
public String getOtaUpdateArn() {
return otaUpdateArn;
}
/**
*
* The OTA update ARN.
*
*
* @param otaUpdateArn
* The OTA update ARN.
*
*/
public void setOtaUpdateArn(String otaUpdateArn) {
this.otaUpdateArn = otaUpdateArn;
}
/**
*
* The OTA update ARN.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param otaUpdateArn
* The OTA update ARN.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public CreateOTAUpdateResult withOtaUpdateArn(String otaUpdateArn) {
this.otaUpdateArn = otaUpdateArn;
return this;
}
/**
*
* The AWS IoT job ARN associated with the OTA update.
*
*
* @return
* The AWS IoT job ARN associated with the OTA update.
*
*/
public String getAwsIotJobArn() {
return awsIotJobArn;
}
/**
*
* The AWS IoT job ARN associated with the OTA update.
*
*
* @param awsIotJobArn
* The AWS IoT job ARN associated with the OTA update.
*
*/
public void setAwsIotJobArn(String awsIotJobArn) {
this.awsIotJobArn = awsIotJobArn;
}
/**
*
* The AWS IoT job ARN associated with the OTA update.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param awsIotJobArn
* The AWS IoT job ARN associated with the OTA update.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public CreateOTAUpdateResult withAwsIotJobArn(String awsIotJobArn) {
this.awsIotJobArn = awsIotJobArn;
return this;
}
/**
*
* The OTA update status.
*
*
* Constraints:
* Allowed Values: CREATE_PENDING, CREATE_IN_PROGRESS,
* CREATE_COMPLETE, CREATE_FAILED
*
* @return
* The OTA update status.
*
* @see OTAUpdateStatus
*/
public String getOtaUpdateStatus() {
return otaUpdateStatus;
}
/**
*
* The OTA update status.
*
*
* Constraints:
* Allowed Values: CREATE_PENDING, CREATE_IN_PROGRESS,
* CREATE_COMPLETE, CREATE_FAILED
*
* @param otaUpdateStatus
* The OTA update status.
*
* @see OTAUpdateStatus
*/
public void setOtaUpdateStatus(String otaUpdateStatus) {
this.otaUpdateStatus = otaUpdateStatus;
}
/**
*
* The OTA update status.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Allowed Values: CREATE_PENDING, CREATE_IN_PROGRESS,
* CREATE_COMPLETE, CREATE_FAILED
*
* @param otaUpdateStatus
* The OTA update status.
*
* @return A reference to this updated object so that method calls can be
* chained together.
* @see OTAUpdateStatus
*/
public CreateOTAUpdateResult withOtaUpdateStatus(String otaUpdateStatus) {
this.otaUpdateStatus = otaUpdateStatus;
return this;
}
/**
*
* The OTA update status.
*
*
* Constraints:
* Allowed Values: CREATE_PENDING, CREATE_IN_PROGRESS,
* CREATE_COMPLETE, CREATE_FAILED
*
* @param otaUpdateStatus
* The OTA update status.
*
* @see OTAUpdateStatus
*/
public void setOtaUpdateStatus(OTAUpdateStatus otaUpdateStatus) {
this.otaUpdateStatus = otaUpdateStatus.toString();
}
/**
*
* The OTA update status.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Allowed Values: CREATE_PENDING, CREATE_IN_PROGRESS,
* CREATE_COMPLETE, CREATE_FAILED
*
* @param otaUpdateStatus
* The OTA update status.
*
* @return A reference to this updated 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; 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 (getAwsIotJobId() != null)
sb.append("awsIotJobId: " + getAwsIotJobId() + ",");
if (getOtaUpdateArn() != null)
sb.append("otaUpdateArn: " + getOtaUpdateArn() + ",");
if (getAwsIotJobArn() != null)
sb.append("awsIotJobArn: " + getAwsIotJobArn() + ",");
if (getOtaUpdateStatus() != null)
sb.append("otaUpdateStatus: " + getOtaUpdateStatus());
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
+ ((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 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;
}
}