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

    if (obj instanceof DiskImageDetail == false) return false;
    DiskImageDetail other = (DiskImageDetail) obj;
    if (other.getFormat() == null ^ this.getFormat() == null) return false;
    if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == false)
      return false;
    if (other.getBytes() == null ^ this.getBytes() == null) return false;
    if (other.getBytes() != null && other.getBytes().equals(this.getBytes()) == false) return false;
    if (other.getImportManifestUrl() == null ^ this.getImportManifestUrl() == null) return false;
    if (other.getImportManifestUrl() != null
        && other.getImportManifestUrl().equals(this.getImportManifestUrl()) == false) return false;
    return true;
  }
  public Request<ImportVolumeRequest> marshall(ImportVolumeRequest importVolumeRequest) {

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

    Request<ImportVolumeRequest> request =
        new DefaultRequest<ImportVolumeRequest>(importVolumeRequest, "AmazonEC2");
    request.addParameter("Action", "ImportVolume");
    request.addParameter("Version", "2013-07-15");

    if (importVolumeRequest.getAvailabilityZone() != null) {
      request.addParameter(
          "AvailabilityZone", StringUtils.fromString(importVolumeRequest.getAvailabilityZone()));
    }
    DiskImageDetail diskImageDetailImage = importVolumeRequest.getImage();
    if (diskImageDetailImage != null) {
      if (diskImageDetailImage.getFormat() != null) {
        request.addParameter(
            "Image.Format", StringUtils.fromString(diskImageDetailImage.getFormat()));
      }
      if (diskImageDetailImage.getBytes() != null) {
        request.addParameter("Image.Bytes", StringUtils.fromLong(diskImageDetailImage.getBytes()));
      }
      if (diskImageDetailImage.getImportManifestUrl() != null) {
        request.addParameter(
            "Image.ImportManifestUrl",
            StringUtils.fromString(diskImageDetailImage.getImportManifestUrl()));
      }
    }
    if (importVolumeRequest.getDescription() != null) {
      request.addParameter(
          "Description", StringUtils.fromString(importVolumeRequest.getDescription()));
    }
    VolumeDetail volumeDetailVolume = importVolumeRequest.getVolume();
    if (volumeDetailVolume != null) {
      if (volumeDetailVolume.getSize() != null) {
        request.addParameter("Volume.Size", StringUtils.fromLong(volumeDetailVolume.getSize()));
      }
    }

    return request;
  }