[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\GoogleCloudAiplatformV1ListPersistentResourcesResponse;
|
---|
| 21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1PersistentResource;
|
---|
| 22 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1RebootPersistentResourceRequest;
|
---|
| 23 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "persistentResources" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
| 30 | * $persistentResources = $aiplatformService->projects_locations_persistentResources;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class ProjectsLocationsPersistentResources extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Creates a PersistentResource. (persistentResources.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. The resource name of the Location to create
|
---|
| 39 | * the PersistentResource in. Format: `projects/{project}/locations/{location}`
|
---|
| 40 | * @param GoogleCloudAiplatformV1PersistentResource $postBody
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | *
|
---|
| 43 | * @opt_param string persistentResourceId Required. The ID to use for the
|
---|
| 44 | * PersistentResource, which become the final component of the
|
---|
| 45 | * PersistentResource's resource name. The maximum length is 63 characters, and
|
---|
| 46 | * valid characters are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
|
---|
| 47 | * @return GoogleLongrunningOperation
|
---|
| 48 | * @throws \Google\Service\Exception
|
---|
| 49 | */
|
---|
| 50 | public function create($parent, GoogleCloudAiplatformV1PersistentResource $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 PersistentResource. (persistentResources.delete)
|
---|
| 58 | *
|
---|
| 59 | * @param string $name Required. The name of the PersistentResource to be
|
---|
| 60 | * deleted. Format: `projects/{project}/locations/{location}/persistentResources
|
---|
| 61 | * /{persistent_resource}`
|
---|
| 62 | * @param array $optParams Optional parameters.
|
---|
| 63 | * @return GoogleLongrunningOperation
|
---|
| 64 | * @throws \Google\Service\Exception
|
---|
| 65 | */
|
---|
| 66 | public function delete($name, $optParams = [])
|
---|
| 67 | {
|
---|
| 68 | $params = ['name' => $name];
|
---|
| 69 | $params = array_merge($params, $optParams);
|
---|
| 70 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
| 71 | }
|
---|
| 72 | /**
|
---|
| 73 | * Gets a PersistentResource. (persistentResources.get)
|
---|
| 74 | *
|
---|
| 75 | * @param string $name Required. The name of the PersistentResource resource.
|
---|
| 76 | * Format: `projects/{project_id_or_number}/locations/{location_id}/persistentRe
|
---|
| 77 | * sources/{persistent_resource_id}`
|
---|
| 78 | * @param array $optParams Optional parameters.
|
---|
| 79 | * @return GoogleCloudAiplatformV1PersistentResource
|
---|
| 80 | * @throws \Google\Service\Exception
|
---|
| 81 | */
|
---|
| 82 | public function get($name, $optParams = [])
|
---|
| 83 | {
|
---|
| 84 | $params = ['name' => $name];
|
---|
| 85 | $params = array_merge($params, $optParams);
|
---|
| 86 | return $this->call('get', [$params], GoogleCloudAiplatformV1PersistentResource::class);
|
---|
| 87 | }
|
---|
| 88 | /**
|
---|
| 89 | * Lists PersistentResources in a Location.
|
---|
| 90 | * (persistentResources.listProjectsLocationsPersistentResources)
|
---|
| 91 | *
|
---|
| 92 | * @param string $parent Required. The resource name of the Location to list the
|
---|
| 93 | * PersistentResources from. Format: `projects/{project}/locations/{location}`
|
---|
| 94 | * @param array $optParams Optional parameters.
|
---|
| 95 | *
|
---|
| 96 | * @opt_param int pageSize Optional. The standard list page size.
|
---|
| 97 | * @opt_param string pageToken Optional. The standard list page token. Typically
|
---|
| 98 | * obtained via ListPersistentResourcesResponse.next_page_token of the previous
|
---|
| 99 | * PersistentResourceService.ListPersistentResource call.
|
---|
| 100 | * @return GoogleCloudAiplatformV1ListPersistentResourcesResponse
|
---|
| 101 | * @throws \Google\Service\Exception
|
---|
| 102 | */
|
---|
| 103 | public function listProjectsLocationsPersistentResources($parent, $optParams = [])
|
---|
| 104 | {
|
---|
| 105 | $params = ['parent' => $parent];
|
---|
| 106 | $params = array_merge($params, $optParams);
|
---|
| 107 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListPersistentResourcesResponse::class);
|
---|
| 108 | }
|
---|
| 109 | /**
|
---|
| 110 | * Updates a PersistentResource. (persistentResources.patch)
|
---|
| 111 | *
|
---|
| 112 | * @param string $name Immutable. Resource name of a PersistentResource.
|
---|
| 113 | * @param GoogleCloudAiplatformV1PersistentResource $postBody
|
---|
| 114 | * @param array $optParams Optional parameters.
|
---|
| 115 | *
|
---|
| 116 | * @opt_param string updateMask Required. Specify the fields to be overwritten
|
---|
| 117 | * in the PersistentResource by the update method.
|
---|
| 118 | * @return GoogleLongrunningOperation
|
---|
| 119 | * @throws \Google\Service\Exception
|
---|
| 120 | */
|
---|
| 121 | public function patch($name, GoogleCloudAiplatformV1PersistentResource $postBody, $optParams = [])
|
---|
| 122 | {
|
---|
| 123 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 124 | $params = array_merge($params, $optParams);
|
---|
| 125 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
| 126 | }
|
---|
| 127 | /**
|
---|
| 128 | * Reboots a PersistentResource. (persistentResources.reboot)
|
---|
| 129 | *
|
---|
| 130 | * @param string $name Required. The name of the PersistentResource resource.
|
---|
| 131 | * Format: `projects/{project_id_or_number}/locations/{location_id}/persistentRe
|
---|
| 132 | * sources/{persistent_resource_id}`
|
---|
| 133 | * @param GoogleCloudAiplatformV1RebootPersistentResourceRequest $postBody
|
---|
| 134 | * @param array $optParams Optional parameters.
|
---|
| 135 | * @return GoogleLongrunningOperation
|
---|
| 136 | * @throws \Google\Service\Exception
|
---|
| 137 | */
|
---|
| 138 | public function reboot($name, GoogleCloudAiplatformV1RebootPersistentResourceRequest $postBody, $optParams = [])
|
---|
| 139 | {
|
---|
| 140 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 141 | $params = array_merge($params, $optParams);
|
---|
| 142 | return $this->call('reboot', [$params], GoogleLongrunningOperation::class);
|
---|
| 143 | }
|
---|
| 144 | }
|
---|
| 145 |
|
---|
| 146 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 147 | class_alias(ProjectsLocationsPersistentResources::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsPersistentResources');
|
---|