fetchAdditionalSpecContent method

Future<GoogleCloudApihubV1FetchAdditionalSpecContentResponse> fetchAdditionalSpecContent(
  1. String name, {
  2. String? specContentType,
  3. String? $fields,
})

Fetch additional spec content.

Request parameters:

name - Required. The name of the spec whose contents need to be retrieved. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/apis/\[^/\]+/versions/\[^/\]+/specs/\[^/\]+$.

specContentType - Optional. The type of the spec contents to be retrieved. Possible string values are:

  • "SPEC_CONTENT_TYPE_UNSPECIFIED" : Unspecified spec content type. Defaults to spec content uploaded by the user.
  • "BOOSTED_SPEC_CONTENT" : The spec content type for boosted spec.
  • "GATEWAY_OPEN_API_SPEC" : The spec content type for OpenAPI spec. This enum is used for OpenAPI specs ingested via APIGEE X Gateway.

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

Completes with a GoogleCloudApihubV1FetchAdditionalSpecContentResponse.

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

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

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