public Request<GetInvalidationRequest> marshall(GetInvalidationRequest getInvalidationRequest) {
    if (getInvalidationRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<GetInvalidationRequest> request =
        new DefaultRequest<GetInvalidationRequest>(getInvalidationRequest, "AmazonCloudFront");
    request.setHttpMethod(HttpMethodName.GET);

    String uriResourcePath = "2014-01-31/distribution/{DistributionId}/invalidation/{Id}";
    uriResourcePath =
        uriResourcePath.replace(
            "{DistributionId}", getString(getInvalidationRequest.getDistributionId()));
    uriResourcePath = uriResourcePath.replace("{Id}", getString(getInvalidationRequest.getId()));

    if (uriResourcePath.contains("?")) {
      String queryString = uriResourcePath.substring(uriResourcePath.indexOf("?") + 1);
      uriResourcePath = uriResourcePath.substring(0, uriResourcePath.indexOf("?"));

      for (String s : queryString.split("[;&]")) {
        String[] nameValuePair = s.split("=");
        if (nameValuePair.length == 2) {
          request.addParameter(nameValuePair[0], nameValuePair[1]);
        } else {
          request.addParameter(s, null);
        }
      }
    }

    request.setResourcePath(uriResourcePath);

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

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

    if (other.getDistributionId() == null ^ this.getDistributionId() == null) return false;
    if (other.getDistributionId() != null
        && other.getDistributionId().equals(this.getDistributionId()) == false) return false;
    if (other.getId() == null ^ this.getId() == null) return false;
    if (other.getId() != null && other.getId().equals(this.getId()) == false) return false;
    return true;
  }