@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubscriptionArn() == null) ? 0 : getSubscriptionArn().hashCode()); hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().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 (getSubscriptionArn() != null) sb.append("SubscriptionArn: ").append(getSubscriptionArn()).append(","); if (getOwner() != null) sb.append("Owner: ").append(getOwner()).append(","); if (getProtocol() != null) sb.append("Protocol: ").append(getProtocol()).append(","); if (getEndpoint() != null) sb.append("Endpoint: ").append(getEndpoint()).append(","); if (getTopicArn() != null) sb.append("TopicArn: ").append(getTopicArn()); sb.append("}"); return sb.toString(); }
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; if (other.getTopicArn() == null ^ this.getTopicArn() == null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubscriptionArn() == null) ? 0 : getSubscriptionArn().hashCode()); hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().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 (getSubscriptionArn() != null) sb.append("SubscriptionArn: " + getSubscriptionArn() + ","); if (getOwner() != null) sb.append("Owner: " + getOwner() + ","); if (getProtocol() != null) sb.append("Protocol: " + getProtocol() + ","); if (getEndpoint() != null) sb.append("Endpoint: " + getEndpoint() + ","); if (getTopicArn() != null) sb.append("TopicArn: " + getTopicArn()); sb.append("}"); return sb.toString(); }
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; if (other.getTopicArn() == null ^ this.getTopicArn() == null)
public void marshall(Subscription _subscription, Request<?> request, String _prefix) { String prefix; if (_subscription.getSubscriptionArn() != null) { prefix = _prefix + "SubscriptionArn"; String subscriptionArn = _subscription.getSubscriptionArn(); request.addParameter(prefix, StringUtils.fromString(subscriptionArn)); } if (_subscription.getOwner() != null) { prefix = _prefix + "Owner"; String owner = _subscription.getOwner(); request.addParameter(prefix, StringUtils.fromString(owner)); } if (_subscription.getProtocol() != null) { prefix = _prefix + "Protocol"; String protocol = _subscription.getProtocol(); request.addParameter(prefix, StringUtils.fromString(protocol)); } if (_subscription.getEndpoint() != null) { prefix = _prefix + "Endpoint"; String endpoint = _subscription.getEndpoint(); request.addParameter(prefix, StringUtils.fromString(endpoint)); } if (_subscription.getTopicArn() != null) { prefix = _prefix + "TopicArn"; String topicArn = _subscription.getTopicArn(); request.addParameter(prefix, StringUtils.fromString(topicArn)); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubscriptionArn() == null) ? 0 : getSubscriptionArn().hashCode()); hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); return hashCode; }
ListSubscriptionsResult listResult = snsClient.listSubscriptions(); List<Subscription> subscriptions = listResult.getSubscriptions(); String arn=""; for (Subscription subs : subscriptions) { if(subs.getProtocol().equals("sms") && subs.getEndpoint().equals("12712438216")) { arn = subs.getTopicArn(); break; } } if(!arn.equals("")) { snsClient.unsubscribe(arn); }
/** * 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 (getSubscriptionArn() != null) sb.append("SubscriptionArn: " + getSubscriptionArn() + ","); if (getOwner() != null) sb.append("Owner: " + getOwner() + ","); if (getProtocol() != null) sb.append("Protocol: " + getProtocol() + ","); if (getEndpoint() != null) sb.append("Endpoint: " + getEndpoint() + ","); if (getTopicArn() != null) sb.append("TopicArn: " + getTopicArn()); sb.append("}"); return sb.toString(); }
log_.info("Topic " + topicName + " has subscription to " + s.getEndpoint() + " as " + s.getSubscriptionArn()); log_.info("Topic " + topicName + " has subscription to " + s.getEndpoint() + " as " + s.getSubscriptionArn());
private void projectSubscription(Topic topic, Subscription subscription) { ObjectNode n = mapper.createObjectNode(); n.put("aws_topicArn", subscription.getTopicArn()); n.put("aws_endpoint", subscription.getEndpoint()); n.put("aws_protocol", subscription.getProtocol()); n.put("aws_owner", subscription.getOwner()); n.put("aws_region", getRegion().getName()); n.put("aws_account", getAccountId()); String cypher = "merge (s:AwsSnsSubscription {aws_arn:{arn}}) set s+={props}, s.updateTs=timestamp()"; getNeoRxClient().execCypher(cypher, "arn", subscription.getSubscriptionArn(), "props", n); cypher = "match (a:AwsSnsSubscription {aws_arn:{subscriptionArn}}), (t:AwsSnsTopic {aws_arn:{topicArn}}) MERGE (t)-[r:HAS_SUBSCRIPTION]->(a) set r.updateTs=timestamp()"; getNeoRxClient().execCypher(cypher, "subscriptionArn", subscription.getSubscriptionArn(), "topicArn", topic.getTopicArn()); String targetArn = subscription.getEndpoint(); if (targetArn.startsWith("arn:aws:sqs:")) { cypher = "match (a:AwsSnsTopic {aws_arn:{topicArn}}),(q:AwsSqsQueue {aws_arn:{queueArn}}) MERGE (a)-[r:PUBLISHES]->(q) set r.updateTs=timestamp()"; getNeoRxClient().execCypher(cypher, "topicArn", subscription.getTopicArn(), "queueArn", targetArn); } }
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; if (other.getTopicArn() == null ^ this.getTopicArn() == null)
out.println("<td>"+s.getProtocol()+"</td>"); if(s.getProtocol().toLowerCase().equals("cqs")&&isAdmin(request)){ out.println("<td><a href='/webui/cqsuser?userId="+Util.getUserIdForQueueArn(s.getEndpoint())+"'>"+s.getEndpoint()+"</a></td>"); } else { out.println("<td>"+s.getEndpoint()+"</td>");
if(queueArn.equals(subscription.getEndpoint()))
if(queueArn.equals(s.getEndpoint()))
public void marshall(Subscription _subscription, Request<?> request, String _prefix) { String prefix; if (_subscription.getSubscriptionArn() != null) { prefix = _prefix + "SubscriptionArn"; String subscriptionArn = _subscription.getSubscriptionArn(); request.addParameter(prefix, StringUtils.fromString(subscriptionArn)); } if (_subscription.getOwner() != null) { prefix = _prefix + "Owner"; String owner = _subscription.getOwner(); request.addParameter(prefix, StringUtils.fromString(owner)); } if (_subscription.getProtocol() != null) { prefix = _prefix + "Protocol"; String protocol = _subscription.getProtocol(); request.addParameter(prefix, StringUtils.fromString(protocol)); } if (_subscription.getEndpoint() != null) { prefix = _prefix + "Endpoint"; String endpoint = _subscription.getEndpoint(); request.addParameter(prefix, StringUtils.fromString(endpoint)); } if (_subscription.getTopicArn() != null) { prefix = _prefix + "TopicArn"; String topicArn = _subscription.getTopicArn(); request.addParameter(prefix, StringUtils.fromString(topicArn)); } }