get method

Future<Dataset> get(
  1. String projectId,
  2. String datasetId, {
  3. String? datasetView,
  4. String? $fields,
})

Returns the dataset specified by datasetID.

Request parameters:

projectId - Required. Project ID of the requested dataset Value must have pattern ^\[^/\]+$.

datasetId - Required. Dataset ID of the requested dataset Value must have pattern ^\[^/\]+$.

datasetView - Optional. Specifies the view that determines which dataset information is returned. By default, metadata and ACL information are returned. Possible string values are:

  • "DATASET_VIEW_UNSPECIFIED" : The default value. Default to the FULL view.
  • "METADATA" : Includes metadata information for the dataset, such as location, etag, lastModifiedTime, etc.
  • "ACL" : Includes ACL information for the dataset, which defines dataset access for one or more entities.
  • "FULL" : Includes both dataset metadata and ACL information.

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

Completes with a Dataset.

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

  final url_ = 'projects/' +
      core.Uri.encodeFull('$projectId') +
      '/datasets/' +
      core.Uri.encodeFull('$datasetId');

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