listUserGroups(userId) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API listUserGroups parameter userId is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/groups`;

    return new Collection(
      this,
      url,
      new ModelFactory(models.Group),
    );
  }
/**
   *
   * @param userId {String}
   * @description
   * Fetches the groups of which the user is a member.
   * @returns {Collection} A collection that will yield {@link Group} instances.
   */
@param userId {String}
@description
Fetches the groups of which the user is a member.
@returns {Collection} A collection that will yield  Group instances.
@param userId { String } @description Fetches the groups of which the user is a member . @returns { Collection } A collection that will yield Group instances .
listUserGroups(userId) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API listUserGroups parameter userId is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/groups`;
    return new Collection(
      this,
      url,
      new ModelFactory(models.Group),
    );
  }
listUserGroups ( userId ) { if ( ! userId ) { return Promise . reject ( new Error ( 'OKTA API listUserGroups parameter userId is required.' ) ) ; } let url = ` ${ this . baseUrl } ${ userId } ` ; return new Collection ( this , url , new ModelFactory ( models . Group ) , ) ; }
@param userId {String}
 @description
 Fetches the groups of which the user is a member.
@param userId { String } @description Fetches the groups of which the user is a member .