com.amazonaws.services.finspace.model.Volume Maven / Gradle / Ivy
Show all versions of aws-java-sdk-finspace Show documentation
/*
* Copyright 2019-2024 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.finspace.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The structure that consists of name and type of volume.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Volume implements Serializable, Cloneable, StructuredPojo {
/**
*
* A unique identifier for the volume.
*
*/
private String volumeName;
/**
*
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type.
*
*/
private String volumeType;
/**
*
* A unique identifier for the volume.
*
*
* @param volumeName
* A unique identifier for the volume.
*/
public void setVolumeName(String volumeName) {
this.volumeName = volumeName;
}
/**
*
* A unique identifier for the volume.
*
*
* @return A unique identifier for the volume.
*/
public String getVolumeName() {
return this.volumeName;
}
/**
*
* A unique identifier for the volume.
*
*
* @param volumeName
* A unique identifier for the volume.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Volume withVolumeName(String volumeName) {
setVolumeName(volumeName);
return this;
}
/**
*
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type.
*
*
* @param volumeType
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type.
* @see VolumeType
*/
public void setVolumeType(String volumeType) {
this.volumeType = volumeType;
}
/**
*
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type.
*
*
* @return The type of file system volume. Currently, FinSpace only supports NAS_1
volume type.
* @see VolumeType
*/
public String getVolumeType() {
return this.volumeType;
}
/**
*
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type.
*
*
* @param volumeType
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see VolumeType
*/
public Volume withVolumeType(String volumeType) {
setVolumeType(volumeType);
return this;
}
/**
*
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type.
*
*
* @param volumeType
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see VolumeType
*/
public Volume withVolumeType(VolumeType volumeType) {
this.volumeType = volumeType.toString();
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getVolumeName() != null)
sb.append("VolumeName: ").append(getVolumeName()).append(",");
if (getVolumeType() != null)
sb.append("VolumeType: ").append(getVolumeType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Volume == false)
return false;
Volume other = (Volume) obj;
if (other.getVolumeName() == null ^ this.getVolumeName() == null)
return false;
if (other.getVolumeName() != null && other.getVolumeName().equals(this.getVolumeName()) == false)
return false;
if (other.getVolumeType() == null ^ this.getVolumeType() == null)
return false;
if (other.getVolumeType() != null && other.getVolumeType().equals(this.getVolumeType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getVolumeName() == null) ? 0 : getVolumeName().hashCode());
hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode());
return hashCode;
}
@Override
public Volume clone() {
try {
return (Volume) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.finspace.model.transform.VolumeMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}