public Request<DeleteVolumeRequest> marshall(DeleteVolumeRequest deleteVolumeRequest) {
    Request<DeleteVolumeRequest> request =
        new DefaultRequest<DeleteVolumeRequest>(deleteVolumeRequest, "AmazonEC2");
    request.addParameter("Action", "DeleteVolume");
    request.addParameter("Version", "2009-11-30");
    if (deleteVolumeRequest != null) {
      if (deleteVolumeRequest.getVolumeId() != null) {
        request.addParameter("VolumeId", StringUtils.fromString(deleteVolumeRequest.getVolumeId()));
      }
    }

    return request;
  }
コード例 #2
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;

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

    if (other.getVolumeId() == null ^ this.getVolumeId() == null) return false;
    if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false)
      return false;
    return true;
  }
コード例 #3
0
  public Request<DeleteVolumeRequest> marshall(DeleteVolumeRequest deleteVolumeRequest) {

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

    Request<DeleteVolumeRequest> request =
        new DefaultRequest<DeleteVolumeRequest>(deleteVolumeRequest, "AmazonEC2");
    request.addParameter("Action", "DeleteVolume");
    request.addParameter("Version", "2012-06-15");

    if (deleteVolumeRequest.getVolumeId() != null) {
      request.addParameter("VolumeId", StringUtils.fromString(deleteVolumeRequest.getVolumeId()));
    }

    return request;
  }