source: vendor/google/apiclient-services/src/Backupdr/Resource/ProjectsLocationsBackupPlans.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 6.6 KB
Line 
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
18namespace Google\Service\Backupdr\Resource;
19
20use Google\Service\Backupdr\BackupPlan;
21use Google\Service\Backupdr\ListBackupPlansResponse;
22use Google\Service\Backupdr\Operation;
23
24/**
25 * The "backupPlans" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $backupdrService = new Google\Service\Backupdr(...);
29 * $backupPlans = $backupdrService->projects_locations_backupPlans;
30 * </code>
31 */
32class ProjectsLocationsBackupPlans extends \Google\Service\Resource
33{
34 /**
35 * Create a BackupPlan (backupPlans.create)
36 *
37 * @param string $parent Required. The `BackupPlan` project and location in the
38 * format `projects/{project}/locations/{location}`. In Cloud BackupDR locations
39 * map to GCP regions, for example **us-central1**.
40 * @param BackupPlan $postBody
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param string backupPlanId Required. The name of the `BackupPlan` to
44 * create. The name must be unique for the specified project and location.The
45 * name must start with a lowercase letter followed by up to 62 lowercase
46 * letters, numbers, or hyphens. Pattern, /a-z{,62}/.
47 * @opt_param string requestId Optional. An optional request ID to identify
48 * requests. Specify a unique request ID so that if you must retry your request,
49 * the server will know to ignore the request if it has already been completed.
50 * The server will guarantee that for at least 60 minutes since the first
51 * request. For example, consider a situation where you make an initial request
52 * and t he request times out. If you make the request again with the same
53 * request ID, the server can check if original operation with the same request
54 * ID was received, and if so, will ignore the second request. This prevents
55 * clients from accidentally creating duplicate commitments. The request ID must
56 * be a valid UUID with the exception that zero UUID is not supported
57 * (00000000-0000-0000-0000-000000000000).
58 * @return Operation
59 * @throws \Google\Service\Exception
60 */
61 public function create($parent, BackupPlan $postBody, $optParams = [])
62 {
63 $params = ['parent' => $parent, 'postBody' => $postBody];
64 $params = array_merge($params, $optParams);
65 return $this->call('create', [$params], Operation::class);
66 }
67 /**
68 * Deletes a single BackupPlan. (backupPlans.delete)
69 *
70 * @param string $name Required. The resource name of the `BackupPlan` to
71 * delete. Format:
72 * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
73 * @param array $optParams Optional parameters.
74 *
75 * @opt_param string requestId Optional. An optional request ID to identify
76 * requests. Specify a unique request ID so that if you must retry your request,
77 * the server will know to ignore the request if it has already been completed.
78 * The server will guarantee that for at least 60 minutes after the first
79 * request. For example, consider a situation where you make an initial request
80 * and the request times out. If you make the request again with the same
81 * request ID, the server can check if original operation with the same request
82 * ID was received, and if so, will ignore the second request. This prevents
83 * clients from accidentally creating duplicate commitments. The request ID must
84 * be a valid UUID with the exception that zero UUID is not supported
85 * (00000000-0000-0000-0000-000000000000).
86 * @return Operation
87 * @throws \Google\Service\Exception
88 */
89 public function delete($name, $optParams = [])
90 {
91 $params = ['name' => $name];
92 $params = array_merge($params, $optParams);
93 return $this->call('delete', [$params], Operation::class);
94 }
95 /**
96 * Gets details of a single BackupPlan. (backupPlans.get)
97 *
98 * @param string $name Required. The resource name of the `BackupPlan` to
99 * retrieve. Format:
100 * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
101 * @param array $optParams Optional parameters.
102 * @return BackupPlan
103 * @throws \Google\Service\Exception
104 */
105 public function get($name, $optParams = [])
106 {
107 $params = ['name' => $name];
108 $params = array_merge($params, $optParams);
109 return $this->call('get', [$params], BackupPlan::class);
110 }
111 /**
112 * Lists BackupPlans in a given project and location.
113 * (backupPlans.listProjectsLocationsBackupPlans)
114 *
115 * @param string $parent Required. The project and location for which to
116 * retrieve `BackupPlans` information. Format:
117 * `projects/{project}/locations/{location}`. In Cloud BackupDR, locations map
118 * to GCP regions, for e.g. **us-central1**. To retrieve backup plans for all
119 * locations, use "-" for the `{location}` value.
120 * @param array $optParams Optional parameters.
121 *
122 * @opt_param string filter Optional. Field match expression used to filter the
123 * results.
124 * @opt_param string orderBy Optional. Field by which to sort the results.
125 * @opt_param int pageSize Optional. The maximum number of `BackupPlans` to
126 * return in a single response. If not specified, a default value will be chosen
127 * by the service. Note that the response may include a partial list and a
128 * caller should only rely on the response's next_page_token to determine if
129 * there are more instances left to be queried.
130 * @opt_param string pageToken Optional. The value of next_page_token received
131 * from a previous `ListBackupPlans` call. Provide this to retrieve the
132 * subsequent page in a multi-page list of results. When paginating, all other
133 * parameters provided to `ListBackupPlans` must match the call that provided
134 * the page token.
135 * @return ListBackupPlansResponse
136 * @throws \Google\Service\Exception
137 */
138 public function listProjectsLocationsBackupPlans($parent, $optParams = [])
139 {
140 $params = ['parent' => $parent];
141 $params = array_merge($params, $optParams);
142 return $this->call('list', [$params], ListBackupPlansResponse::class);
143 }
144}
145
146// Adding a class alias for backwards compatibility with the previous class name.
147class_alias(ProjectsLocationsBackupPlans::class, 'Google_Service_Backupdr_Resource_ProjectsLocationsBackupPlans');
Note: See TracBrowser for help on using the repository browser.