com.amazonaws.services.entityresolution.model.GetIdMappingJobResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-entityresolution Show documentation
/*
* Copyright 2019-2024 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.entityresolution.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetIdMappingJobResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The time at which the job has finished.
*
*/
private java.util.Date endTime;
private ErrorDetails errorDetails;
/**
*
* The ID of the job.
*
*/
private String jobId;
/**
*
* Metrics associated with the execution, specifically total records processed, unique IDs generated, and records
* the execution skipped.
*
*/
private IdMappingJobMetrics metrics;
/**
*
* A list of OutputSource
objects.
*
*/
private java.util.List outputSourceConfig;
/**
*
* The time at which the job was started.
*
*/
private java.util.Date startTime;
/**
*
* The current status of the job.
*
*/
private String status;
/**
*
* The time at which the job has finished.
*
*
* @param endTime
* The time at which the job has finished.
*/
public void setEndTime(java.util.Date endTime) {
this.endTime = endTime;
}
/**
*
* The time at which the job has finished.
*
*
* @return The time at which the job has finished.
*/
public java.util.Date getEndTime() {
return this.endTime;
}
/**
*
* The time at which the job has finished.
*
*
* @param endTime
* The time at which the job has finished.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetIdMappingJobResult withEndTime(java.util.Date endTime) {
setEndTime(endTime);
return this;
}
/**
* @param errorDetails
*/
public void setErrorDetails(ErrorDetails errorDetails) {
this.errorDetails = errorDetails;
}
/**
* @return
*/
public ErrorDetails getErrorDetails() {
return this.errorDetails;
}
/**
* @param errorDetails
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetIdMappingJobResult withErrorDetails(ErrorDetails errorDetails) {
setErrorDetails(errorDetails);
return this;
}
/**
*
* The ID of the job.
*
*
* @param jobId
* The ID of the job.
*/
public void setJobId(String jobId) {
this.jobId = jobId;
}
/**
*
* The ID of the job.
*
*
* @return The ID of the job.
*/
public String getJobId() {
return this.jobId;
}
/**
*
* The ID of the job.
*
*
* @param jobId
* The ID of the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetIdMappingJobResult withJobId(String jobId) {
setJobId(jobId);
return this;
}
/**
*
* Metrics associated with the execution, specifically total records processed, unique IDs generated, and records
* the execution skipped.
*
*
* @param metrics
* Metrics associated with the execution, specifically total records processed, unique IDs generated, and
* records the execution skipped.
*/
public void setMetrics(IdMappingJobMetrics metrics) {
this.metrics = metrics;
}
/**
*
* Metrics associated with the execution, specifically total records processed, unique IDs generated, and records
* the execution skipped.
*
*
* @return Metrics associated with the execution, specifically total records processed, unique IDs generated, and
* records the execution skipped.
*/
public IdMappingJobMetrics getMetrics() {
return this.metrics;
}
/**
*
* Metrics associated with the execution, specifically total records processed, unique IDs generated, and records
* the execution skipped.
*
*
* @param metrics
* Metrics associated with the execution, specifically total records processed, unique IDs generated, and
* records the execution skipped.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetIdMappingJobResult withMetrics(IdMappingJobMetrics metrics) {
setMetrics(metrics);
return this;
}
/**
*
* A list of OutputSource
objects.
*
*
* @return A list of OutputSource
objects.
*/
public java.util.List getOutputSourceConfig() {
return outputSourceConfig;
}
/**
*
* A list of OutputSource
objects.
*
*
* @param outputSourceConfig
* A list of OutputSource
objects.
*/
public void setOutputSourceConfig(java.util.Collection outputSourceConfig) {
if (outputSourceConfig == null) {
this.outputSourceConfig = null;
return;
}
this.outputSourceConfig = new java.util.ArrayList(outputSourceConfig);
}
/**
*
* A list of OutputSource
objects.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setOutputSourceConfig(java.util.Collection)} or {@link #withOutputSourceConfig(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param outputSourceConfig
* A list of OutputSource
objects.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetIdMappingJobResult withOutputSourceConfig(IdMappingJobOutputSource... outputSourceConfig) {
if (this.outputSourceConfig == null) {
setOutputSourceConfig(new java.util.ArrayList(outputSourceConfig.length));
}
for (IdMappingJobOutputSource ele : outputSourceConfig) {
this.outputSourceConfig.add(ele);
}
return this;
}
/**
*
* A list of OutputSource
objects.
*
*
* @param outputSourceConfig
* A list of OutputSource
objects.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetIdMappingJobResult withOutputSourceConfig(java.util.Collection outputSourceConfig) {
setOutputSourceConfig(outputSourceConfig);
return this;
}
/**
*
* The time at which the job was started.
*
*
* @param startTime
* The time at which the job was started.
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
*
* The time at which the job was started.
*
*
* @return The time at which the job was started.
*/
public java.util.Date getStartTime() {
return this.startTime;
}
/**
*
* The time at which the job was started.
*
*
* @param startTime
* The time at which the job was started.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetIdMappingJobResult withStartTime(java.util.Date startTime) {
setStartTime(startTime);
return this;
}
/**
*
* The current status of the job.
*
*
* @param status
* The current status of the job.
* @see JobStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The current status of the job.
*
*
* @return The current status of the job.
* @see JobStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The current status of the job.
*
*
* @param status
* The current status of the job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JobStatus
*/
public GetIdMappingJobResult withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The current status of the job.
*
*
* @param status
* The current status of the job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JobStatus
*/
public GetIdMappingJobResult withStatus(JobStatus status) {
this.status = status.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 (getEndTime() != null)
sb.append("EndTime: ").append(getEndTime()).append(",");
if (getErrorDetails() != null)
sb.append("ErrorDetails: ").append(getErrorDetails()).append(",");
if (getJobId() != null)
sb.append("JobId: ").append(getJobId()).append(",");
if (getMetrics() != null)
sb.append("Metrics: ").append(getMetrics()).append(",");
if (getOutputSourceConfig() != null)
sb.append("OutputSourceConfig: ").append(getOutputSourceConfig()).append(",");
if (getStartTime() != null)
sb.append("StartTime: ").append(getStartTime()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetIdMappingJobResult == false)
return false;
GetIdMappingJobResult other = (GetIdMappingJobResult) obj;
if (other.getEndTime() == null ^ this.getEndTime() == null)
return false;
if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false)
return false;
if (other.getErrorDetails() == null ^ this.getErrorDetails() == null)
return false;
if (other.getErrorDetails() != null && other.getErrorDetails().equals(this.getErrorDetails()) == false)
return false;
if (other.getJobId() == null ^ this.getJobId() == null)
return false;
if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false)
return false;
if (other.getMetrics() == null ^ this.getMetrics() == null)
return false;
if (other.getMetrics() != null && other.getMetrics().equals(this.getMetrics()) == false)
return false;
if (other.getOutputSourceConfig() == null ^ this.getOutputSourceConfig() == null)
return false;
if (other.getOutputSourceConfig() != null && other.getOutputSourceConfig().equals(this.getOutputSourceConfig()) == false)
return false;
if (other.getStartTime() == null ^ this.getStartTime() == null)
return false;
if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
hashCode = prime * hashCode + ((getErrorDetails() == null) ? 0 : getErrorDetails().hashCode());
hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode());
hashCode = prime * hashCode + ((getMetrics() == null) ? 0 : getMetrics().hashCode());
hashCode = prime * hashCode + ((getOutputSourceConfig() == null) ? 0 : getOutputSourceConfig().hashCode());
hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
return hashCode;
}
@Override
public GetIdMappingJobResult clone() {
try {
return (GetIdMappingJobResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}