/*
* 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;
/**
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RegisterJobDefinition" target="_top">AWS API
* Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RegisterJobDefinitionResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {
/**
* <p>
* The name of the job definition.
* </p>
*/
private String jobDefinitionName;
/**
* <p>
* The Amazon Resource Name (ARN) of the job definition.
* </p>
*/
private String jobDefinitionArn;
/**
* <p>
* The revision of the job definition.
* </p>
*/
private Integer revision;
/**
* <p>
* The name of the job definition.
* </p>
*
* @param jobDefinitionName
* The name of the job definition.
*/
public void setJobDefinitionName(String jobDefinitionName) {
this.jobDefinitionName = jobDefinitionName;
}
/**
* <p>
* The name of the job definition.
* </p>
*
* @return The name of the job definition.
*/
public String getJobDefinitionName() {
return this.jobDefinitionName;
}
/**
* <p>
* The name of the job definition.
* </p>
*
* @param jobDefinitionName
* The name of the job definition.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RegisterJobDefinitionResult withJobDefinitionName(String jobDefinitionName) {
setJobDefinitionName(jobDefinitionName);
return this;
}
/**
* <p>
* The Amazon Resource Name (ARN) of the job definition.
* </p>
*
* @param jobDefinitionArn
* The Amazon Resource Name (ARN) of the job definition.
*/
public void setJobDefinitionArn(String jobDefinitionArn) {
this.jobDefinitionArn = jobDefinitionArn;
}
/**
* <p>
* The Amazon Resource Name (ARN) of the job definition.
* </p>
*
* @return The Amazon Resource Name (ARN) of the job definition.
*/
public String getJobDefinitionArn() {
return this.jobDefinitionArn;
}
/**
* <p>
* The Amazon Resource Name (ARN) of the job definition.
* </p>
*
* @param jobDefinitionArn
* The Amazon Resource Name (ARN) of the job definition.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RegisterJobDefinitionResult withJobDefinitionArn(String jobDefinitionArn) {
setJobDefinitionArn(jobDefinitionArn);
return this;
}
/**
* <p>
* The revision of the job definition.
* </p>
*
* @param revision
* The revision of the job definition.
*/
public void setRevision(Integer revision) {
this.revision = revision;
}
/**
* <p>
* The revision of the job definition.
* </p>
*
* @return The revision of the job definition.
*/
public Integer getRevision() {
return this.revision;
}
/**
* <p>
* The revision of the job definition.
* </p>
*
* @param revision
* The revision of the job definition.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RegisterJobDefinitionResult withRevision(Integer revision) {
setRevision(revision);
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 (getJobDefinitionName() != null)
sb.append("JobDefinitionName: ").append(getJobDefinitionName()).append(",");
if (getJobDefinitionArn() != null)
sb.append("JobDefinitionArn: ").append(getJobDefinitionArn()).append(",");
if (getRevision() != null)
sb.append("Revision: ").append(getRevision());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RegisterJobDefinitionResult == false)
return false;
RegisterJobDefinitionResult other = (RegisterJobDefinitionResult) obj;
if (other.getJobDefinitionName() == null ^ this.getJobDefinitionName() == null)
return false;
if (other.getJobDefinitionName() != null && other.getJobDefinitionName().equals(this.getJobDefinitionName()) == false)
return false;
if (other.getJobDefinitionArn() == null ^ this.getJobDefinitionArn() == null)
return false;
if (other.getJobDefinitionArn() != null && other.getJobDefinitionArn().equals(this.getJobDefinitionArn()) == false)
return false;
if (other.getRevision() == null ^ this.getRevision() == null)
return false;
if (other.getRevision() != null && other.getRevision().equals(this.getRevision()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getJobDefinitionName() == null) ? 0 : getJobDefinitionName().hashCode());
hashCode = prime * hashCode + ((getJobDefinitionArn() == null) ? 0 : getJobDefinitionArn().hashCode());
hashCode = prime * hashCode + ((getRevision() == null) ? 0 : getRevision().hashCode());
return hashCode;
}
@Override
public RegisterJobDefinitionResult clone() {
try {
return (RegisterJobDefinitionResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}