searchNetworkProfiles method

Future<SearchNetworkProfilesResponse> searchNetworkProfiles({
  1. List<Filter>? filters,
  2. int? maxResults,
  3. String? nextToken,
  4. List<Sort>? sortCriteria,
})

Searches network profiles and lists the ones that meet a set of filter and sort criteria.

Parameter filters : The filters to use to list a specified set of network profiles. Valid filters are NetworkProfileName, Ssid, and SecurityType.

Parameter maxResults : The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

Parameter nextToken : An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.

Parameter sortCriteria : The sort order to use to list the specified set of network profiles. Valid sort criteria includes NetworkProfileName, Ssid, and SecurityType.

Implementation

Future<SearchNetworkProfilesResponse> searchNetworkProfiles({
  List<Filter>? filters,
  int? maxResults,
  String? nextToken,
  List<Sort>? sortCriteria,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.SearchNetworkProfiles'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'Filters': filters,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (sortCriteria != null) 'SortCriteria': sortCriteria,
    },
  );

  return SearchNetworkProfilesResponse.fromJson(jsonResponse.body);
}