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;
 

Representation of a job returned by the ListJobs operation.

 
 public class Job implements SerializableCloneable {

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

    
Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".
 
     private java.util.Date creationDate;

    
Indicates whether the job was canceled.
 
     private Boolean isCanceled;

    
Specifies whether the job to initiate is an import or export job.

Constraints:
Allowed Values: Import, Export

 
     private String jobType;

    
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 Job withJobId(String jobId) {
         this. = jobId;
         return this;
     }

    
Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".

Returns:
Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".
 
     public java.util.Date getCreationDate() {
         return ;
     }
    
    
Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".

Parameters:
creationDate Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".
    public void setCreationDate(java.util.Date creationDate) {
        this. = creationDate;
    }
    
    
Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".

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

Parameters:
creationDate Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".
Returns:
A reference to this updated object so that method calls can be chained together.
    public Job withCreationDate(java.util.Date creationDate) {
        this. = creationDate;
        return this;
    }

    
Indicates whether the job was canceled.

Returns:
Indicates whether the job was canceled.
    public Boolean isCanceled() {
        return ;
    }
    
    
Indicates whether the job was canceled.

Parameters:
isCanceled Indicates whether the job was canceled.
    public void setIsCanceled(Boolean isCanceled) {
        this. = isCanceled;
    }
    
    
Indicates whether the job was canceled.

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

Parameters:
isCanceled Indicates whether the job was canceled.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Job withIsCanceled(Boolean isCanceled) {
        this. = isCanceled;
        return this;
    }

    
Indicates whether the job was canceled.

Returns:
Indicates whether the job was canceled.
    public Boolean getIsCanceled() {
        return ;
    }

    
Specifies whether the job to initiate is an import or export job.

Constraints:
Allowed Values: Import, Export

Returns:
Specifies whether the job to initiate is an import or export job.
See also:
JobType
    public String getJobType() {
        return ;
    }
    
    
Specifies whether the job to initiate is an import or export job.

Constraints:
Allowed Values: Import, Export

Parameters:
jobType Specifies whether the job to initiate is an import or export job.
See also:
JobType
    public void setJobType(String jobType) {
        this. = jobType;
    }
    
    
Specifies whether the job to initiate is an import or export job.

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

Constraints:
Allowed Values: Import, Export

Parameters:
jobType Specifies whether the job to initiate is an import or export job.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
JobType
    public Job withJobType(String jobType) {
        this. = jobType;
        return this;
    }

    
Specifies whether the job to initiate is an import or export job.

Constraints:
Allowed Values: Import, Export

Parameters:
jobType Specifies whether the job to initiate is an import or export job.
See also:
JobType
    public void setJobType(JobType jobType) {
        this. = jobType.toString();
    }
    
    
Specifies whether the job to initiate is an import or export job.

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

Constraints:
Allowed Values: Import, Export

Parameters:
jobType Specifies whether the job to initiate is an import or export job.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
JobType
    public Job withJobType(JobType jobType) {
        this. = jobType.toString();
        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 (getCreationDate() != nullsb.append("CreationDate: " + getCreationDate() + ",");
        if (isCanceled() != nullsb.append("IsCanceled: " + isCanceled() + ",");
        if (getJobType() != nullsb.append("JobType: " + getJobType() );
        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 + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); 
        hashCode = prime * hashCode + ((isCanceled() == null) ? 0 : isCanceled().hashCode()); 
        hashCode = prime * hashCode + ((getJobType() == null) ? 0 : getJobType().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof Job == falsereturn false;
        Job other = (Job)obj;
        
        if (other.getJobId() == null ^ this.getJobId() == nullreturn false;
        if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == falsereturn false
        if (other.getCreationDate() == null ^ this.getCreationDate() == nullreturn false;
        if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == falsereturn false
        if (other.isCanceled() == null ^ this.isCanceled() == nullreturn false;
        if (other.isCanceled() != null && other.isCanceled().equals(this.isCanceled()) == falsereturn false
        if (other.getJobType() == null ^ this.getJobType() == nullreturn false;
        if (other.getJobType() != null && other.getJobType().equals(this.getJobType()) == falsereturn false
        return true;
    }
    
    @Override
    public Job clone() {
        try {
            return (Jobsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X