list method
Lists schemas in a project.
Request parameters:
parent
- Required. The name of the project in which to list schemas.
Format is projects/{project-id}
.
Value must have pattern ^projects/\[^/\]+$
.
pageSize
- Maximum number of schemas to return.
pageToken
- The value returned by the last ListSchemasResponse
;
indicates that this is a continuation of a prior ListSchemas
call, and
that the system should return the next page of data.
view
- The set of Schema fields to return in the response. If not set,
returns Schemas with name
and type
, but not definition
. Set to
FULL
to retrieve all fields.
Possible string values are:
- "SCHEMA_VIEW_UNSPECIFIED" : The default / unset value. The API will default to the BASIC view.
- "BASIC" : Include the name and type of the schema, but not the definition.
- "FULL" : Include all Schema object fields.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListSchemasResponse.
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<ListSchemasResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/schemas';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListSchemasResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}