google-apis-migrationcenter_v1alpha1 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,1113 @@
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 MigrationcenterV1alpha1
23
+ # Migration Center API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/migrationcenter_v1alpha1'
29
+ #
30
+ # Migrationcenter = Google::Apis::MigrationcenterV1alpha1 # Alias the module
31
+ # service = Migrationcenter::MigrationCenterAPIService.new
32
+ #
33
+ # @see https://cloud.google.com/migration-center
34
+ class MigrationCenterAPIService < 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://migrationcenter.googleapis.com/', '',
47
+ client_name: 'google-apis-migrationcenter_v1alpha1',
48
+ client_version: Google::Apis::MigrationcenterV1alpha1::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::MigrationcenterV1alpha1::Location] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::MigrationcenterV1alpha1::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, 'v1alpha1/{+name}', options)
74
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Location::Representation
75
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::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
88
+ # in [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::MigrationcenterV1alpha1::ListLocationsResponse] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::MigrationcenterV1alpha1::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, 'v1alpha1/{+name}/locations', options)
114
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::ListLocationsResponse::Representation
115
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::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
+ # Aggregates the requested fields based on provided function.
126
+ # @param [String] parent
127
+ # Required. Parent value for `AggregateAssetsValuesRequest`.
128
+ # @param [Google::Apis::MigrationcenterV1alpha1::AggregateAssetsValuesRequest] aggregate_assets_values_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::MigrationcenterV1alpha1::AggregateAssetsValuesResponse] parsed result object
139
+ # @yieldparam err [StandardError] error object if request failed
140
+ #
141
+ # @return [Google::Apis::MigrationcenterV1alpha1::AggregateAssetsValuesResponse]
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 aggregate_project_location_asset_values(parent, aggregate_assets_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
147
+ command = make_simple_command(:post, 'v1alpha1/{+parent}/assets:aggregateValues', options)
148
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::AggregateAssetsValuesRequest::Representation
149
+ command.request_object = aggregate_assets_values_request_object
150
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::AggregateAssetsValuesResponse::Representation
151
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::AggregateAssetsValuesResponse
152
+ command.params['parent'] = parent unless parent.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
+ # Updates the parameters of a list of assets.
159
+ # @param [String] parent
160
+ # Required. Parent value for batch asset update.
161
+ # @param [Google::Apis::MigrationcenterV1alpha1::BatchUpdateAssetsRequest] batch_update_assets_request_object
162
+ # @param [String] fields
163
+ # Selector specifying which fields to include in a partial response.
164
+ # @param [String] quota_user
165
+ # Available to use for quota purposes for server-side applications. Can be any
166
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
167
+ # @param [Google::Apis::RequestOptions] options
168
+ # Request-specific options
169
+ #
170
+ # @yield [result, err] Result & error if block supplied
171
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::BatchUpdateAssetsResponse] parsed result object
172
+ # @yieldparam err [StandardError] error object if request failed
173
+ #
174
+ # @return [Google::Apis::MigrationcenterV1alpha1::BatchUpdateAssetsResponse]
175
+ #
176
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
177
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
178
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
179
+ def batch_update_assets(parent, batch_update_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
180
+ command = make_simple_command(:post, 'v1alpha1/{+parent}/assets:batchUpdate', options)
181
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::BatchUpdateAssetsRequest::Representation
182
+ command.request_object = batch_update_assets_request_object
183
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::BatchUpdateAssetsResponse::Representation
184
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::BatchUpdateAssetsResponse
185
+ command.params['parent'] = parent unless parent.nil?
186
+ command.query['fields'] = fields unless fields.nil?
187
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
188
+ execute_or_queue_command(command, &block)
189
+ end
190
+
191
+ # Creates a new asset in a given project and location. Deprecated: Use
192
+ # ReportAssetFrames instead.
193
+ # @param [String] parent
194
+ # Required. Value for parent.
195
+ # @param [Google::Apis::MigrationcenterV1alpha1::Asset] asset_object
196
+ # @param [String] asset_id
197
+ # @param [String] request_id
198
+ # Optional. An optional request ID to identify requests. Specify a unique
199
+ # request ID so that if you must retry your request, the server will know to
200
+ # ignore the request if it has already been completed. The server will guarantee
201
+ # that for at least 60 minutes since the first request. For example, consider a
202
+ # situation where you make an initial request and the request times out. If you
203
+ # make the request again with the same request ID, the server can check if
204
+ # original operation with the same request ID was received, and if so, will
205
+ # ignore the second request. This prevents clients from accidentally creating
206
+ # duplicate commitments. The request ID must be a valid UUID with the exception
207
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
208
+ # @param [String] fields
209
+ # Selector specifying which fields to include in a partial response.
210
+ # @param [String] quota_user
211
+ # Available to use for quota purposes for server-side applications. Can be any
212
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
213
+ # @param [Google::Apis::RequestOptions] options
214
+ # Request-specific options
215
+ #
216
+ # @yield [result, err] Result & error if block supplied
217
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
218
+ # @yieldparam err [StandardError] error object if request failed
219
+ #
220
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
221
+ #
222
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
223
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
224
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
225
+ def create_project_location_asset(parent, asset_object = nil, asset_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
226
+ command = make_simple_command(:post, 'v1alpha1/{+parent}/assets', options)
227
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::Asset::Representation
228
+ command.request_object = asset_object
229
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
230
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
231
+ command.params['parent'] = parent unless parent.nil?
232
+ command.query['assetId'] = asset_id unless asset_id.nil?
233
+ command.query['requestId'] = request_id unless request_id.nil?
234
+ command.query['fields'] = fields unless fields.nil?
235
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
236
+ execute_or_queue_command(command, &block)
237
+ end
238
+
239
+ # Deletes an asset.
240
+ # @param [String] name
241
+ # Required. Name of the resource.
242
+ # @param [String] request_id
243
+ # Optional. An optional request ID to identify requests. Specify a unique
244
+ # request ID so that if you must retry your request, the server will know to
245
+ # ignore the request if it has already been completed. The server will guarantee
246
+ # that for at least 60 minutes after the first request. For example, consider a
247
+ # situation where you make an initial request and the request times out. If you
248
+ # make the request again with the same request ID, the server can check if
249
+ # original operation with the same request ID was received, and if so, will
250
+ # ignore the second request. This prevents clients from accidentally creating
251
+ # duplicate commitments. The request ID must be a valid UUID with the exception
252
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
253
+ # @param [String] fields
254
+ # Selector specifying which fields to include in a partial response.
255
+ # @param [String] quota_user
256
+ # Available to use for quota purposes for server-side applications. Can be any
257
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
258
+ # @param [Google::Apis::RequestOptions] options
259
+ # Request-specific options
260
+ #
261
+ # @yield [result, err] Result & error if block supplied
262
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
263
+ # @yieldparam err [StandardError] error object if request failed
264
+ #
265
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
266
+ #
267
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
268
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
269
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
270
+ def delete_project_location_asset(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
271
+ command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
272
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
273
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
274
+ command.params['name'] = name unless name.nil?
275
+ command.query['requestId'] = request_id unless request_id.nil?
276
+ command.query['fields'] = fields unless fields.nil?
277
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
278
+ execute_or_queue_command(command, &block)
279
+ end
280
+
281
+ # Gets the details of an asset.
282
+ # @param [String] name
283
+ # Required. Name of the resource.
284
+ # @param [String] view
285
+ # View of the assets. Defaults to BASIC.
286
+ # @param [String] fields
287
+ # Selector specifying which fields to include in a partial response.
288
+ # @param [String] quota_user
289
+ # Available to use for quota purposes for server-side applications. Can be any
290
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
291
+ # @param [Google::Apis::RequestOptions] options
292
+ # Request-specific options
293
+ #
294
+ # @yield [result, err] Result & error if block supplied
295
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Asset] parsed result object
296
+ # @yieldparam err [StandardError] error object if request failed
297
+ #
298
+ # @return [Google::Apis::MigrationcenterV1alpha1::Asset]
299
+ #
300
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
301
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
302
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
303
+ def get_project_location_asset(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
304
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
305
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Asset::Representation
306
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Asset
307
+ command.params['name'] = name unless name.nil?
308
+ command.query['view'] = view unless view.nil?
309
+ command.query['fields'] = fields unless fields.nil?
310
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
311
+ execute_or_queue_command(command, &block)
312
+ end
313
+
314
+ # Lists all the assets in a given project and location.
315
+ # @param [String] parent
316
+ # Required. Parent value for `ListAssetsRequest`.
317
+ # @param [String] filter
318
+ # Filtering results.
319
+ # @param [String] order_by
320
+ # Field to sort by. See https://google.aip.dev/132#ordering for more details.
321
+ # @param [Fixnum] page_size
322
+ # Requested page size. Server may return fewer items than requested. If
323
+ # unspecified, server will pick an appropriate default.
324
+ # @param [String] page_token
325
+ # A token identifying a page of results the server should return.
326
+ # @param [String] view
327
+ # View of the assets. Defaults to BASIC.
328
+ # @param [String] fields
329
+ # Selector specifying which fields to include in a partial response.
330
+ # @param [String] quota_user
331
+ # Available to use for quota purposes for server-side applications. Can be any
332
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
333
+ # @param [Google::Apis::RequestOptions] options
334
+ # Request-specific options
335
+ #
336
+ # @yield [result, err] Result & error if block supplied
337
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::ListAssetsResponse] parsed result object
338
+ # @yieldparam err [StandardError] error object if request failed
339
+ #
340
+ # @return [Google::Apis::MigrationcenterV1alpha1::ListAssetsResponse]
341
+ #
342
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
343
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
344
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
345
+ def list_project_location_assets(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
346
+ command = make_simple_command(:get, 'v1alpha1/{+parent}/assets', options)
347
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::ListAssetsResponse::Representation
348
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::ListAssetsResponse
349
+ command.params['parent'] = parent unless parent.nil?
350
+ command.query['filter'] = filter unless filter.nil?
351
+ command.query['orderBy'] = order_by unless order_by.nil?
352
+ command.query['pageSize'] = page_size unless page_size.nil?
353
+ command.query['pageToken'] = page_token unless page_token.nil?
354
+ command.query['view'] = view unless view.nil?
355
+ command.query['fields'] = fields unless fields.nil?
356
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
357
+ execute_or_queue_command(command, &block)
358
+ end
359
+
360
+ # Updates the parameters of an asset.
361
+ # @param [String] name
362
+ # Output only. The full name of the asset.
363
+ # @param [Google::Apis::MigrationcenterV1alpha1::Asset] asset_object
364
+ # @param [String] request_id
365
+ # Optional. An optional request ID to identify requests. Specify a unique
366
+ # request ID so that if you must retry your request, the server will know to
367
+ # ignore the request if it has already been completed. The server will guarantee
368
+ # that for at least 60 minutes since the first request. For example, consider a
369
+ # situation where you make an initial request and the request times out. If you
370
+ # make the request again with the same request ID, the server can check if
371
+ # original operation with the same request ID was received, and if so, will
372
+ # ignore the second request. This prevents clients from accidentally creating
373
+ # duplicate commitments. The request ID must be a valid UUID with the exception
374
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
375
+ # @param [String] update_mask
376
+ # Required. Field mask is used to specify the fields to be overwritten in the `
377
+ # Asset` resource by the update. The values specified in the `update_mask` field
378
+ # are relative to the resource, not the full request. A field will be
379
+ # overwritten if it is in the mask. A single * value in the mask lets you to
380
+ # overwrite all fields.
381
+ # @param [String] fields
382
+ # Selector specifying which fields to include in a partial response.
383
+ # @param [String] quota_user
384
+ # Available to use for quota purposes for server-side applications. Can be any
385
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
386
+ # @param [Google::Apis::RequestOptions] options
387
+ # Request-specific options
388
+ #
389
+ # @yield [result, err] Result & error if block supplied
390
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
391
+ # @yieldparam err [StandardError] error object if request failed
392
+ #
393
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
394
+ #
395
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
396
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
397
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
398
+ def patch_project_location_asset(name, asset_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
399
+ command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
400
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::Asset::Representation
401
+ command.request_object = asset_object
402
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
403
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
404
+ command.params['name'] = name unless name.nil?
405
+ command.query['requestId'] = request_id unless request_id.nil?
406
+ command.query['updateMask'] = update_mask unless update_mask.nil?
407
+ command.query['fields'] = fields unless fields.nil?
408
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
409
+ execute_or_queue_command(command, &block)
410
+ end
411
+
412
+ # Reports a set of frames.
413
+ # @param [String] parent
414
+ # Required. Parent of the resource.
415
+ # @param [Google::Apis::MigrationcenterV1alpha1::Frames] frames_object
416
+ # @param [String] source
417
+ # Required. Reference to a source.
418
+ # @param [String] fields
419
+ # Selector specifying which fields to include in a partial response.
420
+ # @param [String] quota_user
421
+ # Available to use for quota purposes for server-side applications. Can be any
422
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
423
+ # @param [Google::Apis::RequestOptions] options
424
+ # Request-specific options
425
+ #
426
+ # @yield [result, err] Result & error if block supplied
427
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::ReportAssetFramesResponse] parsed result object
428
+ # @yieldparam err [StandardError] error object if request failed
429
+ #
430
+ # @return [Google::Apis::MigrationcenterV1alpha1::ReportAssetFramesResponse]
431
+ #
432
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
433
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
434
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
435
+ def report_project_location_asset_asset_frames(parent, frames_object = nil, source: nil, fields: nil, quota_user: nil, options: nil, &block)
436
+ command = make_simple_command(:post, 'v1alpha1/{+parent}/assets:reportAssetFrames', options)
437
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::Frames::Representation
438
+ command.request_object = frames_object
439
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::ReportAssetFramesResponse::Representation
440
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::ReportAssetFramesResponse
441
+ command.params['parent'] = parent unless parent.nil?
442
+ command.query['source'] = source unless source.nil?
443
+ command.query['fields'] = fields unless fields.nil?
444
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
445
+ execute_or_queue_command(command, &block)
446
+ end
447
+
448
+ # Creates an import job.
449
+ # @param [String] parent
450
+ # Required. Value for parent.
451
+ # @param [Google::Apis::MigrationcenterV1alpha1::ImportJob] import_job_object
452
+ # @param [String] import_job_id
453
+ # Required. ID of the import job.
454
+ # @param [String] request_id
455
+ # Optional. An optional request ID to identify requests. Specify a unique
456
+ # request ID so that if you must retry your request, the server will know to
457
+ # ignore the request if it has already been completed. The server will guarantee
458
+ # that for at least 60 minutes since the first request. For example, consider a
459
+ # situation where you make an initial request and the request times out. If you
460
+ # make the request again with the same request ID, the server can check if
461
+ # original operation with the same request ID was received, and if so, will
462
+ # ignore the second request. This prevents clients from accidentally creating
463
+ # duplicate commitments. The request ID must be a valid UUID with the exception
464
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
465
+ # @param [String] fields
466
+ # Selector specifying which fields to include in a partial response.
467
+ # @param [String] quota_user
468
+ # Available to use for quota purposes for server-side applications. Can be any
469
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
470
+ # @param [Google::Apis::RequestOptions] options
471
+ # Request-specific options
472
+ #
473
+ # @yield [result, err] Result & error if block supplied
474
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
475
+ # @yieldparam err [StandardError] error object if request failed
476
+ #
477
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
478
+ #
479
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
480
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
481
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
482
+ def create_project_location_import_job(parent, import_job_object = nil, import_job_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
483
+ command = make_simple_command(:post, 'v1alpha1/{+parent}/importJobs', options)
484
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::ImportJob::Representation
485
+ command.request_object = import_job_object
486
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
487
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
488
+ command.params['parent'] = parent unless parent.nil?
489
+ command.query['importJobId'] = import_job_id unless import_job_id.nil?
490
+ command.query['requestId'] = request_id unless request_id.nil?
491
+ command.query['fields'] = fields unless fields.nil?
492
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
493
+ execute_or_queue_command(command, &block)
494
+ end
495
+
496
+ # Deletes an import job.
497
+ # @param [String] name
498
+ # Required. Name of the resource.
499
+ # @param [String] request_id
500
+ # Optional. An optional request ID to identify requests. Specify a unique
501
+ # request ID so that if you must retry your request, the server will know to
502
+ # ignore the request if it has already been completed. The server will guarantee
503
+ # that for at least 60 minutes after the first request. For example, consider a
504
+ # situation where you make an initial request and the request times out. If you
505
+ # make the request again with the same request ID, the server can check if
506
+ # original operation with the same request ID was received, and if so, will
507
+ # ignore the second request. This prevents clients from accidentally creating
508
+ # duplicate commitments. The request ID must be a valid UUID with the exception
509
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
510
+ # @param [String] fields
511
+ # Selector specifying which fields to include in a partial response.
512
+ # @param [String] quota_user
513
+ # Available to use for quota purposes for server-side applications. Can be any
514
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
515
+ # @param [Google::Apis::RequestOptions] options
516
+ # Request-specific options
517
+ #
518
+ # @yield [result, err] Result & error if block supplied
519
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
520
+ # @yieldparam err [StandardError] error object if request failed
521
+ #
522
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
523
+ #
524
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
525
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
526
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
527
+ def delete_project_location_import_job(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
528
+ command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
529
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
530
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
531
+ command.params['name'] = name unless name.nil?
532
+ command.query['requestId'] = request_id unless request_id.nil?
533
+ command.query['fields'] = fields unless fields.nil?
534
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
535
+ execute_or_queue_command(command, &block)
536
+ end
537
+
538
+ # Gets the details of an import job.
539
+ # @param [String] name
540
+ # Required. Name of the resource.
541
+ # @param [String] view
542
+ # Optional. The level of details of the import job. Default value is FULL.
543
+ # @param [String] fields
544
+ # Selector specifying which fields to include in a partial response.
545
+ # @param [String] quota_user
546
+ # Available to use for quota purposes for server-side applications. Can be any
547
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
548
+ # @param [Google::Apis::RequestOptions] options
549
+ # Request-specific options
550
+ #
551
+ # @yield [result, err] Result & error if block supplied
552
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::ImportJob] parsed result object
553
+ # @yieldparam err [StandardError] error object if request failed
554
+ #
555
+ # @return [Google::Apis::MigrationcenterV1alpha1::ImportJob]
556
+ #
557
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
558
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
559
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
560
+ def get_project_location_import_job(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
561
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
562
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::ImportJob::Representation
563
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::ImportJob
564
+ command.params['name'] = name unless name.nil?
565
+ command.query['view'] = view unless view.nil?
566
+ command.query['fields'] = fields unless fields.nil?
567
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
568
+ execute_or_queue_command(command, &block)
569
+ end
570
+
571
+ # Lists all import jobs.
572
+ # @param [String] parent
573
+ # Required. Parent value for `ListImportJobsRequest`.
574
+ # @param [String] filter
575
+ # Filtering results.
576
+ # @param [String] order_by
577
+ # Field to sort by. See https://google.aip.dev/132#ordering for more details.
578
+ # @param [Fixnum] page_size
579
+ # Requested page size. Server may return fewer items than requested. If
580
+ # unspecified, server will pick an appropriate default.
581
+ # @param [String] page_token
582
+ # A token identifying a page of results the server should return.
583
+ # @param [String] view
584
+ # Optional. The level of details of each import job. Default value is BASIC.
585
+ # @param [String] fields
586
+ # Selector specifying which fields to include in a partial response.
587
+ # @param [String] quota_user
588
+ # Available to use for quota purposes for server-side applications. Can be any
589
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
590
+ # @param [Google::Apis::RequestOptions] options
591
+ # Request-specific options
592
+ #
593
+ # @yield [result, err] Result & error if block supplied
594
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::ListImportJobsResponse] parsed result object
595
+ # @yieldparam err [StandardError] error object if request failed
596
+ #
597
+ # @return [Google::Apis::MigrationcenterV1alpha1::ListImportJobsResponse]
598
+ #
599
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
600
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
601
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
602
+ def list_project_location_import_jobs(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
603
+ command = make_simple_command(:get, 'v1alpha1/{+parent}/importJobs', options)
604
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::ListImportJobsResponse::Representation
605
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::ListImportJobsResponse
606
+ command.params['parent'] = parent unless parent.nil?
607
+ command.query['filter'] = filter unless filter.nil?
608
+ command.query['orderBy'] = order_by unless order_by.nil?
609
+ command.query['pageSize'] = page_size unless page_size.nil?
610
+ command.query['pageToken'] = page_token unless page_token.nil?
611
+ command.query['view'] = view unless view.nil?
612
+ command.query['fields'] = fields unless fields.nil?
613
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
614
+ execute_or_queue_command(command, &block)
615
+ end
616
+
617
+ # Updates an import job.
618
+ # @param [String] name
619
+ # Output only. The full name of the import job.
620
+ # @param [Google::Apis::MigrationcenterV1alpha1::ImportJob] import_job_object
621
+ # @param [String] request_id
622
+ # Optional. An optional request ID to identify requests. Specify a unique
623
+ # request ID so that if you must retry your request, the server will know to
624
+ # ignore the request if it has already been completed. The server will guarantee
625
+ # that for at least 60 minutes since the first request. For example, consider a
626
+ # situation where you make an initial request and the request times out. If you
627
+ # make the request again with the same request ID, the server can check if
628
+ # original operation with the same request ID was received, and if so, will
629
+ # ignore the second request. This prevents clients from accidentally creating
630
+ # duplicate commitments. The request ID must be a valid UUID with the exception
631
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
632
+ # @param [String] update_mask
633
+ # Required. Field mask is used to specify the fields to be overwritten in the `
634
+ # Asset` resource by the update. The values specified in the `update_mask` field
635
+ # are relative to the resource, not the full request. A field will be
636
+ # overwritten if it is in the mask. A single * value in the mask lets you to
637
+ # overwrite all fields.
638
+ # @param [String] fields
639
+ # Selector specifying which fields to include in a partial response.
640
+ # @param [String] quota_user
641
+ # Available to use for quota purposes for server-side applications. Can be any
642
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
643
+ # @param [Google::Apis::RequestOptions] options
644
+ # Request-specific options
645
+ #
646
+ # @yield [result, err] Result & error if block supplied
647
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
648
+ # @yieldparam err [StandardError] error object if request failed
649
+ #
650
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
651
+ #
652
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
653
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
654
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
655
+ def patch_project_location_import_job(name, import_job_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
656
+ command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
657
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::ImportJob::Representation
658
+ command.request_object = import_job_object
659
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
660
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
661
+ command.params['name'] = name unless name.nil?
662
+ command.query['requestId'] = request_id unless request_id.nil?
663
+ command.query['updateMask'] = update_mask unless update_mask.nil?
664
+ command.query['fields'] = fields unless fields.nil?
665
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
666
+ execute_or_queue_command(command, &block)
667
+ end
668
+
669
+ # Runs an import job.
670
+ # @param [String] name
671
+ # Required. The name of the import job to run.
672
+ # @param [Google::Apis::MigrationcenterV1alpha1::RunImportJobRequest] run_import_job_request_object
673
+ # @param [String] fields
674
+ # Selector specifying which fields to include in a partial response.
675
+ # @param [String] quota_user
676
+ # Available to use for quota purposes for server-side applications. Can be any
677
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
678
+ # @param [Google::Apis::RequestOptions] options
679
+ # Request-specific options
680
+ #
681
+ # @yield [result, err] Result & error if block supplied
682
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
683
+ # @yieldparam err [StandardError] error object if request failed
684
+ #
685
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
686
+ #
687
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
688
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
689
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
690
+ def run_import_job(name, run_import_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
691
+ command = make_simple_command(:post, 'v1alpha1/{+name}:run', options)
692
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::RunImportJobRequest::Representation
693
+ command.request_object = run_import_job_request_object
694
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
695
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
696
+ command.params['name'] = name unless name.nil?
697
+ command.query['fields'] = fields unless fields.nil?
698
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
699
+ execute_or_queue_command(command, &block)
700
+ end
701
+
702
+ # Validates an import job.
703
+ # @param [String] name
704
+ # Required. The name of the import job to validate.
705
+ # @param [Google::Apis::MigrationcenterV1alpha1::ValidateImportJobRequest] validate_import_job_request_object
706
+ # @param [String] fields
707
+ # Selector specifying which fields to include in a partial response.
708
+ # @param [String] quota_user
709
+ # Available to use for quota purposes for server-side applications. Can be any
710
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
711
+ # @param [Google::Apis::RequestOptions] options
712
+ # Request-specific options
713
+ #
714
+ # @yield [result, err] Result & error if block supplied
715
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
716
+ # @yieldparam err [StandardError] error object if request failed
717
+ #
718
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
719
+ #
720
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
721
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
722
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
723
+ def validate_import_job(name, validate_import_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
724
+ command = make_simple_command(:post, 'v1alpha1/{+name}:validate', options)
725
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::ValidateImportJobRequest::Representation
726
+ command.request_object = validate_import_job_request_object
727
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
728
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
729
+ command.params['name'] = name unless name.nil?
730
+ command.query['fields'] = fields unless fields.nil?
731
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
732
+ execute_or_queue_command(command, &block)
733
+ end
734
+
735
+ # Starts asynchronous cancellation on a long-running operation. The server makes
736
+ # a best effort to cancel the operation, but success is not guaranteed. If the
737
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
738
+ # Clients can use Operations.GetOperation or other methods to check whether the
739
+ # cancellation succeeded or whether the operation completed despite cancellation.
740
+ # On successful cancellation, the operation is not deleted; instead, it becomes
741
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
742
+ # corresponding to `Code.CANCELLED`.
743
+ # @param [String] name
744
+ # The name of the operation resource to be cancelled.
745
+ # @param [Google::Apis::MigrationcenterV1alpha1::CancelOperationRequest] cancel_operation_request_object
746
+ # @param [String] fields
747
+ # Selector specifying which fields to include in a partial response.
748
+ # @param [String] quota_user
749
+ # Available to use for quota purposes for server-side applications. Can be any
750
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
751
+ # @param [Google::Apis::RequestOptions] options
752
+ # Request-specific options
753
+ #
754
+ # @yield [result, err] Result & error if block supplied
755
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Empty] parsed result object
756
+ # @yieldparam err [StandardError] error object if request failed
757
+ #
758
+ # @return [Google::Apis::MigrationcenterV1alpha1::Empty]
759
+ #
760
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
761
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
762
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
763
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
764
+ command = make_simple_command(:post, 'v1alpha1/{+name}:cancel', options)
765
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::CancelOperationRequest::Representation
766
+ command.request_object = cancel_operation_request_object
767
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Empty::Representation
768
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Empty
769
+ command.params['name'] = name unless name.nil?
770
+ command.query['fields'] = fields unless fields.nil?
771
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
772
+ execute_or_queue_command(command, &block)
773
+ end
774
+
775
+ # Deletes a long-running operation. This method indicates that the client is no
776
+ # longer interested in the operation result. It does not cancel the operation.
777
+ # If the server doesn't support this method, it returns `google.rpc.Code.
778
+ # UNIMPLEMENTED`.
779
+ # @param [String] name
780
+ # The name of the operation resource to be deleted.
781
+ # @param [String] fields
782
+ # Selector specifying which fields to include in a partial response.
783
+ # @param [String] quota_user
784
+ # Available to use for quota purposes for server-side applications. Can be any
785
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
786
+ # @param [Google::Apis::RequestOptions] options
787
+ # Request-specific options
788
+ #
789
+ # @yield [result, err] Result & error if block supplied
790
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Empty] parsed result object
791
+ # @yieldparam err [StandardError] error object if request failed
792
+ #
793
+ # @return [Google::Apis::MigrationcenterV1alpha1::Empty]
794
+ #
795
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
796
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
797
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
798
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
799
+ command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
800
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Empty::Representation
801
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Empty
802
+ command.params['name'] = name unless name.nil?
803
+ command.query['fields'] = fields unless fields.nil?
804
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
805
+ execute_or_queue_command(command, &block)
806
+ end
807
+
808
+ # Gets the latest state of a long-running operation. Clients can use this method
809
+ # to poll the operation result at intervals as recommended by the API service.
810
+ # @param [String] name
811
+ # The name of the operation resource.
812
+ # @param [String] fields
813
+ # Selector specifying which fields to include in a partial response.
814
+ # @param [String] quota_user
815
+ # Available to use for quota purposes for server-side applications. Can be any
816
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
817
+ # @param [Google::Apis::RequestOptions] options
818
+ # Request-specific options
819
+ #
820
+ # @yield [result, err] Result & error if block supplied
821
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
822
+ # @yieldparam err [StandardError] error object if request failed
823
+ #
824
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
825
+ #
826
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
827
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
828
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
829
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
830
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
831
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
832
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
833
+ command.params['name'] = name unless name.nil?
834
+ command.query['fields'] = fields unless fields.nil?
835
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
836
+ execute_or_queue_command(command, &block)
837
+ end
838
+
839
+ # Lists operations that match the specified filter in the request. If the server
840
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
841
+ # binding allows API services to override the binding to use different resource
842
+ # name schemes, such as `users/*/operations`. To override the binding, API
843
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
844
+ # service configuration. For backwards compatibility, the default name includes
845
+ # the operations collection id, however overriding users must ensure the name
846
+ # binding is the parent resource, without the operations collection id.
847
+ # @param [String] name
848
+ # The name of the operation's parent resource.
849
+ # @param [String] filter
850
+ # The standard list filter.
851
+ # @param [Fixnum] page_size
852
+ # The standard list page size.
853
+ # @param [String] page_token
854
+ # The standard list page token.
855
+ # @param [String] fields
856
+ # Selector specifying which fields to include in a partial response.
857
+ # @param [String] quota_user
858
+ # Available to use for quota purposes for server-side applications. Can be any
859
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
860
+ # @param [Google::Apis::RequestOptions] options
861
+ # Request-specific options
862
+ #
863
+ # @yield [result, err] Result & error if block supplied
864
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::ListOperationsResponse] parsed result object
865
+ # @yieldparam err [StandardError] error object if request failed
866
+ #
867
+ # @return [Google::Apis::MigrationcenterV1alpha1::ListOperationsResponse]
868
+ #
869
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
870
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
871
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
872
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
873
+ command = make_simple_command(:get, 'v1alpha1/{+name}/operations', options)
874
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::ListOperationsResponse::Representation
875
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::ListOperationsResponse
876
+ command.params['name'] = name unless name.nil?
877
+ command.query['filter'] = filter unless filter.nil?
878
+ command.query['pageSize'] = page_size unless page_size.nil?
879
+ command.query['pageToken'] = page_token unless page_token.nil?
880
+ command.query['fields'] = fields unless fields.nil?
881
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
882
+ execute_or_queue_command(command, &block)
883
+ end
884
+
885
+ # Creates a new source in a given project and location.
886
+ # @param [String] parent
887
+ # Required. Value for parent.
888
+ # @param [Google::Apis::MigrationcenterV1alpha1::Source] source_object
889
+ # @param [String] request_id
890
+ # Optional. An optional request ID to identify requests. Specify a unique
891
+ # request ID so that if you must retry your request, the server will know to
892
+ # ignore the request if it has already been completed. The server will guarantee
893
+ # that for at least 60 minutes since the first request. For example, consider a
894
+ # situation where you make an initial request and the request times out. If you
895
+ # make the request again with the same request ID, the server can check if
896
+ # original operation with the same request ID was received, and if so, will
897
+ # ignore the second request. This prevents clients from accidentally creating
898
+ # duplicate commitments. The request ID must be a valid UUID with the exception
899
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
900
+ # @param [String] source_id
901
+ # Required. User specified ID for the source. It will become the last component
902
+ # of the source name. The ID must be unique within the project, must conform
903
+ # with RFC-1034, is restricted to lower-cased letters, and has a maximum length
904
+ # of 63 characters. The ID must match the regular expression: `[a-z]([a-z0-9-]`0,
905
+ # 61`[a-z0-9])?`.
906
+ # @param [String] fields
907
+ # Selector specifying which fields to include in a partial response.
908
+ # @param [String] quota_user
909
+ # Available to use for quota purposes for server-side applications. Can be any
910
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
911
+ # @param [Google::Apis::RequestOptions] options
912
+ # Request-specific options
913
+ #
914
+ # @yield [result, err] Result & error if block supplied
915
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
916
+ # @yieldparam err [StandardError] error object if request failed
917
+ #
918
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
919
+ #
920
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
921
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
922
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
923
+ def create_project_location_source(parent, source_object = nil, request_id: nil, source_id: nil, fields: nil, quota_user: nil, options: nil, &block)
924
+ command = make_simple_command(:post, 'v1alpha1/{+parent}/sources', options)
925
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::Source::Representation
926
+ command.request_object = source_object
927
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
928
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
929
+ command.params['parent'] = parent unless parent.nil?
930
+ command.query['requestId'] = request_id unless request_id.nil?
931
+ command.query['sourceId'] = source_id unless source_id.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
+ # Deletes a source.
938
+ # @param [String] name
939
+ # Required. Name of the resource.
940
+ # @param [String] request_id
941
+ # Optional. An optional request ID to identify requests. Specify a unique
942
+ # request ID so that if you must retry your request, the server will know to
943
+ # ignore the request if it has already been completed. The server will guarantee
944
+ # that for at least 60 minutes after the first request. For example, consider a
945
+ # situation where you make an initial request and the request times out. If you
946
+ # make the request again with the same request ID, the server can check if
947
+ # original operation with the same request ID was received, and if so, will
948
+ # ignore the second request. This prevents clients from accidentally creating
949
+ # duplicate commitments. The request ID must be a valid UUID with the exception
950
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
951
+ # @param [String] fields
952
+ # Selector specifying which fields to include in a partial response.
953
+ # @param [String] quota_user
954
+ # Available to use for quota purposes for server-side applications. Can be any
955
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
956
+ # @param [Google::Apis::RequestOptions] options
957
+ # Request-specific options
958
+ #
959
+ # @yield [result, err] Result & error if block supplied
960
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
961
+ # @yieldparam err [StandardError] error object if request failed
962
+ #
963
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
964
+ #
965
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
966
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
967
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
968
+ def delete_project_location_source(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
969
+ command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
970
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
971
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
972
+ command.params['name'] = name unless name.nil?
973
+ command.query['requestId'] = request_id unless request_id.nil?
974
+ command.query['fields'] = fields unless fields.nil?
975
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
976
+ execute_or_queue_command(command, &block)
977
+ end
978
+
979
+ # Gets the details of a source.
980
+ # @param [String] name
981
+ # Required. Name of the resource.
982
+ # @param [String] fields
983
+ # Selector specifying which fields to include in a partial response.
984
+ # @param [String] quota_user
985
+ # Available to use for quota purposes for server-side applications. Can be any
986
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
987
+ # @param [Google::Apis::RequestOptions] options
988
+ # Request-specific options
989
+ #
990
+ # @yield [result, err] Result & error if block supplied
991
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Source] parsed result object
992
+ # @yieldparam err [StandardError] error object if request failed
993
+ #
994
+ # @return [Google::Apis::MigrationcenterV1alpha1::Source]
995
+ #
996
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
997
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
998
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
999
+ def get_project_location_source(name, fields: nil, quota_user: nil, options: nil, &block)
1000
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
1001
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Source::Representation
1002
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Source
1003
+ command.params['name'] = name unless name.nil?
1004
+ command.query['fields'] = fields unless fields.nil?
1005
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1006
+ execute_or_queue_command(command, &block)
1007
+ end
1008
+
1009
+ # Lists all the sources in a given project and location.
1010
+ # @param [String] parent
1011
+ # Required. Parent value for `ListSourcesRequest`.
1012
+ # @param [String] filter
1013
+ # Filtering results.
1014
+ # @param [String] order_by
1015
+ # Field to sort by. See https://google.aip.dev/132#ordering for more details.
1016
+ # @param [Fixnum] page_size
1017
+ # Requested page size. The server may return fewer items than requested. If
1018
+ # unspecified, the server will pick an appropriate default value.
1019
+ # @param [String] page_token
1020
+ # A token identifying a page of results that the server should return.
1021
+ # @param [String] fields
1022
+ # Selector specifying which fields to include in a partial response.
1023
+ # @param [String] quota_user
1024
+ # Available to use for quota purposes for server-side applications. Can be any
1025
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1026
+ # @param [Google::Apis::RequestOptions] options
1027
+ # Request-specific options
1028
+ #
1029
+ # @yield [result, err] Result & error if block supplied
1030
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::ListSourcesResponse] parsed result object
1031
+ # @yieldparam err [StandardError] error object if request failed
1032
+ #
1033
+ # @return [Google::Apis::MigrationcenterV1alpha1::ListSourcesResponse]
1034
+ #
1035
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1036
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1037
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1038
+ 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)
1039
+ command = make_simple_command(:get, 'v1alpha1/{+parent}/sources', options)
1040
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::ListSourcesResponse::Representation
1041
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::ListSourcesResponse
1042
+ command.params['parent'] = parent unless parent.nil?
1043
+ command.query['filter'] = filter unless filter.nil?
1044
+ command.query['orderBy'] = order_by unless order_by.nil?
1045
+ command.query['pageSize'] = page_size unless page_size.nil?
1046
+ command.query['pageToken'] = page_token unless page_token.nil?
1047
+ command.query['fields'] = fields unless fields.nil?
1048
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1049
+ execute_or_queue_command(command, &block)
1050
+ end
1051
+
1052
+ # Updates the parameters of a source.
1053
+ # @param [String] name
1054
+ # Output only. The full name of the source.
1055
+ # @param [Google::Apis::MigrationcenterV1alpha1::Source] source_object
1056
+ # @param [String] request_id
1057
+ # Optional. An optional request ID to identify requests. Specify a unique
1058
+ # request ID so that if you must retry your request, the server will know to
1059
+ # ignore the request if it has already been completed. The server will guarantee
1060
+ # that for at least 60 minutes since the first request. For example, consider a
1061
+ # situation where you make an initial request and the request times out. If you
1062
+ # make the request again with the same request ID, the server can check if
1063
+ # original operation with the same request ID was received, and if so, will
1064
+ # ignore the second request. This prevents clients from accidentally creating
1065
+ # duplicate commitments. The request ID must be a valid UUID with the exception
1066
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1067
+ # @param [String] update_mask
1068
+ # Required. Field mask is used to specify the fields to be overwritten in the `
1069
+ # Source` resource by the update. The values specified in the `update_mask`
1070
+ # field are relative to the resource, not the full request. A field will be
1071
+ # overwritten if it is in the mask. A single * value in the mask lets you to
1072
+ # overwrite all fields.
1073
+ # @param [String] fields
1074
+ # Selector specifying which fields to include in a partial response.
1075
+ # @param [String] quota_user
1076
+ # Available to use for quota purposes for server-side applications. Can be any
1077
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1078
+ # @param [Google::Apis::RequestOptions] options
1079
+ # Request-specific options
1080
+ #
1081
+ # @yield [result, err] Result & error if block supplied
1082
+ # @yieldparam result [Google::Apis::MigrationcenterV1alpha1::Operation] parsed result object
1083
+ # @yieldparam err [StandardError] error object if request failed
1084
+ #
1085
+ # @return [Google::Apis::MigrationcenterV1alpha1::Operation]
1086
+ #
1087
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1088
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1089
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1090
+ def patch_project_location_source(name, source_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1091
+ command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
1092
+ command.request_representation = Google::Apis::MigrationcenterV1alpha1::Source::Representation
1093
+ command.request_object = source_object
1094
+ command.response_representation = Google::Apis::MigrationcenterV1alpha1::Operation::Representation
1095
+ command.response_class = Google::Apis::MigrationcenterV1alpha1::Operation
1096
+ command.params['name'] = name unless name.nil?
1097
+ command.query['requestId'] = request_id unless request_id.nil?
1098
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1099
+ command.query['fields'] = fields unless fields.nil?
1100
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1101
+ execute_or_queue_command(command, &block)
1102
+ end
1103
+
1104
+ protected
1105
+
1106
+ def apply_command_defaults(command)
1107
+ command.query['key'] = key unless key.nil?
1108
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1109
+ end
1110
+ end
1111
+ end
1112
+ end
1113
+ end