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

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

    const request = this.http.postJson(
      url,
      {
        body: userCredentials
      },
      { resources }
    );
    return request.then(jsonRes => new models.UserCredentials(jsonRes, this));
  }
/**
   *
   * @param userId {String}
   * @param {UserCredentials} userCredentials
   * @description
   * Changes a user's recovery question & answer credential by validating the user's current password.  This operation can only be performed on users in **STAGED**, **ACTIVE** or **RECOVERY** `status` that have a valid password credential
   * @returns {Promise<UserCredentials>}
   */
@param userId {String}
@param {UserCredentials} userCredentials
@description
Changes a user's recovery question & answer credential by validating the user's current password.
@param userId { String } @param { UserCredentials } userCredentials @description Changes a user ' s recovery question & answer credential by validating the user ' s current password .
changeRecoveryQuestion(userId, userCredentials) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API changeRecoveryQuestion parameter userId is required.'));
    }
    if (!userCredentials) {
      return Promise.reject(new Error('OKTA API changeRecoveryQuestion parameter userCredentials is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/credentials/change_recovery_question`;
    const resources = [
      `${this.baseUrl}/api/v1/users/${userId}`
    ];
    const request = this.http.postJson(
      url,
      {
        body: userCredentials
      },
      { resources }
    );
    return request.then(jsonRes => new models.UserCredentials(jsonRes, this));
  }
changeRecoveryQuestion ( userId , userCredentials ) { if ( ! userId ) { return Promise . reject ( new Error ( 'OKTA API changeRecoveryQuestion parameter userId is required.' ) ) ; } if ( ! userCredentials ) { return Promise . reject ( new Error ( 'OKTA API changeRecoveryQuestion parameter userCredentials is required.' ) ) ; } let url = ` ${ this . baseUrl } ${ userId } ` ; const resources = [ ` ${ this . baseUrl } ${ userId } ` ] ; const request = this . http . postJson ( url , { body : userCredentials } , { resources } ) ; return request . then ( jsonRes => new models . UserCredentials ( jsonRes , this ) ) ; }
@param userId {String}
 @param {UserCredentials} userCredentials
 @description
 Changes a user's recovery question & answer credential by validating the user's current password.
@param userId { String } @param { UserCredentials } userCredentials @description Changes a user ' s recovery question & answer credential by validating the user ' s current password .