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 status of a volume.

 
 public class VolumeStatusInfo implements Serializable {

    
The status of the volume.

Constraints:
Allowed Values: ok, impaired, insufficient-data

 
     private String status;

    
The details of the volume status.
 
The status of the volume.

Constraints:
Allowed Values: ok, impaired, insufficient-data

Returns:
The status of the volume.
See also:
VolumeStatusInfoStatus
 
     public String getStatus() {
         return ;
     }
    
    
The status of the volume.

Constraints:
Allowed Values: ok, impaired, insufficient-data

Parameters:
status The status of the volume.
See also:
VolumeStatusInfoStatus
 
     public void setStatus(String status) {
         this. = status;
     }
    
    
The status of the volume.

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

Constraints:
Allowed Values: ok, impaired, insufficient-data

Parameters:
status The status of the volume.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
VolumeStatusInfoStatus
 
     public VolumeStatusInfo withStatus(String status) {
         this. = status;
         return this;
     }

    
The status of the volume.

Constraints:
Allowed Values: ok, impaired, insufficient-data

Parameters:
status The status of the volume.
See also:
VolumeStatusInfoStatus
 
     public void setStatus(VolumeStatusInfoStatus status) {
         this. = status.toString();
     }
    
    
The status of the volume.

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

Constraints:
Allowed Values: ok, impaired, insufficient-data

Parameters:
status The status of the volume.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
VolumeStatusInfoStatus
        this. = status.toString();
        return this;
    }

    
The details of the volume status.

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

Parameters:
details The details of the volume status.
    public void setDetails(java.util.Collection<VolumeStatusDetailsdetails) {
        if (details == null) {
            this. = null;
            return;
        }
        detailsCopy.addAll(details);
        this. = detailsCopy;
    }
    
    
The details of the volume status.

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

Parameters:
details The details of the volume status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeStatusInfo withDetails(VolumeStatusDetails... details) {
        if (getDetails() == nullsetDetails(new java.util.ArrayList<VolumeStatusDetails>(details.length));
        for (VolumeStatusDetails value : details) {
            getDetails().add(value);
        }
        return this;
    }
    
    
The details of the volume status.

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

Parameters:
details The details of the volume status.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (details == null) {
            this. = null;
        } else {
            detailsCopy.addAll(details);
            this. = detailsCopy;
        }
        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 (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getDetails() != nullsb.append("Details: " + getDetails() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getDetails() == null) ? 0 : getDetails().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof VolumeStatusInfo == falsereturn false;
        VolumeStatusInfo other = (VolumeStatusInfo)obj;
        
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getDetails() == null ^ this.getDetails() == nullreturn false;
        if (other.getDetails() != null && other.getDetails().equals(this.getDetails()) == falsereturn false
        return true;
    }
    
}
    
New to GrepCode? Check out our FAQ X