[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\GoogleCloudAiplatformV1CachedContent;
|
---|
| 21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListCachedContentsResponse;
|
---|
| 22 | use Google\Service\Aiplatform\GoogleProtobufEmpty;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "cachedContents" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
| 29 | * $cachedContents = $aiplatformService->projects_locations_cachedContents;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsCachedContents extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates cached content, this call will initialize the cached content in the
|
---|
| 36 | * data storage, and users need to pay for the cache data storage.
|
---|
| 37 | * (cachedContents.create)
|
---|
| 38 | *
|
---|
| 39 | * @param string $parent Required. The parent resource where the cached content
|
---|
| 40 | * will be created
|
---|
| 41 | * @param GoogleCloudAiplatformV1CachedContent $postBody
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | * @return GoogleCloudAiplatformV1CachedContent
|
---|
| 44 | * @throws \Google\Service\Exception
|
---|
| 45 | */
|
---|
| 46 | public function create($parent, GoogleCloudAiplatformV1CachedContent $postBody, $optParams = [])
|
---|
| 47 | {
|
---|
| 48 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 49 | $params = array_merge($params, $optParams);
|
---|
| 50 | return $this->call('create', [$params], GoogleCloudAiplatformV1CachedContent::class);
|
---|
| 51 | }
|
---|
| 52 | /**
|
---|
| 53 | * Deletes cached content (cachedContents.delete)
|
---|
| 54 | *
|
---|
| 55 | * @param string $name Required. The resource name referring to the cached
|
---|
| 56 | * content
|
---|
| 57 | * @param array $optParams Optional parameters.
|
---|
| 58 | * @return GoogleProtobufEmpty
|
---|
| 59 | * @throws \Google\Service\Exception
|
---|
| 60 | */
|
---|
| 61 | public function delete($name, $optParams = [])
|
---|
| 62 | {
|
---|
| 63 | $params = ['name' => $name];
|
---|
| 64 | $params = array_merge($params, $optParams);
|
---|
| 65 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
| 66 | }
|
---|
| 67 | /**
|
---|
| 68 | * Gets cached content configurations (cachedContents.get)
|
---|
| 69 | *
|
---|
| 70 | * @param string $name Required. The resource name referring to the cached
|
---|
| 71 | * content
|
---|
| 72 | * @param array $optParams Optional parameters.
|
---|
| 73 | * @return GoogleCloudAiplatformV1CachedContent
|
---|
| 74 | * @throws \Google\Service\Exception
|
---|
| 75 | */
|
---|
| 76 | public function get($name, $optParams = [])
|
---|
| 77 | {
|
---|
| 78 | $params = ['name' => $name];
|
---|
| 79 | $params = array_merge($params, $optParams);
|
---|
| 80 | return $this->call('get', [$params], GoogleCloudAiplatformV1CachedContent::class);
|
---|
| 81 | }
|
---|
| 82 | /**
|
---|
| 83 | * Lists cached contents in a project
|
---|
| 84 | * (cachedContents.listProjectsLocationsCachedContents)
|
---|
| 85 | *
|
---|
| 86 | * @param string $parent Required. The parent, which owns this collection of
|
---|
| 87 | * cached contents.
|
---|
| 88 | * @param array $optParams Optional parameters.
|
---|
| 89 | *
|
---|
| 90 | * @opt_param int pageSize Optional. The maximum number of cached contents to
|
---|
| 91 | * return. The service may return fewer than this value. If unspecified, some
|
---|
| 92 | * default (under maximum) number of items will be returned. The maximum value
|
---|
| 93 | * is 1000; values above 1000 will be coerced to 1000.
|
---|
| 94 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
| 95 | * `ListCachedContents` call. Provide this to retrieve the subsequent page. When
|
---|
| 96 | * paginating, all other parameters provided to `ListCachedContents` must match
|
---|
| 97 | * the call that provided the page token.
|
---|
| 98 | * @return GoogleCloudAiplatformV1ListCachedContentsResponse
|
---|
| 99 | * @throws \Google\Service\Exception
|
---|
| 100 | */
|
---|
| 101 | public function listProjectsLocationsCachedContents($parent, $optParams = [])
|
---|
| 102 | {
|
---|
| 103 | $params = ['parent' => $parent];
|
---|
| 104 | $params = array_merge($params, $optParams);
|
---|
| 105 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListCachedContentsResponse::class);
|
---|
| 106 | }
|
---|
| 107 | /**
|
---|
| 108 | * Updates cached content configurations (cachedContents.patch)
|
---|
| 109 | *
|
---|
| 110 | * @param string $name Immutable. Identifier. The server-generated resource name
|
---|
| 111 | * of the cached content Format:
|
---|
| 112 | * projects/{project}/locations/{location}/cachedContents/{cached_content}
|
---|
| 113 | * @param GoogleCloudAiplatformV1CachedContent $postBody
|
---|
| 114 | * @param array $optParams Optional parameters.
|
---|
| 115 | *
|
---|
| 116 | * @opt_param string updateMask Required. The list of fields to update.
|
---|
| 117 | * @return GoogleCloudAiplatformV1CachedContent
|
---|
| 118 | * @throws \Google\Service\Exception
|
---|
| 119 | */
|
---|
| 120 | public function patch($name, GoogleCloudAiplatformV1CachedContent $postBody, $optParams = [])
|
---|
| 121 | {
|
---|
| 122 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 123 | $params = array_merge($params, $optParams);
|
---|
| 124 | return $this->call('patch', [$params], GoogleCloudAiplatformV1CachedContent::class);
|
---|
| 125 | }
|
---|
| 126 | }
|
---|
| 127 |
|
---|
| 128 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 129 | class_alias(ProjectsLocationsCachedContents::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsCachedContents');
|
---|