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.opsworks.model;
 

Describes an instance's RAID array.

 
 public class RaidArray implements SerializableCloneable {

    
The array ID.
 
     private String raidArrayId;

    
The instance ID.
 
     private String instanceId;

    
The array name.
 
     private String name;

    
The RAID level.
 
     private Integer raidLevel;

    
The number of disks in the array.
 
     private Integer numberOfDisks;

    
The array's size.
 
     private Integer size;

    
The array's Linux device. For example /dev/mdadm0.
 
     private String device;

    
The array's mount point.
 
     private String mountPoint;

    
The array's Availability Zone. For more information, see Regions and Endpoints.
 
     private String availabilityZone;

    
When the RAID array was created.
 
     private String createdAt;

    
The stack ID.
 
     private String stackId;

    
The volume type, standard or PIOPS.
 
     private String volumeType;

    
For PIOPS volumes, the IOPS per disk.
 
     private Integer iops;

    
The array ID.

Returns:
The array ID.
 
     public String getRaidArrayId() {
        return ;
    }
    
    
The array ID.

Parameters:
raidArrayId The array ID.
    public void setRaidArrayId(String raidArrayId) {
        this. = raidArrayId;
    }
    
    
The array ID.

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

Parameters:
raidArrayId The array ID.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withRaidArrayId(String raidArrayId) {
        this. = raidArrayId;
        return this;
    }

    
The instance ID.

Returns:
The instance ID.
    public String getInstanceId() {
        return ;
    }
    
    
The instance ID.

Parameters:
instanceId The instance ID.
    public void setInstanceId(String instanceId) {
        this. = instanceId;
    }
    
    
The instance ID.

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

Parameters:
instanceId The instance ID.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withInstanceId(String instanceId) {
        this. = instanceId;
        return this;
    }

    
The array name.

Returns:
The array name.
    public String getName() {
        return ;
    }
    
    
The array name.

Parameters:
name The array name.
    public void setName(String name) {
        this. = name;
    }
    
    
The array name.

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

Parameters:
name The array name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withName(String name) {
        this. = name;
        return this;
    }

    
The RAID level.

Returns:
The RAID level.
    public Integer getRaidLevel() {
        return ;
    }
    
    
The RAID level.

Parameters:
raidLevel The RAID level.
    public void setRaidLevel(Integer raidLevel) {
        this. = raidLevel;
    }
    
    
The RAID level.

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

Parameters:
raidLevel The RAID level.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withRaidLevel(Integer raidLevel) {
        this. = raidLevel;
        return this;
    }

    
The number of disks in the array.

Returns:
The number of disks in the array.
    public Integer getNumberOfDisks() {
        return ;
    }
    
    
The number of disks in the array.

Parameters:
numberOfDisks The number of disks in the array.
    public void setNumberOfDisks(Integer numberOfDisks) {
        this. = numberOfDisks;
    }
    
    
The number of disks in the array.

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

Parameters:
numberOfDisks The number of disks in the array.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withNumberOfDisks(Integer numberOfDisks) {
        this. = numberOfDisks;
        return this;
    }

    
The array's size.

Returns:
The array's size.
    public Integer getSize() {
        return ;
    }
    
    
The array's size.

Parameters:
size The array's size.
    public void setSize(Integer size) {
        this. = size;
    }
    
    
The array's size.

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

Parameters:
size The array's size.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withSize(Integer size) {
        this. = size;
        return this;
    }

    
The array's Linux device. For example /dev/mdadm0.

Returns:
The array's Linux device. For example /dev/mdadm0.
    public String getDevice() {
        return ;
    }
    
    
The array's Linux device. For example /dev/mdadm0.

Parameters:
device The array's Linux device. For example /dev/mdadm0.
    public void setDevice(String device) {
        this. = device;
    }
    
    
The array's Linux device. For example /dev/mdadm0.

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

Parameters:
device The array's Linux device. For example /dev/mdadm0.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withDevice(String device) {
        this. = device;
        return this;
    }

    
The array's mount point.

Returns:
The array's mount point.
    public String getMountPoint() {
        return ;
    }
    
    
The array's mount point.

Parameters:
mountPoint The array's mount point.
    public void setMountPoint(String mountPoint) {
        this. = mountPoint;
    }
    
    
The array's mount point.

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

Parameters:
mountPoint The array's mount point.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withMountPoint(String mountPoint) {
        this. = mountPoint;
        return this;
    }

    
The array's Availability Zone. For more information, see Regions and Endpoints.

Returns:
The array's Availability Zone. For more information, see Regions and Endpoints.
    public String getAvailabilityZone() {
        return ;
    }
    
    
The array's Availability Zone. For more information, see Regions and Endpoints.

Parameters:
availabilityZone The array's Availability Zone. For more information, see Regions and Endpoints.
    public void setAvailabilityZone(String availabilityZone) {
        this. = availabilityZone;
    }
    
    
The array's Availability Zone. For more information, see Regions and Endpoints.

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

Parameters:
availabilityZone The array's Availability Zone. For more information, see Regions and Endpoints.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withAvailabilityZone(String availabilityZone) {
        this. = availabilityZone;
        return this;
    }

    
When the RAID array was created.

Returns:
When the RAID array was created.
    public String getCreatedAt() {
        return ;
    }
    
    
When the RAID array was created.

Parameters:
createdAt When the RAID array was created.
    public void setCreatedAt(String createdAt) {
        this. = createdAt;
    }
    
    
When the RAID array was created.

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

Parameters:
createdAt When the RAID array was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withCreatedAt(String createdAt) {
        this. = createdAt;
        return this;
    }

    
The stack ID.

Returns:
The stack ID.
    public String getStackId() {
        return ;
    }
    
    
The stack ID.

Parameters:
stackId The stack ID.
    public void setStackId(String stackId) {
        this. = stackId;
    }
    
    
The stack ID.

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

Parameters:
stackId The stack ID.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withStackId(String stackId) {
        this. = stackId;
        return this;
    }

    
The volume type, standard or PIOPS.

Returns:
The volume type, standard or PIOPS.
    public String getVolumeType() {
        return ;
    }
    
    
The volume type, standard or PIOPS.

Parameters:
volumeType The volume type, standard or PIOPS.
    public void setVolumeType(String volumeType) {
        this. = volumeType;
    }
    
    
The volume type, standard or PIOPS.

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

Parameters:
volumeType The volume type, standard or PIOPS.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withVolumeType(String volumeType) {
        this. = volumeType;
        return this;
    }

    
For PIOPS volumes, the IOPS per disk.

Returns:
For PIOPS volumes, the IOPS per disk.
    public Integer getIops() {
        return ;
    }
    
    
For PIOPS volumes, the IOPS per disk.

Parameters:
iops For PIOPS volumes, the IOPS per disk.
    public void setIops(Integer iops) {
        this. = iops;
    }
    
    
For PIOPS volumes, the IOPS per disk.

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

Parameters:
iops For PIOPS volumes, the IOPS per disk.
Returns:
A reference to this updated object so that method calls can be chained together.
    public RaidArray withIops(Integer iops) {
        this. = iops;
        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 (getRaidArrayId() != nullsb.append("RaidArrayId: " + getRaidArrayId() + ",");
        if (getInstanceId() != nullsb.append("InstanceId: " + getInstanceId() + ",");
        if (getName() != nullsb.append("Name: " + getName() + ",");
        if (getRaidLevel() != nullsb.append("RaidLevel: " + getRaidLevel() + ",");
        if (getNumberOfDisks() != nullsb.append("NumberOfDisks: " + getNumberOfDisks() + ",");
        if (getSize() != nullsb.append("Size: " + getSize() + ",");
        if (getDevice() != nullsb.append("Device: " + getDevice() + ",");
        if (getMountPoint() != nullsb.append("MountPoint: " + getMountPoint() + ",");
        if (getAvailabilityZone() != nullsb.append("AvailabilityZone: " + getAvailabilityZone() + ",");
        if (getCreatedAt() != nullsb.append("CreatedAt: " + getCreatedAt() + ",");
        if (getStackId() != nullsb.append("StackId: " + getStackId() + ",");
        if (getVolumeType() != nullsb.append("VolumeType: " + getVolumeType() + ",");
        if (getIops() != nullsb.append("Iops: " + getIops() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getRaidArrayId() == null) ? 0 : getRaidArrayId().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); 
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getRaidLevel() == null) ? 0 : getRaidLevel().hashCode()); 
        hashCode = prime * hashCode + ((getNumberOfDisks() == null) ? 0 : getNumberOfDisks().hashCode()); 
        hashCode = prime * hashCode + ((getSize() == null) ? 0 : getSize().hashCode()); 
        hashCode = prime * hashCode + ((getDevice() == null) ? 0 : getDevice().hashCode()); 
        hashCode = prime * hashCode + ((getMountPoint() == null) ? 0 : getMountPoint().hashCode()); 
        hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); 
        hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); 
        hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode()); 
        hashCode = prime * hashCode + ((getIops() == null) ? 0 : getIops().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof RaidArray == falsereturn false;
        RaidArray other = (RaidArray)obj;
        
        if (other.getRaidArrayId() == null ^ this.getRaidArrayId() == nullreturn false;
        if (other.getRaidArrayId() != null && other.getRaidArrayId().equals(this.getRaidArrayId()) == falsereturn false
        if (other.getInstanceId() == null ^ this.getInstanceId() == nullreturn false;
        if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == falsereturn false
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getRaidLevel() == null ^ this.getRaidLevel() == nullreturn false;
        if (other.getRaidLevel() != null && other.getRaidLevel().equals(this.getRaidLevel()) == falsereturn false
        if (other.getNumberOfDisks() == null ^ this.getNumberOfDisks() == nullreturn false;
        if (other.getNumberOfDisks() != null && other.getNumberOfDisks().equals(this.getNumberOfDisks()) == falsereturn false
        if (other.getSize() == null ^ this.getSize() == nullreturn false;
        if (other.getSize() != null && other.getSize().equals(this.getSize()) == falsereturn false
        if (other.getDevice() == null ^ this.getDevice() == nullreturn false;
        if (other.getDevice() != null && other.getDevice().equals(this.getDevice()) == falsereturn false
        if (other.getMountPoint() == null ^ this.getMountPoint() == nullreturn false;
        if (other.getMountPoint() != null && other.getMountPoint().equals(this.getMountPoint()) == falsereturn false
        if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == nullreturn false;
        if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == falsereturn false
        if (other.getCreatedAt() == null ^ this.getCreatedAt() == nullreturn false;
        if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == falsereturn false
        if (other.getStackId() == null ^ this.getStackId() == nullreturn false;
        if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == falsereturn false
        if (other.getVolumeType() == null ^ this.getVolumeType() == nullreturn false;
        if (other.getVolumeType() != null && other.getVolumeType().equals(this.getVolumeType()) == falsereturn false
        if (other.getIops() == null ^ this.getIops() == nullreturn false;
        if (other.getIops() != null && other.getIops().equals(this.getIops()) == falsereturn false
        return true;
    }
    
    @Override
    public RaidArray clone() {
        try {
            return (RaidArraysuper.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