[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\GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest;
|
---|
| 21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1DeploymentResourcePool;
|
---|
| 22 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse;
|
---|
| 23 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1QueryDeployedModelsResponse;
|
---|
| 24 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "deploymentResourcePools" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
| 31 | * $deploymentResourcePools = $aiplatformService->projects_locations_deploymentResourcePools;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class ProjectsLocationsDeploymentResourcePools extends \Google\Service\Resource
|
---|
| 35 | {
|
---|
| 36 | /**
|
---|
| 37 | * Create a DeploymentResourcePool. (deploymentResourcePools.create)
|
---|
| 38 | *
|
---|
| 39 | * @param string $parent Required. The parent location resource where this
|
---|
| 40 | * DeploymentResourcePool will be created. Format:
|
---|
| 41 | * `projects/{project}/locations/{location}`
|
---|
| 42 | * @param GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest $postBody
|
---|
| 43 | * @param array $optParams Optional parameters.
|
---|
| 44 | * @return GoogleLongrunningOperation
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function create($parent, GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest $postBody, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Delete a DeploymentResourcePool. (deploymentResourcePools.delete)
|
---|
| 55 | *
|
---|
| 56 | * @param string $name Required. The name of the DeploymentResourcePool to
|
---|
| 57 | * delete. Format: `projects/{project}/locations/{location}/deploymentResourcePo
|
---|
| 58 | * ols/{deployment_resource_pool}`
|
---|
| 59 | * @param array $optParams Optional parameters.
|
---|
| 60 | * @return GoogleLongrunningOperation
|
---|
| 61 | * @throws \Google\Service\Exception
|
---|
| 62 | */
|
---|
| 63 | public function delete($name, $optParams = [])
|
---|
| 64 | {
|
---|
| 65 | $params = ['name' => $name];
|
---|
| 66 | $params = array_merge($params, $optParams);
|
---|
| 67 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
| 68 | }
|
---|
| 69 | /**
|
---|
| 70 | * Get a DeploymentResourcePool. (deploymentResourcePools.get)
|
---|
| 71 | *
|
---|
| 72 | * @param string $name Required. The name of the DeploymentResourcePool to
|
---|
| 73 | * retrieve. Format: `projects/{project}/locations/{location}/deploymentResource
|
---|
| 74 | * Pools/{deployment_resource_pool}`
|
---|
| 75 | * @param array $optParams Optional parameters.
|
---|
| 76 | * @return GoogleCloudAiplatformV1DeploymentResourcePool
|
---|
| 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], GoogleCloudAiplatformV1DeploymentResourcePool::class);
|
---|
| 84 | }
|
---|
| 85 | /**
|
---|
| 86 | * List DeploymentResourcePools in a location.
|
---|
| 87 | * (deploymentResourcePools.listProjectsLocationsDeploymentResourcePools)
|
---|
| 88 | *
|
---|
| 89 | * @param string $parent Required. The parent Location which owns this
|
---|
| 90 | * collection of DeploymentResourcePools. Format:
|
---|
| 91 | * `projects/{project}/locations/{location}`
|
---|
| 92 | * @param array $optParams Optional parameters.
|
---|
| 93 | *
|
---|
| 94 | * @opt_param int pageSize The maximum number of DeploymentResourcePools to
|
---|
| 95 | * return. The service may return fewer than this value.
|
---|
| 96 | * @opt_param string pageToken A page token, received from a previous
|
---|
| 97 | * `ListDeploymentResourcePools` call. Provide this to retrieve the subsequent
|
---|
| 98 | * page. When paginating, all other parameters provided to
|
---|
| 99 | * `ListDeploymentResourcePools` must match the call that provided the page
|
---|
| 100 | * token.
|
---|
| 101 | * @return GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse
|
---|
| 102 | * @throws \Google\Service\Exception
|
---|
| 103 | */
|
---|
| 104 | public function listProjectsLocationsDeploymentResourcePools($parent, $optParams = [])
|
---|
| 105 | {
|
---|
| 106 | $params = ['parent' => $parent];
|
---|
| 107 | $params = array_merge($params, $optParams);
|
---|
| 108 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse::class);
|
---|
| 109 | }
|
---|
| 110 | /**
|
---|
| 111 | * Update a DeploymentResourcePool. (deploymentResourcePools.patch)
|
---|
| 112 | *
|
---|
| 113 | * @param string $name Immutable. The resource name of the
|
---|
| 114 | * DeploymentResourcePool. Format: `projects/{project}/locations/{location}/depl
|
---|
| 115 | * oymentResourcePools/{deployment_resource_pool}`
|
---|
| 116 | * @param GoogleCloudAiplatformV1DeploymentResourcePool $postBody
|
---|
| 117 | * @param array $optParams Optional parameters.
|
---|
| 118 | *
|
---|
| 119 | * @opt_param string updateMask Required. The list of fields to update.
|
---|
| 120 | * @return GoogleLongrunningOperation
|
---|
| 121 | * @throws \Google\Service\Exception
|
---|
| 122 | */
|
---|
| 123 | public function patch($name, GoogleCloudAiplatformV1DeploymentResourcePool $postBody, $optParams = [])
|
---|
| 124 | {
|
---|
| 125 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 126 | $params = array_merge($params, $optParams);
|
---|
| 127 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
| 128 | }
|
---|
| 129 | /**
|
---|
| 130 | * List DeployedModels that have been deployed on this DeploymentResourcePool.
|
---|
| 131 | * (deploymentResourcePools.queryDeployedModels)
|
---|
| 132 | *
|
---|
| 133 | * @param string $deploymentResourcePool Required. The name of the target
|
---|
| 134 | * DeploymentResourcePool to query. Format: `projects/{project}/locations/{locat
|
---|
| 135 | * ion}/deploymentResourcePools/{deployment_resource_pool}`
|
---|
| 136 | * @param array $optParams Optional parameters.
|
---|
| 137 | *
|
---|
| 138 | * @opt_param int pageSize The maximum number of DeployedModels to return. The
|
---|
| 139 | * service may return fewer than this value.
|
---|
| 140 | * @opt_param string pageToken A page token, received from a previous
|
---|
| 141 | * `QueryDeployedModels` call. Provide this to retrieve the subsequent page.
|
---|
| 142 | * When paginating, all other parameters provided to `QueryDeployedModels` must
|
---|
| 143 | * match the call that provided the page token.
|
---|
| 144 | * @return GoogleCloudAiplatformV1QueryDeployedModelsResponse
|
---|
| 145 | * @throws \Google\Service\Exception
|
---|
| 146 | */
|
---|
| 147 | public function queryDeployedModels($deploymentResourcePool, $optParams = [])
|
---|
| 148 | {
|
---|
| 149 | $params = ['deploymentResourcePool' => $deploymentResourcePool];
|
---|
| 150 | $params = array_merge($params, $optParams);
|
---|
| 151 | return $this->call('queryDeployedModels', [$params], GoogleCloudAiplatformV1QueryDeployedModelsResponse::class);
|
---|
| 152 | }
|
---|
| 153 | }
|
---|
| 154 |
|
---|
| 155 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 156 | class_alias(ProjectsLocationsDeploymentResourcePools::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsDeploymentResourcePools');
|
---|