activateUser(userId, queryParameters) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API activateUser parameter userId is required.'));
    }
    if (!queryParameters) {
      return Promise.reject(new Error('OKTA API activateUser parameter queryParameters is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/activate`;
    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.UserActivationToken(jsonRes, this));
  }
/**
   *
   * @param userId {String}
   * @param {Object} queryParams Map of query parameters to add to this request
   * @param {String} [queryParams.sendEmail]
   * @description
   * Activates a user.  This operation can only be performed on users with a `STAGED` status.  Activation of a user is an asynchronous operation. The user will have the `transitioningToStatus` property with a value of `ACTIVE` during activation to indicate that the user hasn't completed the asynchronous operation.  The user will have a status of `ACTIVE` when the activation process is complete.
   * @returns {Promise<UserActivationToken>}
   */
@param userId {String}
@param {Object} queryParams Map of query parameters to add to this request
@param {String} [queryParams.sendEmail]
@description
Activates a user.  This operation can only be performed on users with a `STAGED` status.  Activation of a user is an asynchronous operation. The user will have the `transitioningToStatus` property with a value of `ACTIVE` during activation to indicate that the user hasn't completed the asynchronous operation.  The user will have a status of `ACTIVE` when the activation process is complete.
@returns {Promise}
@param userId { String } @param { Object } queryParams Map of query parameters to add to this request @param { String } [ queryParams . sendEmail ] @description Activates a user . This operation can only be performed on users with a ` STAGED ` status . Activation of a user is an asynchronous operation . The user will have the ` transitioningToStatus ` property with a value of ` ACTIVE ` during activation to indicate that the user hasn ' t completed the asynchronous operation . The user will have a status of ` ACTIVE ` when the activation process is complete . @returns { Promise }
activateUser(userId, queryParameters) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API activateUser parameter userId is required.'));
    }
    if (!queryParameters) {
      return Promise.reject(new Error('OKTA API activateUser parameter queryParameters is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/activate`;
    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.UserActivationToken(jsonRes, this));
  }
activateUser ( userId , queryParameters ) { if ( ! userId ) { return Promise . reject ( new Error ( 'OKTA API activateUser parameter userId is required.' ) ) ; } if ( ! queryParameters ) { return Promise . reject ( new Error ( 'OKTA API activateUser 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 . UserActivationToken ( jsonRes , this ) ) ; }
@param userId {String}
 @param {Object} queryParams Map of query parameters to add to this request
 @param {String} [queryParams.sendEmail]
 @description
 Activates a user.
@param userId { String } @param { Object } queryParams Map of query parameters to add to this request @param { String } [ queryParams . sendEmail ] @description Activates a user .