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;
 

The execution state of a step.

 
 public class StepExecutionStatusDetail implements SerializableCloneable {

    
The state of the job flow step.

Constraints:
Allowed Values: PENDING, RUNNING, CONTINUE, COMPLETED, CANCELLED, FAILED, INTERRUPTED

 
     private String state;

    
The creation date and time of the step.
 
     private java.util.Date creationDateTime;

    
The start date and time of the step.
 
     private java.util.Date startDateTime;

    
The completion date and time of the step.
 
     private java.util.Date endDateTime;

    
A description of the step's current state.

Constraints:
Length: 0 - 10280
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String lastStateChangeReason;

    
Default constructor for a new StepExecutionStatusDetail object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public StepExecutionStatusDetail() {}
    
    
Constructs a new StepExecutionStatusDetail object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
state The state of the job flow step.
creationDateTime The creation date and time of the step.
 
     public StepExecutionStatusDetail(String statejava.util.Date creationDateTime) {
         setState(state);
         setCreationDateTime(creationDateTime);
     }

    
Constructs a new StepExecutionStatusDetail object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
state The state of the job flow step.
creationDateTime The creation date and time of the step.
 
     public StepExecutionStatusDetail(StepExecutionState statejava.util.Date creationDateTime) {
         this. = state.toString();
         this. = creationDateTime;
     }

    
The state of the job flow step.

Constraints:
Allowed Values: PENDING, RUNNING, CONTINUE, COMPLETED, CANCELLED, FAILED, INTERRUPTED

Returns:
The state of the job flow step.
See also:
StepExecutionState
 
    public String getState() {
        return ;
    }
    
    
The state of the job flow step.

Constraints:
Allowed Values: PENDING, RUNNING, CONTINUE, COMPLETED, CANCELLED, FAILED, INTERRUPTED

Parameters:
state The state of the job flow step.
See also:
StepExecutionState
    public void setState(String state) {
        this. = state;
    }
    
    
The state of the job flow step.

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

Constraints:
Allowed Values: PENDING, RUNNING, CONTINUE, COMPLETED, CANCELLED, FAILED, INTERRUPTED

Parameters:
state The state of the job flow step.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
StepExecutionState
    public StepExecutionStatusDetail withState(String state) {
        this. = state;
        return this;
    }

    
The state of the job flow step.

Constraints:
Allowed Values: PENDING, RUNNING, CONTINUE, COMPLETED, CANCELLED, FAILED, INTERRUPTED

Parameters:
state The state of the job flow step.
See also:
StepExecutionState
    public void setState(StepExecutionState state) {
        this. = state.toString();
    }
    
    
The state of the job flow step.

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

Constraints:
Allowed Values: PENDING, RUNNING, CONTINUE, COMPLETED, CANCELLED, FAILED, INTERRUPTED

Parameters:
state The state of the job flow step.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
StepExecutionState
        this. = state.toString();
        return this;
    }

    
The creation date and time of the step.

Returns:
The creation date and time of the step.
    public java.util.Date getCreationDateTime() {
        return ;
    }
    
    
The creation date and time of the step.

Parameters:
creationDateTime The creation date and time of the step.
    public void setCreationDateTime(java.util.Date creationDateTime) {
        this. = creationDateTime;
    }
    
    
The creation date and time of the step.

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

Parameters:
creationDateTime The creation date and time of the step.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StepExecutionStatusDetail withCreationDateTime(java.util.Date creationDateTime) {
        this. = creationDateTime;
        return this;
    }

    
The start date and time of the step.

Returns:
The start date and time of the step.
    public java.util.Date getStartDateTime() {
        return ;
    }
    
    
The start date and time of the step.

Parameters:
startDateTime The start date and time of the step.
    public void setStartDateTime(java.util.Date startDateTime) {
        this. = startDateTime;
    }
    
    
The start date and time of the step.

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

Parameters:
startDateTime The start date and time of the step.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StepExecutionStatusDetail withStartDateTime(java.util.Date startDateTime) {
        this. = startDateTime;
        return this;
    }

    
The completion date and time of the step.

Returns:
The completion date and time of the step.
    public java.util.Date getEndDateTime() {
        return ;
    }
    
    
The completion date and time of the step.

Parameters:
endDateTime The completion date and time of the step.
    public void setEndDateTime(java.util.Date endDateTime) {
        this. = endDateTime;
    }
    
    
The completion date and time of the step.

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

Parameters:
endDateTime The completion date and time of the step.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StepExecutionStatusDetail withEndDateTime(java.util.Date endDateTime) {
        this. = endDateTime;
        return this;
    }

    
A description of the step's current state.

Constraints:
Length: 0 - 10280
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
A description of the step's current state.
    public String getLastStateChangeReason() {
        return ;
    }
    
    
A description of the step's current state.

Constraints:
Length: 0 - 10280
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
lastStateChangeReason A description of the step's current state.
    public void setLastStateChangeReason(String lastStateChangeReason) {
        this. = lastStateChangeReason;
    }
    
    
A description of the step's current state.

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

Constraints:
Length: 0 - 10280
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
lastStateChangeReason A description of the step's current state.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StepExecutionStatusDetail withLastStateChangeReason(String lastStateChangeReason) {
        this. = lastStateChangeReason;
        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 (getState() != nullsb.append("State: " + getState() + ",");
        if (getCreationDateTime() != nullsb.append("CreationDateTime: " + getCreationDateTime() + ",");
        if (getStartDateTime() != nullsb.append("StartDateTime: " + getStartDateTime() + ",");
        if (getEndDateTime() != nullsb.append("EndDateTime: " + getEndDateTime() + ",");
        if (getLastStateChangeReason() != nullsb.append("LastStateChangeReason: " + getLastStateChangeReason() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); 
        hashCode = prime * hashCode + ((getCreationDateTime() == null) ? 0 : getCreationDateTime().hashCode()); 
        hashCode = prime * hashCode + ((getStartDateTime() == null) ? 0 : getStartDateTime().hashCode()); 
        hashCode = prime * hashCode + ((getEndDateTime() == null) ? 0 : getEndDateTime().hashCode()); 
        hashCode = prime * hashCode + ((getLastStateChangeReason() == null) ? 0 : getLastStateChangeReason().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof StepExecutionStatusDetail == falsereturn false;
        
        if (other.getState() == null ^ this.getState() == nullreturn false;
        if (other.getState() != null && other.getState().equals(this.getState()) == falsereturn false
        if (other.getCreationDateTime() == null ^ this.getCreationDateTime() == nullreturn false;
        if (other.getCreationDateTime() != null && other.getCreationDateTime().equals(this.getCreationDateTime()) == falsereturn false
        if (other.getStartDateTime() == null ^ this.getStartDateTime() == nullreturn false;
        if (other.getStartDateTime() != null && other.getStartDateTime().equals(this.getStartDateTime()) == falsereturn false
        if (other.getEndDateTime() == null ^ this.getEndDateTime() == nullreturn false;
        if (other.getEndDateTime() != null && other.getEndDateTime().equals(this.getEndDateTime()) == falsereturn false
        if (other.getLastStateChangeReason() == null ^ this.getLastStateChangeReason() == nullreturn false;
        if (other.getLastStateChangeReason() != null && other.getLastStateChangeReason().equals(this.getLastStateChangeReason()) == falsereturn false
        return true;
    }
    
    @Override
    public StepExecutionStatusDetail clone() {
        try {
            return (StepExecutionStatusDetailsuper.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