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

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

    if (other.getSubscriptionArn() == null ^ this.getSubscriptionArn() == null) return false;
    if (other.getSubscriptionArn() != null
        && other.getSubscriptionArn().equals(this.getSubscriptionArn()) == false) return false;
    return true;
  }
  public Request<UnsubscribeRequest> marshall(UnsubscribeRequest unsubscribeRequest) {

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

    Request<UnsubscribeRequest> request =
        new DefaultRequest<UnsubscribeRequest>(unsubscribeRequest, "AmazonSNS");
    request.addParameter("Action", "Unsubscribe");
    request.addParameter("Version", "2010-03-31");

    if (unsubscribeRequest.getSubscriptionArn() != null) {
      request.addParameter(
          "SubscriptionArn", StringUtils.fromString(unsubscribeRequest.getSubscriptionArn()));
    }

    return request;
  }