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 the volume status.

 
 public class VolumeStatusItem implements Serializable {

    
The volume ID.
 
     private String volumeId;

    
The Availability Zone of the volume.
 
     private String availabilityZone;

    
The volume status.
 
     private VolumeStatusInfo volumeStatus;

    
A list of events associated with the volume.
 
The details of the operation.
 
The volume ID.

Returns:
The volume ID.
 
     public String getVolumeId() {
         return ;
     }
    
    
The volume ID.

Parameters:
volumeId The volume ID.
 
     public void setVolumeId(String volumeId) {
         this. = volumeId;
     }
    
    
The volume ID.

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

Parameters:
volumeId The volume ID.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public VolumeStatusItem withVolumeId(String volumeId) {
         this. = volumeId;
         return this;
     }

    
The Availability Zone of the volume.

Returns:
The Availability Zone of the volume.
 
     public String getAvailabilityZone() {
         return ;
     }
    
    
The Availability Zone of the volume.

Parameters:
availabilityZone The Availability Zone of the volume.
 
     public void setAvailabilityZone(String availabilityZone) {
         this. = availabilityZone;
    }
    
    
The Availability Zone of the volume.

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

Parameters:
availabilityZone The Availability Zone of the volume.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeStatusItem withAvailabilityZone(String availabilityZone) {
        this. = availabilityZone;
        return this;
    }

    
The volume status.

Returns:
The volume status.
    public VolumeStatusInfo getVolumeStatus() {
        return ;
    }
    
    
The volume status.

Parameters:
volumeStatus The volume status.
    public void setVolumeStatus(VolumeStatusInfo volumeStatus) {
        this. = volumeStatus;
    }
    
    
The volume status.

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

Parameters:
volumeStatus The volume status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeStatusItem withVolumeStatus(VolumeStatusInfo volumeStatus) {
        this. = volumeStatus;
        return this;
    }

    
A list of events associated with the volume.

Returns:
A list of events associated with the volume.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of events associated with the volume.

Parameters:
events A list of events associated with the volume.
    public void setEvents(java.util.Collection<VolumeStatusEventevents) {
        if (events == null) {
            this. = null;
            return;
        }
        eventsCopy.addAll(events);
        this. = eventsCopy;
    }
    
    
A list of events associated with the volume.

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

Parameters:
events A list of events associated with the volume.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeStatusItem withEvents(VolumeStatusEvent... events) {
        if (getEvents() == nullsetEvents(new java.util.ArrayList<VolumeStatusEvent>(events.length));
        for (VolumeStatusEvent value : events) {
            getEvents().add(value);
        }
        return this;
    }
    
    
A list of events associated with the volume.

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

Parameters:
events A list of events associated with the volume.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (events == null) {
            this. = null;
        } else {
            eventsCopy.addAll(events);
            this. = eventsCopy;
        }
        return this;
    }

    
The details of the operation.

Returns:
The details of the operation.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The details of the operation.

Parameters:
actions The details of the operation.
    public void setActions(java.util.Collection<VolumeStatusActionactions) {
        if (actions == null) {
            this. = null;
            return;
        }
        actionsCopy.addAll(actions);
        this. = actionsCopy;
    }
    
    
The details of the operation.

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

Parameters:
actions The details of the operation.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeStatusItem withActions(VolumeStatusAction... actions) {
        if (getActions() == nullsetActions(new java.util.ArrayList<VolumeStatusAction>(actions.length));
        for (VolumeStatusAction value : actions) {
            getActions().add(value);
        }
        return this;
    }
    
    
The details of the operation.

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

Parameters:
actions The details of the operation.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (actions == null) {
            this. = null;
        } else {
            actionsCopy.addAll(actions);
            this. = actionsCopy;
        }
        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 (getVolumeId() != nullsb.append("VolumeId: " + getVolumeId() + ",");
        if (getAvailabilityZone() != nullsb.append("AvailabilityZone: " + getAvailabilityZone() + ",");
        if (getVolumeStatus() != nullsb.append("VolumeStatus: " + getVolumeStatus() + ",");
        if (getEvents() != nullsb.append("Events: " + getEvents() + ",");
        if (getActions() != nullsb.append("Actions: " + getActions() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode()); 
        hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeStatus() == null) ? 0 : getVolumeStatus().hashCode()); 
        hashCode = prime * hashCode + ((getEvents() == null) ? 0 : getEvents().hashCode()); 
        hashCode = prime * hashCode + ((getActions() == null) ? 0 : getActions().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof VolumeStatusItem == falsereturn false;
        VolumeStatusItem other = (VolumeStatusItem)obj;
        
        if (other.getVolumeId() == null ^ this.getVolumeId() == nullreturn false;
        if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == falsereturn false
        if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == nullreturn false;
        if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == falsereturn false
        if (other.getVolumeStatus() == null ^ this.getVolumeStatus() == nullreturn false;
        if (other.getVolumeStatus() != null && other.getVolumeStatus().equals(this.getVolumeStatus()) == falsereturn false
        if (other.getEvents() == null ^ this.getEvents() == nullreturn false;
        if (other.getEvents() != null && other.getEvents().equals(this.getEvents()) == falsereturn false
        if (other.getActions() == null ^ this.getActions() == nullreturn false;
        if (other.getActions() != null && other.getActions().equals(this.getActions()) == falsereturn false
        return true;
    }
    
}
    
New to GrepCode? Check out our FAQ X