code: public AddResourcePermissionsRequest withPrincipals(SharePrincipal... principals) {
          if (this.principals == null) {
              setPrincipals(new java.util.ArrayList<SharePrincipal>(principals.length));
          }
          for (SharePrincipal ele : principals) {
              this.principals.add(ele);
          }
          return this;
      }
docs: <p>
  The users, groups, or organization being granted permission.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setPrincipals(java.util.Collection)} or {@link #withPrincipals(java.util.Collection)} if you want to
  override the existing values.
  </p>
  
  @param principals
  The users, groups, or organization being granted permission.
  @return Returns a reference to this object so that method calls can be chained together.