google-apis-vmmigration_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2055 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module VmmigrationV1
23
+ # VM Migration API
24
+ #
25
+ # Use the Migrate for Compute Engine API to programmatically migrate workloads.
26
+ #
27
+ # @example
28
+ # require 'google/apis/vmmigration_v1'
29
+ #
30
+ # Vmmigration = Google::Apis::VmmigrationV1 # Alias the module
31
+ # service = Vmmigration::VMMigrationServiceService.new
32
+ #
33
+ # @see https://cloud.google.com/migrate/compute-engine
34
+ class VMMigrationServiceService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://vmmigration.googleapis.com/', '',
47
+ client_name: 'google-apis-vmmigration_v1',
48
+ client_version: Google::Apis::VmmigrationV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Gets information about a location.
53
+ # @param [String] name
54
+ # Resource name for the location.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::VmmigrationV1::Location] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::VmmigrationV1::Location]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'v1/{+name}', options)
74
+ command.response_representation = Google::Apis::VmmigrationV1::Location::Representation
75
+ command.response_class = Google::Apis::VmmigrationV1::Location
76
+ command.params['name'] = name unless name.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Lists information about the supported locations for this service.
83
+ # @param [String] name
84
+ # The resource that owns the locations collection, if applicable.
85
+ # @param [String] filter
86
+ # A filter to narrow down results to a preferred subset. The filtering language
87
+ # accepts strings like "displayName=tokyo", and is documented in more detail in [
88
+ # AIP-160](https://google.aip.dev/160).
89
+ # @param [Fixnum] page_size
90
+ # The maximum number of results to return. If not set, the service selects a
91
+ # default.
92
+ # @param [String] page_token
93
+ # A page token received from the `next_page_token` field in the response. Send
94
+ # that page token to receive the subsequent page.
95
+ # @param [String] fields
96
+ # Selector specifying which fields to include in a partial response.
97
+ # @param [String] quota_user
98
+ # Available to use for quota purposes for server-side applications. Can be any
99
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # @param [Google::Apis::RequestOptions] options
101
+ # Request-specific options
102
+ #
103
+ # @yield [result, err] Result & error if block supplied
104
+ # @yieldparam result [Google::Apis::VmmigrationV1::ListLocationsResponse] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::VmmigrationV1::ListLocationsResponse]
108
+ #
109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
112
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
113
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
114
+ command.response_representation = Google::Apis::VmmigrationV1::ListLocationsResponse::Representation
115
+ command.response_class = Google::Apis::VmmigrationV1::ListLocationsResponse
116
+ command.params['name'] = name unless name.nil?
117
+ command.query['filter'] = filter unless filter.nil?
118
+ command.query['pageSize'] = page_size unless page_size.nil?
119
+ command.query['pageToken'] = page_token unless page_token.nil?
120
+ command.query['fields'] = fields unless fields.nil?
121
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
122
+ execute_or_queue_command(command, &block)
123
+ end
124
+
125
+ # Adds a MigratingVm to a Group.
126
+ # @param [String] group
127
+ # Required. The full path name of the Group to add to.
128
+ # @param [Google::Apis::VmmigrationV1::AddGroupMigrationRequest] add_group_migration_request_object
129
+ # @param [String] fields
130
+ # Selector specifying which fields to include in a partial response.
131
+ # @param [String] quota_user
132
+ # Available to use for quota purposes for server-side applications. Can be any
133
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
134
+ # @param [Google::Apis::RequestOptions] options
135
+ # Request-specific options
136
+ #
137
+ # @yield [result, err] Result & error if block supplied
138
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
139
+ # @yieldparam err [StandardError] error object if request failed
140
+ #
141
+ # @return [Google::Apis::VmmigrationV1::Operation]
142
+ #
143
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
144
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
145
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
146
+ def add_group_migration(group, add_group_migration_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
147
+ command = make_simple_command(:post, 'v1/{+group}:addGroupMigration', options)
148
+ command.request_representation = Google::Apis::VmmigrationV1::AddGroupMigrationRequest::Representation
149
+ command.request_object = add_group_migration_request_object
150
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
151
+ command.response_class = Google::Apis::VmmigrationV1::Operation
152
+ command.params['group'] = group unless group.nil?
153
+ command.query['fields'] = fields unless fields.nil?
154
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
155
+ execute_or_queue_command(command, &block)
156
+ end
157
+
158
+ # Creates a new Group in a given project and location.
159
+ # @param [String] parent
160
+ # Required. The Group's parent.
161
+ # @param [Google::Apis::VmmigrationV1::Group] group_object
162
+ # @param [String] group_id
163
+ # Required. The group identifier.
164
+ # @param [String] request_id
165
+ # A request ID to identify requests. Specify a unique request ID so that if you
166
+ # must retry your request, the server will know to ignore the request if it has
167
+ # already been completed. The server will guarantee that for at least 60 minutes
168
+ # since the first request. For example, consider a situation where you make an
169
+ # initial request and t he request times out. If you make the request again with
170
+ # the same request ID, the server can check if original operation with the same
171
+ # request ID was received, and if so, will ignore the second request. This
172
+ # prevents clients from accidentally creating duplicate commitments. The request
173
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
174
+ # 00000000-0000-0000-0000-000000000000).
175
+ # @param [String] fields
176
+ # Selector specifying which fields to include in a partial response.
177
+ # @param [String] quota_user
178
+ # Available to use for quota purposes for server-side applications. Can be any
179
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
180
+ # @param [Google::Apis::RequestOptions] options
181
+ # Request-specific options
182
+ #
183
+ # @yield [result, err] Result & error if block supplied
184
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
185
+ # @yieldparam err [StandardError] error object if request failed
186
+ #
187
+ # @return [Google::Apis::VmmigrationV1::Operation]
188
+ #
189
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
190
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
191
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
192
+ def create_project_location_group(parent, group_object = nil, group_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
193
+ command = make_simple_command(:post, 'v1/{+parent}/groups', options)
194
+ command.request_representation = Google::Apis::VmmigrationV1::Group::Representation
195
+ command.request_object = group_object
196
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
197
+ command.response_class = Google::Apis::VmmigrationV1::Operation
198
+ command.params['parent'] = parent unless parent.nil?
199
+ command.query['groupId'] = group_id unless group_id.nil?
200
+ command.query['requestId'] = request_id unless request_id.nil?
201
+ command.query['fields'] = fields unless fields.nil?
202
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
203
+ execute_or_queue_command(command, &block)
204
+ end
205
+
206
+ # Deletes a single Group.
207
+ # @param [String] name
208
+ # Required. The Group name.
209
+ # @param [String] request_id
210
+ # Optional. A request ID to identify requests. Specify a unique request ID so
211
+ # that if you must retry your request, the server will know to ignore the
212
+ # request if it has already been completed. The server will guarantee that for
213
+ # at least 60 minutes after the first request. For example, consider a situation
214
+ # where you make an initial request and t he request times out. If you make the
215
+ # request again with the same request ID, the server can check if original
216
+ # operation with the same request ID was received, and if so, will ignore the
217
+ # second request. This prevents clients from accidentally creating duplicate
218
+ # commitments. The request ID must be a valid UUID with the exception that zero
219
+ # UUID is not supported (00000000-0000-0000-0000-000000000000).
220
+ # @param [String] fields
221
+ # Selector specifying which fields to include in a partial response.
222
+ # @param [String] quota_user
223
+ # Available to use for quota purposes for server-side applications. Can be any
224
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
225
+ # @param [Google::Apis::RequestOptions] options
226
+ # Request-specific options
227
+ #
228
+ # @yield [result, err] Result & error if block supplied
229
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
230
+ # @yieldparam err [StandardError] error object if request failed
231
+ #
232
+ # @return [Google::Apis::VmmigrationV1::Operation]
233
+ #
234
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
235
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
236
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
237
+ def delete_project_location_group(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
238
+ command = make_simple_command(:delete, 'v1/{+name}', options)
239
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
240
+ command.response_class = Google::Apis::VmmigrationV1::Operation
241
+ command.params['name'] = name unless name.nil?
242
+ command.query['requestId'] = request_id unless request_id.nil?
243
+ command.query['fields'] = fields unless fields.nil?
244
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
245
+ execute_or_queue_command(command, &block)
246
+ end
247
+
248
+ # Gets details of a single Group.
249
+ # @param [String] name
250
+ # Required. The group name.
251
+ # @param [String] fields
252
+ # Selector specifying which fields to include in a partial response.
253
+ # @param [String] quota_user
254
+ # Available to use for quota purposes for server-side applications. Can be any
255
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
256
+ # @param [Google::Apis::RequestOptions] options
257
+ # Request-specific options
258
+ #
259
+ # @yield [result, err] Result & error if block supplied
260
+ # @yieldparam result [Google::Apis::VmmigrationV1::Group] parsed result object
261
+ # @yieldparam err [StandardError] error object if request failed
262
+ #
263
+ # @return [Google::Apis::VmmigrationV1::Group]
264
+ #
265
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
266
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
267
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
268
+ def get_project_location_group(name, fields: nil, quota_user: nil, options: nil, &block)
269
+ command = make_simple_command(:get, 'v1/{+name}', options)
270
+ command.response_representation = Google::Apis::VmmigrationV1::Group::Representation
271
+ command.response_class = Google::Apis::VmmigrationV1::Group
272
+ command.params['name'] = name unless name.nil?
273
+ command.query['fields'] = fields unless fields.nil?
274
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
275
+ execute_or_queue_command(command, &block)
276
+ end
277
+
278
+ # Lists Groups in a given project and location.
279
+ # @param [String] parent
280
+ # Required. The parent, which owns this collection of groups.
281
+ # @param [String] filter
282
+ # Optional. The filter request.
283
+ # @param [String] order_by
284
+ # Optional. the order by fields for the result.
285
+ # @param [Fixnum] page_size
286
+ # Optional. The maximum number of groups to return. The service may return fewer
287
+ # than this value. If unspecified, at most 500 groups will be returned. The
288
+ # maximum value is 1000; values above 1000 will be coerced to 1000.
289
+ # @param [String] page_token
290
+ # Required. A page token, received from a previous `ListGroups` call. Provide
291
+ # this to retrieve the subsequent page. When paginating, all other parameters
292
+ # provided to `ListGroups` must match the call that provided the page token.
293
+ # @param [String] fields
294
+ # Selector specifying which fields to include in a partial response.
295
+ # @param [String] quota_user
296
+ # Available to use for quota purposes for server-side applications. Can be any
297
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
298
+ # @param [Google::Apis::RequestOptions] options
299
+ # Request-specific options
300
+ #
301
+ # @yield [result, err] Result & error if block supplied
302
+ # @yieldparam result [Google::Apis::VmmigrationV1::ListGroupsResponse] parsed result object
303
+ # @yieldparam err [StandardError] error object if request failed
304
+ #
305
+ # @return [Google::Apis::VmmigrationV1::ListGroupsResponse]
306
+ #
307
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
308
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
309
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
310
+ def list_project_location_groups(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
311
+ command = make_simple_command(:get, 'v1/{+parent}/groups', options)
312
+ command.response_representation = Google::Apis::VmmigrationV1::ListGroupsResponse::Representation
313
+ command.response_class = Google::Apis::VmmigrationV1::ListGroupsResponse
314
+ command.params['parent'] = parent unless parent.nil?
315
+ command.query['filter'] = filter unless filter.nil?
316
+ command.query['orderBy'] = order_by unless order_by.nil?
317
+ command.query['pageSize'] = page_size unless page_size.nil?
318
+ command.query['pageToken'] = page_token unless page_token.nil?
319
+ command.query['fields'] = fields unless fields.nil?
320
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
321
+ execute_or_queue_command(command, &block)
322
+ end
323
+
324
+ # Updates the parameters of a single Group.
325
+ # @param [String] name
326
+ # The Group name.
327
+ # @param [Google::Apis::VmmigrationV1::Group] group_object
328
+ # @param [String] request_id
329
+ # A request ID to identify requests. Specify a unique request ID so that if you
330
+ # must retry your request, the server will know to ignore the request if it has
331
+ # already been completed. The server will guarantee that for at least 60 minutes
332
+ # since the first request. For example, consider a situation where you make an
333
+ # initial request and t he request times out. If you make the request again with
334
+ # the same request ID, the server can check if original operation with the same
335
+ # request ID was received, and if so, will ignore the second request. This
336
+ # prevents clients from accidentally creating duplicate commitments. The request
337
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
338
+ # 00000000-0000-0000-0000-000000000000).
339
+ # @param [String] update_mask
340
+ # Field mask is used to specify the fields to be overwritten in the Group
341
+ # resource by the update. The fields specified in the update_mask are relative
342
+ # to the resource, not the full request. A field will be overwritten if it is in
343
+ # the mask. If the user does not provide a mask then all fields will be
344
+ # overwritten.
345
+ # @param [String] fields
346
+ # Selector specifying which fields to include in a partial response.
347
+ # @param [String] quota_user
348
+ # Available to use for quota purposes for server-side applications. Can be any
349
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
350
+ # @param [Google::Apis::RequestOptions] options
351
+ # Request-specific options
352
+ #
353
+ # @yield [result, err] Result & error if block supplied
354
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
355
+ # @yieldparam err [StandardError] error object if request failed
356
+ #
357
+ # @return [Google::Apis::VmmigrationV1::Operation]
358
+ #
359
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
360
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
361
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
362
+ def patch_project_location_group(name, group_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
363
+ command = make_simple_command(:patch, 'v1/{+name}', options)
364
+ command.request_representation = Google::Apis::VmmigrationV1::Group::Representation
365
+ command.request_object = group_object
366
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
367
+ command.response_class = Google::Apis::VmmigrationV1::Operation
368
+ command.params['name'] = name unless name.nil?
369
+ command.query['requestId'] = request_id unless request_id.nil?
370
+ command.query['updateMask'] = update_mask unless update_mask.nil?
371
+ command.query['fields'] = fields unless fields.nil?
372
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
373
+ execute_or_queue_command(command, &block)
374
+ end
375
+
376
+ # Removes a MigratingVm from a Group.
377
+ # @param [String] group
378
+ # Required. The name of the Group.
379
+ # @param [Google::Apis::VmmigrationV1::RemoveGroupMigrationRequest] remove_group_migration_request_object
380
+ # @param [String] fields
381
+ # Selector specifying which fields to include in a partial response.
382
+ # @param [String] quota_user
383
+ # Available to use for quota purposes for server-side applications. Can be any
384
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
385
+ # @param [Google::Apis::RequestOptions] options
386
+ # Request-specific options
387
+ #
388
+ # @yield [result, err] Result & error if block supplied
389
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
390
+ # @yieldparam err [StandardError] error object if request failed
391
+ #
392
+ # @return [Google::Apis::VmmigrationV1::Operation]
393
+ #
394
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
395
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
396
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
397
+ def remove_group_migration(group, remove_group_migration_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
398
+ command = make_simple_command(:post, 'v1/{+group}:removeGroupMigration', options)
399
+ command.request_representation = Google::Apis::VmmigrationV1::RemoveGroupMigrationRequest::Representation
400
+ command.request_object = remove_group_migration_request_object
401
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
402
+ command.response_class = Google::Apis::VmmigrationV1::Operation
403
+ command.params['group'] = group unless group.nil?
404
+ command.query['fields'] = fields unless fields.nil?
405
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
406
+ execute_or_queue_command(command, &block)
407
+ end
408
+
409
+ # Starts asynchronous cancellation on a long-running operation. The server makes
410
+ # a best effort to cancel the operation, but success is not guaranteed. If the
411
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
412
+ # Clients can use Operations.GetOperation or other methods to check whether the
413
+ # cancellation succeeded or whether the operation completed despite cancellation.
414
+ # On successful cancellation, the operation is not deleted; instead, it becomes
415
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
416
+ # corresponding to `Code.CANCELLED`.
417
+ # @param [String] name
418
+ # The name of the operation resource to be cancelled.
419
+ # @param [Google::Apis::VmmigrationV1::CancelOperationRequest] cancel_operation_request_object
420
+ # @param [String] fields
421
+ # Selector specifying which fields to include in a partial response.
422
+ # @param [String] quota_user
423
+ # Available to use for quota purposes for server-side applications. Can be any
424
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
425
+ # @param [Google::Apis::RequestOptions] options
426
+ # Request-specific options
427
+ #
428
+ # @yield [result, err] Result & error if block supplied
429
+ # @yieldparam result [Google::Apis::VmmigrationV1::Empty] parsed result object
430
+ # @yieldparam err [StandardError] error object if request failed
431
+ #
432
+ # @return [Google::Apis::VmmigrationV1::Empty]
433
+ #
434
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
435
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
436
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
437
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
438
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
439
+ command.request_representation = Google::Apis::VmmigrationV1::CancelOperationRequest::Representation
440
+ command.request_object = cancel_operation_request_object
441
+ command.response_representation = Google::Apis::VmmigrationV1::Empty::Representation
442
+ command.response_class = Google::Apis::VmmigrationV1::Empty
443
+ command.params['name'] = name unless name.nil?
444
+ command.query['fields'] = fields unless fields.nil?
445
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
446
+ execute_or_queue_command(command, &block)
447
+ end
448
+
449
+ # Deletes a long-running operation. This method indicates that the client is no
450
+ # longer interested in the operation result. It does not cancel the operation.
451
+ # If the server doesn't support this method, it returns `google.rpc.Code.
452
+ # UNIMPLEMENTED`.
453
+ # @param [String] name
454
+ # The name of the operation resource to be deleted.
455
+ # @param [String] fields
456
+ # Selector specifying which fields to include in a partial response.
457
+ # @param [String] quota_user
458
+ # Available to use for quota purposes for server-side applications. Can be any
459
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
460
+ # @param [Google::Apis::RequestOptions] options
461
+ # Request-specific options
462
+ #
463
+ # @yield [result, err] Result & error if block supplied
464
+ # @yieldparam result [Google::Apis::VmmigrationV1::Empty] parsed result object
465
+ # @yieldparam err [StandardError] error object if request failed
466
+ #
467
+ # @return [Google::Apis::VmmigrationV1::Empty]
468
+ #
469
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
470
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
471
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
472
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
473
+ command = make_simple_command(:delete, 'v1/{+name}', options)
474
+ command.response_representation = Google::Apis::VmmigrationV1::Empty::Representation
475
+ command.response_class = Google::Apis::VmmigrationV1::Empty
476
+ command.params['name'] = name unless name.nil?
477
+ command.query['fields'] = fields unless fields.nil?
478
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
479
+ execute_or_queue_command(command, &block)
480
+ end
481
+
482
+ # Gets the latest state of a long-running operation. Clients can use this method
483
+ # to poll the operation result at intervals as recommended by the API service.
484
+ # @param [String] name
485
+ # The name of the operation resource.
486
+ # @param [String] fields
487
+ # Selector specifying which fields to include in a partial response.
488
+ # @param [String] quota_user
489
+ # Available to use for quota purposes for server-side applications. Can be any
490
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
491
+ # @param [Google::Apis::RequestOptions] options
492
+ # Request-specific options
493
+ #
494
+ # @yield [result, err] Result & error if block supplied
495
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
496
+ # @yieldparam err [StandardError] error object if request failed
497
+ #
498
+ # @return [Google::Apis::VmmigrationV1::Operation]
499
+ #
500
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
501
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
502
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
503
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
504
+ command = make_simple_command(:get, 'v1/{+name}', options)
505
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
506
+ command.response_class = Google::Apis::VmmigrationV1::Operation
507
+ command.params['name'] = name unless name.nil?
508
+ command.query['fields'] = fields unless fields.nil?
509
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
510
+ execute_or_queue_command(command, &block)
511
+ end
512
+
513
+ # Lists operations that match the specified filter in the request. If the server
514
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
515
+ # binding allows API services to override the binding to use different resource
516
+ # name schemes, such as `users/*/operations`. To override the binding, API
517
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
518
+ # service configuration. For backwards compatibility, the default name includes
519
+ # the operations collection id, however overriding users must ensure the name
520
+ # binding is the parent resource, without the operations collection id.
521
+ # @param [String] name
522
+ # The name of the operation's parent resource.
523
+ # @param [String] filter
524
+ # The standard list filter.
525
+ # @param [Fixnum] page_size
526
+ # The standard list page size.
527
+ # @param [String] page_token
528
+ # The standard list page token.
529
+ # @param [String] fields
530
+ # Selector specifying which fields to include in a partial response.
531
+ # @param [String] quota_user
532
+ # Available to use for quota purposes for server-side applications. Can be any
533
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
534
+ # @param [Google::Apis::RequestOptions] options
535
+ # Request-specific options
536
+ #
537
+ # @yield [result, err] Result & error if block supplied
538
+ # @yieldparam result [Google::Apis::VmmigrationV1::ListOperationsResponse] parsed result object
539
+ # @yieldparam err [StandardError] error object if request failed
540
+ #
541
+ # @return [Google::Apis::VmmigrationV1::ListOperationsResponse]
542
+ #
543
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
544
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
545
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
546
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
547
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
548
+ command.response_representation = Google::Apis::VmmigrationV1::ListOperationsResponse::Representation
549
+ command.response_class = Google::Apis::VmmigrationV1::ListOperationsResponse
550
+ command.params['name'] = name unless name.nil?
551
+ command.query['filter'] = filter unless filter.nil?
552
+ command.query['pageSize'] = page_size unless page_size.nil?
553
+ command.query['pageToken'] = page_token unless page_token.nil?
554
+ command.query['fields'] = fields unless fields.nil?
555
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
556
+ execute_or_queue_command(command, &block)
557
+ end
558
+
559
+ # Creates a new Source in a given project and location.
560
+ # @param [String] parent
561
+ # Required. The Source's parent.
562
+ # @param [Google::Apis::VmmigrationV1::Source] source_object
563
+ # @param [String] request_id
564
+ # A request ID to identify requests. Specify a unique request ID so that if you
565
+ # must retry your request, the server will know to ignore the request if it has
566
+ # already been completed. The server will guarantee that for at least 60 minutes
567
+ # since the first request. For example, consider a situation where you make an
568
+ # initial request and t he request times out. If you make the request again with
569
+ # the same request ID, the server can check if original operation with the same
570
+ # request ID was received, and if so, will ignore the second request. This
571
+ # prevents clients from accidentally creating duplicate commitments. The request
572
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
573
+ # 00000000-0000-0000-0000-000000000000).
574
+ # @param [String] source_id
575
+ # Required. The source identifier.
576
+ # @param [String] fields
577
+ # Selector specifying which fields to include in a partial response.
578
+ # @param [String] quota_user
579
+ # Available to use for quota purposes for server-side applications. Can be any
580
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
581
+ # @param [Google::Apis::RequestOptions] options
582
+ # Request-specific options
583
+ #
584
+ # @yield [result, err] Result & error if block supplied
585
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
586
+ # @yieldparam err [StandardError] error object if request failed
587
+ #
588
+ # @return [Google::Apis::VmmigrationV1::Operation]
589
+ #
590
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
591
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
592
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
593
+ def create_project_location_source(parent, source_object = nil, request_id: nil, source_id: nil, fields: nil, quota_user: nil, options: nil, &block)
594
+ command = make_simple_command(:post, 'v1/{+parent}/sources', options)
595
+ command.request_representation = Google::Apis::VmmigrationV1::Source::Representation
596
+ command.request_object = source_object
597
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
598
+ command.response_class = Google::Apis::VmmigrationV1::Operation
599
+ command.params['parent'] = parent unless parent.nil?
600
+ command.query['requestId'] = request_id unless request_id.nil?
601
+ command.query['sourceId'] = source_id unless source_id.nil?
602
+ command.query['fields'] = fields unless fields.nil?
603
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
604
+ execute_or_queue_command(command, &block)
605
+ end
606
+
607
+ # Deletes a single Source.
608
+ # @param [String] name
609
+ # Required. The Source name.
610
+ # @param [String] request_id
611
+ # Optional. A request ID to identify requests. Specify a unique request ID so
612
+ # that if you must retry your request, the server will know to ignore the
613
+ # request if it has already been completed. The server will guarantee that for
614
+ # at least 60 minutes after the first request. For example, consider a situation
615
+ # where you make an initial request and t he request times out. If you make the
616
+ # request again with the same request ID, the server can check if original
617
+ # operation with the same request ID was received, and if so, will ignore the
618
+ # second request. This prevents clients from accidentally creating duplicate
619
+ # commitments. The request ID must be a valid UUID with the exception that zero
620
+ # UUID is not supported (00000000-0000-0000-0000-000000000000).
621
+ # @param [String] fields
622
+ # Selector specifying which fields to include in a partial response.
623
+ # @param [String] quota_user
624
+ # Available to use for quota purposes for server-side applications. Can be any
625
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
626
+ # @param [Google::Apis::RequestOptions] options
627
+ # Request-specific options
628
+ #
629
+ # @yield [result, err] Result & error if block supplied
630
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
631
+ # @yieldparam err [StandardError] error object if request failed
632
+ #
633
+ # @return [Google::Apis::VmmigrationV1::Operation]
634
+ #
635
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
636
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
637
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
638
+ def delete_project_location_source(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
639
+ command = make_simple_command(:delete, 'v1/{+name}', options)
640
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
641
+ command.response_class = Google::Apis::VmmigrationV1::Operation
642
+ command.params['name'] = name unless name.nil?
643
+ command.query['requestId'] = request_id unless request_id.nil?
644
+ command.query['fields'] = fields unless fields.nil?
645
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
646
+ execute_or_queue_command(command, &block)
647
+ end
648
+
649
+ # List remote source's inventory of VMs. The remote source is the onprem vCenter
650
+ # (remote in the sense it's not in Compute Engine). The inventory describes the
651
+ # list of existing VMs in that source. Note that this operation lists the VMs on
652
+ # the remote source, as opposed to listing the MigratingVms resources in the
653
+ # vmmigration service.
654
+ # @param [String] source
655
+ # Required. The name of the Source.
656
+ # @param [Boolean] force_refresh
657
+ # If this flag is set to true, the source will be queried instead of using
658
+ # cached results. Using this flag will make the call slower.
659
+ # @param [String] fields
660
+ # Selector specifying which fields to include in a partial response.
661
+ # @param [String] quota_user
662
+ # Available to use for quota purposes for server-side applications. Can be any
663
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
664
+ # @param [Google::Apis::RequestOptions] options
665
+ # Request-specific options
666
+ #
667
+ # @yield [result, err] Result & error if block supplied
668
+ # @yieldparam result [Google::Apis::VmmigrationV1::FetchInventoryResponse] parsed result object
669
+ # @yieldparam err [StandardError] error object if request failed
670
+ #
671
+ # @return [Google::Apis::VmmigrationV1::FetchInventoryResponse]
672
+ #
673
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
674
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
675
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
676
+ def fetch_project_location_source_inventory(source, force_refresh: nil, fields: nil, quota_user: nil, options: nil, &block)
677
+ command = make_simple_command(:get, 'v1/{+source}:fetchInventory', options)
678
+ command.response_representation = Google::Apis::VmmigrationV1::FetchInventoryResponse::Representation
679
+ command.response_class = Google::Apis::VmmigrationV1::FetchInventoryResponse
680
+ command.params['source'] = source unless source.nil?
681
+ command.query['forceRefresh'] = force_refresh unless force_refresh.nil?
682
+ command.query['fields'] = fields unless fields.nil?
683
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
684
+ execute_or_queue_command(command, &block)
685
+ end
686
+
687
+ # Gets details of a single Source.
688
+ # @param [String] name
689
+ # Required. The Source name.
690
+ # @param [String] fields
691
+ # Selector specifying which fields to include in a partial response.
692
+ # @param [String] quota_user
693
+ # Available to use for quota purposes for server-side applications. Can be any
694
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
695
+ # @param [Google::Apis::RequestOptions] options
696
+ # Request-specific options
697
+ #
698
+ # @yield [result, err] Result & error if block supplied
699
+ # @yieldparam result [Google::Apis::VmmigrationV1::Source] parsed result object
700
+ # @yieldparam err [StandardError] error object if request failed
701
+ #
702
+ # @return [Google::Apis::VmmigrationV1::Source]
703
+ #
704
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
705
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
706
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
707
+ def get_project_location_source(name, fields: nil, quota_user: nil, options: nil, &block)
708
+ command = make_simple_command(:get, 'v1/{+name}', options)
709
+ command.response_representation = Google::Apis::VmmigrationV1::Source::Representation
710
+ command.response_class = Google::Apis::VmmigrationV1::Source
711
+ command.params['name'] = name unless name.nil?
712
+ command.query['fields'] = fields unless fields.nil?
713
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
714
+ execute_or_queue_command(command, &block)
715
+ end
716
+
717
+ # Lists Sources in a given project and location.
718
+ # @param [String] parent
719
+ # Required. The parent, which owns this collection of sources.
720
+ # @param [String] filter
721
+ # Optional. The filter request.
722
+ # @param [String] order_by
723
+ # Optional. the order by fields for the result.
724
+ # @param [Fixnum] page_size
725
+ # Optional. The maximum number of sources to return. The service may return
726
+ # fewer than this value. If unspecified, at most 500 sources will be returned.
727
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
728
+ # @param [String] page_token
729
+ # Required. A page token, received from a previous `ListSources` call. Provide
730
+ # this to retrieve the subsequent page. When paginating, all other parameters
731
+ # provided to `ListSources` must match the call that provided the page token.
732
+ # @param [String] fields
733
+ # Selector specifying which fields to include in a partial response.
734
+ # @param [String] quota_user
735
+ # Available to use for quota purposes for server-side applications. Can be any
736
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
737
+ # @param [Google::Apis::RequestOptions] options
738
+ # Request-specific options
739
+ #
740
+ # @yield [result, err] Result & error if block supplied
741
+ # @yieldparam result [Google::Apis::VmmigrationV1::ListSourcesResponse] parsed result object
742
+ # @yieldparam err [StandardError] error object if request failed
743
+ #
744
+ # @return [Google::Apis::VmmigrationV1::ListSourcesResponse]
745
+ #
746
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
747
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
748
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
749
+ def list_project_location_sources(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
750
+ command = make_simple_command(:get, 'v1/{+parent}/sources', options)
751
+ command.response_representation = Google::Apis::VmmigrationV1::ListSourcesResponse::Representation
752
+ command.response_class = Google::Apis::VmmigrationV1::ListSourcesResponse
753
+ command.params['parent'] = parent unless parent.nil?
754
+ command.query['filter'] = filter unless filter.nil?
755
+ command.query['orderBy'] = order_by unless order_by.nil?
756
+ command.query['pageSize'] = page_size unless page_size.nil?
757
+ command.query['pageToken'] = page_token unless page_token.nil?
758
+ command.query['fields'] = fields unless fields.nil?
759
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
760
+ execute_or_queue_command(command, &block)
761
+ end
762
+
763
+ # Updates the parameters of a single Source.
764
+ # @param [String] name
765
+ # Output only. The Source name.
766
+ # @param [Google::Apis::VmmigrationV1::Source] source_object
767
+ # @param [String] request_id
768
+ # A request ID to identify requests. Specify a unique request ID so that if you
769
+ # must retry your request, the server will know to ignore the request if it has
770
+ # already been completed. The server will guarantee that for at least 60 minutes
771
+ # since the first request. For example, consider a situation where you make an
772
+ # initial request and t he request times out. If you make the request again with
773
+ # the same request ID, the server can check if original operation with the same
774
+ # request ID was received, and if so, will ignore the second request. This
775
+ # prevents clients from accidentally creating duplicate commitments. The request
776
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
777
+ # 00000000-0000-0000-0000-000000000000).
778
+ # @param [String] update_mask
779
+ # Field mask is used to specify the fields to be overwritten in the Source
780
+ # resource by the update. The fields specified in the update_mask are relative
781
+ # to the resource, not the full request. A field will be overwritten if it is in
782
+ # the mask. If the user does not provide a mask then all fields will be
783
+ # overwritten.
784
+ # @param [String] fields
785
+ # Selector specifying which fields to include in a partial response.
786
+ # @param [String] quota_user
787
+ # Available to use for quota purposes for server-side applications. Can be any
788
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
789
+ # @param [Google::Apis::RequestOptions] options
790
+ # Request-specific options
791
+ #
792
+ # @yield [result, err] Result & error if block supplied
793
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
794
+ # @yieldparam err [StandardError] error object if request failed
795
+ #
796
+ # @return [Google::Apis::VmmigrationV1::Operation]
797
+ #
798
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
799
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
800
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
801
+ def patch_project_location_source(name, source_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
802
+ command = make_simple_command(:patch, 'v1/{+name}', options)
803
+ command.request_representation = Google::Apis::VmmigrationV1::Source::Representation
804
+ command.request_object = source_object
805
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
806
+ command.response_class = Google::Apis::VmmigrationV1::Operation
807
+ command.params['name'] = name unless name.nil?
808
+ command.query['requestId'] = request_id unless request_id.nil?
809
+ command.query['updateMask'] = update_mask unless update_mask.nil?
810
+ command.query['fields'] = fields unless fields.nil?
811
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
812
+ execute_or_queue_command(command, &block)
813
+ end
814
+
815
+ # Creates a new DatacenterConnector in a given Source.
816
+ # @param [String] parent
817
+ # Required. The DatacenterConnector's parent. Required. The Source in where the
818
+ # new DatacenterConnector will be created. For example: `projects/my-project/
819
+ # locations/us-central1/sources/my-source`
820
+ # @param [Google::Apis::VmmigrationV1::DatacenterConnector] datacenter_connector_object
821
+ # @param [String] datacenter_connector_id
822
+ # Required. The datacenterConnector identifier.
823
+ # @param [String] request_id
824
+ # A request ID to identify requests. Specify a unique request ID so that if you
825
+ # must retry your request, the server will know to ignore the request if it has
826
+ # already been completed. The server will guarantee that for at least 60 minutes
827
+ # since the first request. For example, consider a situation where you make an
828
+ # initial request and t he request times out. If you make the request again with
829
+ # the same request ID, the server can check if original operation with the same
830
+ # request ID was received, and if so, will ignore the second request. This
831
+ # prevents clients from accidentally creating duplicate commitments. The request
832
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
833
+ # 00000000-0000-0000-0000-000000000000).
834
+ # @param [String] fields
835
+ # Selector specifying which fields to include in a partial response.
836
+ # @param [String] quota_user
837
+ # Available to use for quota purposes for server-side applications. Can be any
838
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
839
+ # @param [Google::Apis::RequestOptions] options
840
+ # Request-specific options
841
+ #
842
+ # @yield [result, err] Result & error if block supplied
843
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
844
+ # @yieldparam err [StandardError] error object if request failed
845
+ #
846
+ # @return [Google::Apis::VmmigrationV1::Operation]
847
+ #
848
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
849
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
850
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
851
+ def create_project_location_source_datacenter_connector(parent, datacenter_connector_object = nil, datacenter_connector_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
852
+ command = make_simple_command(:post, 'v1/{+parent}/datacenterConnectors', options)
853
+ command.request_representation = Google::Apis::VmmigrationV1::DatacenterConnector::Representation
854
+ command.request_object = datacenter_connector_object
855
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
856
+ command.response_class = Google::Apis::VmmigrationV1::Operation
857
+ command.params['parent'] = parent unless parent.nil?
858
+ command.query['datacenterConnectorId'] = datacenter_connector_id unless datacenter_connector_id.nil?
859
+ command.query['requestId'] = request_id unless request_id.nil?
860
+ command.query['fields'] = fields unless fields.nil?
861
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
862
+ execute_or_queue_command(command, &block)
863
+ end
864
+
865
+ # Deletes a single DatacenterConnector.
866
+ # @param [String] name
867
+ # Required. The DatacenterConnector name.
868
+ # @param [String] request_id
869
+ # A request ID to identify requests. Specify a unique request ID so that if you
870
+ # must retry your request, the server will know to ignore the request if it has
871
+ # already been completed. The server will guarantee that for at least 60 minutes
872
+ # after the first request. For example, consider a situation where you make an
873
+ # initial request and t he request times out. If you make the request again with
874
+ # the same request ID, the server can check if original operation with the same
875
+ # request ID was received, and if so, will ignore the second request. This
876
+ # prevents clients from accidentally creating duplicate commitments. The request
877
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
878
+ # 00000000-0000-0000-0000-000000000000).
879
+ # @param [String] fields
880
+ # Selector specifying which fields to include in a partial response.
881
+ # @param [String] quota_user
882
+ # Available to use for quota purposes for server-side applications. Can be any
883
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
884
+ # @param [Google::Apis::RequestOptions] options
885
+ # Request-specific options
886
+ #
887
+ # @yield [result, err] Result & error if block supplied
888
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
889
+ # @yieldparam err [StandardError] error object if request failed
890
+ #
891
+ # @return [Google::Apis::VmmigrationV1::Operation]
892
+ #
893
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
894
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
895
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
896
+ def delete_project_location_source_datacenter_connector(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
897
+ command = make_simple_command(:delete, 'v1/{+name}', options)
898
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
899
+ command.response_class = Google::Apis::VmmigrationV1::Operation
900
+ command.params['name'] = name unless name.nil?
901
+ command.query['requestId'] = request_id unless request_id.nil?
902
+ command.query['fields'] = fields unless fields.nil?
903
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
904
+ execute_or_queue_command(command, &block)
905
+ end
906
+
907
+ # Gets details of a single DatacenterConnector.
908
+ # @param [String] name
909
+ # Required. The name of the DatacenterConnector.
910
+ # @param [String] fields
911
+ # Selector specifying which fields to include in a partial response.
912
+ # @param [String] quota_user
913
+ # Available to use for quota purposes for server-side applications. Can be any
914
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
915
+ # @param [Google::Apis::RequestOptions] options
916
+ # Request-specific options
917
+ #
918
+ # @yield [result, err] Result & error if block supplied
919
+ # @yieldparam result [Google::Apis::VmmigrationV1::DatacenterConnector] parsed result object
920
+ # @yieldparam err [StandardError] error object if request failed
921
+ #
922
+ # @return [Google::Apis::VmmigrationV1::DatacenterConnector]
923
+ #
924
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
925
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
926
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
927
+ def get_project_location_source_datacenter_connector(name, fields: nil, quota_user: nil, options: nil, &block)
928
+ command = make_simple_command(:get, 'v1/{+name}', options)
929
+ command.response_representation = Google::Apis::VmmigrationV1::DatacenterConnector::Representation
930
+ command.response_class = Google::Apis::VmmigrationV1::DatacenterConnector
931
+ command.params['name'] = name unless name.nil?
932
+ command.query['fields'] = fields unless fields.nil?
933
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
934
+ execute_or_queue_command(command, &block)
935
+ end
936
+
937
+ # Lists DatacenterConnectors in a given Source.
938
+ # @param [String] parent
939
+ # Required. The parent, which owns this collection of connectors.
940
+ # @param [String] filter
941
+ # Optional. The filter request.
942
+ # @param [String] order_by
943
+ # Optional. the order by fields for the result.
944
+ # @param [Fixnum] page_size
945
+ # Optional. The maximum number of connectors to return. The service may return
946
+ # fewer than this value. If unspecified, at most 500 sources will be returned.
947
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
948
+ # @param [String] page_token
949
+ # Required. A page token, received from a previous `ListDatacenterConnectors`
950
+ # call. Provide this to retrieve the subsequent page. When paginating, all other
951
+ # parameters provided to `ListDatacenterConnectors` must match the call that
952
+ # provided the page token.
953
+ # @param [String] fields
954
+ # Selector specifying which fields to include in a partial response.
955
+ # @param [String] quota_user
956
+ # Available to use for quota purposes for server-side applications. Can be any
957
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
958
+ # @param [Google::Apis::RequestOptions] options
959
+ # Request-specific options
960
+ #
961
+ # @yield [result, err] Result & error if block supplied
962
+ # @yieldparam result [Google::Apis::VmmigrationV1::ListDatacenterConnectorsResponse] parsed result object
963
+ # @yieldparam err [StandardError] error object if request failed
964
+ #
965
+ # @return [Google::Apis::VmmigrationV1::ListDatacenterConnectorsResponse]
966
+ #
967
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
968
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
969
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
970
+ def list_project_location_source_datacenter_connectors(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
971
+ command = make_simple_command(:get, 'v1/{+parent}/datacenterConnectors', options)
972
+ command.response_representation = Google::Apis::VmmigrationV1::ListDatacenterConnectorsResponse::Representation
973
+ command.response_class = Google::Apis::VmmigrationV1::ListDatacenterConnectorsResponse
974
+ command.params['parent'] = parent unless parent.nil?
975
+ command.query['filter'] = filter unless filter.nil?
976
+ command.query['orderBy'] = order_by unless order_by.nil?
977
+ command.query['pageSize'] = page_size unless page_size.nil?
978
+ command.query['pageToken'] = page_token unless page_token.nil?
979
+ command.query['fields'] = fields unless fields.nil?
980
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
981
+ execute_or_queue_command(command, &block)
982
+ end
983
+
984
+ # Creates a new MigratingVm in a given Source.
985
+ # @param [String] parent
986
+ # Required. The MigratingVm's parent.
987
+ # @param [Google::Apis::VmmigrationV1::MigratingVm] migrating_vm_object
988
+ # @param [String] migrating_vm_id
989
+ # Required. The migratingVm identifier.
990
+ # @param [String] request_id
991
+ # A request ID to identify requests. Specify a unique request ID so that if you
992
+ # must retry your request, the server will know to ignore the request if it has
993
+ # already been completed. The server will guarantee that for at least 60 minutes
994
+ # since the first request. For example, consider a situation where you make an
995
+ # initial request and t he request times out. If you make the request again with
996
+ # the same request ID, the server can check if original operation with the same
997
+ # request ID was received, and if so, will ignore the second request. This
998
+ # prevents clients from accidentally creating duplicate commitments. The request
999
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
1000
+ # 00000000-0000-0000-0000-000000000000).
1001
+ # @param [String] fields
1002
+ # Selector specifying which fields to include in a partial response.
1003
+ # @param [String] quota_user
1004
+ # Available to use for quota purposes for server-side applications. Can be any
1005
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1006
+ # @param [Google::Apis::RequestOptions] options
1007
+ # Request-specific options
1008
+ #
1009
+ # @yield [result, err] Result & error if block supplied
1010
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1011
+ # @yieldparam err [StandardError] error object if request failed
1012
+ #
1013
+ # @return [Google::Apis::VmmigrationV1::Operation]
1014
+ #
1015
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1016
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1017
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1018
+ def create_project_location_source_migrating_vm(parent, migrating_vm_object = nil, migrating_vm_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1019
+ command = make_simple_command(:post, 'v1/{+parent}/migratingVms', options)
1020
+ command.request_representation = Google::Apis::VmmigrationV1::MigratingVm::Representation
1021
+ command.request_object = migrating_vm_object
1022
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1023
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1024
+ command.params['parent'] = parent unless parent.nil?
1025
+ command.query['migratingVmId'] = migrating_vm_id unless migrating_vm_id.nil?
1026
+ command.query['requestId'] = request_id unless request_id.nil?
1027
+ command.query['fields'] = fields unless fields.nil?
1028
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1029
+ execute_or_queue_command(command, &block)
1030
+ end
1031
+
1032
+ # Deletes a single MigratingVm.
1033
+ # @param [String] name
1034
+ # Required. The name of the MigratingVm.
1035
+ # @param [String] fields
1036
+ # Selector specifying which fields to include in a partial response.
1037
+ # @param [String] quota_user
1038
+ # Available to use for quota purposes for server-side applications. Can be any
1039
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1040
+ # @param [Google::Apis::RequestOptions] options
1041
+ # Request-specific options
1042
+ #
1043
+ # @yield [result, err] Result & error if block supplied
1044
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1045
+ # @yieldparam err [StandardError] error object if request failed
1046
+ #
1047
+ # @return [Google::Apis::VmmigrationV1::Operation]
1048
+ #
1049
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1050
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1051
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1052
+ def delete_project_location_source_migrating_vm(name, fields: nil, quota_user: nil, options: nil, &block)
1053
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1054
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1055
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1056
+ command.params['name'] = name unless name.nil?
1057
+ command.query['fields'] = fields unless fields.nil?
1058
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1059
+ execute_or_queue_command(command, &block)
1060
+ end
1061
+
1062
+ # Marks a migration as completed, deleting migration resources that are no
1063
+ # longer being used. Only applicable after cutover is done.
1064
+ # @param [String] migrating_vm
1065
+ # Required. The name of the MigratingVm.
1066
+ # @param [Google::Apis::VmmigrationV1::FinalizeMigrationRequest] finalize_migration_request_object
1067
+ # @param [String] fields
1068
+ # Selector specifying which fields to include in a partial response.
1069
+ # @param [String] quota_user
1070
+ # Available to use for quota purposes for server-side applications. Can be any
1071
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1072
+ # @param [Google::Apis::RequestOptions] options
1073
+ # Request-specific options
1074
+ #
1075
+ # @yield [result, err] Result & error if block supplied
1076
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1077
+ # @yieldparam err [StandardError] error object if request failed
1078
+ #
1079
+ # @return [Google::Apis::VmmigrationV1::Operation]
1080
+ #
1081
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1082
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1083
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1084
+ def finalize_migrating_vm_migration(migrating_vm, finalize_migration_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1085
+ command = make_simple_command(:post, 'v1/{+migratingVm}:finalizeMigration', options)
1086
+ command.request_representation = Google::Apis::VmmigrationV1::FinalizeMigrationRequest::Representation
1087
+ command.request_object = finalize_migration_request_object
1088
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1089
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1090
+ command.params['migratingVm'] = migrating_vm unless migrating_vm.nil?
1091
+ command.query['fields'] = fields unless fields.nil?
1092
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1093
+ execute_or_queue_command(command, &block)
1094
+ end
1095
+
1096
+ # Gets details of a single MigratingVm.
1097
+ # @param [String] name
1098
+ # Required. The name of the MigratingVm.
1099
+ # @param [String] fields
1100
+ # Selector specifying which fields to include in a partial response.
1101
+ # @param [String] quota_user
1102
+ # Available to use for quota purposes for server-side applications. Can be any
1103
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1104
+ # @param [Google::Apis::RequestOptions] options
1105
+ # Request-specific options
1106
+ #
1107
+ # @yield [result, err] Result & error if block supplied
1108
+ # @yieldparam result [Google::Apis::VmmigrationV1::MigratingVm] parsed result object
1109
+ # @yieldparam err [StandardError] error object if request failed
1110
+ #
1111
+ # @return [Google::Apis::VmmigrationV1::MigratingVm]
1112
+ #
1113
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1114
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1115
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1116
+ def get_project_location_source_migrating_vm(name, fields: nil, quota_user: nil, options: nil, &block)
1117
+ command = make_simple_command(:get, 'v1/{+name}', options)
1118
+ command.response_representation = Google::Apis::VmmigrationV1::MigratingVm::Representation
1119
+ command.response_class = Google::Apis::VmmigrationV1::MigratingVm
1120
+ command.params['name'] = name unless name.nil?
1121
+ command.query['fields'] = fields unless fields.nil?
1122
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1123
+ execute_or_queue_command(command, &block)
1124
+ end
1125
+
1126
+ # Lists MigratingVms in a given Source.
1127
+ # @param [String] parent
1128
+ # Required. The parent, which owns this collection of MigratingVms.
1129
+ # @param [String] filter
1130
+ # Optional. The filter request.
1131
+ # @param [String] order_by
1132
+ # Optional. the order by fields for the result.
1133
+ # @param [Fixnum] page_size
1134
+ # Optional. The maximum number of migrating VMs to return. The service may
1135
+ # return fewer than this value. If unspecified, at most 500 migrating VMs will
1136
+ # be returned. The maximum value is 1000; values above 1000 will be coerced to
1137
+ # 1000.
1138
+ # @param [String] page_token
1139
+ # Required. A page token, received from a previous `ListMigratingVms` call.
1140
+ # Provide this to retrieve the subsequent page. When paginating, all other
1141
+ # parameters provided to `ListMigratingVms` must match the call that provided
1142
+ # the page token.
1143
+ # @param [String] fields
1144
+ # Selector specifying which fields to include in a partial response.
1145
+ # @param [String] quota_user
1146
+ # Available to use for quota purposes for server-side applications. Can be any
1147
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1148
+ # @param [Google::Apis::RequestOptions] options
1149
+ # Request-specific options
1150
+ #
1151
+ # @yield [result, err] Result & error if block supplied
1152
+ # @yieldparam result [Google::Apis::VmmigrationV1::ListMigratingVmsResponse] parsed result object
1153
+ # @yieldparam err [StandardError] error object if request failed
1154
+ #
1155
+ # @return [Google::Apis::VmmigrationV1::ListMigratingVmsResponse]
1156
+ #
1157
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1158
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1159
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1160
+ def list_project_location_source_migrating_vms(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1161
+ command = make_simple_command(:get, 'v1/{+parent}/migratingVms', options)
1162
+ command.response_representation = Google::Apis::VmmigrationV1::ListMigratingVmsResponse::Representation
1163
+ command.response_class = Google::Apis::VmmigrationV1::ListMigratingVmsResponse
1164
+ command.params['parent'] = parent unless parent.nil?
1165
+ command.query['filter'] = filter unless filter.nil?
1166
+ command.query['orderBy'] = order_by unless order_by.nil?
1167
+ command.query['pageSize'] = page_size unless page_size.nil?
1168
+ command.query['pageToken'] = page_token unless page_token.nil?
1169
+ command.query['fields'] = fields unless fields.nil?
1170
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1171
+ execute_or_queue_command(command, &block)
1172
+ end
1173
+
1174
+ # Updates the parameters of a single MigratingVm.
1175
+ # @param [String] name
1176
+ # Output only. The identifier of the MigratingVm.
1177
+ # @param [Google::Apis::VmmigrationV1::MigratingVm] migrating_vm_object
1178
+ # @param [String] request_id
1179
+ # A request ID to identify requests. Specify a unique request ID so that if you
1180
+ # must retry your request, the server will know to ignore the request if it has
1181
+ # already been completed. The server will guarantee that for at least 60 minutes
1182
+ # since the first request. For example, consider a situation where you make an
1183
+ # initial request and t he request times out. If you make the request again with
1184
+ # the same request ID, the server can check if original operation with the same
1185
+ # request ID was received, and if so, will ignore the second request. This
1186
+ # prevents clients from accidentally creating duplicate commitments. The request
1187
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
1188
+ # 00000000-0000-0000-0000-000000000000).
1189
+ # @param [String] update_mask
1190
+ # Field mask is used to specify the fields to be overwritten in the MigratingVm
1191
+ # resource by the update. The fields specified in the update_mask are relative
1192
+ # to the resource, not the full request. A field will be overwritten if it is in
1193
+ # the mask. If the user does not provide a mask then all fields will be
1194
+ # overwritten.
1195
+ # @param [String] fields
1196
+ # Selector specifying which fields to include in a partial response.
1197
+ # @param [String] quota_user
1198
+ # Available to use for quota purposes for server-side applications. Can be any
1199
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1200
+ # @param [Google::Apis::RequestOptions] options
1201
+ # Request-specific options
1202
+ #
1203
+ # @yield [result, err] Result & error if block supplied
1204
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1205
+ # @yieldparam err [StandardError] error object if request failed
1206
+ #
1207
+ # @return [Google::Apis::VmmigrationV1::Operation]
1208
+ #
1209
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1210
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1211
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1212
+ def patch_project_location_source_migrating_vm(name, migrating_vm_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1213
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1214
+ command.request_representation = Google::Apis::VmmigrationV1::MigratingVm::Representation
1215
+ command.request_object = migrating_vm_object
1216
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1217
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1218
+ command.params['name'] = name unless name.nil?
1219
+ command.query['requestId'] = request_id unless request_id.nil?
1220
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1221
+ command.query['fields'] = fields unless fields.nil?
1222
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1223
+ execute_or_queue_command(command, &block)
1224
+ end
1225
+
1226
+ # Pauses a migration for a VM. If cycle tasks are running they will be cancelled,
1227
+ # preserving source task data. Further replication cycles will not be triggered
1228
+ # while the VM is paused.
1229
+ # @param [String] migrating_vm
1230
+ # Required. The name of the MigratingVm.
1231
+ # @param [Google::Apis::VmmigrationV1::PauseMigrationRequest] pause_migration_request_object
1232
+ # @param [String] fields
1233
+ # Selector specifying which fields to include in a partial response.
1234
+ # @param [String] quota_user
1235
+ # Available to use for quota purposes for server-side applications. Can be any
1236
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1237
+ # @param [Google::Apis::RequestOptions] options
1238
+ # Request-specific options
1239
+ #
1240
+ # @yield [result, err] Result & error if block supplied
1241
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1242
+ # @yieldparam err [StandardError] error object if request failed
1243
+ #
1244
+ # @return [Google::Apis::VmmigrationV1::Operation]
1245
+ #
1246
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1247
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1248
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1249
+ def pause_migrating_vm_migration(migrating_vm, pause_migration_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1250
+ command = make_simple_command(:post, 'v1/{+migratingVm}:pauseMigration', options)
1251
+ command.request_representation = Google::Apis::VmmigrationV1::PauseMigrationRequest::Representation
1252
+ command.request_object = pause_migration_request_object
1253
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1254
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1255
+ command.params['migratingVm'] = migrating_vm unless migrating_vm.nil?
1256
+ command.query['fields'] = fields unless fields.nil?
1257
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1258
+ execute_or_queue_command(command, &block)
1259
+ end
1260
+
1261
+ # Resumes a migration for a VM. When called on a paused migration, will start
1262
+ # the process of uploading data and creating snapshots; when called on a
1263
+ # completed cut-over migration, will update the migration to active state and
1264
+ # start the process of uploading data and creating snapshots.
1265
+ # @param [String] migrating_vm
1266
+ # Required. The name of the MigratingVm.
1267
+ # @param [Google::Apis::VmmigrationV1::ResumeMigrationRequest] resume_migration_request_object
1268
+ # @param [String] fields
1269
+ # Selector specifying which fields to include in a partial response.
1270
+ # @param [String] quota_user
1271
+ # Available to use for quota purposes for server-side applications. Can be any
1272
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1273
+ # @param [Google::Apis::RequestOptions] options
1274
+ # Request-specific options
1275
+ #
1276
+ # @yield [result, err] Result & error if block supplied
1277
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1278
+ # @yieldparam err [StandardError] error object if request failed
1279
+ #
1280
+ # @return [Google::Apis::VmmigrationV1::Operation]
1281
+ #
1282
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1283
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1284
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1285
+ def resume_migrating_vm_migration(migrating_vm, resume_migration_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1286
+ command = make_simple_command(:post, 'v1/{+migratingVm}:resumeMigration', options)
1287
+ command.request_representation = Google::Apis::VmmigrationV1::ResumeMigrationRequest::Representation
1288
+ command.request_object = resume_migration_request_object
1289
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1290
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1291
+ command.params['migratingVm'] = migrating_vm unless migrating_vm.nil?
1292
+ command.query['fields'] = fields unless fields.nil?
1293
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1294
+ execute_or_queue_command(command, &block)
1295
+ end
1296
+
1297
+ # Starts migration for a VM. Starts the process of uploading data and creating
1298
+ # snapshots, in replication cycles scheduled by the policy.
1299
+ # @param [String] migrating_vm
1300
+ # Required. The name of the MigratingVm.
1301
+ # @param [Google::Apis::VmmigrationV1::StartMigrationRequest] start_migration_request_object
1302
+ # @param [String] fields
1303
+ # Selector specifying which fields to include in a partial response.
1304
+ # @param [String] quota_user
1305
+ # Available to use for quota purposes for server-side applications. Can be any
1306
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1307
+ # @param [Google::Apis::RequestOptions] options
1308
+ # Request-specific options
1309
+ #
1310
+ # @yield [result, err] Result & error if block supplied
1311
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1312
+ # @yieldparam err [StandardError] error object if request failed
1313
+ #
1314
+ # @return [Google::Apis::VmmigrationV1::Operation]
1315
+ #
1316
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1317
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1318
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1319
+ def start_migrating_vm_migration(migrating_vm, start_migration_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1320
+ command = make_simple_command(:post, 'v1/{+migratingVm}:startMigration', options)
1321
+ command.request_representation = Google::Apis::VmmigrationV1::StartMigrationRequest::Representation
1322
+ command.request_object = start_migration_request_object
1323
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1324
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1325
+ command.params['migratingVm'] = migrating_vm unless migrating_vm.nil?
1326
+ command.query['fields'] = fields unless fields.nil?
1327
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1328
+ execute_or_queue_command(command, &block)
1329
+ end
1330
+
1331
+ # Initiates the cancellation of a running clone job.
1332
+ # @param [String] name
1333
+ # Required. The clone job id
1334
+ # @param [Google::Apis::VmmigrationV1::CancelCloneJobRequest] cancel_clone_job_request_object
1335
+ # @param [String] fields
1336
+ # Selector specifying which fields to include in a partial response.
1337
+ # @param [String] quota_user
1338
+ # Available to use for quota purposes for server-side applications. Can be any
1339
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1340
+ # @param [Google::Apis::RequestOptions] options
1341
+ # Request-specific options
1342
+ #
1343
+ # @yield [result, err] Result & error if block supplied
1344
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1345
+ # @yieldparam err [StandardError] error object if request failed
1346
+ #
1347
+ # @return [Google::Apis::VmmigrationV1::Operation]
1348
+ #
1349
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1350
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1351
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1352
+ def cancel_clone_job(name, cancel_clone_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1353
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
1354
+ command.request_representation = Google::Apis::VmmigrationV1::CancelCloneJobRequest::Representation
1355
+ command.request_object = cancel_clone_job_request_object
1356
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1357
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1358
+ command.params['name'] = name unless name.nil?
1359
+ command.query['fields'] = fields unless fields.nil?
1360
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1361
+ execute_or_queue_command(command, &block)
1362
+ end
1363
+
1364
+ # Initiates a Clone of a specific migrating VM.
1365
+ # @param [String] parent
1366
+ # Required. The Clone's parent.
1367
+ # @param [Google::Apis::VmmigrationV1::CloneJob] clone_job_object
1368
+ # @param [String] clone_job_id
1369
+ # Required. The clone job identifier.
1370
+ # @param [String] request_id
1371
+ # A request ID to identify requests. Specify a unique request ID so that if you
1372
+ # must retry your request, the server will know to ignore the request if it has
1373
+ # already been completed. The server will guarantee that for at least 60 minutes
1374
+ # since the first request. For example, consider a situation where you make an
1375
+ # initial request and t he request times out. If you make the request again with
1376
+ # the same request ID, the server can check if original operation with the same
1377
+ # request ID was received, and if so, will ignore the second request. This
1378
+ # prevents clients from accidentally creating duplicate commitments. The request
1379
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
1380
+ # 00000000-0000-0000-0000-000000000000).
1381
+ # @param [String] fields
1382
+ # Selector specifying which fields to include in a partial response.
1383
+ # @param [String] quota_user
1384
+ # Available to use for quota purposes for server-side applications. Can be any
1385
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1386
+ # @param [Google::Apis::RequestOptions] options
1387
+ # Request-specific options
1388
+ #
1389
+ # @yield [result, err] Result & error if block supplied
1390
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1391
+ # @yieldparam err [StandardError] error object if request failed
1392
+ #
1393
+ # @return [Google::Apis::VmmigrationV1::Operation]
1394
+ #
1395
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1396
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1397
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1398
+ def create_project_location_source_migrating_vm_clone_job(parent, clone_job_object = nil, clone_job_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1399
+ command = make_simple_command(:post, 'v1/{+parent}/cloneJobs', options)
1400
+ command.request_representation = Google::Apis::VmmigrationV1::CloneJob::Representation
1401
+ command.request_object = clone_job_object
1402
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1403
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1404
+ command.params['parent'] = parent unless parent.nil?
1405
+ command.query['cloneJobId'] = clone_job_id unless clone_job_id.nil?
1406
+ command.query['requestId'] = request_id unless request_id.nil?
1407
+ command.query['fields'] = fields unless fields.nil?
1408
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1409
+ execute_or_queue_command(command, &block)
1410
+ end
1411
+
1412
+ # Gets details of a single CloneJob.
1413
+ # @param [String] name
1414
+ # Required. The name of the CloneJob.
1415
+ # @param [String] fields
1416
+ # Selector specifying which fields to include in a partial response.
1417
+ # @param [String] quota_user
1418
+ # Available to use for quota purposes for server-side applications. Can be any
1419
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1420
+ # @param [Google::Apis::RequestOptions] options
1421
+ # Request-specific options
1422
+ #
1423
+ # @yield [result, err] Result & error if block supplied
1424
+ # @yieldparam result [Google::Apis::VmmigrationV1::CloneJob] parsed result object
1425
+ # @yieldparam err [StandardError] error object if request failed
1426
+ #
1427
+ # @return [Google::Apis::VmmigrationV1::CloneJob]
1428
+ #
1429
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1430
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1431
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1432
+ def get_project_location_source_migrating_vm_clone_job(name, fields: nil, quota_user: nil, options: nil, &block)
1433
+ command = make_simple_command(:get, 'v1/{+name}', options)
1434
+ command.response_representation = Google::Apis::VmmigrationV1::CloneJob::Representation
1435
+ command.response_class = Google::Apis::VmmigrationV1::CloneJob
1436
+ command.params['name'] = name unless name.nil?
1437
+ command.query['fields'] = fields unless fields.nil?
1438
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1439
+ execute_or_queue_command(command, &block)
1440
+ end
1441
+
1442
+ # Lists CloneJobs of a given migrating VM.
1443
+ # @param [String] parent
1444
+ # Required. The parent, which owns this collection of source VMs.
1445
+ # @param [String] filter
1446
+ # Optional. The filter request.
1447
+ # @param [String] order_by
1448
+ # Optional. the order by fields for the result.
1449
+ # @param [Fixnum] page_size
1450
+ # Optional. The maximum number of clone jobs to return. The service may return
1451
+ # fewer than this value. If unspecified, at most 500 clone jobs will be returned.
1452
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1453
+ # @param [String] page_token
1454
+ # Required. A page token, received from a previous `ListCloneJobs` call. Provide
1455
+ # this to retrieve the subsequent page. When paginating, all other parameters
1456
+ # provided to `ListCloneJobs` must match the call that provided the page token.
1457
+ # @param [String] fields
1458
+ # Selector specifying which fields to include in a partial response.
1459
+ # @param [String] quota_user
1460
+ # Available to use for quota purposes for server-side applications. Can be any
1461
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1462
+ # @param [Google::Apis::RequestOptions] options
1463
+ # Request-specific options
1464
+ #
1465
+ # @yield [result, err] Result & error if block supplied
1466
+ # @yieldparam result [Google::Apis::VmmigrationV1::ListCloneJobsResponse] parsed result object
1467
+ # @yieldparam err [StandardError] error object if request failed
1468
+ #
1469
+ # @return [Google::Apis::VmmigrationV1::ListCloneJobsResponse]
1470
+ #
1471
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1472
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1473
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1474
+ def list_project_location_source_migrating_vm_clone_jobs(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1475
+ command = make_simple_command(:get, 'v1/{+parent}/cloneJobs', options)
1476
+ command.response_representation = Google::Apis::VmmigrationV1::ListCloneJobsResponse::Representation
1477
+ command.response_class = Google::Apis::VmmigrationV1::ListCloneJobsResponse
1478
+ command.params['parent'] = parent unless parent.nil?
1479
+ command.query['filter'] = filter unless filter.nil?
1480
+ command.query['orderBy'] = order_by unless order_by.nil?
1481
+ command.query['pageSize'] = page_size unless page_size.nil?
1482
+ command.query['pageToken'] = page_token unless page_token.nil?
1483
+ command.query['fields'] = fields unless fields.nil?
1484
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1485
+ execute_or_queue_command(command, &block)
1486
+ end
1487
+
1488
+ # Initiates the cancellation of a running cutover job.
1489
+ # @param [String] name
1490
+ # Required. The cutover job id
1491
+ # @param [Google::Apis::VmmigrationV1::CancelCutoverJobRequest] cancel_cutover_job_request_object
1492
+ # @param [String] fields
1493
+ # Selector specifying which fields to include in a partial response.
1494
+ # @param [String] quota_user
1495
+ # Available to use for quota purposes for server-side applications. Can be any
1496
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1497
+ # @param [Google::Apis::RequestOptions] options
1498
+ # Request-specific options
1499
+ #
1500
+ # @yield [result, err] Result & error if block supplied
1501
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1502
+ # @yieldparam err [StandardError] error object if request failed
1503
+ #
1504
+ # @return [Google::Apis::VmmigrationV1::Operation]
1505
+ #
1506
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1507
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1508
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1509
+ def cancel_cutover_job(name, cancel_cutover_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1510
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
1511
+ command.request_representation = Google::Apis::VmmigrationV1::CancelCutoverJobRequest::Representation
1512
+ command.request_object = cancel_cutover_job_request_object
1513
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1514
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1515
+ command.params['name'] = name unless name.nil?
1516
+ command.query['fields'] = fields unless fields.nil?
1517
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1518
+ execute_or_queue_command(command, &block)
1519
+ end
1520
+
1521
+ # Initiates a Cutover of a specific migrating VM. The returned LRO is completed
1522
+ # when the cutover job resource is created and the job is initiated.
1523
+ # @param [String] parent
1524
+ # Required. The Cutover's parent.
1525
+ # @param [Google::Apis::VmmigrationV1::CutoverJob] cutover_job_object
1526
+ # @param [String] cutover_job_id
1527
+ # Required. The cutover job identifier.
1528
+ # @param [String] request_id
1529
+ # A request ID to identify requests. Specify a unique request ID so that if you
1530
+ # must retry your request, the server will know to ignore the request if it has
1531
+ # already been completed. The server will guarantee that for at least 60 minutes
1532
+ # since the first request. For example, consider a situation where you make an
1533
+ # initial request and t he request times out. If you make the request again with
1534
+ # the same request ID, the server can check if original operation with the same
1535
+ # request ID was received, and if so, will ignore the second request. This
1536
+ # prevents clients from accidentally creating duplicate commitments. The request
1537
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
1538
+ # 00000000-0000-0000-0000-000000000000).
1539
+ # @param [String] fields
1540
+ # Selector specifying which fields to include in a partial response.
1541
+ # @param [String] quota_user
1542
+ # Available to use for quota purposes for server-side applications. Can be any
1543
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1544
+ # @param [Google::Apis::RequestOptions] options
1545
+ # Request-specific options
1546
+ #
1547
+ # @yield [result, err] Result & error if block supplied
1548
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1549
+ # @yieldparam err [StandardError] error object if request failed
1550
+ #
1551
+ # @return [Google::Apis::VmmigrationV1::Operation]
1552
+ #
1553
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1554
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1555
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1556
+ def create_project_location_source_migrating_vm_cutover_job(parent, cutover_job_object = nil, cutover_job_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1557
+ command = make_simple_command(:post, 'v1/{+parent}/cutoverJobs', options)
1558
+ command.request_representation = Google::Apis::VmmigrationV1::CutoverJob::Representation
1559
+ command.request_object = cutover_job_object
1560
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1561
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1562
+ command.params['parent'] = parent unless parent.nil?
1563
+ command.query['cutoverJobId'] = cutover_job_id unless cutover_job_id.nil?
1564
+ command.query['requestId'] = request_id unless request_id.nil?
1565
+ command.query['fields'] = fields unless fields.nil?
1566
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1567
+ execute_or_queue_command(command, &block)
1568
+ end
1569
+
1570
+ # Gets details of a single CutoverJob.
1571
+ # @param [String] name
1572
+ # Required. The name of the CutoverJob.
1573
+ # @param [String] fields
1574
+ # Selector specifying which fields to include in a partial response.
1575
+ # @param [String] quota_user
1576
+ # Available to use for quota purposes for server-side applications. Can be any
1577
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1578
+ # @param [Google::Apis::RequestOptions] options
1579
+ # Request-specific options
1580
+ #
1581
+ # @yield [result, err] Result & error if block supplied
1582
+ # @yieldparam result [Google::Apis::VmmigrationV1::CutoverJob] parsed result object
1583
+ # @yieldparam err [StandardError] error object if request failed
1584
+ #
1585
+ # @return [Google::Apis::VmmigrationV1::CutoverJob]
1586
+ #
1587
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1588
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1589
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1590
+ def get_project_location_source_migrating_vm_cutover_job(name, fields: nil, quota_user: nil, options: nil, &block)
1591
+ command = make_simple_command(:get, 'v1/{+name}', options)
1592
+ command.response_representation = Google::Apis::VmmigrationV1::CutoverJob::Representation
1593
+ command.response_class = Google::Apis::VmmigrationV1::CutoverJob
1594
+ command.params['name'] = name unless name.nil?
1595
+ command.query['fields'] = fields unless fields.nil?
1596
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1597
+ execute_or_queue_command(command, &block)
1598
+ end
1599
+
1600
+ # Lists CutoverJobs of a given migrating VM.
1601
+ # @param [String] parent
1602
+ # Required. The parent, which owns this collection of migrating VMs.
1603
+ # @param [String] filter
1604
+ # Optional. The filter request.
1605
+ # @param [String] order_by
1606
+ # Optional. the order by fields for the result.
1607
+ # @param [Fixnum] page_size
1608
+ # Optional. The maximum number of cutover jobs to return. The service may return
1609
+ # fewer than this value. If unspecified, at most 500 cutover jobs will be
1610
+ # returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
1611
+ # @param [String] page_token
1612
+ # Required. A page token, received from a previous `ListCutoverJobs` call.
1613
+ # Provide this to retrieve the subsequent page. When paginating, all other
1614
+ # parameters provided to `ListCutoverJobs` must match the call that provided the
1615
+ # page token.
1616
+ # @param [String] fields
1617
+ # Selector specifying which fields to include in a partial response.
1618
+ # @param [String] quota_user
1619
+ # Available to use for quota purposes for server-side applications. Can be any
1620
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1621
+ # @param [Google::Apis::RequestOptions] options
1622
+ # Request-specific options
1623
+ #
1624
+ # @yield [result, err] Result & error if block supplied
1625
+ # @yieldparam result [Google::Apis::VmmigrationV1::ListCutoverJobsResponse] parsed result object
1626
+ # @yieldparam err [StandardError] error object if request failed
1627
+ #
1628
+ # @return [Google::Apis::VmmigrationV1::ListCutoverJobsResponse]
1629
+ #
1630
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1631
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1632
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1633
+ def list_project_location_source_migrating_vm_cutover_jobs(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1634
+ command = make_simple_command(:get, 'v1/{+parent}/cutoverJobs', options)
1635
+ command.response_representation = Google::Apis::VmmigrationV1::ListCutoverJobsResponse::Representation
1636
+ command.response_class = Google::Apis::VmmigrationV1::ListCutoverJobsResponse
1637
+ command.params['parent'] = parent unless parent.nil?
1638
+ command.query['filter'] = filter unless filter.nil?
1639
+ command.query['orderBy'] = order_by unless order_by.nil?
1640
+ command.query['pageSize'] = page_size unless page_size.nil?
1641
+ command.query['pageToken'] = page_token unless page_token.nil?
1642
+ command.query['fields'] = fields unless fields.nil?
1643
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1644
+ execute_or_queue_command(command, &block)
1645
+ end
1646
+
1647
+ # Creates a new UtilizationReport.
1648
+ # @param [String] parent
1649
+ # Required. The Utilization Report's parent.
1650
+ # @param [Google::Apis::VmmigrationV1::UtilizationReport] utilization_report_object
1651
+ # @param [String] request_id
1652
+ # A request ID to identify requests. Specify a unique request ID so that if you
1653
+ # must retry your request, the server will know to ignore the request if it has
1654
+ # already been completed. The server will guarantee that for at least 60 minutes
1655
+ # since the first request. For example, consider a situation where you make an
1656
+ # initial request and t he request times out. If you make the request again with
1657
+ # the same request ID, the server can check if original operation with the same
1658
+ # request ID was received, and if so, will ignore the second request. This
1659
+ # prevents clients from accidentally creating duplicate commitments. The request
1660
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
1661
+ # 00000000-0000-0000-0000-000000000000).
1662
+ # @param [String] utilization_report_id
1663
+ # Required. The ID to use for the report, which will become the final component
1664
+ # of the reports's resource name. This value maximum length is 63 characters,
1665
+ # and valid characters are /a-z-/. It must start with an english letter and must
1666
+ # not end with a hyphen.
1667
+ # @param [String] fields
1668
+ # Selector specifying which fields to include in a partial response.
1669
+ # @param [String] quota_user
1670
+ # Available to use for quota purposes for server-side applications. Can be any
1671
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1672
+ # @param [Google::Apis::RequestOptions] options
1673
+ # Request-specific options
1674
+ #
1675
+ # @yield [result, err] Result & error if block supplied
1676
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1677
+ # @yieldparam err [StandardError] error object if request failed
1678
+ #
1679
+ # @return [Google::Apis::VmmigrationV1::Operation]
1680
+ #
1681
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1682
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1683
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1684
+ def create_project_location_source_utilization_report(parent, utilization_report_object = nil, request_id: nil, utilization_report_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1685
+ command = make_simple_command(:post, 'v1/{+parent}/utilizationReports', options)
1686
+ command.request_representation = Google::Apis::VmmigrationV1::UtilizationReport::Representation
1687
+ command.request_object = utilization_report_object
1688
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1689
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1690
+ command.params['parent'] = parent unless parent.nil?
1691
+ command.query['requestId'] = request_id unless request_id.nil?
1692
+ command.query['utilizationReportId'] = utilization_report_id unless utilization_report_id.nil?
1693
+ command.query['fields'] = fields unless fields.nil?
1694
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1695
+ execute_or_queue_command(command, &block)
1696
+ end
1697
+
1698
+ # Deletes a single Utilization Report.
1699
+ # @param [String] name
1700
+ # Required. The Utilization Report name.
1701
+ # @param [String] request_id
1702
+ # Optional. A request ID to identify requests. Specify a unique request ID so
1703
+ # that if you must retry your request, the server will know to ignore the
1704
+ # request if it has already been completed. The server will guarantee that for
1705
+ # at least 60 minutes after the first request. For example, consider a situation
1706
+ # where you make an initial request and t he request times out. If you make the
1707
+ # request again with the same request ID, the server can check if original
1708
+ # operation with the same request ID was received, and if so, will ignore the
1709
+ # second request. This prevents clients from accidentally creating duplicate
1710
+ # commitments. The request ID must be a valid UUID with the exception that zero
1711
+ # UUID is not supported (00000000-0000-0000-0000-000000000000).
1712
+ # @param [String] fields
1713
+ # Selector specifying which fields to include in a partial response.
1714
+ # @param [String] quota_user
1715
+ # Available to use for quota purposes for server-side applications. Can be any
1716
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1717
+ # @param [Google::Apis::RequestOptions] options
1718
+ # Request-specific options
1719
+ #
1720
+ # @yield [result, err] Result & error if block supplied
1721
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1722
+ # @yieldparam err [StandardError] error object if request failed
1723
+ #
1724
+ # @return [Google::Apis::VmmigrationV1::Operation]
1725
+ #
1726
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1727
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1728
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1729
+ def delete_project_location_source_utilization_report(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1730
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1731
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1732
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1733
+ command.params['name'] = name unless name.nil?
1734
+ command.query['requestId'] = request_id unless request_id.nil?
1735
+ command.query['fields'] = fields unless fields.nil?
1736
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1737
+ execute_or_queue_command(command, &block)
1738
+ end
1739
+
1740
+ # Gets a single Utilization Report.
1741
+ # @param [String] name
1742
+ # Required. The Utilization Report name.
1743
+ # @param [String] view
1744
+ # Optional. The level of details of the report. Defaults to FULL
1745
+ # @param [String] fields
1746
+ # Selector specifying which fields to include in a partial response.
1747
+ # @param [String] quota_user
1748
+ # Available to use for quota purposes for server-side applications. Can be any
1749
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1750
+ # @param [Google::Apis::RequestOptions] options
1751
+ # Request-specific options
1752
+ #
1753
+ # @yield [result, err] Result & error if block supplied
1754
+ # @yieldparam result [Google::Apis::VmmigrationV1::UtilizationReport] parsed result object
1755
+ # @yieldparam err [StandardError] error object if request failed
1756
+ #
1757
+ # @return [Google::Apis::VmmigrationV1::UtilizationReport]
1758
+ #
1759
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1760
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1761
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1762
+ def get_project_location_source_utilization_report(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
1763
+ command = make_simple_command(:get, 'v1/{+name}', options)
1764
+ command.response_representation = Google::Apis::VmmigrationV1::UtilizationReport::Representation
1765
+ command.response_class = Google::Apis::VmmigrationV1::UtilizationReport
1766
+ command.params['name'] = name unless name.nil?
1767
+ command.query['view'] = view unless view.nil?
1768
+ command.query['fields'] = fields unless fields.nil?
1769
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1770
+ execute_or_queue_command(command, &block)
1771
+ end
1772
+
1773
+ # Lists Utilization Reports of the given Source.
1774
+ # @param [String] parent
1775
+ # Required. The Utilization Reports parent.
1776
+ # @param [String] filter
1777
+ # Optional. The filter request.
1778
+ # @param [String] order_by
1779
+ # Optional. the order by fields for the result.
1780
+ # @param [Fixnum] page_size
1781
+ # Optional. The maximum number of reports to return. The service may return
1782
+ # fewer than this value. If unspecified, at most 500 reports will be returned.
1783
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1784
+ # @param [String] page_token
1785
+ # Required. A page token, received from a previous `ListUtilizationReports` call.
1786
+ # Provide this to retrieve the subsequent page. When paginating, all other
1787
+ # parameters provided to `ListUtilizationReports` must match the call that
1788
+ # provided the page token.
1789
+ # @param [String] view
1790
+ # Optional. The level of details of each report. Defaults to BASIC.
1791
+ # @param [String] fields
1792
+ # Selector specifying which fields to include in a partial response.
1793
+ # @param [String] quota_user
1794
+ # Available to use for quota purposes for server-side applications. Can be any
1795
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1796
+ # @param [Google::Apis::RequestOptions] options
1797
+ # Request-specific options
1798
+ #
1799
+ # @yield [result, err] Result & error if block supplied
1800
+ # @yieldparam result [Google::Apis::VmmigrationV1::ListUtilizationReportsResponse] parsed result object
1801
+ # @yieldparam err [StandardError] error object if request failed
1802
+ #
1803
+ # @return [Google::Apis::VmmigrationV1::ListUtilizationReportsResponse]
1804
+ #
1805
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1806
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1807
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1808
+ def list_project_location_source_utilization_reports(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
1809
+ command = make_simple_command(:get, 'v1/{+parent}/utilizationReports', options)
1810
+ command.response_representation = Google::Apis::VmmigrationV1::ListUtilizationReportsResponse::Representation
1811
+ command.response_class = Google::Apis::VmmigrationV1::ListUtilizationReportsResponse
1812
+ command.params['parent'] = parent unless parent.nil?
1813
+ command.query['filter'] = filter unless filter.nil?
1814
+ command.query['orderBy'] = order_by unless order_by.nil?
1815
+ command.query['pageSize'] = page_size unless page_size.nil?
1816
+ command.query['pageToken'] = page_token unless page_token.nil?
1817
+ command.query['view'] = view unless view.nil?
1818
+ command.query['fields'] = fields unless fields.nil?
1819
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1820
+ execute_or_queue_command(command, &block)
1821
+ end
1822
+
1823
+ # Creates a new TargetProject in a given project. NOTE: TargetProject is a
1824
+ # global resource; hence the only supported value for location is `global`.
1825
+ # @param [String] parent
1826
+ # Required. The TargetProject's parent.
1827
+ # @param [Google::Apis::VmmigrationV1::TargetProject] target_project_object
1828
+ # @param [String] request_id
1829
+ # A request ID to identify requests. Specify a unique request ID so that if you
1830
+ # must retry your request, the server will know to ignore the request if it has
1831
+ # already been completed. The server will guarantee that for at least 60 minutes
1832
+ # since the first request. For example, consider a situation where you make an
1833
+ # initial request and t he request times out. If you make the request again with
1834
+ # the same request ID, the server can check if original operation with the same
1835
+ # request ID was received, and if so, will ignore the second request. This
1836
+ # prevents clients from accidentally creating duplicate commitments. The request
1837
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
1838
+ # 00000000-0000-0000-0000-000000000000).
1839
+ # @param [String] target_project_id
1840
+ # Required. The target_project identifier.
1841
+ # @param [String] fields
1842
+ # Selector specifying which fields to include in a partial response.
1843
+ # @param [String] quota_user
1844
+ # Available to use for quota purposes for server-side applications. Can be any
1845
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1846
+ # @param [Google::Apis::RequestOptions] options
1847
+ # Request-specific options
1848
+ #
1849
+ # @yield [result, err] Result & error if block supplied
1850
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1851
+ # @yieldparam err [StandardError] error object if request failed
1852
+ #
1853
+ # @return [Google::Apis::VmmigrationV1::Operation]
1854
+ #
1855
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1856
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1857
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1858
+ def create_project_location_target_project(parent, target_project_object = nil, request_id: nil, target_project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1859
+ command = make_simple_command(:post, 'v1/{+parent}/targetProjects', options)
1860
+ command.request_representation = Google::Apis::VmmigrationV1::TargetProject::Representation
1861
+ command.request_object = target_project_object
1862
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1863
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1864
+ command.params['parent'] = parent unless parent.nil?
1865
+ command.query['requestId'] = request_id unless request_id.nil?
1866
+ command.query['targetProjectId'] = target_project_id unless target_project_id.nil?
1867
+ command.query['fields'] = fields unless fields.nil?
1868
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1869
+ execute_or_queue_command(command, &block)
1870
+ end
1871
+
1872
+ # Deletes a single TargetProject. NOTE: TargetProject is a global resource;
1873
+ # hence the only supported value for location is `global`.
1874
+ # @param [String] name
1875
+ # Required. The TargetProject name.
1876
+ # @param [String] request_id
1877
+ # Optional. A request ID to identify requests. Specify a unique request ID so
1878
+ # that if you must retry your request, the server will know to ignore the
1879
+ # request if it has already been completed. The server will guarantee that for
1880
+ # at least 60 minutes after the first request. For example, consider a situation
1881
+ # where you make an initial request and t he request times out. If you make the
1882
+ # request again with the same request ID, the server can check if original
1883
+ # operation with the same request ID was received, and if so, will ignore the
1884
+ # second request. This prevents clients from accidentally creating duplicate
1885
+ # commitments. The request ID must be a valid UUID with the exception that zero
1886
+ # UUID is not supported (00000000-0000-0000-0000-000000000000).
1887
+ # @param [String] fields
1888
+ # Selector specifying which fields to include in a partial response.
1889
+ # @param [String] quota_user
1890
+ # Available to use for quota purposes for server-side applications. Can be any
1891
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1892
+ # @param [Google::Apis::RequestOptions] options
1893
+ # Request-specific options
1894
+ #
1895
+ # @yield [result, err] Result & error if block supplied
1896
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
1897
+ # @yieldparam err [StandardError] error object if request failed
1898
+ #
1899
+ # @return [Google::Apis::VmmigrationV1::Operation]
1900
+ #
1901
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1902
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1903
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1904
+ def delete_project_location_target_project(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1905
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1906
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
1907
+ command.response_class = Google::Apis::VmmigrationV1::Operation
1908
+ command.params['name'] = name unless name.nil?
1909
+ command.query['requestId'] = request_id unless request_id.nil?
1910
+ command.query['fields'] = fields unless fields.nil?
1911
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1912
+ execute_or_queue_command(command, &block)
1913
+ end
1914
+
1915
+ # Gets details of a single TargetProject. NOTE: TargetProject is a global
1916
+ # resource; hence the only supported value for location is `global`.
1917
+ # @param [String] name
1918
+ # Required. The TargetProject name.
1919
+ # @param [String] fields
1920
+ # Selector specifying which fields to include in a partial response.
1921
+ # @param [String] quota_user
1922
+ # Available to use for quota purposes for server-side applications. Can be any
1923
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1924
+ # @param [Google::Apis::RequestOptions] options
1925
+ # Request-specific options
1926
+ #
1927
+ # @yield [result, err] Result & error if block supplied
1928
+ # @yieldparam result [Google::Apis::VmmigrationV1::TargetProject] parsed result object
1929
+ # @yieldparam err [StandardError] error object if request failed
1930
+ #
1931
+ # @return [Google::Apis::VmmigrationV1::TargetProject]
1932
+ #
1933
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1934
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1935
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1936
+ def get_project_location_target_project(name, fields: nil, quota_user: nil, options: nil, &block)
1937
+ command = make_simple_command(:get, 'v1/{+name}', options)
1938
+ command.response_representation = Google::Apis::VmmigrationV1::TargetProject::Representation
1939
+ command.response_class = Google::Apis::VmmigrationV1::TargetProject
1940
+ command.params['name'] = name unless name.nil?
1941
+ command.query['fields'] = fields unless fields.nil?
1942
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1943
+ execute_or_queue_command(command, &block)
1944
+ end
1945
+
1946
+ # Lists TargetProjects in a given project. NOTE: TargetProject is a global
1947
+ # resource; hence the only supported value for location is `global`.
1948
+ # @param [String] parent
1949
+ # Required. The parent, which owns this collection of targets.
1950
+ # @param [String] filter
1951
+ # Optional. The filter request.
1952
+ # @param [String] order_by
1953
+ # Optional. the order by fields for the result.
1954
+ # @param [Fixnum] page_size
1955
+ # Optional. The maximum number of targets to return. The service may return
1956
+ # fewer than this value. If unspecified, at most 500 targets will be returned.
1957
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1958
+ # @param [String] page_token
1959
+ # Required. A page token, received from a previous `ListTargets` call. Provide
1960
+ # this to retrieve the subsequent page. When paginating, all other parameters
1961
+ # provided to `ListTargets` must match the call that provided the page token.
1962
+ # @param [String] fields
1963
+ # Selector specifying which fields to include in a partial response.
1964
+ # @param [String] quota_user
1965
+ # Available to use for quota purposes for server-side applications. Can be any
1966
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1967
+ # @param [Google::Apis::RequestOptions] options
1968
+ # Request-specific options
1969
+ #
1970
+ # @yield [result, err] Result & error if block supplied
1971
+ # @yieldparam result [Google::Apis::VmmigrationV1::ListTargetProjectsResponse] parsed result object
1972
+ # @yieldparam err [StandardError] error object if request failed
1973
+ #
1974
+ # @return [Google::Apis::VmmigrationV1::ListTargetProjectsResponse]
1975
+ #
1976
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1977
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1978
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1979
+ def list_project_location_target_projects(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1980
+ command = make_simple_command(:get, 'v1/{+parent}/targetProjects', options)
1981
+ command.response_representation = Google::Apis::VmmigrationV1::ListTargetProjectsResponse::Representation
1982
+ command.response_class = Google::Apis::VmmigrationV1::ListTargetProjectsResponse
1983
+ command.params['parent'] = parent unless parent.nil?
1984
+ command.query['filter'] = filter unless filter.nil?
1985
+ command.query['orderBy'] = order_by unless order_by.nil?
1986
+ command.query['pageSize'] = page_size unless page_size.nil?
1987
+ command.query['pageToken'] = page_token unless page_token.nil?
1988
+ command.query['fields'] = fields unless fields.nil?
1989
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1990
+ execute_or_queue_command(command, &block)
1991
+ end
1992
+
1993
+ # Updates the parameters of a single TargetProject. NOTE: TargetProject is a
1994
+ # global resource; hence the only supported value for location is `global`.
1995
+ # @param [String] name
1996
+ # The name of the target project.
1997
+ # @param [Google::Apis::VmmigrationV1::TargetProject] target_project_object
1998
+ # @param [String] request_id
1999
+ # A request ID to identify requests. Specify a unique request ID so that if you
2000
+ # must retry your request, the server will know to ignore the request if it has
2001
+ # already been completed. The server will guarantee that for at least 60 minutes
2002
+ # since the first request. For example, consider a situation where you make an
2003
+ # initial request and t he request times out. If you make the request again with
2004
+ # the same request ID, the server can check if original operation with the same
2005
+ # request ID was received, and if so, will ignore the second request. This
2006
+ # prevents clients from accidentally creating duplicate commitments. The request
2007
+ # ID must be a valid UUID with the exception that zero UUID is not supported (
2008
+ # 00000000-0000-0000-0000-000000000000).
2009
+ # @param [String] update_mask
2010
+ # Field mask is used to specify the fields to be overwritten in the
2011
+ # TargetProject resource by the update. The fields specified in the update_mask
2012
+ # are relative to the resource, not the full request. A field will be
2013
+ # overwritten if it is in the mask. If the user does not provide a mask then all
2014
+ # fields will be overwritten.
2015
+ # @param [String] fields
2016
+ # Selector specifying which fields to include in a partial response.
2017
+ # @param [String] quota_user
2018
+ # Available to use for quota purposes for server-side applications. Can be any
2019
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2020
+ # @param [Google::Apis::RequestOptions] options
2021
+ # Request-specific options
2022
+ #
2023
+ # @yield [result, err] Result & error if block supplied
2024
+ # @yieldparam result [Google::Apis::VmmigrationV1::Operation] parsed result object
2025
+ # @yieldparam err [StandardError] error object if request failed
2026
+ #
2027
+ # @return [Google::Apis::VmmigrationV1::Operation]
2028
+ #
2029
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2030
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2031
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2032
+ def patch_project_location_target_project(name, target_project_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2033
+ command = make_simple_command(:patch, 'v1/{+name}', options)
2034
+ command.request_representation = Google::Apis::VmmigrationV1::TargetProject::Representation
2035
+ command.request_object = target_project_object
2036
+ command.response_representation = Google::Apis::VmmigrationV1::Operation::Representation
2037
+ command.response_class = Google::Apis::VmmigrationV1::Operation
2038
+ command.params['name'] = name unless name.nil?
2039
+ command.query['requestId'] = request_id unless request_id.nil?
2040
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2041
+ command.query['fields'] = fields unless fields.nil?
2042
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2043
+ execute_or_queue_command(command, &block)
2044
+ end
2045
+
2046
+ protected
2047
+
2048
+ def apply_command_defaults(command)
2049
+ command.query['key'] = key unless key.nil?
2050
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2051
+ end
2052
+ end
2053
+ end
2054
+ end
2055
+ end