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\Aiplatform\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListSpecialistPoolsResponse;
|
---|
21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1SpecialistPool;
|
---|
22 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "specialistPools" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
29 | * $specialistPools = $aiplatformService->projects_locations_specialistPools;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsSpecialistPools extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a SpecialistPool. (specialistPools.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. The parent Project name for the new
|
---|
38 | * SpecialistPool. The form is `projects/{project}/locations/{location}`.
|
---|
39 | * @param GoogleCloudAiplatformV1SpecialistPool $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | * @return GoogleLongrunningOperation
|
---|
42 | * @throws \Google\Service\Exception
|
---|
43 | */
|
---|
44 | public function create($parent, GoogleCloudAiplatformV1SpecialistPool $postBody, $optParams = [])
|
---|
45 | {
|
---|
46 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
47 | $params = array_merge($params, $optParams);
|
---|
48 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * Deletes a SpecialistPool as well as all Specialists in the pool.
|
---|
52 | * (specialistPools.delete)
|
---|
53 | *
|
---|
54 | * @param string $name Required. The resource name of the SpecialistPool to
|
---|
55 | * delete. Format:
|
---|
56 | * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | *
|
---|
59 | * @opt_param bool force If set to true, any specialist managers in this
|
---|
60 | * SpecialistPool will also be deleted. (Otherwise, the request will only work
|
---|
61 | * if the SpecialistPool has no specialist managers.)
|
---|
62 | * @return GoogleLongrunningOperation
|
---|
63 | * @throws \Google\Service\Exception
|
---|
64 | */
|
---|
65 | public function delete($name, $optParams = [])
|
---|
66 | {
|
---|
67 | $params = ['name' => $name];
|
---|
68 | $params = array_merge($params, $optParams);
|
---|
69 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
70 | }
|
---|
71 | /**
|
---|
72 | * Gets a SpecialistPool. (specialistPools.get)
|
---|
73 | *
|
---|
74 | * @param string $name Required. The name of the SpecialistPool resource. The
|
---|
75 | * form is
|
---|
76 | * `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
|
---|
77 | * @param array $optParams Optional parameters.
|
---|
78 | * @return GoogleCloudAiplatformV1SpecialistPool
|
---|
79 | * @throws \Google\Service\Exception
|
---|
80 | */
|
---|
81 | public function get($name, $optParams = [])
|
---|
82 | {
|
---|
83 | $params = ['name' => $name];
|
---|
84 | $params = array_merge($params, $optParams);
|
---|
85 | return $this->call('get', [$params], GoogleCloudAiplatformV1SpecialistPool::class);
|
---|
86 | }
|
---|
87 | /**
|
---|
88 | * Lists SpecialistPools in a Location.
|
---|
89 | * (specialistPools.listProjectsLocationsSpecialistPools)
|
---|
90 | *
|
---|
91 | * @param string $parent Required. The name of the SpecialistPool's parent
|
---|
92 | * resource. Format: `projects/{project}/locations/{location}`
|
---|
93 | * @param array $optParams Optional parameters.
|
---|
94 | *
|
---|
95 | * @opt_param int pageSize The standard list page size.
|
---|
96 | * @opt_param string pageToken The standard list page token. Typically obtained
|
---|
97 | * by ListSpecialistPoolsResponse.next_page_token of the previous
|
---|
98 | * SpecialistPoolService.ListSpecialistPools call. Return first page if empty.
|
---|
99 | * @opt_param string readMask Mask specifying which fields to read. FieldMask
|
---|
100 | * represents a set of
|
---|
101 | * @return GoogleCloudAiplatformV1ListSpecialistPoolsResponse
|
---|
102 | * @throws \Google\Service\Exception
|
---|
103 | */
|
---|
104 | public function listProjectsLocationsSpecialistPools($parent, $optParams = [])
|
---|
105 | {
|
---|
106 | $params = ['parent' => $parent];
|
---|
107 | $params = array_merge($params, $optParams);
|
---|
108 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListSpecialistPoolsResponse::class);
|
---|
109 | }
|
---|
110 | /**
|
---|
111 | * Updates a SpecialistPool. (specialistPools.patch)
|
---|
112 | *
|
---|
113 | * @param string $name Required. The resource name of the SpecialistPool.
|
---|
114 | * @param GoogleCloudAiplatformV1SpecialistPool $postBody
|
---|
115 | * @param array $optParams Optional parameters.
|
---|
116 | *
|
---|
117 | * @opt_param string updateMask Required. The update mask applies to the
|
---|
118 | * resource.
|
---|
119 | * @return GoogleLongrunningOperation
|
---|
120 | * @throws \Google\Service\Exception
|
---|
121 | */
|
---|
122 | public function patch($name, GoogleCloudAiplatformV1SpecialistPool $postBody, $optParams = [])
|
---|
123 | {
|
---|
124 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
125 | $params = array_merge($params, $optParams);
|
---|
126 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
127 | }
|
---|
128 | }
|
---|
129 |
|
---|
130 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
131 | class_alias(ProjectsLocationsSpecialistPools::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsSpecialistPools');
|
---|