searchUsersWithHttpInfo method

Future<Response> searchUsersWithHttpInfo(
  1. String tenantId,
  2. String urlId, [
  3. SearchUsersOptions? options
])

Performs an HTTP 'GET /user-search/{tenantId}' operation and returns the Response. Parameters:

Implementation

Future<Response> searchUsersWithHttpInfo(String tenantId, String urlId, [ SearchUsersOptions? options ]) async {
  final usernameStartsWith = options?.usernameStartsWith;
  final mentionGroupIds = options?.mentionGroupIds;
  final sso = options?.sso;
  final searchSection = options?.searchSection;
  // ignore: prefer_const_declarations
  final path = r'/user-search/{tenantId}'
    .replaceAll('{tenantId}', tenantId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

    queryParams.addAll(_queryParams('', 'urlId', urlId));
  if (usernameStartsWith != null) {
    queryParams.addAll(_queryParams('', 'usernameStartsWith', usernameStartsWith));
  }
  if (mentionGroupIds != null) {
    queryParams.addAll(_queryParams('multi', 'mentionGroupIds', mentionGroupIds));
  }
  if (sso != null) {
    queryParams.addAll(_queryParams('', 'sso', sso));
  }
  if (searchSection != null) {
    queryParams.addAll(_queryParams('', 'searchSection', searchSection));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}