/*
* Copyright 2012-2017 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.batch.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
* <p>
* An object representing summary details of a job.
* </p>
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobSummary" target="_top">AWS API
* Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class JobSummary implements Serializable, Cloneable, StructuredPojo {
/**
* <p>
* The ID of the job.
* </p>
*/
private String jobId;
/**
* <p>
* The name of the job.
* </p>
*/
private String jobName;
/**
* <p>
* The ID of the job.
* </p>
*
* @param jobId
* The ID of the job.
*/
public void setJobId(String jobId) {
this.jobId = jobId;
}
/**
* <p>
* The ID of the job.
* </p>
*
* @return The ID of the job.
*/
public String getJobId() {
return this.jobId;
}
/**
* <p>
* The ID of the job.
* </p>
*
* @param jobId
* The ID of the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public JobSummary withJobId(String jobId) {
setJobId(jobId);
return this;
}
/**
* <p>
* The name of the job.
* </p>
*
* @param jobName
* The name of the job.
*/
public void setJobName(String jobName) {
this.jobName = jobName;
}
/**
* <p>
* The name of the job.
* </p>
*
* @return The name of the job.
*/
public String getJobName() {
return this.jobName;
}
/**
* <p>
* The name of the job.
* </p>
*
* @param jobName
* The name of the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public JobSummary withJobName(String jobName) {
setJobName(jobName);
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 (getJobId() != null)
sb.append("JobId: ").append(getJobId()).append(",");
if (getJobName() != null)
sb.append("JobName: ").append(getJobName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof JobSummary == false)
return false;
JobSummary other = (JobSummary) obj;
if (other.getJobId() == null ^ this.getJobId() == null)
return false;
if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false)
return false;
if (other.getJobName() == null ^ this.getJobName() == null)
return false;
if (other.getJobName() != null && other.getJobName().equals(this.getJobName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode());
hashCode = prime * hashCode + ((getJobName() == null) ? 0 : getJobName().hashCode());
return hashCode;
}
@Override
public JobSummary clone() {
try {
return (JobSummary) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.batch.model.transform.JobSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}