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

    return new Collection(
      this,
      url,
      new factories.UserFactor(),
    );
  }
/**
   *
   * @param userId {String}
   * @description
   * Enumerates all the enrolled factors for the specified user
   * @returns {Collection} A collection that will yield {@link UserFactor} instances.
   */
@param userId {String}
@description
Enumerates all the enrolled factors for the specified user
@returns {Collection} A collection that will yield  UserFactor instances.
@param userId { String } @description Enumerates all the enrolled factors for the specified user @returns { Collection } A collection that will yield UserFactor instances .
listFactors(userId) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API listFactors parameter userId is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/factors`;
    return new Collection(
      this,
      url,
      new factories.UserFactor(),
    );
  }
listFactors ( userId ) { if ( ! userId ) { return Promise . reject ( new Error ( 'OKTA API listFactors parameter userId is required.' ) ) ; } let url = ` ${ this . baseUrl } ${ userId } ` ; return new Collection ( this , url , new factories . UserFactor ( ) , ) ; }
@param userId {String}
 @description
 Enumerates all the enrolled factors for the specified user
 @returns {Collection} A collection that will yield {@link UserFactor} instances.
@param userId { String } @description Enumerates all the enrolled factors for the specified user @returns { Collection } A collection that will yield { @link UserFactor } instances .