com.amazonaws.services.dataexchange.model.GetJobResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-dataexchange 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.dataexchange.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetJobResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ARN for the job.
*
*/
private String arn;
/**
*
* The date and time that the job was created, in ISO 8601 format.
*
*/
private java.util.Date createdAt;
/**
*
* Details about the job.
*
*/
private ResponseDetails details;
/**
*
* The errors associated with jobs.
*
*/
private java.util.List errors;
/**
*
* The unique identifier for the job.
*
*/
private String id;
/**
*
* The state of the job.
*
*/
private String state;
/**
*
* The job type.
*
*/
private String type;
/**
*
* The date and time that the job was last updated, in ISO 8601 format.
*
*/
private java.util.Date updatedAt;
/**
*
* The ARN for the job.
*
*
* @param arn
* The ARN for the job.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN for the job.
*
*
* @return The ARN for the job.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN for the job.
*
*
* @param arn
* The ARN for the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetJobResult withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The date and time that the job was created, in ISO 8601 format.
*
*
* @param createdAt
* The date and time that the job was created, in ISO 8601 format.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The date and time that the job was created, in ISO 8601 format.
*
*
* @return The date and time that the job was created, in ISO 8601 format.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The date and time that the job was created, in ISO 8601 format.
*
*
* @param createdAt
* The date and time that the job was created, in ISO 8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetJobResult withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* Details about the job.
*
*
* @param details
* Details about the job.
*/
public void setDetails(ResponseDetails details) {
this.details = details;
}
/**
*
* Details about the job.
*
*
* @return Details about the job.
*/
public ResponseDetails getDetails() {
return this.details;
}
/**
*
* Details about the job.
*
*
* @param details
* Details about the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetJobResult withDetails(ResponseDetails details) {
setDetails(details);
return this;
}
/**
*
* The errors associated with jobs.
*
*
* @return The errors associated with jobs.
*/
public java.util.List getErrors() {
return errors;
}
/**
*
* The errors associated with jobs.
*
*
* @param errors
* The errors associated with jobs.
*/
public void setErrors(java.util.Collection errors) {
if (errors == null) {
this.errors = null;
return;
}
this.errors = new java.util.ArrayList(errors);
}
/**
*
* The errors associated with jobs.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setErrors(java.util.Collection)} or {@link #withErrors(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param errors
* The errors associated with jobs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetJobResult withErrors(JobError... errors) {
if (this.errors == null) {
setErrors(new java.util.ArrayList(errors.length));
}
for (JobError ele : errors) {
this.errors.add(ele);
}
return this;
}
/**
*
* The errors associated with jobs.
*
*
* @param errors
* The errors associated with jobs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetJobResult withErrors(java.util.Collection errors) {
setErrors(errors);
return this;
}
/**
*
* The unique identifier for the job.
*
*
* @param id
* The unique identifier for the job.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The unique identifier for the job.
*
*
* @return The unique identifier for the job.
*/
public String getId() {
return this.id;
}
/**
*
* The unique identifier for the job.
*
*
* @param id
* The unique identifier for the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetJobResult withId(String id) {
setId(id);
return this;
}
/**
*
* The state of the job.
*
*
* @param state
* The state of the job.
* @see State
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The state of the job.
*
*
* @return The state of the job.
* @see State
*/
public String getState() {
return this.state;
}
/**
*
* The state of the job.
*
*
* @param state
* The state of the job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see State
*/
public GetJobResult withState(String state) {
setState(state);
return this;
}
/**
*
* The state of the job.
*
*
* @param state
* The state of the job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see State
*/
public GetJobResult withState(State state) {
this.state = state.toString();
return this;
}
/**
*
* The job type.
*
*
* @param type
* The job type.
* @see Type
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The job type.
*
*
* @return The job type.
* @see Type
*/
public String getType() {
return this.type;
}
/**
*
* The job type.
*
*
* @param type
* The job type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Type
*/
public GetJobResult withType(String type) {
setType(type);
return this;
}
/**
*
* The job type.
*
*
* @param type
* The job type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Type
*/
public GetJobResult withType(Type type) {
this.type = type.toString();
return this;
}
/**
*
* The date and time that the job was last updated, in ISO 8601 format.
*
*
* @param updatedAt
* The date and time that the job was last updated, in ISO 8601 format.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The date and time that the job was last updated, in ISO 8601 format.
*
*
* @return The date and time that the job was last updated, in ISO 8601 format.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The date and time that the job was last updated, in ISO 8601 format.
*
*
* @param updatedAt
* The date and time that the job was last updated, in ISO 8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetJobResult withUpdatedAt(java.util.Date updatedAt) {
setUpdatedAt(updatedAt);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getDetails() != null)
sb.append("Details: ").append(getDetails()).append(",");
if (getErrors() != null)
sb.append("Errors: ").append(getErrors()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getUpdatedAt() != null)
sb.append("UpdatedAt: ").append(getUpdatedAt());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetJobResult == false)
return false;
GetJobResult other = (GetJobResult) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getDetails() == null ^ this.getDetails() == null)
return false;
if (other.getDetails() != null && other.getDetails().equals(this.getDetails()) == false)
return false;
if (other.getErrors() == null ^ this.getErrors() == null)
return false;
if (other.getErrors() != null && other.getErrors().equals(this.getErrors()) == 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.getState() == null ^ this.getState() == null)
return false;
if (other.getState() != null && other.getState().equals(this.getState()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null)
return false;
if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getDetails() == null) ? 0 : getDetails().hashCode());
hashCode = prime * hashCode + ((getErrors() == null) ? 0 : getErrors().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
return hashCode;
}
@Override
public GetJobResult clone() {
try {
return (GetJobResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}