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.elasticmapreduce.model;
 
 
Container for the parameters to the DescribeJobFlows operation.

This API is deprecated and will eventually be removed. We recommend you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.

DescribeJobFlows returns a list of job flows that match all of the supplied parameters. The parameters can include a list of job flow IDs, job flow states, and restrictions on job flow creation date and time.

Regardless of supplied parameters, only job flows created within the last two months are returned.

If no parameters are supplied, then job flows matching either of the following criteria are returned:

  • Job flows created and completed in the last two weeks
  • Job flows created within the last two months that are in one of the following states: RUNNING , WAITING , SHUTTING_DOWN , STARTING

Amazon Elastic MapReduce can return a maximum of 512 job flow descriptions.

 
 public class DescribeJobFlowsRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
Return only job flows created after this date and time.
 
     private java.util.Date createdAfter;

    
Return only job flows created before this date and time.
 
     private java.util.Date createdBefore;

    
Return only job flows whose job flow ID is contained in this list.
 
Return only job flows whose state is contained in this list.
 
Default constructor for a new DescribeJobFlowsRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public DescribeJobFlowsRequest() {}
    
    
Constructs a new DescribeJobFlowsRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
jobFlowIds Return only job flows whose job flow ID is contained in this list.
 
     public DescribeJobFlowsRequest(java.util.List<StringjobFlowIds) {
         setJobFlowIds(jobFlowIds);
     }

    
Return only job flows created after this date and time.

Returns:
Return only job flows created after this date and time.
    public java.util.Date getCreatedAfter() {
        return ;
    }
    
    
Return only job flows created after this date and time.

Parameters:
createdAfter Return only job flows created after this date and time.
    public void setCreatedAfter(java.util.Date createdAfter) {
        this. = createdAfter;
    }
    
    
Return only job flows created after this date and time.

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

Parameters:
createdAfter Return only job flows created after this date and time.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeJobFlowsRequest withCreatedAfter(java.util.Date createdAfter) {
        this. = createdAfter;
        return this;
    }

    
Return only job flows created before this date and time.

Returns:
Return only job flows created before this date and time.
    public java.util.Date getCreatedBefore() {
        return ;
    }
    
    
Return only job flows created before this date and time.

Parameters:
createdBefore Return only job flows created before this date and time.
    public void setCreatedBefore(java.util.Date createdBefore) {
        this. = createdBefore;
    }
    
    
Return only job flows created before this date and time.

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

Parameters:
createdBefore Return only job flows created before this date and time.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeJobFlowsRequest withCreatedBefore(java.util.Date createdBefore) {
        this. = createdBefore;
        return this;
    }

    
Return only job flows whose job flow ID is contained in this list.

Returns:
Return only job flows whose job flow ID is contained in this list.
    public java.util.List<StringgetJobFlowIds() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Return only job flows whose job flow ID is contained in this list.

Parameters:
jobFlowIds Return only job flows whose job flow ID is contained in this list.
    public void setJobFlowIds(java.util.Collection<StringjobFlowIds) {
        if (jobFlowIds == null) {
            this. = null;
            return;
        }
        jobFlowIdsCopy.addAll(jobFlowIds);
        this. = jobFlowIdsCopy;
    }
    
    
Return only job flows whose job flow ID is contained in this list.

NOTE: This method appends the values to the existing list (if any). Use setJobFlowIds(java.util.Collection) or withJobFlowIds(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:
jobFlowIds Return only job flows whose job flow ID is contained in this list.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeJobFlowsRequest withJobFlowIds(String... jobFlowIds) {
        if (getJobFlowIds() == nullsetJobFlowIds(new java.util.ArrayList<String>(jobFlowIds.length));
        for (String value : jobFlowIds) {
            getJobFlowIds().add(value);
        }
        return this;
    }
    
    
Return only job flows whose job flow ID is contained in this list.

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

Parameters:
jobFlowIds Return only job flows whose job flow ID is contained in this list.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (jobFlowIds == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringjobFlowIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(jobFlowIds.size());
            jobFlowIdsCopy.addAll(jobFlowIds);
            this. = jobFlowIdsCopy;
        }
        return this;
    }

    
Return only job flows whose state is contained in this list.

Returns:
Return only job flows whose state is contained in this list.
    public java.util.List<StringgetJobFlowStates() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Return only job flows whose state is contained in this list.

Parameters:
jobFlowStates Return only job flows whose state is contained in this list.
    public void setJobFlowStates(java.util.Collection<StringjobFlowStates) {
        if (jobFlowStates == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringjobFlowStatesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(jobFlowStates.size());
        jobFlowStatesCopy.addAll(jobFlowStates);
        this. = jobFlowStatesCopy;
    }
    
    
Return only job flows whose state is contained in this list.

NOTE: This method appends the values to the existing list (if any). Use setJobFlowStates(java.util.Collection) or withJobFlowStates(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:
jobFlowStates Return only job flows whose state is contained in this list.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeJobFlowsRequest withJobFlowStates(String... jobFlowStates) {
        if (getJobFlowStates() == nullsetJobFlowStates(new java.util.ArrayList<String>(jobFlowStates.length));
        for (String value : jobFlowStates) {
            getJobFlowStates().add(value);
        }
        return this;
    }
    
    
Return only job flows whose state is contained in this list.

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

Parameters:
jobFlowStates Return only job flows whose state is contained in this list.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (jobFlowStates == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringjobFlowStatesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(jobFlowStates.size());
            jobFlowStatesCopy.addAll(jobFlowStates);
            this. = jobFlowStatesCopy;
        }
        return this;
    }

    
Return only job flows whose state is contained in this list.

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

Parameters:
jobFlowStates Return only job flows whose state is contained in this list.
Returns:
A reference to this updated object so that method calls can be chained together.
        java.util.ArrayList<StringjobFlowStatesCopy = new java.util.ArrayList<String>(jobFlowStates.length);
        for (JobFlowExecutionState member : jobFlowStates) {
            jobFlowStatesCopy.add(member.toString());
        }
        if (getJobFlowStates() == null) {
            setJobFlowStates(jobFlowStatesCopy);
        } else {
            getJobFlowStates().addAll(jobFlowStatesCopy);
        }
        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 (getCreatedAfter() != nullsb.append("CreatedAfter: " + getCreatedAfter() + ",");
        if (getCreatedBefore() != nullsb.append("CreatedBefore: " + getCreatedBefore() + ",");
        if (getJobFlowIds() != nullsb.append("JobFlowIds: " + getJobFlowIds() + ",");
        if (getJobFlowStates() != nullsb.append("JobFlowStates: " + getJobFlowStates() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCreatedAfter() == null) ? 0 : getCreatedAfter().hashCode()); 
        hashCode = prime * hashCode + ((getCreatedBefore() == null) ? 0 : getCreatedBefore().hashCode()); 
        hashCode = prime * hashCode + ((getJobFlowIds() == null) ? 0 : getJobFlowIds().hashCode()); 
        hashCode = prime * hashCode + ((getJobFlowStates() == null) ? 0 : getJobFlowStates().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeJobFlowsRequest == falsereturn false;
        DescribeJobFlowsRequest other = (DescribeJobFlowsRequest)obj;
        
        if (other.getCreatedAfter() == null ^ this.getCreatedAfter() == nullreturn false;
        if (other.getCreatedAfter() != null && other.getCreatedAfter().equals(this.getCreatedAfter()) == falsereturn false
        if (other.getCreatedBefore() == null ^ this.getCreatedBefore() == nullreturn false;
        if (other.getCreatedBefore() != null && other.getCreatedBefore().equals(this.getCreatedBefore()) == falsereturn false
        if (other.getJobFlowIds() == null ^ this.getJobFlowIds() == nullreturn false;
        if (other.getJobFlowIds() != null && other.getJobFlowIds().equals(this.getJobFlowIds()) == falsereturn false
        if (other.getJobFlowStates() == null ^ this.getJobFlowStates() == nullreturn false;
        if (other.getJobFlowStates() != null && other.getJobFlowStates().equals(this.getJobFlowStates()) == falsereturn false
        return true;
    }
    
    @Override
    public DescribeJobFlowsRequest clone() {
        
            return (DescribeJobFlowsRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X