source: vendor/google/apiclient-services/src/Backupdr/Resource/ProjectsLocationsBackupPlanAssociations.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 7.1 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\BackupPlanAssociation;
21use Google\Service\Backupdr\ListBackupPlanAssociationsResponse;
22use Google\Service\Backupdr\Operation;
23use Google\Service\Backupdr\TriggerBackupRequest;
24
25/**
26 * The "backupPlanAssociations" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $backupdrService = new Google\Service\Backupdr(...);
30 * $backupPlanAssociations = $backupdrService->projects_locations_backupPlanAssociations;
31 * </code>
32 */
33class ProjectsLocationsBackupPlanAssociations extends \Google\Service\Resource
34{
35 /**
36 * Create a BackupPlanAssociation (backupPlanAssociations.create)
37 *
38 * @param string $parent Required. The backup plan association project and
39 * location in the format `projects/{project_id}/locations/{location}`. In Cloud
40 * BackupDR locations map to GCP regions, for example **us-central1**.
41 * @param BackupPlanAssociation $postBody
42 * @param array $optParams Optional parameters.
43 *
44 * @opt_param string backupPlanAssociationId Required. The name of the backup
45 * plan association to create. The name must be unique for the specified project
46 * and location.
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, BackupPlanAssociation $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 BackupPlanAssociation. (backupPlanAssociations.delete)
69 *
70 * @param string $name Required. Name of the backup plan association resource,
71 * in the format `projects/{project}/locations/{location}/backupPlanAssociations
72 * /{backupPlanAssociationId}`
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 BackupPlanAssociation. (backupPlanAssociations.get)
97 *
98 * @param string $name Required. Name of the backup plan association resource,
99 * in the format `projects/{project}/locations/{location}/backupPlanAssociations
100 * /{backupPlanAssociationId}`
101 * @param array $optParams Optional parameters.
102 * @return BackupPlanAssociation
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], BackupPlanAssociation::class);
110 }
111 /**
112 * Lists BackupPlanAssociations in a given project and location.
113 * (backupPlanAssociations.listProjectsLocationsBackupPlanAssociations)
114 *
115 * @param string $parent Required. The project and location for which to
116 * retrieve backup Plan Associations information, in the format
117 * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations
118 * map to GCP regions, for example **us-central1**. To retrieve backup plan
119 * associations for all locations, use "-" for the `{location}` value.
120 * @param array $optParams Optional parameters.
121 *
122 * @opt_param string filter Optional. Filtering results
123 * @opt_param int pageSize Optional. Requested page size. Server may return
124 * fewer items than requested. If unspecified, server will pick an appropriate
125 * default.
126 * @opt_param string pageToken Optional. A token identifying a page of results
127 * the server should return.
128 * @return ListBackupPlanAssociationsResponse
129 * @throws \Google\Service\Exception
130 */
131 public function listProjectsLocationsBackupPlanAssociations($parent, $optParams = [])
132 {
133 $params = ['parent' => $parent];
134 $params = array_merge($params, $optParams);
135 return $this->call('list', [$params], ListBackupPlanAssociationsResponse::class);
136 }
137 /**
138 * Triggers a new Backup. (backupPlanAssociations.triggerBackup)
139 *
140 * @param string $name Required. Name of the backup plan association resource,
141 * in the format `projects/{project}/locations/{location}/backupPlanAssociations
142 * /{backupPlanAssociationId}`
143 * @param TriggerBackupRequest $postBody
144 * @param array $optParams Optional parameters.
145 * @return Operation
146 * @throws \Google\Service\Exception
147 */
148 public function triggerBackup($name, TriggerBackupRequest $postBody, $optParams = [])
149 {
150 $params = ['name' => $name, 'postBody' => $postBody];
151 $params = array_merge($params, $optParams);
152 return $this->call('triggerBackup', [$params], Operation::class);
153 }
154}
155
156// Adding a class alias for backwards compatibility with the previous class name.
157class_alias(ProjectsLocationsBackupPlanAssociations::class, 'Google_Service_Backupdr_Resource_ProjectsLocationsBackupPlanAssociations');
Note: See TracBrowser for help on using the repository browser.