source: vendor/google/apiclient-services/src/Contactcenterinsights/Resource/ProjectsLocationsConversations.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload project files

  • Property mode set to 100644
File size: 11.3 KB
Line 
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
18namespace Google\Service\Contactcenterinsights\Resource;
19
20use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsRequest;
21use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1BulkDeleteConversationsRequest;
22use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1CalculateStatsResponse;
23use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1Conversation;
24use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1IngestConversationsRequest;
25use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1ListConversationsResponse;
26use Google\Service\Contactcenterinsights\GoogleCloudContactcenterinsightsV1UploadConversationRequest;
27use Google\Service\Contactcenterinsights\GoogleLongrunningOperation;
28use Google\Service\Contactcenterinsights\GoogleProtobufEmpty;
29
30/**
31 * The "conversations" collection of methods.
32 * Typical usage is:
33 * <code>
34 * $contactcenterinsightsService = new Google\Service\Contactcenterinsights(...);
35 * $conversations = $contactcenterinsightsService->projects_locations_conversations;
36 * </code>
37 */
38class ProjectsLocationsConversations extends \Google\Service\Resource
39{
40 /**
41 * Analyzes multiple conversations in a single request.
42 * (conversations.bulkAnalyze)
43 *
44 * @param string $parent Required. The parent resource to create analyses in.
45 * @param GoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsRequest $postBody
46 * @param array $optParams Optional parameters.
47 * @return GoogleLongrunningOperation
48 * @throws \Google\Service\Exception
49 */
50 public function bulkAnalyze($parent, GoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsRequest $postBody, $optParams = [])
51 {
52 $params = ['parent' => $parent, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('bulkAnalyze', [$params], GoogleLongrunningOperation::class);
55 }
56 /**
57 * Deletes multiple conversations in a single request.
58 * (conversations.bulkDelete)
59 *
60 * @param string $parent Required. The parent resource to delete conversations
61 * from. Format: projects/{project}/locations/{location}
62 * @param GoogleCloudContactcenterinsightsV1BulkDeleteConversationsRequest $postBody
63 * @param array $optParams Optional parameters.
64 * @return GoogleLongrunningOperation
65 * @throws \Google\Service\Exception
66 */
67 public function bulkDelete($parent, GoogleCloudContactcenterinsightsV1BulkDeleteConversationsRequest $postBody, $optParams = [])
68 {
69 $params = ['parent' => $parent, 'postBody' => $postBody];
70 $params = array_merge($params, $optParams);
71 return $this->call('bulkDelete', [$params], GoogleLongrunningOperation::class);
72 }
73 /**
74 * Gets conversation statistics. (conversations.calculateStats)
75 *
76 * @param string $location Required. The location of the conversations.
77 * @param array $optParams Optional parameters.
78 *
79 * @opt_param string filter A filter to reduce results to a specific subset.
80 * This field is useful for getting statistics about conversations with specific
81 * properties.
82 * @return GoogleCloudContactcenterinsightsV1CalculateStatsResponse
83 * @throws \Google\Service\Exception
84 */
85 public function calculateStats($location, $optParams = [])
86 {
87 $params = ['location' => $location];
88 $params = array_merge($params, $optParams);
89 return $this->call('calculateStats', [$params], GoogleCloudContactcenterinsightsV1CalculateStatsResponse::class);
90 }
91 /**
92 * Creates a conversation. Note that this method does not support audio
93 * transcription or redaction. Use `conversations.upload` instead.
94 * (conversations.create)
95 *
96 * @param string $parent Required. The parent resource of the conversation.
97 * @param GoogleCloudContactcenterinsightsV1Conversation $postBody
98 * @param array $optParams Optional parameters.
99 *
100 * @opt_param string conversationId A unique ID for the new conversation. This
101 * ID will become the final component of the conversation's resource name. If no
102 * ID is specified, a server-generated ID will be used. This value should be
103 * 4-64 characters and must match the regular expression `^[a-z0-9-]{4,64}$`.
104 * Valid characters are `a-z-`
105 * @return GoogleCloudContactcenterinsightsV1Conversation
106 * @throws \Google\Service\Exception
107 */
108 public function create($parent, GoogleCloudContactcenterinsightsV1Conversation $postBody, $optParams = [])
109 {
110 $params = ['parent' => $parent, 'postBody' => $postBody];
111 $params = array_merge($params, $optParams);
112 return $this->call('create', [$params], GoogleCloudContactcenterinsightsV1Conversation::class);
113 }
114 /**
115 * Deletes a conversation. (conversations.delete)
116 *
117 * @param string $name Required. The name of the conversation to delete.
118 * @param array $optParams Optional parameters.
119 *
120 * @opt_param bool force If set to true, all of this conversation's analyses
121 * will also be deleted. Otherwise, the request will only succeed if the
122 * conversation has no analyses.
123 * @return GoogleProtobufEmpty
124 * @throws \Google\Service\Exception
125 */
126 public function delete($name, $optParams = [])
127 {
128 $params = ['name' => $name];
129 $params = array_merge($params, $optParams);
130 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
131 }
132 /**
133 * Gets a conversation. (conversations.get)
134 *
135 * @param string $name Required. The name of the conversation to get.
136 * @param array $optParams Optional parameters.
137 *
138 * @opt_param string view The level of details of the conversation. Default is
139 * `FULL`.
140 * @return GoogleCloudContactcenterinsightsV1Conversation
141 * @throws \Google\Service\Exception
142 */
143 public function get($name, $optParams = [])
144 {
145 $params = ['name' => $name];
146 $params = array_merge($params, $optParams);
147 return $this->call('get', [$params], GoogleCloudContactcenterinsightsV1Conversation::class);
148 }
149 /**
150 * Imports conversations and processes them according to the user's
151 * configuration. (conversations.ingest)
152 *
153 * @param string $parent Required. The parent resource for new conversations.
154 * @param GoogleCloudContactcenterinsightsV1IngestConversationsRequest $postBody
155 * @param array $optParams Optional parameters.
156 * @return GoogleLongrunningOperation
157 * @throws \Google\Service\Exception
158 */
159 public function ingest($parent, GoogleCloudContactcenterinsightsV1IngestConversationsRequest $postBody, $optParams = [])
160 {
161 $params = ['parent' => $parent, 'postBody' => $postBody];
162 $params = array_merge($params, $optParams);
163 return $this->call('ingest', [$params], GoogleLongrunningOperation::class);
164 }
165 /**
166 * Lists conversations. (conversations.listProjectsLocationsConversations)
167 *
168 * @param string $parent Required. The parent resource of the conversation.
169 * @param array $optParams Optional parameters.
170 *
171 * @opt_param string filter A filter to reduce results to a specific subset.
172 * Useful for querying conversations with specific properties.
173 * @opt_param string orderBy Optional. The attribute by which to order
174 * conversations in the response. If empty, conversations will be ordered by
175 * descending creation time. Supported values are one of the following: *
176 * create_time * customer_satisfaction_rating * duration * latest_analysis *
177 * start_time * turn_count The default sort order is ascending. To specify
178 * order, append `asc` or `desc` (`create_time desc`). For more details, see
179 * [Google AIPs Ordering](https://google.aip.dev/132#ordering).
180 * @opt_param int pageSize The maximum number of conversations to return in the
181 * response. A valid page size ranges from 0 to 100,000 inclusive. If the page
182 * size is zero or unspecified, a default page size of 100 will be chosen. Note
183 * that a call might return fewer results than the requested page size.
184 * @opt_param string pageToken The value returned by the last
185 * `ListConversationsResponse`. This value indicates that this is a continuation
186 * of a prior `ListConversations` call and that the system should return the
187 * next page of data.
188 * @opt_param string view The level of details of the conversation. Default is
189 * `BASIC`.
190 * @return GoogleCloudContactcenterinsightsV1ListConversationsResponse
191 * @throws \Google\Service\Exception
192 */
193 public function listProjectsLocationsConversations($parent, $optParams = [])
194 {
195 $params = ['parent' => $parent];
196 $params = array_merge($params, $optParams);
197 return $this->call('list', [$params], GoogleCloudContactcenterinsightsV1ListConversationsResponse::class);
198 }
199 /**
200 * Updates a conversation. (conversations.patch)
201 *
202 * @param string $name Immutable. The resource name of the conversation. Format:
203 * projects/{project}/locations/{location}/conversations/{conversation}
204 * @param GoogleCloudContactcenterinsightsV1Conversation $postBody
205 * @param array $optParams Optional parameters.
206 *
207 * @opt_param string updateMask The list of fields to be updated. All possible
208 * fields can be updated by passing `*`, or a subset of the following updateable
209 * fields can be provided: * `agent_id` * `language_code` * `labels` *
210 * `metadata` * `quality_metadata` * `call_metadata` * `start_time` *
211 * `expire_time` or `ttl` * `data_source.gcs_source.audio_uri` or
212 * `data_source.dialogflow_source.audio_uri`
213 * @return GoogleCloudContactcenterinsightsV1Conversation
214 * @throws \Google\Service\Exception
215 */
216 public function patch($name, GoogleCloudContactcenterinsightsV1Conversation $postBody, $optParams = [])
217 {
218 $params = ['name' => $name, 'postBody' => $postBody];
219 $params = array_merge($params, $optParams);
220 return $this->call('patch', [$params], GoogleCloudContactcenterinsightsV1Conversation::class);
221 }
222 /**
223 * Create a long-running conversation upload operation. This method differs from
224 * `CreateConversation` by allowing audio transcription and optional DLP
225 * redaction. (conversations.upload)
226 *
227 * @param string $parent Required. The parent resource of the conversation.
228 * @param GoogleCloudContactcenterinsightsV1UploadConversationRequest $postBody
229 * @param array $optParams Optional parameters.
230 * @return GoogleLongrunningOperation
231 * @throws \Google\Service\Exception
232 */
233 public function upload($parent, GoogleCloudContactcenterinsightsV1UploadConversationRequest $postBody, $optParams = [])
234 {
235 $params = ['parent' => $parent, 'postBody' => $postBody];
236 $params = array_merge($params, $optParams);
237 return $this->call('upload', [$params], GoogleLongrunningOperation::class);
238 }
239}
240
241// Adding a class alias for backwards compatibility with the previous class name.
242class_alias(ProjectsLocationsConversations::class, 'Google_Service_Contactcenterinsights_Resource_ProjectsLocationsConversations');
Note: See TracBrowser for help on using the repository browser.