fetchAvailable method
Fetches available Bindings.
Request parameters:
parent - Required. The parent, in the format
projects/{project}/locations/{location}.
Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.
pageSize - Optional. Requested page size. Server may return fewer items
than requested. Page size is 500 if unspecified and is capped at 500
even if a larger value is given.
pageToken - Optional. A token identifying a page of results the server
should return.
sourceIdentifier - The identifier of the source Agent. Format: *
urn:agent:{publisher}:{namespace}:{name}
targetIdentifier - Optional. The identifier of the target Agent, MCP
Server, or Endpoint. Format: * urn:agent:{publisher}:{namespace}:{name}
urn:mcp:{publisher}:{namespace}:{name}*urn:endpoint:{publisher}:{namespace}:{name}
$fields - Selector specifying which fields to include in a partial
response.
Completes with a FetchAvailableBindingsResponse.
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<FetchAvailableBindingsResponse> fetchAvailable(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? sourceIdentifier,
core.String? targetIdentifier,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'sourceIdentifier': ?sourceIdentifier == null ? null : [sourceIdentifier],
'targetIdentifier': ?targetIdentifier == null ? null : [targetIdentifier],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$parent') + '/bindings:fetchAvailable';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return FetchAvailableBindingsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}