google-cloud-resource_manager-v3 0.1.0 → 0.1.1

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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/resource_manager/v3/folders/client.rb +254 -24
  3. data/lib/google/cloud/resource_manager/v3/folders/operations.rb +115 -12
  4. data/lib/google/cloud/resource_manager/v3/organizations/client.rb +103 -13
  5. data/lib/google/cloud/resource_manager/v3/projects/client.rb +254 -24
  6. data/lib/google/cloud/resource_manager/v3/projects/operations.rb +115 -12
  7. data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +70 -3
  8. data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +115 -12
  9. data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +177 -18
  10. data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +115 -12
  11. data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +177 -18
  12. data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +115 -12
  13. data/lib/google/cloud/resource_manager/v3/version.rb +1 -1
  14. data/lib/google/cloud/resourcemanager/v3/folders_pb.rb +2 -2
  15. data/lib/google/cloud/resourcemanager/v3/folders_services_pb.rb +1 -1
  16. data/lib/google/cloud/resourcemanager/v3/organizations_pb.rb +2 -2
  17. data/lib/google/cloud/resourcemanager/v3/organizations_services_pb.rb +1 -1
  18. data/lib/google/cloud/resourcemanager/v3/projects_pb.rb +2 -2
  19. data/lib/google/cloud/resourcemanager/v3/projects_services_pb.rb +1 -1
  20. data/lib/google/cloud/resourcemanager/v3/tag_bindings_pb.rb +2 -2
  21. data/lib/google/cloud/resourcemanager/v3/tag_bindings_services_pb.rb +1 -1
  22. data/lib/google/cloud/resourcemanager/v3/tag_keys_pb.rb +2 -2
  23. data/lib/google/cloud/resourcemanager/v3/tag_keys_services_pb.rb +1 -1
  24. data/lib/google/cloud/resourcemanager/v3/tag_values_pb.rb +2 -2
  25. data/lib/google/cloud/resourcemanager/v3/tag_values_services_pb.rb +1 -1
  26. data/proto_docs/google/cloud/resourcemanager/v3/folders.rb +2 -0
  27. data/proto_docs/google/cloud/resourcemanager/v3/organizations.rb +2 -1
  28. data/proto_docs/google/cloud/resourcemanager/v3/projects.rb +2 -0
  29. metadata +2 -2
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
@@ -208,6 +208,27 @@ module Google
208
208
  #
209
209
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
210
210
  #
211
+ # @example Basic example
212
+ # require "google/cloud/resource_manager/v3"
213
+ #
214
+ # # Create a client object. The client can be reused for multiple calls.
215
+ # client = Google::Cloud::ResourceManager::V3::TagBindings::Client.new
216
+ #
217
+ # # Create a request. To set request fields, pass in keyword arguments.
218
+ # request = Google::Cloud::ResourceManager::V3::ListTagBindingsRequest.new
219
+ #
220
+ # # Call the list_tag_bindings method.
221
+ # result = client.list_tag_bindings request
222
+ #
223
+ # # The returned object is of type Gapic::PagedEnumerable. You can
224
+ # # iterate over all elements by calling #each, and the enumerable
225
+ # # will lazily make API calls to fetch subsequent pages. Other
226
+ # # methods are also available for managing paging directly.
227
+ # result.each do |response|
228
+ # # Each element is of type ::Google::Cloud::ResourceManager::V3::TagBinding.
229
+ # p response
230
+ # end
231
+ #
211
232
  def list_tag_bindings request, options = nil
212
233
  raise ::ArgumentError, "request must be provided" if request.nil?
213
234
 
@@ -275,6 +296,28 @@ module Google
275
296
  #
276
297
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
277
298
  #
299
+ # @example Basic example
300
+ # require "google/cloud/resource_manager/v3"
301
+ #
302
+ # # Create a client object. The client can be reused for multiple calls.
303
+ # client = Google::Cloud::ResourceManager::V3::TagBindings::Client.new
304
+ #
305
+ # # Create a request. To set request fields, pass in keyword arguments.
306
+ # request = Google::Cloud::ResourceManager::V3::CreateTagBindingRequest.new
307
+ #
308
+ # # Call the create_tag_binding method.
309
+ # result = client.create_tag_binding request
310
+ #
311
+ # # The returned object is of type Gapic::Operation. You can use this
312
+ # # object to check the status of an operation, cancel it, or wait
313
+ # # for results. Here is how to block until completion:
314
+ # result.wait_until_done! timeout: 60
315
+ # if result.response?
316
+ # p result.response
317
+ # else
318
+ # puts "Error!"
319
+ # end
320
+ #
278
321
  def create_tag_binding request, options = nil
279
322
  raise ::ArgumentError, "request must be provided" if request.nil?
280
323
 
@@ -340,6 +383,28 @@ module Google
340
383
  #
341
384
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
342
385
  #
386
+ # @example Basic example
387
+ # require "google/cloud/resource_manager/v3"
388
+ #
389
+ # # Create a client object. The client can be reused for multiple calls.
390
+ # client = Google::Cloud::ResourceManager::V3::TagBindings::Client.new
391
+ #
392
+ # # Create a request. To set request fields, pass in keyword arguments.
393
+ # request = Google::Cloud::ResourceManager::V3::DeleteTagBindingRequest.new
394
+ #
395
+ # # Call the delete_tag_binding method.
396
+ # result = client.delete_tag_binding request
397
+ #
398
+ # # The returned object is of type Gapic::Operation. You can use this
399
+ # # object to check the status of an operation, cancel it, or wait
400
+ # # for results. Here is how to block until completion:
401
+ # result.wait_until_done! timeout: 60
402
+ # if result.response?
403
+ # p result.response
404
+ # else
405
+ # puts "Error!"
406
+ # end
407
+ #
343
408
  def delete_tag_binding request, options = nil
344
409
  raise ::ArgumentError, "request must be provided" if request.nil?
345
410
 
@@ -357,9 +422,11 @@ module Google
357
422
  gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
358
423
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
359
424
 
360
- header_params = {
361
- "name" => request.name
362
- }
425
+ header_params = {}
426
+ if request.name
427
+ header_params["name"] = request.name
428
+ end
429
+
363
430
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
364
431
  metadata[:"x-goog-request-params"] ||= request_params_header
365
432
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552