source: vendor/google/apiclient-services/src/DiscoveryEngine/Resource/ProjectsLocationsDataStoresConversations.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 7.5 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\DiscoveryEngine\Resource;
19
20use Google\Service\DiscoveryEngine\GoogleCloudDiscoveryengineV1Conversation;
21use Google\Service\DiscoveryEngine\GoogleCloudDiscoveryengineV1ConverseConversationRequest;
22use Google\Service\DiscoveryEngine\GoogleCloudDiscoveryengineV1ConverseConversationResponse;
23use Google\Service\DiscoveryEngine\GoogleCloudDiscoveryengineV1ListConversationsResponse;
24use Google\Service\DiscoveryEngine\GoogleProtobufEmpty;
25
26/**
27 * The "conversations" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $discoveryengineService = new Google\Service\DiscoveryEngine(...);
31 * $conversations = $discoveryengineService->projects_locations_dataStores_conversations;
32 * </code>
33 */
34class ProjectsLocationsDataStoresConversations extends \Google\Service\Resource
35{
36 /**
37 * Converses a conversation. (conversations.converse)
38 *
39 * @param string $name Required. The resource name of the Conversation to get.
40 * Format: `projects/{project}/locations/{location}/collections/{collection}/dat
41 * aStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{proj
42 * ect}/locations/{location}/collections/{collection}/dataStores/{data_store_id}
43 * /conversations/-` to activate auto session mode, which automatically creates
44 * a new conversation inside a ConverseConversation session.
45 * @param GoogleCloudDiscoveryengineV1ConverseConversationRequest $postBody
46 * @param array $optParams Optional parameters.
47 * @return GoogleCloudDiscoveryengineV1ConverseConversationResponse
48 * @throws \Google\Service\Exception
49 */
50 public function converse($name, GoogleCloudDiscoveryengineV1ConverseConversationRequest $postBody, $optParams = [])
51 {
52 $params = ['name' => $name, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('converse', [$params], GoogleCloudDiscoveryengineV1ConverseConversationResponse::class);
55 }
56 /**
57 * Creates a Conversation. If the Conversation to create already exists, an
58 * ALREADY_EXISTS error is returned. (conversations.create)
59 *
60 * @param string $parent Required. Full resource name of parent data store.
61 * Format: `projects/{project}/locations/{location}/collections/{collection}/dat
62 * aStores/{data_store_id}`
63 * @param GoogleCloudDiscoveryengineV1Conversation $postBody
64 * @param array $optParams Optional parameters.
65 * @return GoogleCloudDiscoveryengineV1Conversation
66 * @throws \Google\Service\Exception
67 */
68 public function create($parent, GoogleCloudDiscoveryengineV1Conversation $postBody, $optParams = [])
69 {
70 $params = ['parent' => $parent, 'postBody' => $postBody];
71 $params = array_merge($params, $optParams);
72 return $this->call('create', [$params], GoogleCloudDiscoveryengineV1Conversation::class);
73 }
74 /**
75 * Deletes a Conversation. If the Conversation to delete does not exist, a
76 * NOT_FOUND error is returned. (conversations.delete)
77 *
78 * @param string $name Required. The resource name of the Conversation to
79 * delete. Format: `projects/{project}/locations/{location}/collections/{collect
80 * ion}/dataStores/{data_store_id}/conversations/{conversation_id}`
81 * @param array $optParams Optional parameters.
82 * @return GoogleProtobufEmpty
83 * @throws \Google\Service\Exception
84 */
85 public function delete($name, $optParams = [])
86 {
87 $params = ['name' => $name];
88 $params = array_merge($params, $optParams);
89 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
90 }
91 /**
92 * Gets a Conversation. (conversations.get)
93 *
94 * @param string $name Required. The resource name of the Conversation to get.
95 * Format: `projects/{project}/locations/{location}/collections/{collection}/dat
96 * aStores/{data_store_id}/conversations/{conversation_id}`
97 * @param array $optParams Optional parameters.
98 * @return GoogleCloudDiscoveryengineV1Conversation
99 * @throws \Google\Service\Exception
100 */
101 public function get($name, $optParams = [])
102 {
103 $params = ['name' => $name];
104 $params = array_merge($params, $optParams);
105 return $this->call('get', [$params], GoogleCloudDiscoveryengineV1Conversation::class);
106 }
107 /**
108 * Lists all Conversations by their parent DataStore.
109 * (conversations.listProjectsLocationsDataStoresConversations)
110 *
111 * @param string $parent Required. The data store resource name. Format: `projec
112 * ts/{project}/locations/{location}/collections/{collection}/dataStores/{data_s
113 * tore_id}`
114 * @param array $optParams Optional parameters.
115 *
116 * @opt_param string filter A filter to apply on the list results. The supported
117 * features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id"
118 * @opt_param string orderBy A comma-separated list of fields to order by,
119 * sorted in ascending order. Use "desc" after a field name for descending.
120 * Supported fields: * `update_time` * `create_time` * `conversation_name`
121 * Example: "update_time desc" "create_time"
122 * @opt_param int pageSize Maximum number of results to return. If unspecified,
123 * defaults to 50. Max allowed value is 1000.
124 * @opt_param string pageToken A page token, received from a previous
125 * `ListConversations` call. Provide this to retrieve the subsequent page.
126 * @return GoogleCloudDiscoveryengineV1ListConversationsResponse
127 * @throws \Google\Service\Exception
128 */
129 public function listProjectsLocationsDataStoresConversations($parent, $optParams = [])
130 {
131 $params = ['parent' => $parent];
132 $params = array_merge($params, $optParams);
133 return $this->call('list', [$params], GoogleCloudDiscoveryengineV1ListConversationsResponse::class);
134 }
135 /**
136 * Updates a Conversation. Conversation action type cannot be changed. If the
137 * Conversation to update does not exist, a NOT_FOUND error is returned.
138 * (conversations.patch)
139 *
140 * @param string $name Immutable. Fully qualified name `projects/{project}/locat
141 * ions/global/collections/{collection}/dataStore/conversations` or `projects/{p
142 * roject}/locations/global/collections/{collection}/engines/conversations`.
143 * @param GoogleCloudDiscoveryengineV1Conversation $postBody
144 * @param array $optParams Optional parameters.
145 *
146 * @opt_param string updateMask Indicates which fields in the provided
147 * Conversation to update. The following are NOT supported: * Conversation.name
148 * If not set or empty, all supported fields are updated.
149 * @return GoogleCloudDiscoveryengineV1Conversation
150 * @throws \Google\Service\Exception
151 */
152 public function patch($name, GoogleCloudDiscoveryengineV1Conversation $postBody, $optParams = [])
153 {
154 $params = ['name' => $name, 'postBody' => $postBody];
155 $params = array_merge($params, $optParams);
156 return $this->call('patch', [$params], GoogleCloudDiscoveryengineV1Conversation::class);
157 }
158}
159
160// Adding a class alias for backwards compatibility with the previous class name.
161class_alias(ProjectsLocationsDataStoresConversations::class, 'Google_Service_DiscoveryEngine_Resource_ProjectsLocationsDataStoresConversations');
Note: See TracBrowser for help on using the repository browser.