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\CloudRedis\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudRedis\BackupCollection;
|
---|
21 | use Google\Service\CloudRedis\ListBackupCollectionsResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "backupCollections" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $redisService = new Google\Service\CloudRedis(...);
|
---|
28 | * $backupCollections = $redisService->projects_locations_backupCollections;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class ProjectsLocationsBackupCollections extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Get a backup collection. (backupCollections.get)
|
---|
35 | *
|
---|
36 | * @param string $name Required. Redis backupCollection resource name using the
|
---|
37 | * form: `projects/{project_id}/locations/{location_id}/backupCollections/{backu
|
---|
38 | * p_collection_id}` where `location_id` refers to a GCP region.
|
---|
39 | * @param array $optParams Optional parameters.
|
---|
40 | * @return BackupCollection
|
---|
41 | * @throws \Google\Service\Exception
|
---|
42 | */
|
---|
43 | public function get($name, $optParams = [])
|
---|
44 | {
|
---|
45 | $params = ['name' => $name];
|
---|
46 | $params = array_merge($params, $optParams);
|
---|
47 | return $this->call('get', [$params], BackupCollection::class);
|
---|
48 | }
|
---|
49 | /**
|
---|
50 | * Lists all backup collections owned by a consumer project in either the
|
---|
51 | * specified location (region) or all locations. If `location_id` is specified
|
---|
52 | * as `-` (wildcard), then all regions available to the project are queried, and
|
---|
53 | * the results are aggregated.
|
---|
54 | * (backupCollections.listProjectsLocationsBackupCollections)
|
---|
55 | *
|
---|
56 | * @param string $parent Required. The resource name of the backupCollection
|
---|
57 | * location using the form: `projects/{project_id}/locations/{location_id}`
|
---|
58 | * where `location_id` refers to a GCP region.
|
---|
59 | * @param array $optParams Optional parameters.
|
---|
60 | *
|
---|
61 | * @opt_param int pageSize Optional. The maximum number of items to return. If
|
---|
62 | * not specified, a default value of 1000 will be used by the service.
|
---|
63 | * Regardless of the page_size value, the response may include a partial list
|
---|
64 | * and a caller should only rely on response's `next_page_token` to determine if
|
---|
65 | * there are more clusters left to be queried.
|
---|
66 | * @opt_param string pageToken Optional. The `next_page_token` value returned
|
---|
67 | * from a previous [ListBackupCollections] request, if any.
|
---|
68 | * @return ListBackupCollectionsResponse
|
---|
69 | * @throws \Google\Service\Exception
|
---|
70 | */
|
---|
71 | public function listProjectsLocationsBackupCollections($parent, $optParams = [])
|
---|
72 | {
|
---|
73 | $params = ['parent' => $parent];
|
---|
74 | $params = array_merge($params, $optParams);
|
---|
75 | return $this->call('list', [$params], ListBackupCollectionsResponse::class);
|
---|
76 | }
|
---|
77 | }
|
---|
78 |
|
---|
79 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
80 | class_alias(ProjectsLocationsBackupCollections::class, 'Google_Service_CloudRedis_Resource_ProjectsLocationsBackupCollections');
|
---|