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

    const resources = [
      `${this.baseUrl}/api/v1/users/${userId}`
    ];

    const request = this.http.post(
      url,
      {
        headers: {
          'Content-Type': 'application/json', 'Accept': 'application/json',
        },
      },
      { resources }
    );
    return request;
  }
/**
   *
   * @param userId {String}
   * @description
   * This operation resets all factors for the specified user. All MFA factor enrollments returned to the unenrolled state. The user's status remains ACTIVE. This link is present only if the user is currently enrolled in one or more MFA factors.
   */
@param userId {String}
@description
This operation resets all factors for the specified user. All MFA factor enrollments returned to the unenrolled state. The user's status remains ACTIVE. This link is present only if the user is currently enrolled in one or more MFA factors.
@param userId { String } @description This operation resets all factors for the specified user . All MFA factor enrollments returned to the unenrolled state . The user ' s status remains ACTIVE . This link is present only if the user is currently enrolled in one or more MFA factors .
resetFactors(userId) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API resetFactors parameter userId is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/reset_factors`;
    const resources = [
      `${this.baseUrl}/api/v1/users/${userId}`
    ];
    const request = this.http.post(
      url,
      {
        headers: {
          'Content-Type': 'application/json', 'Accept': 'application/json',
        },
      },
      { resources }
    );
    return request;
  }
resetFactors ( userId ) { if ( ! userId ) { return Promise . reject ( new Error ( 'OKTA API resetFactors parameter userId is required.' ) ) ; } let url = ` ${ this . baseUrl } ${ userId } ` ; const resources = [ ` ${ this . baseUrl } ${ userId } ` ] ; const request = this . http . post ( url , { headers : { 'Content-Type' : 'application/json' , 'Accept' : 'application/json' , } , } , { resources } ) ; return request ; }
@param userId {String}
 @description
 This operation resets all factors for the specified user.
@param userId { String } @description This operation resets all factors for the specified user .