
com.amazonaws.services.iot.model.DescribeThingRegistrationTaskResult Maven / Gradle / Ivy
/*
* Copyright 2015-2020 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 DescribeThingRegistrationTaskResult extends com.amazonaws.AmazonWebServiceResult implements Serializable,
Cloneable {
/**
*
* The task ID.
*
*/
private String taskId;
/**
*
* The task creation date.
*
*/
private java.util.Date creationDate;
/**
*
* The date when the task was last modified.
*
*/
private java.util.Date lastModifiedDate;
/**
*
* The task's template.
*
*/
private String templateBody;
/**
*
* The S3 bucket that contains the input file.
*
*/
private String inputFileBucket;
/**
*
* The input file key.
*
*/
private String inputFileKey;
/**
*
* The role ARN that grants access to the input file bucket.
*
*/
private String roleArn;
/**
*
* The status of the bulk thing provisioning task.
*
*/
private String status;
/**
*
* The message.
*
*/
private String message;
/**
*
* The number of things successfully provisioned.
*
*/
private Integer successCount;
/**
*
* The number of things that failed to be provisioned.
*
*/
private Integer failureCount;
/**
*
* The progress of the bulk provisioning task expressed as a percentage.
*
*/
private Integer percentageProgress;
/**
*
* The task ID.
*
*
* @param taskId
* The task ID.
*/
public void setTaskId(String taskId) {
this.taskId = taskId;
}
/**
*
* The task ID.
*
*
* @return The task ID.
*/
public String getTaskId() {
return this.taskId;
}
/**
*
* The task ID.
*
*
* @param taskId
* The task ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withTaskId(String taskId) {
setTaskId(taskId);
return this;
}
/**
*
* The task creation date.
*
*
* @param creationDate
* The task creation date.
*/
public void setCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
}
/**
*
* The task creation date.
*
*
* @return The task creation date.
*/
public java.util.Date getCreationDate() {
return this.creationDate;
}
/**
*
* The task creation date.
*
*
* @param creationDate
* The task creation date.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withCreationDate(java.util.Date creationDate) {
setCreationDate(creationDate);
return this;
}
/**
*
* The date when the task was last modified.
*
*
* @param lastModifiedDate
* The date when the task was last modified.
*/
public void setLastModifiedDate(java.util.Date lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
/**
*
* The date when the task was last modified.
*
*
* @return The date when the task was last modified.
*/
public java.util.Date getLastModifiedDate() {
return this.lastModifiedDate;
}
/**
*
* The date when the task was last modified.
*
*
* @param lastModifiedDate
* The date when the task was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withLastModifiedDate(java.util.Date lastModifiedDate) {
setLastModifiedDate(lastModifiedDate);
return this;
}
/**
*
* The task's template.
*
*
* @param templateBody
* The task's template.
*/
public void setTemplateBody(String templateBody) {
this.templateBody = templateBody;
}
/**
*
* The task's template.
*
*
* @return The task's template.
*/
public String getTemplateBody() {
return this.templateBody;
}
/**
*
* The task's template.
*
*
* @param templateBody
* The task's template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withTemplateBody(String templateBody) {
setTemplateBody(templateBody);
return this;
}
/**
*
* The S3 bucket that contains the input file.
*
*
* @param inputFileBucket
* The S3 bucket that contains the input file.
*/
public void setInputFileBucket(String inputFileBucket) {
this.inputFileBucket = inputFileBucket;
}
/**
*
* The S3 bucket that contains the input file.
*
*
* @return The S3 bucket that contains the input file.
*/
public String getInputFileBucket() {
return this.inputFileBucket;
}
/**
*
* The S3 bucket that contains the input file.
*
*
* @param inputFileBucket
* The S3 bucket that contains the input file.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withInputFileBucket(String inputFileBucket) {
setInputFileBucket(inputFileBucket);
return this;
}
/**
*
* The input file key.
*
*
* @param inputFileKey
* The input file key.
*/
public void setInputFileKey(String inputFileKey) {
this.inputFileKey = inputFileKey;
}
/**
*
* The input file key.
*
*
* @return The input file key.
*/
public String getInputFileKey() {
return this.inputFileKey;
}
/**
*
* The input file key.
*
*
* @param inputFileKey
* The input file key.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withInputFileKey(String inputFileKey) {
setInputFileKey(inputFileKey);
return this;
}
/**
*
* The role ARN that grants access to the input file bucket.
*
*
* @param roleArn
* The role ARN that grants access to the input file bucket.
*/
public void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
/**
*
* The role ARN that grants access to the input file bucket.
*
*
* @return The role ARN that grants access to the input file bucket.
*/
public String getRoleArn() {
return this.roleArn;
}
/**
*
* The role ARN that grants access to the input file bucket.
*
*
* @param roleArn
* The role ARN that grants access to the input file bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withRoleArn(String roleArn) {
setRoleArn(roleArn);
return this;
}
/**
*
* The status of the bulk thing provisioning task.
*
*
* @param status
* The status of the bulk thing provisioning task.
* @see Status
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the bulk thing provisioning task.
*
*
* @return The status of the bulk thing provisioning task.
* @see Status
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the bulk thing provisioning task.
*
*
* @param status
* The status of the bulk thing provisioning task.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Status
*/
public DescribeThingRegistrationTaskResult withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the bulk thing provisioning task.
*
*
* @param status
* The status of the bulk thing provisioning task.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Status
*/
public DescribeThingRegistrationTaskResult withStatus(Status status) {
this.status = status.toString();
return this;
}
/**
*
* The message.
*
*
* @param message
* The message.
*/
public void setMessage(String message) {
this.message = message;
}
/**
*
* The message.
*
*
* @return The message.
*/
public String getMessage() {
return this.message;
}
/**
*
* The message.
*
*
* @param message
* The message.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withMessage(String message) {
setMessage(message);
return this;
}
/**
*
* The number of things successfully provisioned.
*
*
* @param successCount
* The number of things successfully provisioned.
*/
public void setSuccessCount(Integer successCount) {
this.successCount = successCount;
}
/**
*
* The number of things successfully provisioned.
*
*
* @return The number of things successfully provisioned.
*/
public Integer getSuccessCount() {
return this.successCount;
}
/**
*
* The number of things successfully provisioned.
*
*
* @param successCount
* The number of things successfully provisioned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withSuccessCount(Integer successCount) {
setSuccessCount(successCount);
return this;
}
/**
*
* The number of things that failed to be provisioned.
*
*
* @param failureCount
* The number of things that failed to be provisioned.
*/
public void setFailureCount(Integer failureCount) {
this.failureCount = failureCount;
}
/**
*
* The number of things that failed to be provisioned.
*
*
* @return The number of things that failed to be provisioned.
*/
public Integer getFailureCount() {
return this.failureCount;
}
/**
*
* The number of things that failed to be provisioned.
*
*
* @param failureCount
* The number of things that failed to be provisioned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withFailureCount(Integer failureCount) {
setFailureCount(failureCount);
return this;
}
/**
*
* The progress of the bulk provisioning task expressed as a percentage.
*
*
* @param percentageProgress
* The progress of the bulk provisioning task expressed as a percentage.
*/
public void setPercentageProgress(Integer percentageProgress) {
this.percentageProgress = percentageProgress;
}
/**
*
* The progress of the bulk provisioning task expressed as a percentage.
*
*
* @return The progress of the bulk provisioning task expressed as a percentage.
*/
public Integer getPercentageProgress() {
return this.percentageProgress;
}
/**
*
* The progress of the bulk provisioning task expressed as a percentage.
*
*
* @param percentageProgress
* The progress of the bulk provisioning task expressed as a percentage.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeThingRegistrationTaskResult withPercentageProgress(Integer percentageProgress) {
setPercentageProgress(percentageProgress);
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 (getTaskId() != null)
sb.append("TaskId: ").append(getTaskId()).append(",");
if (getCreationDate() != null)
sb.append("CreationDate: ").append(getCreationDate()).append(",");
if (getLastModifiedDate() != null)
sb.append("LastModifiedDate: ").append(getLastModifiedDate()).append(",");
if (getTemplateBody() != null)
sb.append("TemplateBody: ").append(getTemplateBody()).append(",");
if (getInputFileBucket() != null)
sb.append("InputFileBucket: ").append(getInputFileBucket()).append(",");
if (getInputFileKey() != null)
sb.append("InputFileKey: ").append(getInputFileKey()).append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getMessage() != null)
sb.append("Message: ").append(getMessage()).append(",");
if (getSuccessCount() != null)
sb.append("SuccessCount: ").append(getSuccessCount()).append(",");
if (getFailureCount() != null)
sb.append("FailureCount: ").append(getFailureCount()).append(",");
if (getPercentageProgress() != null)
sb.append("PercentageProgress: ").append(getPercentageProgress());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeThingRegistrationTaskResult == false)
return false;
DescribeThingRegistrationTaskResult other = (DescribeThingRegistrationTaskResult) obj;
if (other.getTaskId() == null ^ this.getTaskId() == null)
return false;
if (other.getTaskId() != null && other.getTaskId().equals(this.getTaskId()) == false)
return false;
if (other.getCreationDate() == null ^ this.getCreationDate() == null)
return false;
if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false)
return false;
if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null)
return false;
if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == false)
return false;
if (other.getTemplateBody() == null ^ this.getTemplateBody() == null)
return false;
if (other.getTemplateBody() != null && other.getTemplateBody().equals(this.getTemplateBody()) == false)
return false;
if (other.getInputFileBucket() == null ^ this.getInputFileBucket() == null)
return false;
if (other.getInputFileBucket() != null && other.getInputFileBucket().equals(this.getInputFileBucket()) == false)
return false;
if (other.getInputFileKey() == null ^ this.getInputFileKey() == null)
return false;
if (other.getInputFileKey() != null && other.getInputFileKey().equals(this.getInputFileKey()) == 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.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getMessage() == null ^ this.getMessage() == null)
return false;
if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false)
return false;
if (other.getSuccessCount() == null ^ this.getSuccessCount() == null)
return false;
if (other.getSuccessCount() != null && other.getSuccessCount().equals(this.getSuccessCount()) == false)
return false;
if (other.getFailureCount() == null ^ this.getFailureCount() == null)
return false;
if (other.getFailureCount() != null && other.getFailureCount().equals(this.getFailureCount()) == false)
return false;
if (other.getPercentageProgress() == null ^ this.getPercentageProgress() == null)
return false;
if (other.getPercentageProgress() != null && other.getPercentageProgress().equals(this.getPercentageProgress()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode());
hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode());
hashCode = prime * hashCode + ((getTemplateBody() == null) ? 0 : getTemplateBody().hashCode());
hashCode = prime * hashCode + ((getInputFileBucket() == null) ? 0 : getInputFileBucket().hashCode());
hashCode = prime * hashCode + ((getInputFileKey() == null) ? 0 : getInputFileKey().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode());
hashCode = prime * hashCode + ((getSuccessCount() == null) ? 0 : getSuccessCount().hashCode());
hashCode = prime * hashCode + ((getFailureCount() == null) ? 0 : getFailureCount().hashCode());
hashCode = prime * hashCode + ((getPercentageProgress() == null) ? 0 : getPercentageProgress().hashCode());
return hashCode;
}
@Override
public DescribeThingRegistrationTaskResult clone() {
try {
return (DescribeThingRegistrationTaskResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}