google-apis-rapidmigrationassessment_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,652 @@
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 RapidmigrationassessmentV1
23
+ # Rapid Migration Assessment API
24
+ #
25
+ # The Rapid Migration Assessment service is our first-party migration assessment
26
+ # and planning tool.
27
+ #
28
+ # @example
29
+ # require 'google/apis/rapidmigrationassessment_v1'
30
+ #
31
+ # Rapidmigrationassessment = Google::Apis::RapidmigrationassessmentV1 # Alias the module
32
+ # service = Rapidmigrationassessment::RapidMigrationAssessmentService.new
33
+ #
34
+ # @see https://cloud.google.com/migration-center
35
+ class RapidMigrationAssessmentService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://rapidmigrationassessment.googleapis.com/', '',
48
+ client_name: 'google-apis-rapidmigrationassessment_v1',
49
+ client_version: Google::Apis::RapidmigrationassessmentV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets information about a location.
54
+ # @param [String] name
55
+ # Resource name for the location.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Location] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::RapidmigrationassessmentV1::Location]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1/{+name}', options)
75
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Location::Representation
76
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Location
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists information about the supported locations for this service.
84
+ # @param [String] name
85
+ # The resource that owns the locations collection, if applicable.
86
+ # @param [String] filter
87
+ # A filter to narrow down results to a preferred subset. The filtering language
88
+ # accepts strings like `"displayName=tokyo"`, and is documented in more detail
89
+ # in [AIP-160](https://google.aip.dev/160).
90
+ # @param [Fixnum] page_size
91
+ # The maximum number of results to return. If not set, the service selects a
92
+ # default.
93
+ # @param [String] page_token
94
+ # A page token received from the `next_page_token` field in the response. Send
95
+ # that page token to receive the subsequent page.
96
+ # @param [String] fields
97
+ # Selector specifying which fields to include in a partial response.
98
+ # @param [String] quota_user
99
+ # Available to use for quota purposes for server-side applications. Can be any
100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
101
+ # @param [Google::Apis::RequestOptions] options
102
+ # Request-specific options
103
+ #
104
+ # @yield [result, err] Result & error if block supplied
105
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::ListLocationsResponse] parsed result object
106
+ # @yieldparam err [StandardError] error object if request failed
107
+ #
108
+ # @return [Google::Apis::RapidmigrationassessmentV1::ListLocationsResponse]
109
+ #
110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
113
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
114
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
115
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::ListLocationsResponse::Representation
116
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::ListLocationsResponse
117
+ command.params['name'] = name unless name.nil?
118
+ command.query['filter'] = filter unless filter.nil?
119
+ command.query['pageSize'] = page_size unless page_size.nil?
120
+ command.query['pageToken'] = page_token unless page_token.nil?
121
+ command.query['fields'] = fields unless fields.nil?
122
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
123
+ execute_or_queue_command(command, &block)
124
+ end
125
+
126
+ # Creates an Annotation
127
+ # @param [String] parent
128
+ # Required. Name of the parent (project+location).
129
+ # @param [Google::Apis::RapidmigrationassessmentV1::Annotation] annotation_object
130
+ # @param [String] request_id
131
+ # Optional. An optional request ID to identify requests.
132
+ # @param [String] fields
133
+ # Selector specifying which fields to include in a partial response.
134
+ # @param [String] quota_user
135
+ # Available to use for quota purposes for server-side applications. Can be any
136
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
137
+ # @param [Google::Apis::RequestOptions] options
138
+ # Request-specific options
139
+ #
140
+ # @yield [result, err] Result & error if block supplied
141
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Operation] parsed result object
142
+ # @yieldparam err [StandardError] error object if request failed
143
+ #
144
+ # @return [Google::Apis::RapidmigrationassessmentV1::Operation]
145
+ #
146
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
147
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
148
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
149
+ def create_project_location_annotation(parent, annotation_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
150
+ command = make_simple_command(:post, 'v1/{+parent}/annotations', options)
151
+ command.request_representation = Google::Apis::RapidmigrationassessmentV1::Annotation::Representation
152
+ command.request_object = annotation_object
153
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Operation::Representation
154
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Operation
155
+ command.params['parent'] = parent unless parent.nil?
156
+ command.query['requestId'] = request_id unless request_id.nil?
157
+ command.query['fields'] = fields unless fields.nil?
158
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
159
+ execute_or_queue_command(command, &block)
160
+ end
161
+
162
+ # Gets details of a single Annotation.
163
+ # @param [String] name
164
+ # Required. Name of the resource.
165
+ # @param [String] fields
166
+ # Selector specifying which fields to include in a partial response.
167
+ # @param [String] quota_user
168
+ # Available to use for quota purposes for server-side applications. Can be any
169
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
170
+ # @param [Google::Apis::RequestOptions] options
171
+ # Request-specific options
172
+ #
173
+ # @yield [result, err] Result & error if block supplied
174
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Annotation] parsed result object
175
+ # @yieldparam err [StandardError] error object if request failed
176
+ #
177
+ # @return [Google::Apis::RapidmigrationassessmentV1::Annotation]
178
+ #
179
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
180
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
181
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
182
+ def get_project_location_annotation(name, fields: nil, quota_user: nil, options: nil, &block)
183
+ command = make_simple_command(:get, 'v1/{+name}', options)
184
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Annotation::Representation
185
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Annotation
186
+ command.params['name'] = name unless name.nil?
187
+ command.query['fields'] = fields unless fields.nil?
188
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
189
+ execute_or_queue_command(command, &block)
190
+ end
191
+
192
+ # Create a Collector to manage the on-prem appliance which collects information
193
+ # about Customer assets.
194
+ # @param [String] parent
195
+ # Required. Name of the parent (project+location).
196
+ # @param [Google::Apis::RapidmigrationassessmentV1::Collector] collector_object
197
+ # @param [String] collector_id
198
+ # Required. Id of the requesting object.
199
+ # @param [String] request_id
200
+ # Optional. An optional request ID to identify requests.
201
+ # @param [String] fields
202
+ # Selector specifying which fields to include in a partial response.
203
+ # @param [String] quota_user
204
+ # Available to use for quota purposes for server-side applications. Can be any
205
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
206
+ # @param [Google::Apis::RequestOptions] options
207
+ # Request-specific options
208
+ #
209
+ # @yield [result, err] Result & error if block supplied
210
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Operation] parsed result object
211
+ # @yieldparam err [StandardError] error object if request failed
212
+ #
213
+ # @return [Google::Apis::RapidmigrationassessmentV1::Operation]
214
+ #
215
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
216
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
217
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
218
+ def create_project_location_collector(parent, collector_object = nil, collector_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
219
+ command = make_simple_command(:post, 'v1/{+parent}/collectors', options)
220
+ command.request_representation = Google::Apis::RapidmigrationassessmentV1::Collector::Representation
221
+ command.request_object = collector_object
222
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Operation::Representation
223
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Operation
224
+ command.params['parent'] = parent unless parent.nil?
225
+ command.query['collectorId'] = collector_id unless collector_id.nil?
226
+ command.query['requestId'] = request_id unless request_id.nil?
227
+ command.query['fields'] = fields unless fields.nil?
228
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
229
+ execute_or_queue_command(command, &block)
230
+ end
231
+
232
+ # Deletes a single Collector - changes state of collector to "Deleting".
233
+ # Background jobs does final deletion thorugh producer api.
234
+ # @param [String] name
235
+ # Required. Name of the resource.
236
+ # @param [String] request_id
237
+ # Optional. An optional request ID to identify requests. Specify a unique
238
+ # request ID so that if you must retry your request, the server will know to
239
+ # ignore the request if it has already been completed. The server will guarantee
240
+ # that for at least 60 minutes after the first request. For example, consider a
241
+ # situation where you make an initial request and the request times out. If you
242
+ # make the request again with the same request ID, the server can check if
243
+ # original operation with the same request ID was received, and if so, will
244
+ # ignore the second request. This prevents clients from accidentally creating
245
+ # duplicate commitments. The request ID must be a valid UUID with the exception
246
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
247
+ # @param [String] fields
248
+ # Selector specifying which fields to include in a partial response.
249
+ # @param [String] quota_user
250
+ # Available to use for quota purposes for server-side applications. Can be any
251
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
252
+ # @param [Google::Apis::RequestOptions] options
253
+ # Request-specific options
254
+ #
255
+ # @yield [result, err] Result & error if block supplied
256
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Operation] parsed result object
257
+ # @yieldparam err [StandardError] error object if request failed
258
+ #
259
+ # @return [Google::Apis::RapidmigrationassessmentV1::Operation]
260
+ #
261
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
262
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
263
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
264
+ def delete_project_location_collector(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
265
+ command = make_simple_command(:delete, 'v1/{+name}', options)
266
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Operation::Representation
267
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Operation
268
+ command.params['name'] = name unless name.nil?
269
+ command.query['requestId'] = request_id unless request_id.nil?
270
+ command.query['fields'] = fields unless fields.nil?
271
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
272
+ execute_or_queue_command(command, &block)
273
+ end
274
+
275
+ # Gets details of a single Collector.
276
+ # @param [String] name
277
+ # Required. Name of the resource.
278
+ # @param [String] fields
279
+ # Selector specifying which fields to include in a partial response.
280
+ # @param [String] quota_user
281
+ # Available to use for quota purposes for server-side applications. Can be any
282
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
283
+ # @param [Google::Apis::RequestOptions] options
284
+ # Request-specific options
285
+ #
286
+ # @yield [result, err] Result & error if block supplied
287
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Collector] parsed result object
288
+ # @yieldparam err [StandardError] error object if request failed
289
+ #
290
+ # @return [Google::Apis::RapidmigrationassessmentV1::Collector]
291
+ #
292
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
293
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
294
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
295
+ def get_project_location_collector(name, fields: nil, quota_user: nil, options: nil, &block)
296
+ command = make_simple_command(:get, 'v1/{+name}', options)
297
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Collector::Representation
298
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Collector
299
+ command.params['name'] = name unless name.nil?
300
+ command.query['fields'] = fields unless fields.nil?
301
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
302
+ execute_or_queue_command(command, &block)
303
+ end
304
+
305
+ # Lists Collectors in a given project and location.
306
+ # @param [String] parent
307
+ # Required. Parent value for ListCollectorsRequest.
308
+ # @param [String] filter
309
+ # Filtering results.
310
+ # @param [String] order_by
311
+ # Hint for how to order the results.
312
+ # @param [Fixnum] page_size
313
+ # Requested page size. Server may return fewer items than requested. If
314
+ # unspecified, server will pick an appropriate default.
315
+ # @param [String] page_token
316
+ # A token identifying a page of results the server should return.
317
+ # @param [String] fields
318
+ # Selector specifying which fields to include in a partial response.
319
+ # @param [String] quota_user
320
+ # Available to use for quota purposes for server-side applications. Can be any
321
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
322
+ # @param [Google::Apis::RequestOptions] options
323
+ # Request-specific options
324
+ #
325
+ # @yield [result, err] Result & error if block supplied
326
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::ListCollectorsResponse] parsed result object
327
+ # @yieldparam err [StandardError] error object if request failed
328
+ #
329
+ # @return [Google::Apis::RapidmigrationassessmentV1::ListCollectorsResponse]
330
+ #
331
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
332
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
333
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
334
+ def list_project_location_collectors(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
335
+ command = make_simple_command(:get, 'v1/{+parent}/collectors', options)
336
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::ListCollectorsResponse::Representation
337
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::ListCollectorsResponse
338
+ command.params['parent'] = parent unless parent.nil?
339
+ command.query['filter'] = filter unless filter.nil?
340
+ command.query['orderBy'] = order_by unless order_by.nil?
341
+ command.query['pageSize'] = page_size unless page_size.nil?
342
+ command.query['pageToken'] = page_token unless page_token.nil?
343
+ command.query['fields'] = fields unless fields.nil?
344
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
345
+ execute_or_queue_command(command, &block)
346
+ end
347
+
348
+ # Updates the parameters of a single Collector.
349
+ # @param [String] name
350
+ # name of resource.
351
+ # @param [Google::Apis::RapidmigrationassessmentV1::Collector] collector_object
352
+ # @param [String] request_id
353
+ # Optional. An optional request ID to identify requests. Specify a unique
354
+ # request ID so that if you must retry your request, the server will know to
355
+ # ignore the request if it has already been completed. The server will guarantee
356
+ # that for at least 60 minutes since the first request. For example, consider a
357
+ # situation where you make an initial request and the request times out. If you
358
+ # make the request again with the same request ID, the server can check if
359
+ # original operation with the same request ID was received, and if so, will
360
+ # ignore the second request. This prevents clients from accidentally creating
361
+ # duplicate commitments. The request ID must be a valid UUID with the exception
362
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
363
+ # @param [String] update_mask
364
+ # Required. Field mask is used to specify the fields to be overwritten in the
365
+ # Collector resource by the update. The fields specified in the update_mask are
366
+ # relative to the resource, not the full request. A field will be overwritten if
367
+ # it is in the mask. If the user does not provide a mask then all fields will be
368
+ # overwritten.
369
+ # @param [String] fields
370
+ # Selector specifying which fields to include in a partial response.
371
+ # @param [String] quota_user
372
+ # Available to use for quota purposes for server-side applications. Can be any
373
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
374
+ # @param [Google::Apis::RequestOptions] options
375
+ # Request-specific options
376
+ #
377
+ # @yield [result, err] Result & error if block supplied
378
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Operation] parsed result object
379
+ # @yieldparam err [StandardError] error object if request failed
380
+ #
381
+ # @return [Google::Apis::RapidmigrationassessmentV1::Operation]
382
+ #
383
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
384
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
385
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
386
+ def patch_project_location_collector(name, collector_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
387
+ command = make_simple_command(:patch, 'v1/{+name}', options)
388
+ command.request_representation = Google::Apis::RapidmigrationassessmentV1::Collector::Representation
389
+ command.request_object = collector_object
390
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Operation::Representation
391
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Operation
392
+ command.params['name'] = name unless name.nil?
393
+ command.query['requestId'] = request_id unless request_id.nil?
394
+ command.query['updateMask'] = update_mask unless update_mask.nil?
395
+ command.query['fields'] = fields unless fields.nil?
396
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
397
+ execute_or_queue_command(command, &block)
398
+ end
399
+
400
+ # Pauses the given collector.
401
+ # @param [String] name
402
+ # Required. Name of the resource.
403
+ # @param [Google::Apis::RapidmigrationassessmentV1::PauseCollectorRequest] pause_collector_request_object
404
+ # @param [String] fields
405
+ # Selector specifying which fields to include in a partial response.
406
+ # @param [String] quota_user
407
+ # Available to use for quota purposes for server-side applications. Can be any
408
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
409
+ # @param [Google::Apis::RequestOptions] options
410
+ # Request-specific options
411
+ #
412
+ # @yield [result, err] Result & error if block supplied
413
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Operation] parsed result object
414
+ # @yieldparam err [StandardError] error object if request failed
415
+ #
416
+ # @return [Google::Apis::RapidmigrationassessmentV1::Operation]
417
+ #
418
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
419
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
420
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
421
+ def pause_collector(name, pause_collector_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
422
+ command = make_simple_command(:post, 'v1/{+name}:pause', options)
423
+ command.request_representation = Google::Apis::RapidmigrationassessmentV1::PauseCollectorRequest::Representation
424
+ command.request_object = pause_collector_request_object
425
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Operation::Representation
426
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Operation
427
+ command.params['name'] = name unless name.nil?
428
+ command.query['fields'] = fields unless fields.nil?
429
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
430
+ execute_or_queue_command(command, &block)
431
+ end
432
+
433
+ # Registers the given collector.
434
+ # @param [String] name
435
+ # Required. Name of the resource.
436
+ # @param [Google::Apis::RapidmigrationassessmentV1::RegisterCollectorRequest] register_collector_request_object
437
+ # @param [String] fields
438
+ # Selector specifying which fields to include in a partial response.
439
+ # @param [String] quota_user
440
+ # Available to use for quota purposes for server-side applications. Can be any
441
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
442
+ # @param [Google::Apis::RequestOptions] options
443
+ # Request-specific options
444
+ #
445
+ # @yield [result, err] Result & error if block supplied
446
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Operation] parsed result object
447
+ # @yieldparam err [StandardError] error object if request failed
448
+ #
449
+ # @return [Google::Apis::RapidmigrationassessmentV1::Operation]
450
+ #
451
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
452
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
453
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
454
+ def register_collector(name, register_collector_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
455
+ command = make_simple_command(:post, 'v1/{+name}:register', options)
456
+ command.request_representation = Google::Apis::RapidmigrationassessmentV1::RegisterCollectorRequest::Representation
457
+ command.request_object = register_collector_request_object
458
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Operation::Representation
459
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Operation
460
+ command.params['name'] = name unless name.nil?
461
+ command.query['fields'] = fields unless fields.nil?
462
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
463
+ execute_or_queue_command(command, &block)
464
+ end
465
+
466
+ # Resumes the given collector.
467
+ # @param [String] name
468
+ # Required. Name of the resource.
469
+ # @param [Google::Apis::RapidmigrationassessmentV1::ResumeCollectorRequest] resume_collector_request_object
470
+ # @param [String] fields
471
+ # Selector specifying which fields to include in a partial response.
472
+ # @param [String] quota_user
473
+ # Available to use for quota purposes for server-side applications. Can be any
474
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
475
+ # @param [Google::Apis::RequestOptions] options
476
+ # Request-specific options
477
+ #
478
+ # @yield [result, err] Result & error if block supplied
479
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Operation] parsed result object
480
+ # @yieldparam err [StandardError] error object if request failed
481
+ #
482
+ # @return [Google::Apis::RapidmigrationassessmentV1::Operation]
483
+ #
484
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
485
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
486
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
487
+ def resume_collector(name, resume_collector_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
488
+ command = make_simple_command(:post, 'v1/{+name}:resume', options)
489
+ command.request_representation = Google::Apis::RapidmigrationassessmentV1::ResumeCollectorRequest::Representation
490
+ command.request_object = resume_collector_request_object
491
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Operation::Representation
492
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Operation
493
+ command.params['name'] = name unless name.nil?
494
+ command.query['fields'] = fields unless fields.nil?
495
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
496
+ execute_or_queue_command(command, &block)
497
+ end
498
+
499
+ # Starts asynchronous cancellation on a long-running operation. The server makes
500
+ # a best effort to cancel the operation, but success is not guaranteed. If the
501
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
502
+ # Clients can use Operations.GetOperation or other methods to check whether the
503
+ # cancellation succeeded or whether the operation completed despite cancellation.
504
+ # On successful cancellation, the operation is not deleted; instead, it becomes
505
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
506
+ # corresponding to `Code.CANCELLED`.
507
+ # @param [String] name
508
+ # The name of the operation resource to be cancelled.
509
+ # @param [Google::Apis::RapidmigrationassessmentV1::CancelOperationRequest] cancel_operation_request_object
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::RapidmigrationassessmentV1::Empty] parsed result object
520
+ # @yieldparam err [StandardError] error object if request failed
521
+ #
522
+ # @return [Google::Apis::RapidmigrationassessmentV1::Empty]
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 cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
528
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
529
+ command.request_representation = Google::Apis::RapidmigrationassessmentV1::CancelOperationRequest::Representation
530
+ command.request_object = cancel_operation_request_object
531
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Empty::Representation
532
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Empty
533
+ command.params['name'] = name unless name.nil?
534
+ command.query['fields'] = fields unless fields.nil?
535
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
536
+ execute_or_queue_command(command, &block)
537
+ end
538
+
539
+ # Deletes a long-running operation. This method indicates that the client is no
540
+ # longer interested in the operation result. It does not cancel the operation.
541
+ # If the server doesn't support this method, it returns `google.rpc.Code.
542
+ # UNIMPLEMENTED`.
543
+ # @param [String] name
544
+ # The name of the operation resource to be deleted.
545
+ # @param [String] fields
546
+ # Selector specifying which fields to include in a partial response.
547
+ # @param [String] quota_user
548
+ # Available to use for quota purposes for server-side applications. Can be any
549
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
550
+ # @param [Google::Apis::RequestOptions] options
551
+ # Request-specific options
552
+ #
553
+ # @yield [result, err] Result & error if block supplied
554
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::Empty] parsed result object
555
+ # @yieldparam err [StandardError] error object if request failed
556
+ #
557
+ # @return [Google::Apis::RapidmigrationassessmentV1::Empty]
558
+ #
559
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
560
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
561
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
562
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
563
+ command = make_simple_command(:delete, 'v1/{+name}', options)
564
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Empty::Representation
565
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Empty
566
+ command.params['name'] = name unless name.nil?
567
+ command.query['fields'] = fields unless fields.nil?
568
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
569
+ execute_or_queue_command(command, &block)
570
+ end
571
+
572
+ # Gets the latest state of a long-running operation. Clients can use this method
573
+ # to poll the operation result at intervals as recommended by the API service.
574
+ # @param [String] name
575
+ # The name of the operation resource.
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::RapidmigrationassessmentV1::Operation] parsed result object
586
+ # @yieldparam err [StandardError] error object if request failed
587
+ #
588
+ # @return [Google::Apis::RapidmigrationassessmentV1::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 get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
594
+ command = make_simple_command(:get, 'v1/{+name}', options)
595
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::Operation::Representation
596
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::Operation
597
+ command.params['name'] = name unless name.nil?
598
+ command.query['fields'] = fields unless fields.nil?
599
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
600
+ execute_or_queue_command(command, &block)
601
+ end
602
+
603
+ # Lists operations that match the specified filter in the request. If the server
604
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
605
+ # @param [String] name
606
+ # The name of the operation's parent resource.
607
+ # @param [String] filter
608
+ # The standard list filter.
609
+ # @param [Fixnum] page_size
610
+ # The standard list page size.
611
+ # @param [String] page_token
612
+ # The standard list page token.
613
+ # @param [String] fields
614
+ # Selector specifying which fields to include in a partial response.
615
+ # @param [String] quota_user
616
+ # Available to use for quota purposes for server-side applications. Can be any
617
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
618
+ # @param [Google::Apis::RequestOptions] options
619
+ # Request-specific options
620
+ #
621
+ # @yield [result, err] Result & error if block supplied
622
+ # @yieldparam result [Google::Apis::RapidmigrationassessmentV1::ListOperationsResponse] parsed result object
623
+ # @yieldparam err [StandardError] error object if request failed
624
+ #
625
+ # @return [Google::Apis::RapidmigrationassessmentV1::ListOperationsResponse]
626
+ #
627
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
628
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
629
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
630
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
631
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
632
+ command.response_representation = Google::Apis::RapidmigrationassessmentV1::ListOperationsResponse::Representation
633
+ command.response_class = Google::Apis::RapidmigrationassessmentV1::ListOperationsResponse
634
+ command.params['name'] = name unless name.nil?
635
+ command.query['filter'] = filter unless filter.nil?
636
+ command.query['pageSize'] = page_size unless page_size.nil?
637
+ command.query['pageToken'] = page_token unless page_token.nil?
638
+ command.query['fields'] = fields unless fields.nil?
639
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
640
+ execute_or_queue_command(command, &block)
641
+ end
642
+
643
+ protected
644
+
645
+ def apply_command_defaults(command)
646
+ command.query['key'] = key unless key.nil?
647
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
648
+ end
649
+ end
650
+ end
651
+ end
652
+ end