@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getReturnSubscriptionArn() == null) ? 0 : getReturnSubscriptionArn().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTopicArn() != null) sb.append("TopicArn: ").append(getTopicArn()).append(","); if (getProtocol() != null) sb.append("Protocol: ").append(getProtocol()).append(","); if (getEndpoint() != null) sb.append("Endpoint: ").append(getEndpoint()).append(","); if (getAttributes() != null) sb.append("Attributes: ").append(getAttributes()).append(","); if (getReturnSubscriptionArn() != null) sb.append("ReturnSubscriptionArn: ").append(getReturnSubscriptionArn()); sb.append("}"); return sb.toString(); }
if (other.getTopicArn() != null && other.getTopicArn().equals(this.getTopicArn()) == false) return false; if (other.getProtocol() == null ^ this.getProtocol() == null) return false; if (other.getProtocol() != null && other.getProtocol().equals(this.getProtocol()) == false) return false; if (other.getEndpoint() == null ^ this.getEndpoint() == null)
if (subscribeRequest.getProtocol() != null) { request.addParameter("Protocol", StringUtils.fromString(subscribeRequest.getProtocol()));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTopicArn() != null) sb.append("TopicArn: " + getTopicArn() + ","); if (getProtocol() != null) sb.append("Protocol: " + getProtocol() + ","); if (getEndpoint() != null) sb.append("Endpoint: " + getEndpoint()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SubscribeRequest == false) return false; SubscribeRequest other = (SubscribeRequest) obj; if (other.getTopicArn() == null ^ this.getTopicArn() == null) return false; if (other.getTopicArn() != null && other.getTopicArn().equals(this.getTopicArn()) == false) return false; if (other.getProtocol() == null ^ this.getProtocol() == null) return false; if (other.getProtocol() != null && other.getProtocol().equals(this.getProtocol()) == false) return false; if (other.getEndpoint() == null ^ this.getEndpoint() == null) return false; if (other.getEndpoint() != null && other.getEndpoint().equals(this.getEndpoint()) == false) return false; return true; } }
public Request<SubscribeRequest> marshall(SubscribeRequest subscribeRequest) { if (subscribeRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(SubscribeRequest)"); } Request<SubscribeRequest> request = new DefaultRequest<SubscribeRequest>(subscribeRequest, "AmazonSNS"); request.addParameter("Action", "Subscribe"); request.addParameter("Version", "2010-03-31"); String prefix; if (subscribeRequest.getTopicArn() != null) { prefix = "TopicArn"; String topicArn = subscribeRequest.getTopicArn(); request.addParameter(prefix, StringUtils.fromString(topicArn)); } if (subscribeRequest.getProtocol() != null) { prefix = "Protocol"; String protocol = subscribeRequest.getProtocol(); request.addParameter(prefix, StringUtils.fromString(protocol)); } if (subscribeRequest.getEndpoint() != null) { prefix = "Endpoint"; String endpoint = subscribeRequest.getEndpoint(); request.addParameter(prefix, StringUtils.fromString(endpoint)); } return request; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTopicArn() != null) sb.append("TopicArn: " + getTopicArn() + ","); if (getProtocol() != null) sb.append("Protocol: " + getProtocol() + ","); if (getEndpoint() != null) sb.append("Endpoint: " + getEndpoint()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SubscribeRequest == false) return false; SubscribeRequest other = (SubscribeRequest) obj; if (other.getTopicArn() == null ^ this.getTopicArn() == null) return false; if (other.getTopicArn() != null && other.getTopicArn().equals(this.getTopicArn()) == false) return false; if (other.getProtocol() == null ^ this.getProtocol() == null) return false; if (other.getProtocol() != null && other.getProtocol().equals(this.getProtocol()) == false) return false; if (other.getEndpoint() == null ^ this.getEndpoint() == null) return false; if (other.getEndpoint() != null && other.getEndpoint().equals(this.getEndpoint()) == false) return false; return true; } }
public Request<SubscribeRequest> marshall(SubscribeRequest subscribeRequest) { if (subscribeRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(SubscribeRequest)"); } Request<SubscribeRequest> request = new DefaultRequest<SubscribeRequest>(subscribeRequest, "AmazonSNS"); request.addParameter("Action", "Subscribe"); request.addParameter("Version", "2010-03-31"); String prefix; if (subscribeRequest.getTopicArn() != null) { prefix = "TopicArn"; String topicArn = subscribeRequest.getTopicArn(); request.addParameter(prefix, StringUtils.fromString(topicArn)); } if (subscribeRequest.getProtocol() != null) { prefix = "Protocol"; String protocol = subscribeRequest.getProtocol(); request.addParameter(prefix, StringUtils.fromString(protocol)); } if (subscribeRequest.getEndpoint() != null) { prefix = "Endpoint"; String endpoint = subscribeRequest.getEndpoint(); request.addParameter(prefix, StringUtils.fromString(endpoint)); } return request; } }