[e3d4e0a] | 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\GoogleCloudAiplatformV1Index;
|
---|
| 21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListIndexesResponse;
|
---|
| 22 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1RemoveDatapointsRequest;
|
---|
| 23 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1RemoveDatapointsResponse;
|
---|
| 24 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1UpsertDatapointsRequest;
|
---|
| 25 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1UpsertDatapointsResponse;
|
---|
| 26 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * The "indexes" collection of methods.
|
---|
| 30 | * Typical usage is:
|
---|
| 31 | * <code>
|
---|
| 32 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
| 33 | * $indexes = $aiplatformService->projects_locations_indexes;
|
---|
| 34 | * </code>
|
---|
| 35 | */
|
---|
| 36 | class ProjectsLocationsIndexes extends \Google\Service\Resource
|
---|
| 37 | {
|
---|
| 38 | /**
|
---|
| 39 | * Creates an Index. (indexes.create)
|
---|
| 40 | *
|
---|
| 41 | * @param string $parent Required. The resource name of the Location to create
|
---|
| 42 | * the Index in. Format: `projects/{project}/locations/{location}`
|
---|
| 43 | * @param GoogleCloudAiplatformV1Index $postBody
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | * @return GoogleLongrunningOperation
|
---|
| 46 | * @throws \Google\Service\Exception
|
---|
| 47 | */
|
---|
| 48 | public function create($parent, GoogleCloudAiplatformV1Index $postBody, $optParams = [])
|
---|
| 49 | {
|
---|
| 50 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 51 | $params = array_merge($params, $optParams);
|
---|
| 52 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
| 53 | }
|
---|
| 54 | /**
|
---|
| 55 | * Deletes an Index. An Index can only be deleted when all its DeployedIndexes
|
---|
| 56 | * had been undeployed. (indexes.delete)
|
---|
| 57 | *
|
---|
| 58 | * @param string $name Required. The name of the Index resource to be deleted.
|
---|
| 59 | * Format: `projects/{project}/locations/{location}/indexes/{index}`
|
---|
| 60 | * @param array $optParams Optional parameters.
|
---|
| 61 | * @return GoogleLongrunningOperation
|
---|
| 62 | * @throws \Google\Service\Exception
|
---|
| 63 | */
|
---|
| 64 | public function delete($name, $optParams = [])
|
---|
| 65 | {
|
---|
| 66 | $params = ['name' => $name];
|
---|
| 67 | $params = array_merge($params, $optParams);
|
---|
| 68 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
| 69 | }
|
---|
| 70 | /**
|
---|
| 71 | * Gets an Index. (indexes.get)
|
---|
| 72 | *
|
---|
| 73 | * @param string $name Required. The name of the Index resource. Format:
|
---|
| 74 | * `projects/{project}/locations/{location}/indexes/{index}`
|
---|
| 75 | * @param array $optParams Optional parameters.
|
---|
| 76 | * @return GoogleCloudAiplatformV1Index
|
---|
| 77 | * @throws \Google\Service\Exception
|
---|
| 78 | */
|
---|
| 79 | public function get($name, $optParams = [])
|
---|
| 80 | {
|
---|
| 81 | $params = ['name' => $name];
|
---|
| 82 | $params = array_merge($params, $optParams);
|
---|
| 83 | return $this->call('get', [$params], GoogleCloudAiplatformV1Index::class);
|
---|
| 84 | }
|
---|
| 85 | /**
|
---|
| 86 | * Lists Indexes in a Location. (indexes.listProjectsLocationsIndexes)
|
---|
| 87 | *
|
---|
| 88 | * @param string $parent Required. The resource name of the Location from which
|
---|
| 89 | * to list the Indexes. Format: `projects/{project}/locations/{location}`
|
---|
| 90 | * @param array $optParams Optional parameters.
|
---|
| 91 | *
|
---|
| 92 | * @opt_param string filter The standard list filter.
|
---|
| 93 | * @opt_param int pageSize The standard list page size.
|
---|
| 94 | * @opt_param string pageToken The standard list page token. Typically obtained
|
---|
| 95 | * via ListIndexesResponse.next_page_token of the previous
|
---|
| 96 | * IndexService.ListIndexes call.
|
---|
| 97 | * @opt_param string readMask Mask specifying which fields to read.
|
---|
| 98 | * @return GoogleCloudAiplatformV1ListIndexesResponse
|
---|
| 99 | * @throws \Google\Service\Exception
|
---|
| 100 | */
|
---|
| 101 | public function listProjectsLocationsIndexes($parent, $optParams = [])
|
---|
| 102 | {
|
---|
| 103 | $params = ['parent' => $parent];
|
---|
| 104 | $params = array_merge($params, $optParams);
|
---|
| 105 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListIndexesResponse::class);
|
---|
| 106 | }
|
---|
| 107 | /**
|
---|
| 108 | * Updates an Index. (indexes.patch)
|
---|
| 109 | *
|
---|
| 110 | * @param string $name Output only. The resource name of the Index.
|
---|
| 111 | * @param GoogleCloudAiplatformV1Index $postBody
|
---|
| 112 | * @param array $optParams Optional parameters.
|
---|
| 113 | *
|
---|
| 114 | * @opt_param string updateMask The update mask applies to the resource. For the
|
---|
| 115 | * `FieldMask` definition, see google.protobuf.FieldMask.
|
---|
| 116 | * @return GoogleLongrunningOperation
|
---|
| 117 | * @throws \Google\Service\Exception
|
---|
| 118 | */
|
---|
| 119 | public function patch($name, GoogleCloudAiplatformV1Index $postBody, $optParams = [])
|
---|
| 120 | {
|
---|
| 121 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 122 | $params = array_merge($params, $optParams);
|
---|
| 123 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
| 124 | }
|
---|
| 125 | /**
|
---|
| 126 | * Remove Datapoints from an Index. (indexes.removeDatapoints)
|
---|
| 127 | *
|
---|
| 128 | * @param string $index Required. The name of the Index resource to be updated.
|
---|
| 129 | * Format: `projects/{project}/locations/{location}/indexes/{index}`
|
---|
| 130 | * @param GoogleCloudAiplatformV1RemoveDatapointsRequest $postBody
|
---|
| 131 | * @param array $optParams Optional parameters.
|
---|
| 132 | * @return GoogleCloudAiplatformV1RemoveDatapointsResponse
|
---|
| 133 | * @throws \Google\Service\Exception
|
---|
| 134 | */
|
---|
| 135 | public function removeDatapoints($index, GoogleCloudAiplatformV1RemoveDatapointsRequest $postBody, $optParams = [])
|
---|
| 136 | {
|
---|
| 137 | $params = ['index' => $index, 'postBody' => $postBody];
|
---|
| 138 | $params = array_merge($params, $optParams);
|
---|
| 139 | return $this->call('removeDatapoints', [$params], GoogleCloudAiplatformV1RemoveDatapointsResponse::class);
|
---|
| 140 | }
|
---|
| 141 | /**
|
---|
| 142 | * Add/update Datapoints into an Index. (indexes.upsertDatapoints)
|
---|
| 143 | *
|
---|
| 144 | * @param string $index Required. The name of the Index resource to be updated.
|
---|
| 145 | * Format: `projects/{project}/locations/{location}/indexes/{index}`
|
---|
| 146 | * @param GoogleCloudAiplatformV1UpsertDatapointsRequest $postBody
|
---|
| 147 | * @param array $optParams Optional parameters.
|
---|
| 148 | * @return GoogleCloudAiplatformV1UpsertDatapointsResponse
|
---|
| 149 | * @throws \Google\Service\Exception
|
---|
| 150 | */
|
---|
| 151 | public function upsertDatapoints($index, GoogleCloudAiplatformV1UpsertDatapointsRequest $postBody, $optParams = [])
|
---|
| 152 | {
|
---|
| 153 | $params = ['index' => $index, 'postBody' => $postBody];
|
---|
| 154 | $params = array_merge($params, $optParams);
|
---|
| 155 | return $this->call('upsertDatapoints', [$params], GoogleCloudAiplatformV1UpsertDatapointsResponse::class);
|
---|
| 156 | }
|
---|
| 157 | }
|
---|
| 158 |
|
---|
| 159 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 160 | class_alias(ProjectsLocationsIndexes::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsIndexes');
|
---|