Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.importexport.model;
 
 
Container for the parameters to the CancelJob operation.

This operation cancels a specified job. Only the job owner can cancel it. The operation fails if the job has already started or is complete.

 
 public class CancelJobRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
A unique identifier which refers to a particular job.
 
     private String jobId;

    
Specifies the version of the client tool.
 
     private String aPIVersion;

    
A unique identifier which refers to a particular job.

Returns:
A unique identifier which refers to a particular job.
 
     public String getJobId() {
         return ;
     }
    
    
A unique identifier which refers to a particular job.

Parameters:
jobId A unique identifier which refers to a particular job.
 
     public void setJobId(String jobId) {
         this. = jobId;
     }
    
    
A unique identifier which refers to a particular job.

Returns a reference to this object so that method calls can be chained together.

Parameters:
jobId A unique identifier which refers to a particular job.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CancelJobRequest withJobId(String jobId) {
         this. = jobId;
         return this;
     }

    
Specifies the version of the client tool.

Returns:
Specifies the version of the client tool.
 
     public String getAPIVersion() {
         return ;
     }
    
    
Specifies the version of the client tool.

Parameters:
aPIVersion Specifies the version of the client tool.
 
     public void setAPIVersion(String aPIVersion) {
         this. = aPIVersion;
     }
    
    
Specifies the version of the client tool.

Returns a reference to this object so that method calls can be chained together.

Parameters:
aPIVersion Specifies the version of the client tool.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CancelJobRequest withAPIVersion(String aPIVersion) {
        this. = aPIVersion;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getJobId() != nullsb.append("JobId: " + getJobId() + ",");
        if (getAPIVersion() != nullsb.append("APIVersion: " + getAPIVersion() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode()); 
        hashCode = prime * hashCode + ((getAPIVersion() == null) ? 0 : getAPIVersion().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CancelJobRequest == falsereturn false;
        CancelJobRequest other = (CancelJobRequest)obj;
        
        if (other.getJobId() == null ^ this.getJobId() == nullreturn false;
        if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == falsereturn false
        if (other.getAPIVersion() == null ^ this.getAPIVersion() == nullreturn false;
        if (other.getAPIVersion() != null && other.getAPIVersion().equals(this.getAPIVersion()) == falsereturn false
        return true;
    }
    
    @Override
    public CancelJobRequest clone() {
        
            return (CancelJobRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X