public UpdateAnalysisPermissionsRequest withGrantPermissions(ResourcePermission... grantPermissions) {
        if (this.grantPermissions == null) {
            setGrantPermissions(new java.util.ArrayList<ResourcePermission>(grantPermissions.length));
        }
        for (ResourcePermission ele : grantPermissions) {
            this.grantPermissions.add(ele);
        }
        return this;
    }
<p>
A structure that describes the permissions to add and the principal to add them to.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setGrantPermissions(java.util.Collection)} or {@link #withGrantPermissions(java.util.Collection)} if you
want to override the existing values.
</p>

@param grantPermissions
       A structure that describes the permissions to add and the principal to add them to.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-quicksight/src/main/java/com/amazonaws/services/quicksight/model/UpdateAnalysisPermissionsRequest.java