list method
Lists conversations.
Request parameters:
parent
- Required. The parent resource of the conversation.
Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$
.
filter
- A filter to reduce results to a specific subset. Useful for
querying conversations with specific properties.
orderBy
- Optional. The attribute by which to order conversations in the
response. If empty, conversations will be ordered by descending creation
time. Supported values are one of the following: * create_time *
customer_satisfaction_rating * duration * latest_analysis * start_time *
turn_count The default sort order is ascending. To specify order, append
asc
or desc
(create_time desc
). For more details, see
Google AIPs Ordering.
pageSize
- The maximum number of conversations to return in the
response. A valid page size ranges from 0 to 1,000 inclusive. If the page
size is zero or unspecified, a default page size of 100 will be chosen.
Note that a call might return fewer results than the requested page size.
pageToken
- The value returned by the last ListConversationsResponse
.
This value indicates that this is a continuation of a prior
ListConversations
call and that the system should return the next page
of data.
view
- The level of details of the conversation. Default is BASIC
.
Possible string values are:
- "CONVERSATION_VIEW_UNSPECIFIED" : The conversation view is not
specified. * Defaults to
FULL
inGetConversationRequest
. * Defaults toBASIC
inListConversationsRequest
. - "FULL" : Populates all fields in the conversation.
- "BASIC" : Populates all fields in the conversation except the transcript.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudContactcenterinsightsV1ListConversationsResponse.
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<GoogleCloudContactcenterinsightsV1ListConversationsResponse>
list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (orderBy != null) 'orderBy': [orderBy],
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') + '/conversations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudContactcenterinsightsV1ListConversationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}