/** * Simplified method form for invoking the AddPermission operation with an AsyncHandler. * * @see #addPermissionAsync(AddPermissionRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future<AddPermissionResult> addPermissionAsync(String queueUrl, String label, java.util.List<String> aWSAccountIds, java.util.List<String> actions, com.amazonaws.handlers.AsyncHandler<AddPermissionRequest, AddPermissionResult> asyncHandler) { return addPermissionAsync(new AddPermissionRequest().withQueueUrl(queueUrl).withLabel(label).withAWSAccountIds(aWSAccountIds).withActions(actions), asyncHandler); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getQueueUrl() == null) ? 0 : getQueueUrl().hashCode()); hashCode = prime * hashCode + ((getLabel() == null) ? 0 : getLabel().hashCode()); hashCode = prime * hashCode + ((getAWSAccountIds() == null) ? 0 : getAWSAccountIds().hashCode()); hashCode = prime * hashCode + ((getActions() == null) ? 0 : getActions().hashCode()); return hashCode; }
setQueueUrl(queueUrl); setLabel(label); setAWSAccountIds(aWSAccountIds); setActions(actions);
@Override public Future<AddPermissionResult> addPermissionAsync(String queueUrl, String label, List<String> aWSAccountIds, List<String> actions) { return addPermissionAsync(new AddPermissionRequest(queueUrl, label, aWSAccountIds, actions)); }
/** * <p> * The AWS account number of the <a * href="http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P">principal</a> who is given permission. The * principal must have an AWS account, but does not need to be signed up for Amazon SQS. For information about * locating the AWS account identification, see <a href= * "http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication" * >Your AWS Identifiers</a> in the <i>Amazon Simple Queue Service Developer Guide</i>. * </p> * * @param aWSAccountIds * The AWS account number of the <a * href="http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P">principal</a> who is given * permission. The principal must have an AWS account, but does not need to be signed up for Amazon SQS. For * information about locating the AWS account identification, see <a href= * "http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication" * >Your AWS Identifiers</a> in the <i>Amazon Simple Queue Service Developer Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public AddPermissionRequest withAWSAccountIds(java.util.Collection<String> aWSAccountIds) { setAWSAccountIds(aWSAccountIds); return this; }
setActions(actions); return this;
/** * <p> * The unique identification of the permission you're setting (for example, <code>AliceSendMessage</code>). Maximum * 80 characters. Allowed characters include alphanumeric characters, hyphens (<code>-</code>), and underscores ( * <code>_</code>). * </p> * * @param label * The unique identification of the permission you're setting (for example, <code>AliceSendMessage</code>). * Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (<code>-</code>), and * underscores (<code>_</code>). * @return Returns a reference to this object so that method calls can be chained together. */ public AddPermissionRequest withLabel(String label) { setLabel(label); return this; }
/** * <p> * The URL of the Amazon SQS queue to which permissions are added. * </p> * <p> * Queue URLs and names are case-sensitive. * </p> * * @param queueUrl * The URL of the Amazon SQS queue to which permissions are added.</p> * <p> * Queue URLs and names are case-sensitive. * @return Returns a reference to this object so that method calls can be chained together. */ public AddPermissionRequest withQueueUrl(String queueUrl) { setQueueUrl(queueUrl); return this; }
if (getAWSAccountIds() == null) { this.aWSAccountIds = new java.util.ArrayList<String>(aWSAccountIds.length);
if (getActions() == null) { this.actions = new java.util.ArrayList<String>(actions.length);
@Override public Future<AddPermissionResult> addPermissionAsync(String queueUrl, String label, List<String> aWSAccountIds, List<String> actions, AsyncHandler<AddPermissionRequest, AddPermissionResult> asyncHandler) { return addPermissionAsync(new AddPermissionRequest(queueUrl, label, aWSAccountIds, actions), asyncHandler); }
setAWSAccountIds(new com.amazonaws.internal.SdkInternalList<String>(aWSAccountIds.length));
setActions(new com.amazonaws.internal.SdkInternalList<String>(actions.length));
/** * <p> * The unique identification of the permission you're setting (for example, <code>AliceSendMessage</code>). Maximum * 80 characters. Allowed characters include alphanumeric characters, hyphens (<code>-</code>), and underscores ( * <code>_</code>). * </p> * * @param label * The unique identification of the permission you're setting (for example, <code>AliceSendMessage</code>). * Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (<code>-</code>), and * underscores (<code>_</code>). * @return Returns a reference to this object so that method calls can be chained together. */ public AddPermissionRequest withLabel(String label) { setLabel(label); return this; }
/** * <p> * The URL of the Amazon SQS queue to which permissions are added. * </p> * <p> * Queue URLs and names are case-sensitive. * </p> * * @param queueUrl * The URL of the Amazon SQS queue to which permissions are added.</p> * <p> * Queue URLs and names are case-sensitive. * @return Returns a reference to this object so that method calls can be chained together. */ public AddPermissionRequest withQueueUrl(String queueUrl) { setQueueUrl(queueUrl); return this; }
if (getAWSAccountIds() == null) { this.aWSAccountIds = new java.util.ArrayList<String>(aWSAccountIds.length);
if (getActions() == null) { this.actions = new java.util.ArrayList<String>(actions.length);
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AddPermissionRequest == false) return false; AddPermissionRequest other = (AddPermissionRequest) obj; if (other.getQueueUrl() == null ^ this.getQueueUrl() == null) return false; if (other.getQueueUrl() != null && other.getQueueUrl().equals(this.getQueueUrl()) == false) return false; if (other.getLabel() == null ^ this.getLabel() == null) return false; if (other.getLabel() != null && other.getLabel().equals(this.getLabel()) == false) return false; if (other.getAWSAccountIds() == null ^ this.getAWSAccountIds() == null) return false; if (other.getAWSAccountIds() != null && other.getAWSAccountIds().equals(this.getAWSAccountIds()) == false) return false; if (other.getActions() == null ^ this.getActions() == null) return false; if (other.getActions() != null && other.getActions().equals(this.getActions()) == false) return false; return true; }
/** * Simplified method form for invoking the AddPermission operation with an AsyncHandler. * * @see #addPermissionAsync(AddPermissionRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future<AddPermissionResult> addPermissionAsync(String queueUrl, String label, java.util.List<String> aWSAccountIds, java.util.List<String> actions, com.amazonaws.handlers.AsyncHandler<AddPermissionRequest, AddPermissionResult> asyncHandler) { return addPermissionAsync(new AddPermissionRequest().withQueueUrl(queueUrl).withLabel(label).withAWSAccountIds(aWSAccountIds).withActions(actions), asyncHandler); }
setQueueUrl(queueUrl); setLabel(label); setAWSAccountIds(aWSAccountIds); setActions(actions);