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\VMMigrationService\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\VMMigrationService\AddGroupMigrationRequest;
|
---|
21 | use Google\Service\VMMigrationService\Group;
|
---|
22 | use Google\Service\VMMigrationService\ListGroupsResponse;
|
---|
23 | use Google\Service\VMMigrationService\Operation;
|
---|
24 | use Google\Service\VMMigrationService\RemoveGroupMigrationRequest;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "groups" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $vmmigrationService = new Google\Service\VMMigrationService(...);
|
---|
31 | * $groups = $vmmigrationService->projects_locations_groups;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class ProjectsLocationsGroups extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Adds a MigratingVm to a Group. (groups.addGroupMigration)
|
---|
38 | *
|
---|
39 | * @param string $group Required. The full path name of the Group to add to.
|
---|
40 | * @param AddGroupMigrationRequest $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | * @return Operation
|
---|
43 | * @throws \Google\Service\Exception
|
---|
44 | */
|
---|
45 | public function addGroupMigration($group, AddGroupMigrationRequest $postBody, $optParams = [])
|
---|
46 | {
|
---|
47 | $params = ['group' => $group, 'postBody' => $postBody];
|
---|
48 | $params = array_merge($params, $optParams);
|
---|
49 | return $this->call('addGroupMigration', [$params], Operation::class);
|
---|
50 | }
|
---|
51 | /**
|
---|
52 | * Creates a new Group in a given project and location. (groups.create)
|
---|
53 | *
|
---|
54 | * @param string $parent Required. The Group's parent.
|
---|
55 | * @param Group $postBody
|
---|
56 | * @param array $optParams Optional parameters.
|
---|
57 | *
|
---|
58 | * @opt_param string groupId Required. The group identifier.
|
---|
59 | * @opt_param string requestId A request ID to identify requests. Specify a
|
---|
60 | * unique request ID so that if you must retry your request, the server will
|
---|
61 | * know to ignore the request if it has already been completed. The server will
|
---|
62 | * guarantee that for at least 60 minutes since the first request. For example,
|
---|
63 | * consider a situation where you make an initial request and the request times
|
---|
64 | * out. If you make the request again with the same request ID, the server can
|
---|
65 | * check if original operation with the same request ID was received, and if so,
|
---|
66 | * will ignore the second request. This prevents clients from accidentally
|
---|
67 | * creating duplicate commitments. The request ID must be a valid UUID with the
|
---|
68 | * exception that zero UUID is not supported
|
---|
69 | * (00000000-0000-0000-0000-000000000000).
|
---|
70 | * @return Operation
|
---|
71 | * @throws \Google\Service\Exception
|
---|
72 | */
|
---|
73 | public function create($parent, Group $postBody, $optParams = [])
|
---|
74 | {
|
---|
75 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
76 | $params = array_merge($params, $optParams);
|
---|
77 | return $this->call('create', [$params], Operation::class);
|
---|
78 | }
|
---|
79 | /**
|
---|
80 | * Deletes a single Group. (groups.delete)
|
---|
81 | *
|
---|
82 | * @param string $name Required. The Group name.
|
---|
83 | * @param array $optParams Optional parameters.
|
---|
84 | *
|
---|
85 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
86 | * Specify a unique request ID so that if you must retry your request, the
|
---|
87 | * server will know to ignore the request if it has already been completed. The
|
---|
88 | * server will guarantee that for at least 60 minutes after the first request.
|
---|
89 | * For example, consider a situation where you make an initial request and the
|
---|
90 | * request times out. If you make the request again with the same request ID,
|
---|
91 | * the server can check if original operation with the same request ID was
|
---|
92 | * received, and if so, will ignore the second request. This prevents clients
|
---|
93 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
94 | * valid UUID with the exception that zero UUID is not supported
|
---|
95 | * (00000000-0000-0000-0000-000000000000).
|
---|
96 | * @return Operation
|
---|
97 | * @throws \Google\Service\Exception
|
---|
98 | */
|
---|
99 | public function delete($name, $optParams = [])
|
---|
100 | {
|
---|
101 | $params = ['name' => $name];
|
---|
102 | $params = array_merge($params, $optParams);
|
---|
103 | return $this->call('delete', [$params], Operation::class);
|
---|
104 | }
|
---|
105 | /**
|
---|
106 | * Gets details of a single Group. (groups.get)
|
---|
107 | *
|
---|
108 | * @param string $name Required. The group name.
|
---|
109 | * @param array $optParams Optional parameters.
|
---|
110 | * @return Group
|
---|
111 | * @throws \Google\Service\Exception
|
---|
112 | */
|
---|
113 | public function get($name, $optParams = [])
|
---|
114 | {
|
---|
115 | $params = ['name' => $name];
|
---|
116 | $params = array_merge($params, $optParams);
|
---|
117 | return $this->call('get', [$params], Group::class);
|
---|
118 | }
|
---|
119 | /**
|
---|
120 | * Lists Groups in a given project and location.
|
---|
121 | * (groups.listProjectsLocationsGroups)
|
---|
122 | *
|
---|
123 | * @param string $parent Required. The parent, which owns this collection of
|
---|
124 | * groups.
|
---|
125 | * @param array $optParams Optional parameters.
|
---|
126 | *
|
---|
127 | * @opt_param string filter Optional. The filter request.
|
---|
128 | * @opt_param string orderBy Optional. the order by fields for the result.
|
---|
129 | * @opt_param int pageSize Optional. The maximum number of groups to return. The
|
---|
130 | * service may return fewer than this value. If unspecified, at most 500 groups
|
---|
131 | * will be returned. The maximum value is 1000; values above 1000 will be
|
---|
132 | * coerced to 1000.
|
---|
133 | * @opt_param string pageToken Required. A page token, received from a previous
|
---|
134 | * `ListGroups` call. Provide this to retrieve the subsequent page. When
|
---|
135 | * paginating, all other parameters provided to `ListGroups` must match the call
|
---|
136 | * that provided the page token.
|
---|
137 | * @return ListGroupsResponse
|
---|
138 | * @throws \Google\Service\Exception
|
---|
139 | */
|
---|
140 | public function listProjectsLocationsGroups($parent, $optParams = [])
|
---|
141 | {
|
---|
142 | $params = ['parent' => $parent];
|
---|
143 | $params = array_merge($params, $optParams);
|
---|
144 | return $this->call('list', [$params], ListGroupsResponse::class);
|
---|
145 | }
|
---|
146 | /**
|
---|
147 | * Updates the parameters of a single Group. (groups.patch)
|
---|
148 | *
|
---|
149 | * @param string $name Output only. The Group name.
|
---|
150 | * @param Group $postBody
|
---|
151 | * @param array $optParams Optional parameters.
|
---|
152 | *
|
---|
153 | * @opt_param string requestId A request ID to identify requests. Specify a
|
---|
154 | * unique request ID so that if you must retry your request, the server will
|
---|
155 | * know to ignore the request if it has already been completed. The server will
|
---|
156 | * guarantee that for at least 60 minutes since the first request. For example,
|
---|
157 | * consider a situation where you make an initial request and the request times
|
---|
158 | * out. If you make the request again with the same request ID, the server can
|
---|
159 | * check if original operation with the same request ID was received, and if so,
|
---|
160 | * will ignore the second request. This prevents clients from accidentally
|
---|
161 | * creating duplicate commitments. The request ID must be a valid UUID with the
|
---|
162 | * exception that zero UUID is not supported
|
---|
163 | * (00000000-0000-0000-0000-000000000000).
|
---|
164 | * @opt_param string updateMask Field mask is used to specify the fields to be
|
---|
165 | * overwritten in the Group resource by the update. The fields specified in the
|
---|
166 | * update_mask are relative to the resource, not the full request. A field will
|
---|
167 | * be overwritten if it is in the mask. If the user does not provide a mask then
|
---|
168 | * all fields will be overwritten.
|
---|
169 | * @return Operation
|
---|
170 | * @throws \Google\Service\Exception
|
---|
171 | */
|
---|
172 | public function patch($name, Group $postBody, $optParams = [])
|
---|
173 | {
|
---|
174 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
175 | $params = array_merge($params, $optParams);
|
---|
176 | return $this->call('patch', [$params], Operation::class);
|
---|
177 | }
|
---|
178 | /**
|
---|
179 | * Removes a MigratingVm from a Group. (groups.removeGroupMigration)
|
---|
180 | *
|
---|
181 | * @param string $group Required. The name of the Group.
|
---|
182 | * @param RemoveGroupMigrationRequest $postBody
|
---|
183 | * @param array $optParams Optional parameters.
|
---|
184 | * @return Operation
|
---|
185 | * @throws \Google\Service\Exception
|
---|
186 | */
|
---|
187 | public function removeGroupMigration($group, RemoveGroupMigrationRequest $postBody, $optParams = [])
|
---|
188 | {
|
---|
189 | $params = ['group' => $group, 'postBody' => $postBody];
|
---|
190 | $params = array_merge($params, $optParams);
|
---|
191 | return $this->call('removeGroupMigration', [$params], Operation::class);
|
---|
192 | }
|
---|
193 | }
|
---|
194 |
|
---|
195 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
196 | class_alias(ProjectsLocationsGroups::class, 'Google_Service_VMMigrationService_Resource_ProjectsLocationsGroups');
|
---|