
com.amazonaws.services.iot.model.DescribeThingRegistrationTaskResult Maven / Gradle / Ivy
/*
* 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 DescribeThingRegistrationTaskResult implements Serializable {
/**
*
* The task ID.
*
*
* Constraints:
* Length: - 40
*/
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.
*
*
* Constraints:
* Length: 3 - 256
* Pattern: [a-zA-Z0-9._-]+
*/
private String inputFileBucket;
/**
*
* The input file key.
*
*
* Constraints:
* Length: 1 - 1024
* Pattern: [a-zA-Z0-9!_.*'()-\/]+
*/
private String inputFileKey;
/**
*
* The role ARN that grants access to the input file bucket.
*
*
* Constraints:
* Length: 20 - 2048
*/
private String roleArn;
/**
*
* The status of the bulk thing provisioning task.
*
*
* Constraints:
* Allowed Values: InProgress, Completed, Failed, Cancelled,
* Cancelling
*/
private String status;
/**
*
* The message.
*
*
* Constraints:
* Length: - 2048
*/
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.
*
*
* Constraints:
* Range: 0 - 100
*/
private Integer percentageProgress;
/**
*
* The task ID.
*
*
* Constraints:
* Length: - 40
*
* @return
* The task ID.
*
*/
public String getTaskId() {
return taskId;
}
/**
*
* The task ID.
*
*
* Constraints:
* Length: - 40
*
* @param taskId
* The task ID.
*
*/
public void setTaskId(String taskId) {
this.taskId = taskId;
}
/**
*
* The task ID.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Length: - 40
*
* @param taskId
* The task ID.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withTaskId(String taskId) {
this.taskId = taskId;
return this;
}
/**
*
* The task creation date.
*
*
* @return
* The task creation date.
*
*/
public java.util.Date getCreationDate() {
return creationDate;
}
/**
*
* The task creation date.
*
*
* @param creationDate
* The task creation date.
*
*/
public void setCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
}
/**
*
* The task creation date.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param creationDate
* The task creation date.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
return this;
}
/**
*
* The date when the task was last modified.
*
*
* @return
* The date when the task was last modified.
*
*/
public java.util.Date getLastModifiedDate() {
return lastModifiedDate;
}
/**
*
* 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.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param lastModifiedDate
* The date when the task was last modified.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withLastModifiedDate(java.util.Date lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
return this;
}
/**
*
* The task's template.
*
*
* @return
* The task's template.
*
*/
public String getTemplateBody() {
return templateBody;
}
/**
*
* The task's template.
*
*
* @param templateBody
* The task's template.
*
*/
public void setTemplateBody(String templateBody) {
this.templateBody = templateBody;
}
/**
*
* The task's template.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param templateBody
* The task's template.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withTemplateBody(String templateBody) {
this.templateBody = templateBody;
return this;
}
/**
*
* The S3 bucket that contains the input file.
*
*
* Constraints:
* Length: 3 - 256
* Pattern: [a-zA-Z0-9._-]+
*
* @return
* The S3 bucket that contains the input file.
*
*/
public String getInputFileBucket() {
return inputFileBucket;
}
/**
*
* The S3 bucket that contains the input file.
*
*
* Constraints:
* Length: 3 - 256
* Pattern: [a-zA-Z0-9._-]+
*
* @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.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Length: 3 - 256
* Pattern: [a-zA-Z0-9._-]+
*
* @param inputFileBucket
* The S3 bucket that contains the input file.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withInputFileBucket(String inputFileBucket) {
this.inputFileBucket = inputFileBucket;
return this;
}
/**
*
* The input file key.
*
*
* Constraints:
* Length: 1 - 1024
* Pattern: [a-zA-Z0-9!_.*'()-\/]+
*
* @return
* The input file key.
*
*/
public String getInputFileKey() {
return inputFileKey;
}
/**
*
* The input file key.
*
*
* Constraints:
* Length: 1 - 1024
* Pattern: [a-zA-Z0-9!_.*'()-\/]+
*
* @param inputFileKey
* The input file key.
*
*/
public void setInputFileKey(String inputFileKey) {
this.inputFileKey = inputFileKey;
}
/**
*
* The input file key.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Length: 1 - 1024
* Pattern: [a-zA-Z0-9!_.*'()-\/]+
*
* @param inputFileKey
* The input file key.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withInputFileKey(String inputFileKey) {
this.inputFileKey = inputFileKey;
return this;
}
/**
*
* The role ARN that grants access to the input file bucket.
*
*
* Constraints:
* Length: 20 - 2048
*
* @return
* The role ARN that grants access to the input file bucket.
*
*/
public String getRoleArn() {
return roleArn;
}
/**
*
* The role ARN that grants access to the input file bucket.
*
*
* Constraints:
* Length: 20 - 2048
*
* @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.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Length: 20 - 2048
*
* @param roleArn
* The role ARN that grants access to the input file bucket.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withRoleArn(String roleArn) {
this.roleArn = roleArn;
return this;
}
/**
*
* The status of the bulk thing provisioning task.
*
*
* Constraints:
* Allowed Values: InProgress, Completed, Failed, Cancelled,
* Cancelling
*
* @return
* The status of the bulk thing provisioning task.
*
* @see Status
*/
public String getStatus() {
return status;
}
/**
*
* The status of the bulk thing provisioning task.
*
*
* Constraints:
* Allowed Values: InProgress, Completed, Failed, Cancelled,
* Cancelling
*
* @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.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Allowed Values: InProgress, Completed, Failed, Cancelled,
* Cancelling
*
* @param status
* The status of the bulk thing provisioning task.
*
* @return A reference to this updated object so that method calls can be
* chained together.
* @see Status
*/
public DescribeThingRegistrationTaskResult withStatus(String status) {
this.status = status;
return this;
}
/**
*
* The status of the bulk thing provisioning task.
*
*
* Constraints:
* Allowed Values: InProgress, Completed, Failed, Cancelled,
* Cancelling
*
* @param status
* The status of the bulk thing provisioning task.
*
* @see Status
*/
public void setStatus(Status status) {
this.status = status.toString();
}
/**
*
* The status of the bulk thing provisioning task.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Allowed Values: InProgress, Completed, Failed, Cancelled,
* Cancelling
*
* @param status
* The status of the bulk thing provisioning task.
*
* @return A reference to this updated object so that method calls can be
* chained together.
* @see Status
*/
public DescribeThingRegistrationTaskResult withStatus(Status status) {
this.status = status.toString();
return this;
}
/**
*
* The message.
*
*
* Constraints:
* Length: - 2048
*
* @return
* The message.
*
*/
public String getMessage() {
return message;
}
/**
*
* The message.
*
*
* Constraints:
* Length: - 2048
*
* @param message
* The message.
*
*/
public void setMessage(String message) {
this.message = message;
}
/**
*
* The message.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Length: - 2048
*
* @param message
* The message.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withMessage(String message) {
this.message = message;
return this;
}
/**
*
* The number of things successfully provisioned.
*
*
* @return
* The number of things successfully provisioned.
*
*/
public Integer getSuccessCount() {
return successCount;
}
/**
*
* 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.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param successCount
* The number of things successfully provisioned.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withSuccessCount(Integer successCount) {
this.successCount = successCount;
return this;
}
/**
*
* The number of things that failed to be provisioned.
*
*
* @return
* The number of things that failed to be provisioned.
*
*/
public Integer getFailureCount() {
return failureCount;
}
/**
*
* 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.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param failureCount
* The number of things that failed to be provisioned.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withFailureCount(Integer failureCount) {
this.failureCount = failureCount;
return this;
}
/**
*
* The progress of the bulk provisioning task expressed as a percentage.
*
*
* Constraints:
* Range: 0 - 100
*
* @return
* The progress of the bulk provisioning task expressed as a
* percentage.
*
*/
public Integer getPercentageProgress() {
return percentageProgress;
}
/**
*
* The progress of the bulk provisioning task expressed as a percentage.
*
*
* Constraints:
* Range: 0 - 100
*
* @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.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Range: 0 - 100
*
* @param percentageProgress
* The progress of the bulk provisioning task expressed as a
* percentage.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeThingRegistrationTaskResult withPercentageProgress(Integer percentageProgress) {
this.percentageProgress = percentageProgress;
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 (getTaskId() != null)
sb.append("taskId: " + getTaskId() + ",");
if (getCreationDate() != null)
sb.append("creationDate: " + getCreationDate() + ",");
if (getLastModifiedDate() != null)
sb.append("lastModifiedDate: " + getLastModifiedDate() + ",");
if (getTemplateBody() != null)
sb.append("templateBody: " + getTemplateBody() + ",");
if (getInputFileBucket() != null)
sb.append("inputFileBucket: " + getInputFileBucket() + ",");
if (getInputFileKey() != null)
sb.append("inputFileKey: " + getInputFileKey() + ",");
if (getRoleArn() != null)
sb.append("roleArn: " + getRoleArn() + ",");
if (getStatus() != null)
sb.append("status: " + getStatus() + ",");
if (getMessage() != null)
sb.append("message: " + getMessage() + ",");
if (getSuccessCount() != null)
sb.append("successCount: " + getSuccessCount() + ",");
if (getFailureCount() != null)
sb.append("failureCount: " + getFailureCount() + ",");
if (getPercentageProgress() != null)
sb.append("percentageProgress: " + getPercentageProgress());
sb.append("}");
return sb.toString();
}
@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 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;
}
}