/** * Simplified method form for invoking the RemovePermission operation with an AsyncHandler. * * @see #removePermissionAsync(RemovePermissionRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(String topicArn, String label, com.amazonaws.handlers.AsyncHandler<RemovePermissionRequest, RemovePermissionResult> asyncHandler) { return removePermissionAsync(new RemovePermissionRequest().withTopicArn(topicArn).withLabel(label), asyncHandler); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); hashCode = prime * hashCode + ((getLabel() == null) ? 0 : getLabel().hashCode()); return hashCode; }
/** * Constructs a new RemovePermissionRequest object. Callers should use the setter or fluent setter (with...) methods * to initialize any additional object members. * * @param topicArn * The ARN of the topic whose access control policy you wish to modify. * @param label * The unique label of the statement you want to remove. */ public RemovePermissionRequest(String topicArn, String label) { setTopicArn(topicArn); setLabel(label); }
RemovePermissionRequest removePermissionRequest = new RemovePermissionRequest(); removePermissionRequest.setTopicArn(topicArn); removePermissionRequest.setLabel(label); removePermission(removePermissionRequest);
@Override public void removePermission(String label, ResultCapture<Void> extractor) { RemovePermissionRequest request = new RemovePermissionRequest() .withLabel(label); removePermission(request, extractor); }
RemovePermissionRequest removePermissionRequest = new RemovePermissionRequest(topicArn, labelSid); sns.removePermission(removePermissionRequest); logger.debug("event=remove_permission topic_arn=" + topicArn + " label=" + labelSid + " user_id=" + userId);
/** * <p> * The unique label of the statement you want to remove. * </p> * * @param label * The unique label of the statement you want to remove. * @return Returns a reference to this object so that method calls can be chained together. */ public RemovePermissionRequest withLabel(String label) { setLabel(label); return this; }
/** * <p> * The ARN of the topic whose access control policy you wish to modify. * </p> * * @param topicArn * The ARN of the topic whose access control policy you wish to modify. * @return Returns a reference to this object so that method calls can be chained together. */ public RemovePermissionRequest withTopicArn(String topicArn) { setTopicArn(topicArn); return this; }
RemovePermissionRequest removePermissionRequest = new RemovePermissionRequest(); removePermissionRequest.setTopicArn(topicArn); removePermissionRequest.setLabel(label); removePermission(removePermissionRequest);
@Override public void removePermission(String label, ResultCapture<Void> extractor) { RemovePermissionRequest request = new RemovePermissionRequest() .withLabel(label); removePermission(request, extractor); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RemovePermissionRequest == false) return false; RemovePermissionRequest other = (RemovePermissionRequest) obj; if (other.getTopicArn() == null ^ this.getTopicArn() == null) return false; if (other.getTopicArn() != null && other.getTopicArn().equals(this.getTopicArn()) == false) return false; if (other.getLabel() == null ^ this.getLabel() == null) return false; if (other.getLabel() != null && other.getLabel().equals(this.getLabel()) == false) return false; return true; }
/** * Simplified method form for invoking the RemovePermission operation. * * @see #removePermissionAsync(RemovePermissionRequest) */ @Override public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(String topicArn, String label) { return removePermissionAsync(new RemovePermissionRequest().withTopicArn(topicArn).withLabel(label)); }
/** * Constructs a new RemovePermissionRequest object. Callers should use the * setter or fluent setter (with...) methods to initialize any additional * object members. * * @param topicArn <p> * The ARN of the topic whose access control policy you wish to * modify. * </p> * @param label <p> * The unique label of the statement you want to remove. * </p> */ public RemovePermissionRequest(String topicArn, String label) { setTopicArn(topicArn); setLabel(label); }
/** * 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 (getLabel() != null) sb.append("Label: ").append(getLabel()); sb.append("}"); return sb.toString(); }
/** * Simplified method form for invoking the RemovePermission operation. * * @see #removePermissionAsync(RemovePermissionRequest) */ @Override public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(String topicArn, String label) { return removePermissionAsync(new RemovePermissionRequest().withTopicArn(topicArn).withLabel(label)); }
/** * Constructs a new RemovePermissionRequest object. Callers should use the * setter or fluent setter (with...) methods to initialize any additional * object members. * * @param topicArn <p> * The ARN of the topic whose access control policy you wish to * modify. * </p> * @param label <p> * The unique label of the statement you want to remove. * </p> */ public RemovePermissionRequest(String topicArn, String label) { setTopicArn(topicArn); setLabel(label); }
public Request<RemovePermissionRequest> marshall(RemovePermissionRequest removePermissionRequest) { if (removePermissionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<RemovePermissionRequest> request = new DefaultRequest<RemovePermissionRequest>(removePermissionRequest, "AmazonSNS"); request.addParameter("Action", "RemovePermission"); request.addParameter("Version", "2010-03-31"); request.setHttpMethod(HttpMethodName.POST); if (removePermissionRequest.getTopicArn() != null) { request.addParameter("TopicArn", StringUtils.fromString(removePermissionRequest.getTopicArn())); } if (removePermissionRequest.getLabel() != null) { request.addParameter("Label", StringUtils.fromString(removePermissionRequest.getLabel())); } return request; }
/** * Simplified method form for invoking the RemovePermission operation with an AsyncHandler. * * @see #removePermissionAsync(RemovePermissionRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(String topicArn, String label, com.amazonaws.handlers.AsyncHandler<RemovePermissionRequest, RemovePermissionResult> asyncHandler) { return removePermissionAsync(new RemovePermissionRequest().withTopicArn(topicArn).withLabel(label), asyncHandler); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); hashCode = prime * hashCode + ((getLabel() == null) ? 0 : getLabel().hashCode()); return hashCode; }
@Override public RemovePermissionResult removePermission(String topicArn, String label) { return removePermission(new RemovePermissionRequest().withTopicArn(topicArn).withLabel(label)); }