list method

Future<GoogleCloudAiplatformV1ListSessionsResponse> list(
  1. String parent, {
  2. String? filter,
  3. String? orderBy,
  4. int? pageSize,
  5. String? pageToken,
  6. String? $fields,
})

Lists Sessions in a given reasoning engine.

Request parameters:

parent - Required. The resource name of the location to list sessions from. Format: projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/reasoningEngines/\[^/\]+$.

filter - Optional. The standard list filter. Supported fields: * display_name * user_id * labels Example: display_name="abc", user_id="123", labels.key="value".

orderBy - Optional. A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * create_time * update_time Example: create_time desc.

pageSize - Optional. The maximum number of sessions to return. The service may return fewer than this value. If unspecified, the default page size is 100. Values greater than 100 will be capped at 100.

pageToken - Optional. The next_page_token value returned from a previous list SessionService.ListSessions call.

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

Completes with a GoogleCloudAiplatformV1ListSessionsResponse.

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<GoogleCloudAiplatformV1ListSessionsResponse> list(
  core.String parent, {
  core.String? filter,
  core.String? orderBy,
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'filter': ?filter == null ? null : [filter],
    'orderBy': ?orderBy == null ? null : [orderBy],
    'pageSize': ?pageSize == null ? null : ['${pageSize}'],
    'pageToken': ?pageToken == null ? null : [pageToken],
    'fields': ?$fields == null ? null : [$fields],
  };

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

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