get method

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

Gets a Model.

Request parameters:

name - Required. The name of the Model resource. Format: projects/{project}/locations/{location}/models/{model} In order to retrieve a specific version of the model, also provide the version ID or version alias. Example: projects/{project}/locations/{location}/models/{model}@2 or projects/{project}/locations/{location}/models/{model}@golden If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/models/\[^/\]+$.

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

Completes with a GoogleCloudAiplatformV1Model.

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

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

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