Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2014 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.ec2.model;
 

Describes a volume status operation code.

 
 public class VolumeStatusAction implements Serializable {

    
The code identifying the operation, for example, enable-volume-io.
 
     private String code;

    
A description of the operation.
 
     private String description;

    
The event type associated with this operation.
 
     private String eventType;

    
The ID of the event associated with this operation.
 
     private String eventId;

    
The code identifying the operation, for example, enable-volume-io.

Returns:
The code identifying the operation, for example, enable-volume-io.
 
     public String getCode() {
         return ;
     }
    
    
The code identifying the operation, for example, enable-volume-io.

Parameters:
code The code identifying the operation, for example, enable-volume-io.
 
     public void setCode(String code) {
         this. = code;
     }
    
    
The code identifying the operation, for example, enable-volume-io.

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

Parameters:
code The code identifying the operation, for example, enable-volume-io.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public VolumeStatusAction withCode(String code) {
         this. = code;
         return this;
     }

    
A description of the operation.

Returns:
A description of the operation.
 
     public String getDescription() {
         return ;
     }
    
    
A description of the operation.

Parameters:
description A description of the operation.
 
    public void setDescription(String description) {
        this. = description;
    }
    
    
A description of the operation.

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

Parameters:
description A description of the operation.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeStatusAction withDescription(String description) {
        this. = description;
        return this;
    }

    
The event type associated with this operation.

Returns:
The event type associated with this operation.
    public String getEventType() {
        return ;
    }
    
    
The event type associated with this operation.

Parameters:
eventType The event type associated with this operation.
    public void setEventType(String eventType) {
        this. = eventType;
    }
    
    
The event type associated with this operation.

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

Parameters:
eventType The event type associated with this operation.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeStatusAction withEventType(String eventType) {
        this. = eventType;
        return this;
    }

    
The ID of the event associated with this operation.

Returns:
The ID of the event associated with this operation.
    public String getEventId() {
        return ;
    }
    
    
The ID of the event associated with this operation.

Parameters:
eventId The ID of the event associated with this operation.
    public void setEventId(String eventId) {
        this. = eventId;
    }
    
    
The ID of the event associated with this operation.

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

Parameters:
eventId The ID of the event associated with this operation.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeStatusAction withEventId(String eventId) {
        this. = eventId;
        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 (getCode() != nullsb.append("Code: " + getCode() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getEventType() != nullsb.append("EventType: " + getEventType() + ",");
        if (getEventId() != nullsb.append("EventId: " + getEventId() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCode() == null) ? 0 : getCode().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getEventType() == null) ? 0 : getEventType().hashCode()); 
        hashCode = prime * hashCode + ((getEventId() == null) ? 0 : getEventId().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof VolumeStatusAction == falsereturn false;
        VolumeStatusAction other = (VolumeStatusAction)obj;
        
        if (other.getCode() == null ^ this.getCode() == nullreturn false;
        if (other.getCode() != null && other.getCode().equals(this.getCode()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getEventType() == null ^ this.getEventType() == nullreturn false;
        if (other.getEventType() != null && other.getEventType().equals(this.getEventType()) == falsereturn false
        if (other.getEventId() == null ^ this.getEventId() == nullreturn false;
        if (other.getEventId() != null && other.getEventId().equals(this.getEventId()) == falsereturn false
        return true;
    }
    
}
    
New to GrepCode? Check out our FAQ X