get method

Future<AuthorizedView> get(
  1. String name, {
  2. String? view,
  3. String? $fields,
})

Gets information from a specified AuthorizedView.

Request parameters:

name - Required. The unique name of the requested AuthorizedView. Values are of the form projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}. Value must have pattern ^projects/\[^/\]+/instances/\[^/\]+/tables/\[^/\]+/authorizedViews/\[^/\]+$.

view - Optional. The resource_view to be applied to the returned AuthorizedView's fields. Default to BASIC. Possible string values are:

  • "RESPONSE_VIEW_UNSPECIFIED" : Uses the default view for each method as documented in the request.
  • "NAME_ONLY" : Only populates name.
  • "BASIC" : Only populates the AuthorizedView's basic metadata. This includes: name, deletion_protection, etag.
  • "FULL" : Populates every fields.

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

Completes with a AuthorizedView.

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<AuthorizedView> get(
  core.String name, {
  core.String? view,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (view != null) 'view': [view],
    if ($fields != null) 'fields': [$fields],
  };

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

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