get method

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

Gets a Model Garden publisher model.

Request parameters:

name - Required. The name of the PublisherModel resource. Format: publishers/{publisher}/models/{publisher_model} Value must have pattern ^publishers/\[^/\]+/models/\[^/\]+$.

languageCode - Optional. The IETF BCP-47 language code representing the language in which the publisher model's text information should be written in (see go/bcp47).

view - Optional. PublisherModel view specifying which fields to read. Possible string values are:

  • "PUBLISHER_MODEL_VIEW_UNSPECIFIED" : The default / unset value. The API will default to the BASIC view.
  • "PUBLISHER_MODEL_VIEW_BASIC" : Include basic metadata about the publisher model, but not the full contents.
  • "PUBLISHER_MODEL_VIEW_FULL" : Include everything.
  • "PUBLISHER_MODEL_VERSION_VIEW_BASIC" : Include: VersionId, ModelVersionExternalName, and SupportedActions.

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

Completes with a GoogleCloudAiplatformV1PublisherModel.

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

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

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