resetPassword(userId, queryParameters) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API resetPassword parameter userId is required.'));
    }
    if (!queryParameters) {
      return Promise.reject(new Error('OKTA API resetPassword parameter queryParameters is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/reset_password`;
    const queryString = qs.stringify(queryParameters || {});

    url += queryString ? ('?' + queryString) : '';

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

    const request = this.http.postJson(
      url,
      null,
      { resources }
    );
    return request.then(jsonRes => new models.ResetPasswordToken(jsonRes, this));
  }
/**
   *
   * @param userId {String}
   * @param {Object} queryParams Map of query parameters to add to this request
   * @param {String} [queryParams.sendEmail]
   * @description
   * Generates a one-time token (OTT) that can be used to reset a user's password.  The OTT link can be automatically emailed to the user or returned to the API caller and distributed using a custom flow.
   * @returns {Promise<ResetPasswordToken>}
   */
@param userId {String}
@param {Object} queryParams Map of query parameters to add to this request
@param {String} [queryParams.sendEmail]
@description
Generates a one-time token (OTT) that can be used to reset a user's password.  The OTT link can be automatically emailed to the user or returned to the API caller and distributed using a custom flow.
@returns {Promise}
@param userId { String } @param { Object } queryParams Map of query parameters to add to this request @param { String } [ queryParams . sendEmail ] @description Generates a one - time token ( OTT ) that can be used to reset a user ' s password . The OTT link can be automatically emailed to the user or returned to the API caller and distributed using a custom flow . @returns { Promise }
resetPassword(userId, queryParameters) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API resetPassword parameter userId is required.'));
    }
    if (!queryParameters) {
      return Promise.reject(new Error('OKTA API resetPassword parameter queryParameters is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/reset_password`;
    const queryString = qs.stringify(queryParameters || {});
    url += queryString ? ('?' + queryString) : '';
    const resources = [
      `${this.baseUrl}/api/v1/users/${userId}`
    ];
    const request = this.http.postJson(
      url,
      null,
      { resources }
    );
    return request.then(jsonRes => new models.ResetPasswordToken(jsonRes, this));
  }
resetPassword ( userId , queryParameters ) { if ( ! userId ) { return Promise . reject ( new Error ( 'OKTA API resetPassword parameter userId is required.' ) ) ; } if ( ! queryParameters ) { return Promise . reject ( new Error ( 'OKTA API resetPassword parameter queryParameters is required.' ) ) ; } let url = ` ${ this . baseUrl } ${ userId } ` ; const queryString = qs . stringify ( queryParameters || { } ) ; url += queryString ? ( '?' + queryString ) : '' ; const resources = [ ` ${ this . baseUrl } ${ userId } ` ] ; const request = this . http . postJson ( url , null , { resources } ) ; return request . then ( jsonRes => new models . ResetPasswordToken ( jsonRes , this ) ) ; }
@param userId {String}
 @param {Object} queryParams Map of query parameters to add to this request
 @param {String} [queryParams.sendEmail]
 @description
 Generates a one-time token (OTT) that can be used to reset a user's password.
@param userId { String } @param { Object } queryParams Map of query parameters to add to this request @param { String } [ queryParams . sendEmail ] @description Generates a one - time token ( OTT ) that can be used to reset a user ' s password .