1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\Contactcenterinsights\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1Conversation;
|
---|
21 | use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1ListConversationsResponse;
|
---|
22 | use Google\Service\Contactcenterinsights\GoogleLongrunningOperation;
|
---|
23 | use Google\Service\Contactcenterinsights\GoogleProtobufEmpty;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * The "conversations" collection of methods.
|
---|
27 | * Typical usage is:
|
---|
28 | * <code>
|
---|
29 | * $contactcenterinsightsService = new Google\Service\Contactcenterinsights(...);
|
---|
30 | * $conversations = $contactcenterinsightsService->projects_locations_authorizedViewSets_authorizedViews_conversations;
|
---|
31 | * </code>
|
---|
32 | */
|
---|
33 | class ProjectsLocationsAuthorizedViewSetsAuthorizedViewsConversations extends \Google\Service\Resource
|
---|
34 | {
|
---|
35 | /**
|
---|
36 | * Creates a conversation. Note that this method does not support audio
|
---|
37 | * transcription or redaction. Use `conversations.upload` instead.
|
---|
38 | * (conversations.create)
|
---|
39 | *
|
---|
40 | * @param string $parent Required. The parent resource of the conversation.
|
---|
41 | * @param GoogleCloudContactcenterinsightsV1Conversation $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | *
|
---|
44 | * @opt_param string conversationId A unique ID for the new conversation. This
|
---|
45 | * ID will become the final component of the conversation's resource name. If no
|
---|
46 | * ID is specified, a server-generated ID will be used. This value should be
|
---|
47 | * 4-64 characters and must match the regular expression `^[a-z0-9-]{4,64}$`.
|
---|
48 | * Valid characters are `a-z-`
|
---|
49 | * @return GoogleCloudContactcenterinsightsV1Conversation
|
---|
50 | * @throws \Google\Service\Exception
|
---|
51 | */
|
---|
52 | public function create($parent, GoogleCloudContactcenterinsightsV1Conversation $postBody, $optParams = [])
|
---|
53 | {
|
---|
54 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
55 | $params = array_merge($params, $optParams);
|
---|
56 | return $this->call('create', [$params], GoogleCloudContactcenterinsightsV1Conversation::class);
|
---|
57 | }
|
---|
58 | /**
|
---|
59 | * Deletes a conversation. (conversations.delete)
|
---|
60 | *
|
---|
61 | * @param string $name Required. The name of the conversation to delete.
|
---|
62 | * @param array $optParams Optional parameters.
|
---|
63 | *
|
---|
64 | * @opt_param bool force If set to true, all of this conversation's analyses
|
---|
65 | * will also be deleted. Otherwise, the request will only succeed if the
|
---|
66 | * conversation has no analyses.
|
---|
67 | * @return GoogleProtobufEmpty
|
---|
68 | * @throws \Google\Service\Exception
|
---|
69 | */
|
---|
70 | public function delete($name, $optParams = [])
|
---|
71 | {
|
---|
72 | $params = ['name' => $name];
|
---|
73 | $params = array_merge($params, $optParams);
|
---|
74 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
75 | }
|
---|
76 | /**
|
---|
77 | * Gets a conversation. (conversations.get)
|
---|
78 | *
|
---|
79 | * @param string $name Required. The name of the conversation to get.
|
---|
80 | * @param array $optParams Optional parameters.
|
---|
81 | *
|
---|
82 | * @opt_param string view The level of details of the conversation. Default is
|
---|
83 | * `FULL`.
|
---|
84 | * @return GoogleCloudContactcenterinsightsV1Conversation
|
---|
85 | * @throws \Google\Service\Exception
|
---|
86 | */
|
---|
87 | public function get($name, $optParams = [])
|
---|
88 | {
|
---|
89 | $params = ['name' => $name];
|
---|
90 | $params = array_merge($params, $optParams);
|
---|
91 | return $this->call('get', [$params], GoogleCloudContactcenterinsightsV1Conversation::class);
|
---|
92 | }
|
---|
93 | /**
|
---|
94 | * Lists conversations. (conversations.listProjectsLocationsAuthorizedViewSetsAu
|
---|
95 | * thorizedViewsConversations)
|
---|
96 | *
|
---|
97 | * @param string $parent Required. The parent resource of the conversation.
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | *
|
---|
100 | * @opt_param string filter A filter to reduce results to a specific subset.
|
---|
101 | * Useful for querying conversations with specific properties.
|
---|
102 | * @opt_param string orderBy Optional. The attribute by which to order
|
---|
103 | * conversations in the response. If empty, conversations will be ordered by
|
---|
104 | * descending creation time. Supported values are one of the following: *
|
---|
105 | * create_time * customer_satisfaction_rating * duration * latest_analysis *
|
---|
106 | * start_time * turn_count The default sort order is ascending. To specify
|
---|
107 | * order, append `asc` or `desc` (`create_time desc`). For more details, see
|
---|
108 | * [Google AIPs Ordering](https://google.aip.dev/132#ordering).
|
---|
109 | * @opt_param int pageSize The maximum number of conversations to return in the
|
---|
110 | * response. A valid page size ranges from 0 to 100,000 inclusive. If the page
|
---|
111 | * size is zero or unspecified, a default page size of 100 will be chosen. Note
|
---|
112 | * that a call might return fewer results than the requested page size.
|
---|
113 | * @opt_param string pageToken The value returned by the last
|
---|
114 | * `ListConversationsResponse`. This value indicates that this is a continuation
|
---|
115 | * of a prior `ListConversations` call and that the system should return the
|
---|
116 | * next page of data.
|
---|
117 | * @opt_param string view The level of details of the conversation. Default is
|
---|
118 | * `BASIC`.
|
---|
119 | * @return GoogleCloudContactcenterinsightsV1ListConversationsResponse
|
---|
120 | * @throws \Google\Service\Exception
|
---|
121 | */
|
---|
122 | public function listProjectsLocationsAuthorizedViewSetsAuthorizedViewsConversations($parent, $optParams = [])
|
---|
123 | {
|
---|
124 | $params = ['parent' => $parent];
|
---|
125 | $params = array_merge($params, $optParams);
|
---|
126 | return $this->call('list', [$params], GoogleCloudContactcenterinsightsV1ListConversationsResponse::class);
|
---|
127 | }
|
---|
128 | /**
|
---|
129 | * Updates a conversation. (conversations.patch)
|
---|
130 | *
|
---|
131 | * @param string $name Immutable. The resource name of the conversation. Format:
|
---|
132 | * projects/{project}/locations/{location}/conversations/{conversation}
|
---|
133 | * @param GoogleCloudContactcenterinsightsV1Conversation $postBody
|
---|
134 | * @param array $optParams Optional parameters.
|
---|
135 | *
|
---|
136 | * @opt_param string updateMask The list of fields to be updated. All possible
|
---|
137 | * fields can be updated by passing `*`, or a subset of the following updateable
|
---|
138 | * fields can be provided: * `agent_id` * `language_code` * `labels` *
|
---|
139 | * `metadata` * `quality_metadata` * `call_metadata` * `start_time` *
|
---|
140 | * `expire_time` or `ttl` * `data_source.gcs_source.audio_uri` or
|
---|
141 | * `data_source.dialogflow_source.audio_uri`
|
---|
142 | * @return GoogleCloudContactcenterinsightsV1Conversation
|
---|
143 | * @throws \Google\Service\Exception
|
---|
144 | */
|
---|
145 | public function patch($name, GoogleCloudContactcenterinsightsV1Conversation $postBody, $optParams = [])
|
---|
146 | {
|
---|
147 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
148 | $params = array_merge($params, $optParams);
|
---|
149 | return $this->call('patch', [$params], GoogleCloudContactcenterinsightsV1Conversation::class);
|
---|
150 | }
|
---|
151 | /**
|
---|
152 | * Create a long-running conversation upload operation. This method differs from
|
---|
153 | * `CreateConversation` by allowing audio transcription and optional DLP
|
---|
154 | * redaction. (conversations.upload)
|
---|
155 | *
|
---|
156 | * @param string $parent Required. The parent resource of the conversation.
|
---|
157 | * @param GoogleCloudContactcenterinsightsV1Conversation $postBody
|
---|
158 | * @param array $optParams Optional parameters.
|
---|
159 | *
|
---|
160 | * @opt_param string conversationId Optional. A unique ID for the new
|
---|
161 | * conversation. This ID will become the final component of the conversation's
|
---|
162 | * resource name. If no ID is specified, a server-generated ID will be used.
|
---|
163 | * This value should be 4-64 characters and must match the regular expression
|
---|
164 | * `^[a-z0-9-]{4,64}$`. Valid characters are `a-z-`
|
---|
165 | * @opt_param string redactionConfig.deidentifyTemplate The fully-qualified DLP
|
---|
166 | * deidentify template resource name. Format:
|
---|
167 | * `projects/{project}/deidentifyTemplates/{template}`
|
---|
168 | * @opt_param string redactionConfig.inspectTemplate The fully-qualified DLP
|
---|
169 | * inspect template resource name. Format:
|
---|
170 | * `projects/{project}/locations/{location}/inspectTemplates/{template}`
|
---|
171 | * @opt_param string speechConfig.speechRecognizer The fully-qualified Speech
|
---|
172 | * Recognizer resource name. Format:
|
---|
173 | * `projects/{project_id}/locations/{location}/recognizer/{recognizer}`
|
---|
174 | * @return GoogleLongrunningOperation
|
---|
175 | * @throws \Google\Service\Exception
|
---|
176 | */
|
---|
177 | public function upload($parent, GoogleCloudContactcenterinsightsV1Conversation $postBody, $optParams = [])
|
---|
178 | {
|
---|
179 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
180 | $params = array_merge($params, $optParams);
|
---|
181 | return $this->call('upload', [$params], GoogleLongrunningOperation::class);
|
---|
182 | }
|
---|
183 | }
|
---|
184 |
|
---|
185 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
186 | class_alias(ProjectsLocationsAuthorizedViewSetsAuthorizedViewsConversations::class, 'Google_Service_Contactcenterinsights_Resource_ProjectsLocationsAuthorizedViewSetsAuthorizedViewsConversations');
|
---|