|
| 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\CloudKMS\Resource; |
| 19 | + |
| 20 | +use Google\Service\CloudKMS\ListRetiredResourcesResponse; |
| 21 | +use Google\Service\CloudKMS\RetiredResource; |
| 22 | + |
| 23 | +/** |
| 24 | + * The "retiredResources" collection of methods. |
| 25 | + * Typical usage is: |
| 26 | + * <code> |
| 27 | + * $cloudkmsService = new Google\Service\CloudKMS(...); |
| 28 | + * $retiredResources = $cloudkmsService->projects_locations_retiredResources; |
| 29 | + * </code> |
| 30 | + */ |
| 31 | +class ProjectsLocationsRetiredResources extends \Google\Service\Resource |
| 32 | +{ |
| 33 | + /** |
| 34 | + * Retrieves a specific RetiredResource resource, which represents the record of |
| 35 | + * a deleted CryptoKey. (retiredResources.get) |
| 36 | + * |
| 37 | + * @param string $name Required. The name of the RetiredResource to get. |
| 38 | + * @param array $optParams Optional parameters. |
| 39 | + * @return RetiredResource |
| 40 | + * @throws \Google\Service\Exception |
| 41 | + */ |
| 42 | + public function get($name, $optParams = []) |
| 43 | + { |
| 44 | + $params = ['name' => $name]; |
| 45 | + $params = array_merge($params, $optParams); |
| 46 | + return $this->call('get', [$params], RetiredResource::class); |
| 47 | + } |
| 48 | + /** |
| 49 | + * Lists the RetiredResources which are the records of deleted CryptoKeys. |
| 50 | + * RetiredResources prevent the reuse of these resource names after deletion. |
| 51 | + * (retiredResources.listProjectsLocationsRetiredResources) |
| 52 | + * |
| 53 | + * @param string $parent Required. The project-specific location holding the |
| 54 | + * RetiredResources, in the format `projects/locations`. |
| 55 | + * @param array $optParams Optional parameters. |
| 56 | + * |
| 57 | + * @opt_param int pageSize Optional. Optional limit on the number of |
| 58 | + * RetiredResources to be included in the response. Further RetiredResources can |
| 59 | + * subsequently be obtained by including the |
| 60 | + * ListRetiredResourcesResponse.next_page_token in a subsequent request. If |
| 61 | + * unspecified, the server will pick an appropriate default. |
| 62 | + * @opt_param string pageToken Optional. Optional pagination token, returned |
| 63 | + * earlier via ListRetiredResourcesResponse.next_page_token. |
| 64 | + * @return ListRetiredResourcesResponse |
| 65 | + * @throws \Google\Service\Exception |
| 66 | + */ |
| 67 | + public function listProjectsLocationsRetiredResources($parent, $optParams = []) |
| 68 | + { |
| 69 | + $params = ['parent' => $parent]; |
| 70 | + $params = array_merge($params, $optParams); |
| 71 | + return $this->call('list', [$params], ListRetiredResourcesResponse::class); |
| 72 | + } |
| 73 | +} |
| 74 | + |
| 75 | +// Adding a class alias for backwards compatibility with the previous class name. |
| 76 | +class_alias(ProjectsLocationsRetiredResources::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsRetiredResources'); |
0 commit comments