
com.amazonaws.services.elasticmapreduce.model.DescribeJobFlowsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-emr Show documentation
/*
* Copyright 2011-2016 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;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* The input for the DescribeJobFlows operation.
*
*/
public class DescribeJobFlowsRequest extends
com.amazonaws.AmazonWebServiceRequest implements Serializable,
Cloneable {
/**
*
* 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.
*
*/
private com.amazonaws.internal.SdkInternalList jobFlowIds;
/**
*
* Return only job flows whose state is contained in this list.
*
*/
private com.amazonaws.internal.SdkInternalList jobFlowStates;
/**
* Default constructor for DescribeJobFlowsRequest object. Callers should
* use the setter or fluent setter (with...) methods to initialize the
* 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.
*
* @param jobFlowIds
* Return only job flows whose job flow ID is contained in this list.
*/
public DescribeJobFlowsRequest(java.util.List jobFlowIds) {
setJobFlowIds(jobFlowIds);
}
/**
*
* Return only job flows created after this date and time.
*
*
* @param createdAfter
* Return only job flows created after this date and time.
*/
public void setCreatedAfter(java.util.Date createdAfter) {
this.createdAfter = createdAfter;
}
/**
*
* Return only job flows created after this date and time.
*
*
* @return Return only job flows created after this date and time.
*/
public java.util.Date getCreatedAfter() {
return this.createdAfter;
}
/**
*
* Return only job flows created after this date and time.
*
*
* @param createdAfter
* Return only job flows created after this date and time.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeJobFlowsRequest withCreatedAfter(java.util.Date createdAfter) {
setCreatedAfter(createdAfter);
return this;
}
/**
*
* Return only job flows created before this date and time.
*
*
* @param createdBefore
* Return only job flows created before this date and time.
*/
public void setCreatedBefore(java.util.Date createdBefore) {
this.createdBefore = createdBefore;
}
/**
*
* Return only job flows created before this date and time.
*
*
* @return Return only job flows created before this date and time.
*/
public java.util.Date getCreatedBefore() {
return this.createdBefore;
}
/**
*
* Return only job flows created before this date and time.
*
*
* @param createdBefore
* Return only job flows created before this date and time.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeJobFlowsRequest withCreatedBefore(
java.util.Date createdBefore) {
setCreatedBefore(createdBefore);
return this;
}
/**
*
* Return only job flows whose job flow ID is contained in this list.
*
*
* @return Return only job flows whose job flow ID is contained in this
* list.
*/
public java.util.List getJobFlowIds() {
if (jobFlowIds == null) {
jobFlowIds = new com.amazonaws.internal.SdkInternalList();
}
return jobFlowIds;
}
/**
*
* Return only job flows whose job flow ID is contained in this list.
*
*
* @param jobFlowIds
* Return only job flows whose job flow ID is contained in this list.
*/
public void setJobFlowIds(java.util.Collection jobFlowIds) {
if (jobFlowIds == null) {
this.jobFlowIds = null;
return;
}
this.jobFlowIds = new com.amazonaws.internal.SdkInternalList(
jobFlowIds);
}
/**
*
* 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 {@link #setJobFlowIds(java.util.Collection)} or
* {@link #withJobFlowIds(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param jobFlowIds
* Return only job flows whose job flow ID is contained in this list.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeJobFlowsRequest withJobFlowIds(String... jobFlowIds) {
if (this.jobFlowIds == null) {
setJobFlowIds(new com.amazonaws.internal.SdkInternalList(
jobFlowIds.length));
}
for (String ele : jobFlowIds) {
this.jobFlowIds.add(ele);
}
return this;
}
/**
*
* Return only job flows whose job flow ID is contained in this list.
*
*
* @param jobFlowIds
* Return only job flows whose job flow ID is contained in this list.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeJobFlowsRequest withJobFlowIds(
java.util.Collection jobFlowIds) {
setJobFlowIds(jobFlowIds);
return this;
}
/**
*
* Return only job flows whose state is contained in this list.
*
*
* @return Return only job flows whose state is contained in this list.
* @see JobFlowExecutionState
*/
public java.util.List getJobFlowStates() {
if (jobFlowStates == null) {
jobFlowStates = new com.amazonaws.internal.SdkInternalList();
}
return jobFlowStates;
}
/**
*
* Return only job flows whose state is contained in this list.
*
*
* @param jobFlowStates
* Return only job flows whose state is contained in this list.
* @see JobFlowExecutionState
*/
public void setJobFlowStates(java.util.Collection jobFlowStates) {
if (jobFlowStates == null) {
this.jobFlowStates = null;
return;
}
this.jobFlowStates = new com.amazonaws.internal.SdkInternalList(
jobFlowStates);
}
/**
*
* Return only job flows whose state is contained in this list.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setJobFlowStates(java.util.Collection)} or
* {@link #withJobFlowStates(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param jobFlowStates
* Return only job flows whose state is contained in this list.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see JobFlowExecutionState
*/
public DescribeJobFlowsRequest withJobFlowStates(String... jobFlowStates) {
if (this.jobFlowStates == null) {
setJobFlowStates(new com.amazonaws.internal.SdkInternalList(
jobFlowStates.length));
}
for (String ele : jobFlowStates) {
this.jobFlowStates.add(ele);
}
return this;
}
/**
*
* Return only job flows whose state is contained in this list.
*
*
* @param jobFlowStates
* Return only job flows whose state is contained in this list.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see JobFlowExecutionState
*/
public DescribeJobFlowsRequest withJobFlowStates(
java.util.Collection jobFlowStates) {
setJobFlowStates(jobFlowStates);
return this;
}
/**
*
* Return only job flows whose state is contained in this list.
*
*
* @param jobFlowStates
* Return only job flows whose state is contained in this list.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see JobFlowExecutionState
*/
public DescribeJobFlowsRequest withJobFlowStates(
JobFlowExecutionState... jobFlowStates) {
com.amazonaws.internal.SdkInternalList jobFlowStatesCopy = new com.amazonaws.internal.SdkInternalList(
jobFlowStates.length);
for (JobFlowExecutionState value : jobFlowStates) {
jobFlowStatesCopy.add(value.toString());
}
if (getJobFlowStates() == null) {
setJobFlowStates(jobFlowStatesCopy);
} else {
getJobFlowStates().addAll(jobFlowStatesCopy);
}
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 (getCreatedAfter() != null)
sb.append("CreatedAfter: " + getCreatedAfter() + ",");
if (getCreatedBefore() != null)
sb.append("CreatedBefore: " + getCreatedBefore() + ",");
if (getJobFlowIds() != null)
sb.append("JobFlowIds: " + getJobFlowIds() + ",");
if (getJobFlowStates() != null)
sb.append("JobFlowStates: " + getJobFlowStates());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeJobFlowsRequest == false)
return false;
DescribeJobFlowsRequest other = (DescribeJobFlowsRequest) obj;
if (other.getCreatedAfter() == null ^ this.getCreatedAfter() == null)
return false;
if (other.getCreatedAfter() != null
&& other.getCreatedAfter().equals(this.getCreatedAfter()) == false)
return false;
if (other.getCreatedBefore() == null ^ this.getCreatedBefore() == null)
return false;
if (other.getCreatedBefore() != null
&& other.getCreatedBefore().equals(this.getCreatedBefore()) == false)
return false;
if (other.getJobFlowIds() == null ^ this.getJobFlowIds() == null)
return false;
if (other.getJobFlowIds() != null
&& other.getJobFlowIds().equals(this.getJobFlowIds()) == false)
return false;
if (other.getJobFlowStates() == null ^ this.getJobFlowStates() == null)
return false;
if (other.getJobFlowStates() != null
&& other.getJobFlowStates().equals(this.getJobFlowStates()) == false)
return false;
return true;
}
@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 DescribeJobFlowsRequest clone() {
return (DescribeJobFlowsRequest) super.clone();
}
}