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

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

    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}
   * @param {Object} queryParams Map of query parameters to add to this request
   * @param {String} [queryParams.sendEmail]
   * @description
   * Deactivates a user.  This operation can only be performed on users that do not have a `DEPROVISIONED` status.  Deactivation of a user is an asynchronous operation.  The user will have the `transitioningToStatus` property with a value of `DEPROVISIONED` during deactivation to indicate that the user hasn't completed the asynchronous operation.  The user will have a status of `DEPROVISIONED` when the deactivation process is complete.
   */
@param userId {String}
@param {Object} queryParams Map of query parameters to add to this request
@param {String} [queryParams.sendEmail]
@description
Deactivates a user.  This operation can only be performed on users that do not have a `DEPROVISIONED` status.  Deactivation of a user is an asynchronous operation.  The user will have the `transitioningToStatus` property with a value of `DEPROVISIONED` during deactivation to indicate that the user hasn't completed the asynchronous operation.  The user will have a status of `DEPROVISIONED` when the deactivation process is complete.
@param userId { String } @param { Object } queryParams Map of query parameters to add to this request @param { String } [ queryParams . sendEmail ] @description Deactivates a user . This operation can only be performed on users that do not have a ` DEPROVISIONED ` status . Deactivation of a user is an asynchronous operation . The user will have the ` transitioningToStatus ` property with a value of ` DEPROVISIONED ` during deactivation to indicate that the user hasn ' t completed the asynchronous operation . The user will have a status of ` DEPROVISIONED ` when the deactivation process is complete .
deactivateUser(userId, queryParameters) {
    if (!userId) {
      return Promise.reject(new Error('OKTA API deactivateUser parameter userId is required.'));
    }
    let url = `${this.baseUrl}/api/v1/users/${userId}/lifecycle/deactivate`;
    const queryString = qs.stringify(queryParameters || {});
    url += queryString ? ('?' + queryString) : '';
    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;
  }
deactivateUser ( userId , queryParameters ) { if ( ! userId ) { return Promise . reject ( new Error ( 'OKTA API deactivateUser parameter userId is required.' ) ) ; } let url = ` ${ this . baseUrl } ${ userId } ` ; const queryString = qs . stringify ( queryParameters || { } ) ; url += queryString ? ( '?' + queryString ) : '' ; 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}
 @param {Object} queryParams Map of query parameters to add to this request
 @param {String} [queryParams.sendEmail]
 @description
 Deactivates a user.
@param userId { String } @param { Object } queryParams Map of query parameters to add to this request @param { String } [ queryParams . sendEmail ] @description Deactivates a user .