com.amazonaws.services.pinpoint.model.ExportJobResponse Maven / Gradle / Ivy
Show all versions of aws-android-sdk-pinpoint 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.pinpoint.model;
import java.io.Serializable;
public class ExportJobResponse implements Serializable {
/**
* The unique ID of the application to which the job applies.
*/
private String applicationId;
/**
* The number of pieces that have successfully completed as of the time of
* the request.
*/
private Integer completedPieces;
/**
* The date the job completed in ISO 8601 format.
*/
private String completionDate;
/**
* The date the job was created in ISO 8601 format.
*/
private String creationDate;
/**
* The export job settings.
*/
private ExportJobResource definition;
/**
* The number of pieces that failed to be processed as of the time of the
* request.
*/
private Integer failedPieces;
/**
* Provides up to 100 of the first failed entries for the job, if any exist.
*/
private java.util.List failures;
/**
* The unique ID of the job.
*/
private String id;
/**
* The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING,
* COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or
* more pieces failed.
*
* Constraints:
* Allowed Values: CREATED, INITIALIZING, PROCESSING, COMPLETING,
* COMPLETED, FAILING, FAILED
*/
private String jobStatus;
/**
* The number of endpoints that were not processed; for example, because of
* syntax errors.
*/
private Integer totalFailures;
/**
* The total number of pieces that must be processed to finish the job. Each
* piece is an approximately equal portion of the endpoints.
*/
private Integer totalPieces;
/**
* The number of endpoints that were processed by the job.
*/
private Integer totalProcessed;
/**
* The job type. Will be 'EXPORT'.
*/
private String type;
/**
* The unique ID of the application to which the job applies.
*
* @return The unique ID of the application to which the job applies.
*/
public String getApplicationId() {
return applicationId;
}
/**
* The unique ID of the application to which the job applies.
*
* @param applicationId The unique ID of the application to which the job
* applies.
*/
public void setApplicationId(String applicationId) {
this.applicationId = applicationId;
}
/**
* The unique ID of the application to which the job applies.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param applicationId The unique ID of the application to which the job
* applies.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withApplicationId(String applicationId) {
this.applicationId = applicationId;
return this;
}
/**
* The number of pieces that have successfully completed as of the time of
* the request.
*
* @return The number of pieces that have successfully completed as of the
* time of the request.
*/
public Integer getCompletedPieces() {
return completedPieces;
}
/**
* The number of pieces that have successfully completed as of the time of
* the request.
*
* @param completedPieces The number of pieces that have successfully
* completed as of the time of the request.
*/
public void setCompletedPieces(Integer completedPieces) {
this.completedPieces = completedPieces;
}
/**
* The number of pieces that have successfully completed as of the time of
* the request.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param completedPieces The number of pieces that have successfully
* completed as of the time of the request.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withCompletedPieces(Integer completedPieces) {
this.completedPieces = completedPieces;
return this;
}
/**
* The date the job completed in ISO 8601 format.
*
* @return The date the job completed in ISO 8601 format.
*/
public String getCompletionDate() {
return completionDate;
}
/**
* The date the job completed in ISO 8601 format.
*
* @param completionDate The date the job completed in ISO 8601 format.
*/
public void setCompletionDate(String completionDate) {
this.completionDate = completionDate;
}
/**
* The date the job completed in ISO 8601 format.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param completionDate The date the job completed in ISO 8601 format.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withCompletionDate(String completionDate) {
this.completionDate = completionDate;
return this;
}
/**
* The date the job was created in ISO 8601 format.
*
* @return The date the job was created in ISO 8601 format.
*/
public String getCreationDate() {
return creationDate;
}
/**
* The date the job was created in ISO 8601 format.
*
* @param creationDate The date the job was created in ISO 8601 format.
*/
public void setCreationDate(String creationDate) {
this.creationDate = creationDate;
}
/**
* The date the job was created in ISO 8601 format.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param creationDate The date the job was created in ISO 8601 format.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withCreationDate(String creationDate) {
this.creationDate = creationDate;
return this;
}
/**
* The export job settings.
*
* @return The export job settings.
*/
public ExportJobResource getDefinition() {
return definition;
}
/**
* The export job settings.
*
* @param definition The export job settings.
*/
public void setDefinition(ExportJobResource definition) {
this.definition = definition;
}
/**
* The export job settings.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param definition The export job settings.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withDefinition(ExportJobResource definition) {
this.definition = definition;
return this;
}
/**
* The number of pieces that failed to be processed as of the time of the
* request.
*
* @return The number of pieces that failed to be processed as of the time
* of the request.
*/
public Integer getFailedPieces() {
return failedPieces;
}
/**
* The number of pieces that failed to be processed as of the time of the
* request.
*
* @param failedPieces The number of pieces that failed to be processed as
* of the time of the request.
*/
public void setFailedPieces(Integer failedPieces) {
this.failedPieces = failedPieces;
}
/**
* The number of pieces that failed to be processed as of the time of the
* request.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param failedPieces The number of pieces that failed to be processed as
* of the time of the request.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withFailedPieces(Integer failedPieces) {
this.failedPieces = failedPieces;
return this;
}
/**
* Provides up to 100 of the first failed entries for the job, if any exist.
*
* @return Provides up to 100 of the first failed entries for the job, if
* any exist.
*/
public java.util.List getFailures() {
return failures;
}
/**
* Provides up to 100 of the first failed entries for the job, if any exist.
*
* @param failures Provides up to 100 of the first failed entries for the
* job, if any exist.
*/
public void setFailures(java.util.Collection failures) {
if (failures == null) {
this.failures = null;
return;
}
this.failures = new java.util.ArrayList(failures);
}
/**
* Provides up to 100 of the first failed entries for the job, if any exist.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param failures Provides up to 100 of the first failed entries for the
* job, if any exist.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withFailures(String... failures) {
if (getFailures() == null) {
this.failures = new java.util.ArrayList(failures.length);
}
for (String value : failures) {
this.failures.add(value);
}
return this;
}
/**
* Provides up to 100 of the first failed entries for the job, if any exist.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param failures Provides up to 100 of the first failed entries for the
* job, if any exist.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withFailures(java.util.Collection failures) {
setFailures(failures);
return this;
}
/**
* The unique ID of the job.
*
* @return The unique ID of the job.
*/
public String getId() {
return id;
}
/**
* The unique ID of the job.
*
* @param id The unique ID of the job.
*/
public void setId(String id) {
this.id = id;
}
/**
* The unique ID of the job.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param id The unique ID of the job.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withId(String id) {
this.id = id;
return this;
}
/**
* The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING,
* COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or
* more pieces failed.
*
* Constraints:
* Allowed Values: CREATED, INITIALIZING, PROCESSING, COMPLETING,
* COMPLETED, FAILING, FAILED
*
* @return The status of the job. Valid values: CREATED, INITIALIZING,
* PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status
* is FAILED if one or more pieces failed.
* @see JobStatus
*/
public String getJobStatus() {
return jobStatus;
}
/**
* The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING,
* COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or
* more pieces failed.
*
* Constraints:
* Allowed Values: CREATED, INITIALIZING, PROCESSING, COMPLETING,
* COMPLETED, FAILING, FAILED
*
* @param jobStatus The status of the job. Valid values: CREATED,
* INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING,
* FAILED The job status is FAILED if one or more pieces failed.
* @see JobStatus
*/
public void setJobStatus(String jobStatus) {
this.jobStatus = jobStatus;
}
/**
* The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING,
* COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or
* more pieces failed.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Allowed Values: CREATED, INITIALIZING, PROCESSING, COMPLETING,
* COMPLETED, FAILING, FAILED
*
* @param jobStatus The status of the job. Valid values: CREATED,
* INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING,
* FAILED The job status is FAILED if one or more pieces failed.
* @return A reference to this updated object so that method calls can be
* chained together.
* @see JobStatus
*/
public ExportJobResponse withJobStatus(String jobStatus) {
this.jobStatus = jobStatus;
return this;
}
/**
* The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING,
* COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or
* more pieces failed.
*
* Constraints:
* Allowed Values: CREATED, INITIALIZING, PROCESSING, COMPLETING,
* COMPLETED, FAILING, FAILED
*
* @param jobStatus The status of the job. Valid values: CREATED,
* INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING,
* FAILED The job status is FAILED if one or more pieces failed.
* @see JobStatus
*/
public void setJobStatus(JobStatus jobStatus) {
this.jobStatus = jobStatus.toString();
}
/**
* The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING,
* COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or
* more pieces failed.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Allowed Values: CREATED, INITIALIZING, PROCESSING, COMPLETING,
* COMPLETED, FAILING, FAILED
*
* @param jobStatus The status of the job. Valid values: CREATED,
* INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING,
* FAILED The job status is FAILED if one or more pieces failed.
* @return A reference to this updated object so that method calls can be
* chained together.
* @see JobStatus
*/
public ExportJobResponse withJobStatus(JobStatus jobStatus) {
this.jobStatus = jobStatus.toString();
return this;
}
/**
* The number of endpoints that were not processed; for example, because of
* syntax errors.
*
* @return The number of endpoints that were not processed; for example,
* because of syntax errors.
*/
public Integer getTotalFailures() {
return totalFailures;
}
/**
* The number of endpoints that were not processed; for example, because of
* syntax errors.
*
* @param totalFailures The number of endpoints that were not processed; for
* example, because of syntax errors.
*/
public void setTotalFailures(Integer totalFailures) {
this.totalFailures = totalFailures;
}
/**
* The number of endpoints that were not processed; for example, because of
* syntax errors.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param totalFailures The number of endpoints that were not processed; for
* example, because of syntax errors.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withTotalFailures(Integer totalFailures) {
this.totalFailures = totalFailures;
return this;
}
/**
* The total number of pieces that must be processed to finish the job. Each
* piece is an approximately equal portion of the endpoints.
*
* @return The total number of pieces that must be processed to finish the
* job. Each piece is an approximately equal portion of the
* endpoints.
*/
public Integer getTotalPieces() {
return totalPieces;
}
/**
* The total number of pieces that must be processed to finish the job. Each
* piece is an approximately equal portion of the endpoints.
*
* @param totalPieces The total number of pieces that must be processed to
* finish the job. Each piece is an approximately equal portion
* of the endpoints.
*/
public void setTotalPieces(Integer totalPieces) {
this.totalPieces = totalPieces;
}
/**
* The total number of pieces that must be processed to finish the job. Each
* piece is an approximately equal portion of the endpoints.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param totalPieces The total number of pieces that must be processed to
* finish the job. Each piece is an approximately equal portion
* of the endpoints.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withTotalPieces(Integer totalPieces) {
this.totalPieces = totalPieces;
return this;
}
/**
* The number of endpoints that were processed by the job.
*
* @return The number of endpoints that were processed by the job.
*/
public Integer getTotalProcessed() {
return totalProcessed;
}
/**
* The number of endpoints that were processed by the job.
*
* @param totalProcessed The number of endpoints that were processed by the
* job.
*/
public void setTotalProcessed(Integer totalProcessed) {
this.totalProcessed = totalProcessed;
}
/**
* The number of endpoints that were processed by the job.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param totalProcessed The number of endpoints that were processed by the
* job.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withTotalProcessed(Integer totalProcessed) {
this.totalProcessed = totalProcessed;
return this;
}
/**
* The job type. Will be 'EXPORT'.
*
* @return The job type. Will be 'EXPORT'.
*/
public String getType() {
return type;
}
/**
* The job type. Will be 'EXPORT'.
*
* @param type The job type. Will be 'EXPORT'.
*/
public void setType(String type) {
this.type = type;
}
/**
* The job type. Will be 'EXPORT'.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param type The job type. Will be 'EXPORT'.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ExportJobResponse withType(String type) {
this.type = type;
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 (getApplicationId() != null)
sb.append("ApplicationId: " + getApplicationId() + ",");
if (getCompletedPieces() != null)
sb.append("CompletedPieces: " + getCompletedPieces() + ",");
if (getCompletionDate() != null)
sb.append("CompletionDate: " + getCompletionDate() + ",");
if (getCreationDate() != null)
sb.append("CreationDate: " + getCreationDate() + ",");
if (getDefinition() != null)
sb.append("Definition: " + getDefinition() + ",");
if (getFailedPieces() != null)
sb.append("FailedPieces: " + getFailedPieces() + ",");
if (getFailures() != null)
sb.append("Failures: " + getFailures() + ",");
if (getId() != null)
sb.append("Id: " + getId() + ",");
if (getJobStatus() != null)
sb.append("JobStatus: " + getJobStatus() + ",");
if (getTotalFailures() != null)
sb.append("TotalFailures: " + getTotalFailures() + ",");
if (getTotalPieces() != null)
sb.append("TotalPieces: " + getTotalPieces() + ",");
if (getTotalProcessed() != null)
sb.append("TotalProcessed: " + getTotalProcessed() + ",");
if (getType() != null)
sb.append("Type: " + getType());
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getApplicationId() == null) ? 0 : getApplicationId().hashCode());
hashCode = prime * hashCode
+ ((getCompletedPieces() == null) ? 0 : getCompletedPieces().hashCode());
hashCode = prime * hashCode
+ ((getCompletionDate() == null) ? 0 : getCompletionDate().hashCode());
hashCode = prime * hashCode
+ ((getCreationDate() == null) ? 0 : getCreationDate().hashCode());
hashCode = prime * hashCode + ((getDefinition() == null) ? 0 : getDefinition().hashCode());
hashCode = prime * hashCode
+ ((getFailedPieces() == null) ? 0 : getFailedPieces().hashCode());
hashCode = prime * hashCode + ((getFailures() == null) ? 0 : getFailures().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getJobStatus() == null) ? 0 : getJobStatus().hashCode());
hashCode = prime * hashCode
+ ((getTotalFailures() == null) ? 0 : getTotalFailures().hashCode());
hashCode = prime * hashCode
+ ((getTotalPieces() == null) ? 0 : getTotalPieces().hashCode());
hashCode = prime * hashCode
+ ((getTotalProcessed() == null) ? 0 : getTotalProcessed().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ExportJobResponse == false)
return false;
ExportJobResponse other = (ExportJobResponse) obj;
if (other.getApplicationId() == null ^ this.getApplicationId() == null)
return false;
if (other.getApplicationId() != null
&& other.getApplicationId().equals(this.getApplicationId()) == false)
return false;
if (other.getCompletedPieces() == null ^ this.getCompletedPieces() == null)
return false;
if (other.getCompletedPieces() != null
&& other.getCompletedPieces().equals(this.getCompletedPieces()) == false)
return false;
if (other.getCompletionDate() == null ^ this.getCompletionDate() == null)
return false;
if (other.getCompletionDate() != null
&& other.getCompletionDate().equals(this.getCompletionDate()) == 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.getDefinition() == null ^ this.getDefinition() == null)
return false;
if (other.getDefinition() != null
&& other.getDefinition().equals(this.getDefinition()) == false)
return false;
if (other.getFailedPieces() == null ^ this.getFailedPieces() == null)
return false;
if (other.getFailedPieces() != null
&& other.getFailedPieces().equals(this.getFailedPieces()) == false)
return false;
if (other.getFailures() == null ^ this.getFailures() == null)
return false;
if (other.getFailures() != null && other.getFailures().equals(this.getFailures()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getJobStatus() == null ^ this.getJobStatus() == null)
return false;
if (other.getJobStatus() != null
&& other.getJobStatus().equals(this.getJobStatus()) == false)
return false;
if (other.getTotalFailures() == null ^ this.getTotalFailures() == null)
return false;
if (other.getTotalFailures() != null
&& other.getTotalFailures().equals(this.getTotalFailures()) == false)
return false;
if (other.getTotalPieces() == null ^ this.getTotalPieces() == null)
return false;
if (other.getTotalPieces() != null
&& other.getTotalPieces().equals(this.getTotalPieces()) == false)
return false;
if (other.getTotalProcessed() == null ^ this.getTotalProcessed() == null)
return false;
if (other.getTotalProcessed() != null
&& other.getTotalProcessed().equals(this.getTotalProcessed()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
return true;
}
}