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.elastictranscoder.model;
 

The ListJobsByStatusResponse structure.

 
 public class ListJobsByStatusResult implements SerializableCloneable {

    
An array of Job objects that have the specified status.
 
A value that you use to access the second and subsequent pages of results, if any. When the jobs in the specified pipeline fit on one page or when you've reached the last page of results, the value of NextPageToken is null.

Constraints:
Pattern: ^\d{13}-\w{6}$

 
     private String nextPageToken;

    
An array of Job objects that have the specified status.

Returns:
An array of Job objects that have the specified status.
 
     public java.util.List<JobgetJobs() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<Job>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
An array of Job objects that have the specified status.

Parameters:
jobs An array of Job objects that have the specified status.
 
     public void setJobs(java.util.Collection<Jobjobs) {
         if (jobs == null) {
             this. = null;
             return;
         }
         jobsCopy.addAll(jobs);
         this. = jobsCopy;
     }
    
    
An array of Job objects that have the specified status.

NOTE: This method appends the values to the existing list (if any). Use setJobs(java.util.Collection) or withJobs(java.util.Collection) if you want to override the existing values.

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

Parameters:
jobs An array of Job objects that have the specified status.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ListJobsByStatusResult withJobs(Job... jobs) {
         if (getJobs() == nullsetJobs(new java.util.ArrayList<Job>(jobs.length));
         for (Job value : jobs) {
             getJobs().add(value);
         }
         return this;
     }
    
    
An array of Job objects that have the specified status.

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

Parameters:
jobs An array of Job objects that have the specified status.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (jobs == null) {
            this. = null;
        } else {
            jobsCopy.addAll(jobs);
            this. = jobsCopy;
        }
        return this;
    }

    
A value that you use to access the second and subsequent pages of results, if any. When the jobs in the specified pipeline fit on one page or when you've reached the last page of results, the value of NextPageToken is null.

Constraints:
Pattern: ^\d{13}-\w{6}$

Returns:
A value that you use to access the second and subsequent pages of results, if any. When the jobs in the specified pipeline fit on one page or when you've reached the last page of results, the value of NextPageToken is null.
    public String getNextPageToken() {
        return ;
    }
    
    
A value that you use to access the second and subsequent pages of results, if any. When the jobs in the specified pipeline fit on one page or when you've reached the last page of results, the value of NextPageToken is null.

Constraints:
Pattern: ^\d{13}-\w{6}$

Parameters:
nextPageToken A value that you use to access the second and subsequent pages of results, if any. When the jobs in the specified pipeline fit on one page or when you've reached the last page of results, the value of NextPageToken is null.
    public void setNextPageToken(String nextPageToken) {
        this. = nextPageToken;
    }
    
    
A value that you use to access the second and subsequent pages of results, if any. When the jobs in the specified pipeline fit on one page or when you've reached the last page of results, the value of NextPageToken is null.

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

Constraints:
Pattern: ^\d{13}-\w{6}$

Parameters:
nextPageToken A value that you use to access the second and subsequent pages of results, if any. When the jobs in the specified pipeline fit on one page or when you've reached the last page of results, the value of NextPageToken is null.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListJobsByStatusResult withNextPageToken(String nextPageToken) {
        this. = nextPageToken;
        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 (getJobs() != nullsb.append("Jobs: " + getJobs() + ",");
        if (getNextPageToken() != nullsb.append("NextPageToken: " + getNextPageToken() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getJobs() == null) ? 0 : getJobs().hashCode()); 
        hashCode = prime * hashCode + ((getNextPageToken() == null) ? 0 : getNextPageToken().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ListJobsByStatusResult == falsereturn false;
        ListJobsByStatusResult other = (ListJobsByStatusResult)obj;
        
        if (other.getJobs() == null ^ this.getJobs() == nullreturn false;
        if (other.getJobs() != null && other.getJobs().equals(this.getJobs()) == falsereturn false
        if (other.getNextPageToken() == null ^ this.getNextPageToken() == nullreturn false;
        if (other.getNextPageToken() != null && other.getNextPageToken().equals(this.getNextPageToken()) == falsereturn false
        return true;
    }
    
    @Override
    public ListJobsByStatusResult clone() {
        try {
            return (ListJobsByStatusResultsuper.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