source: vendor/google/apiclient-services/src/DiscoveryEngine/Resource/ProjectsLocationsCollectionsEngines.php

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

Upload project files

  • Property mode set to 100644
File size: 5.8 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\GoogleCloudDiscoveryengineV1Engine;
21use Google\Service\DiscoveryEngine\GoogleCloudDiscoveryengineV1ListEnginesResponse;
22use Google\Service\DiscoveryEngine\GoogleLongrunningOperation;
23
24/**
25 * The "engines" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $discoveryengineService = new Google\Service\DiscoveryEngine(...);
29 * $engines = $discoveryengineService->projects_locations_collections_engines;
30 * </code>
31 */
32class ProjectsLocationsCollectionsEngines extends \Google\Service\Resource
33{
34 /**
35 * Creates a Engine. (engines.create)
36 *
37 * @param string $parent Required. The parent resource name, such as
38 * `projects/{project}/locations/{location}/collections/{collection}`.
39 * @param GoogleCloudDiscoveryengineV1Engine $postBody
40 * @param array $optParams Optional parameters.
41 *
42 * @opt_param string engineId Required. The ID to use for the Engine, which will
43 * become the final component of the Engine's resource name. This field must
44 * conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a
45 * length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is
46 * returned.
47 * @return GoogleLongrunningOperation
48 * @throws \Google\Service\Exception
49 */
50 public function create($parent, GoogleCloudDiscoveryengineV1Engine $postBody, $optParams = [])
51 {
52 $params = ['parent' => $parent, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('create', [$params], GoogleLongrunningOperation::class);
55 }
56 /**
57 * Deletes a Engine. (engines.delete)
58 *
59 * @param string $name Required. Full resource name of Engine, such as `projects
60 * /{project}/locations/{location}/collections/{collection_id}/engines/{engine_i
61 * d}`. If the caller does not have permission to delete the Engine, regardless
62 * of whether or not it exists, a PERMISSION_DENIED error is returned. If the
63 * Engine to delete does not exist, a NOT_FOUND error is returned.
64 * @param array $optParams Optional parameters.
65 * @return GoogleLongrunningOperation
66 * @throws \Google\Service\Exception
67 */
68 public function delete($name, $optParams = [])
69 {
70 $params = ['name' => $name];
71 $params = array_merge($params, $optParams);
72 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
73 }
74 /**
75 * Gets a Engine. (engines.get)
76 *
77 * @param string $name Required. Full resource name of Engine, such as `projects
78 * /{project}/locations/{location}/collections/{collection_id}/engines/{engine_i
79 * d}`.
80 * @param array $optParams Optional parameters.
81 * @return GoogleCloudDiscoveryengineV1Engine
82 * @throws \Google\Service\Exception
83 */
84 public function get($name, $optParams = [])
85 {
86 $params = ['name' => $name];
87 $params = array_merge($params, $optParams);
88 return $this->call('get', [$params], GoogleCloudDiscoveryengineV1Engine::class);
89 }
90 /**
91 * Lists all the Engines associated with the project.
92 * (engines.listProjectsLocationsCollectionsEngines)
93 *
94 * @param string $parent Required. The parent resource name, such as
95 * `projects/{project}/locations/{location}/collections/{collection_id}`.
96 * @param array $optParams Optional parameters.
97 *
98 * @opt_param string filter Optional. Filter by solution type. For example:
99 * solution_type=SOLUTION_TYPE_SEARCH
100 * @opt_param int pageSize Optional. Not supported.
101 * @opt_param string pageToken Optional. Not supported.
102 * @return GoogleCloudDiscoveryengineV1ListEnginesResponse
103 * @throws \Google\Service\Exception
104 */
105 public function listProjectsLocationsCollectionsEngines($parent, $optParams = [])
106 {
107 $params = ['parent' => $parent];
108 $params = array_merge($params, $optParams);
109 return $this->call('list', [$params], GoogleCloudDiscoveryengineV1ListEnginesResponse::class);
110 }
111 /**
112 * Updates an Engine (engines.patch)
113 *
114 * @param string $name Immutable. The fully qualified resource name of the
115 * engine. This field must be a UTF-8 encoded string with a length limit of 1024
116 * characters. Format: `projects/{project}/locations/{location}/collections/{col
117 * lection}/engines/{engine}` engine should be 1-63 characters, and valid
118 * characters are /a-z0-9. Otherwise, an INVALID_ARGUMENT error is returned.
119 * @param GoogleCloudDiscoveryengineV1Engine $postBody
120 * @param array $optParams Optional parameters.
121 *
122 * @opt_param string updateMask Indicates which fields in the provided Engine to
123 * update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT
124 * error is returned.
125 * @return GoogleCloudDiscoveryengineV1Engine
126 * @throws \Google\Service\Exception
127 */
128 public function patch($name, GoogleCloudDiscoveryengineV1Engine $postBody, $optParams = [])
129 {
130 $params = ['name' => $name, 'postBody' => $postBody];
131 $params = array_merge($params, $optParams);
132 return $this->call('patch', [$params], GoogleCloudDiscoveryengineV1Engine::class);
133 }
134}
135
136// Adding a class alias for backwards compatibility with the previous class name.
137class_alias(ProjectsLocationsCollectionsEngines::class, 'Google_Service_DiscoveryEngine_Resource_ProjectsLocationsCollectionsEngines');
Note: See TracBrowser for help on using the repository browser.