list method

Future<GooglePrivacyDlpV2ListInfoTypesResponse> list(
  1. String parent, {
  2. String? filter,
  3. String? languageCode,
  4. String? locationId,
  5. String? $fields,
})

Returns a list of the sensitive information types that DLP API supports.

See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.

Request parameters:

parent - The parent resource name. The format of this value is as follows: locations/ LOCATION_ID Value must have pattern ^locations/\[^/\]+$.

filter - filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.

languageCode - BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.

locationId - Deprecated. This field has no effect.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GooglePrivacyDlpV2ListInfoTypesResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<GooglePrivacyDlpV2ListInfoTypesResponse> list(
  core.String parent, {
  core.String? filter,
  core.String? languageCode,
  core.String? locationId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (filter != null) 'filter': [filter],
    if (languageCode != null) 'languageCode': [languageCode],
    if (locationId != null) 'locationId': [locationId],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v2/' + core.Uri.encodeFull('$parent') + '/infoTypes';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return GooglePrivacyDlpV2ListInfoTypesResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}