@Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;

    if (obj instanceof VolumeConfiguration == false) return false;
    VolumeConfiguration other = (VolumeConfiguration) obj;

    if (other.getMountPoint() == null ^ this.getMountPoint() == null) return false;
    if (other.getMountPoint() != null
        && other.getMountPoint().equals(this.getMountPoint()) == false) return false;
    if (other.getRaidLevel() == null ^ this.getRaidLevel() == null) return false;
    if (other.getRaidLevel() != null && other.getRaidLevel().equals(this.getRaidLevel()) == false)
      return false;
    if (other.getNumberOfDisks() == null ^ this.getNumberOfDisks() == null) return false;
    if (other.getNumberOfDisks() != null
        && other.getNumberOfDisks().equals(this.getNumberOfDisks()) == false) return false;
    if (other.getSize() == null ^ this.getSize() == null) return false;
    if (other.getSize() != null && other.getSize().equals(this.getSize()) == false) return false;
    return true;
  }
  /** Marshall the given parameter object, and output to a SdkJsonGenerator */
  public void marshall(
      VolumeConfiguration volumeConfiguration, StructuredJsonGenerator jsonGenerator) {

    if (volumeConfiguration == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    try {
      jsonGenerator.writeStartObject();

      if (volumeConfiguration.getMountPoint() != null) {
        jsonGenerator.writeFieldName("MountPoint").writeValue(volumeConfiguration.getMountPoint());
      }
      if (volumeConfiguration.getRaidLevel() != null) {
        jsonGenerator.writeFieldName("RaidLevel").writeValue(volumeConfiguration.getRaidLevel());
      }
      if (volumeConfiguration.getNumberOfDisks() != null) {
        jsonGenerator
            .writeFieldName("NumberOfDisks")
            .writeValue(volumeConfiguration.getNumberOfDisks());
      }
      if (volumeConfiguration.getSize() != null) {
        jsonGenerator.writeFieldName("Size").writeValue(volumeConfiguration.getSize());
      }
      if (volumeConfiguration.getVolumeType() != null) {
        jsonGenerator.writeFieldName("VolumeType").writeValue(volumeConfiguration.getVolumeType());
      }
      if (volumeConfiguration.getIops() != null) {
        jsonGenerator.writeFieldName("Iops").writeValue(volumeConfiguration.getIops());
      }

      jsonGenerator.writeEndObject();
    } catch (Throwable t) {
      throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);
    }
  }