google-cloud-service_usage-v1 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bbccb18517f1b0b49d58328c88d2087e90a10405e1adbb1f0fe56ce7fb0a790
4
- data.tar.gz: 95c245cfaae16dbb6dd0982fa5d1b3605c0ab6b1c169ef1bfb7c071b19daba28
3
+ metadata.gz: 4a1bbefae085880bcea6befa39daf9db84ae590de19ecfa60a279a4c64488edf
4
+ data.tar.gz: c189260d7d51a348fbc1cfcc5c6508f01d088729bdc8654d00829f0acac2a4e0
5
5
  SHA512:
6
- metadata.gz: bc2f319ba8762fbad74693bc5458ca2e995a34b5e1f93a95f2f57de93c24333b2a99dfa83b1d21583dabc06efb1b4cd85005016f8de02945fb94657a5daf42f9
7
- data.tar.gz: 5c0169dd8c4b2b7447f8120abfc47f81db51b9d727fab372d6ab92ca5848d582e9fd6e8dc4064b3598211ebf5cf7017ca182798c0eea15ed57d8030341a42213
6
+ metadata.gz: 1c3873b53d84f3b81a74f5c02e605d5c30ca1ba9e86176764718f20470e991f4cf2c34331b63cbb95ad86584f3c2991b3218d227845b4a62146be3ac326752aa
7
+ data.tar.gz: 9c5534fbcd4c3c2d69fe0f15c9ce5725b77c60f878b87e95e6916e8523178837506f7fdb856121db940ad13563032ee643f5247dd4e1139fe9aa0ad6fda0fb24
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/serviceusage/v1/resources.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/auth_pb'
7
5
  require 'google/api/documentation_pb'
8
6
  require 'google/api/endpoint_pb'
@@ -12,6 +10,8 @@ require 'google/api/quota_pb'
12
10
  require 'google/api/usage_pb'
13
11
  require 'google/protobuf/api_pb'
14
12
  require 'google/api/annotations_pb'
13
+ require 'google/protobuf'
14
+
15
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
16
  add_file("google/api/serviceusage/v1/resources.proto", :syntax => :proto3) do
17
17
  add_message "google.api.serviceusage.v1.Service" do
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/serviceusage/v1/serviceusage.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/serviceusage/v1/resources_pb'
8
6
  require 'google/longrunning/operations_pb'
9
7
  require 'google/api/client_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/api/serviceusage/v1/serviceusage.proto", :syntax => :proto3) do
12
12
  add_message "google.api.serviceusage.v1.EnableServiceRequest" do
@@ -31,7 +31,7 @@ module Google
31
31
  # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview)
32
32
  class Service
33
33
 
34
- include GRPC::GenericService
34
+ include ::GRPC::GenericService
35
35
 
36
36
  self.marshal_class_method = :encode
37
37
  self.unmarshal_class_method = :decode
@@ -199,6 +199,28 @@ module Google
199
199
  #
200
200
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
201
201
  #
202
+ # @example Basic example
203
+ # require "google/cloud/service_usage/v1"
204
+ #
205
+ # # Create a client object. The client can be reused for multiple calls.
206
+ # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new
207
+ #
208
+ # # Create a request. To set request fields, pass in keyword arguments.
209
+ # request = Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new
210
+ #
211
+ # # Call the enable_service method.
212
+ # result = client.enable_service request
213
+ #
214
+ # # The returned object is of type Gapic::Operation. You can use this
215
+ # # object to check the status of an operation, cancel it, or wait
216
+ # # for results. Here is how to block until completion:
217
+ # result.wait_until_done! timeout: 60
218
+ # if result.response?
219
+ # p result.response
220
+ # else
221
+ # puts "Error!"
222
+ # end
223
+ #
202
224
  def enable_service request, options = nil
203
225
  raise ::ArgumentError, "request must be provided" if request.nil?
204
226
 
@@ -216,9 +238,11 @@ module Google
216
238
  gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION
217
239
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
218
240
 
219
- header_params = {
220
- "name" => request.name
221
- }
241
+ header_params = {}
242
+ if request.name
243
+ header_params["name"] = request.name
244
+ end
245
+
222
246
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
223
247
  metadata[:"x-goog-request-params"] ||= request_params_header
224
248
 
@@ -288,6 +312,28 @@ module Google
288
312
  #
289
313
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
290
314
  #
315
+ # @example Basic example
316
+ # require "google/cloud/service_usage/v1"
317
+ #
318
+ # # Create a client object. The client can be reused for multiple calls.
319
+ # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new
320
+ #
321
+ # # Create a request. To set request fields, pass in keyword arguments.
322
+ # request = Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new
323
+ #
324
+ # # Call the disable_service method.
325
+ # result = client.disable_service request
326
+ #
327
+ # # The returned object is of type Gapic::Operation. You can use this
328
+ # # object to check the status of an operation, cancel it, or wait
329
+ # # for results. Here is how to block until completion:
330
+ # result.wait_until_done! timeout: 60
331
+ # if result.response?
332
+ # p result.response
333
+ # else
334
+ # puts "Error!"
335
+ # end
336
+ #
291
337
  def disable_service request, options = nil
292
338
  raise ::ArgumentError, "request must be provided" if request.nil?
293
339
 
@@ -305,9 +351,11 @@ module Google
305
351
  gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION
306
352
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
307
353
 
308
- header_params = {
309
- "name" => request.name
310
- }
354
+ header_params = {}
355
+ if request.name
356
+ header_params["name"] = request.name
357
+ end
358
+
311
359
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
312
360
  metadata[:"x-goog-request-params"] ||= request_params_header
313
361
 
@@ -361,6 +409,21 @@ module Google
361
409
  #
362
410
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
363
411
  #
412
+ # @example Basic example
413
+ # require "google/cloud/service_usage/v1"
414
+ #
415
+ # # Create a client object. The client can be reused for multiple calls.
416
+ # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new
417
+ #
418
+ # # Create a request. To set request fields, pass in keyword arguments.
419
+ # request = Google::Cloud::ServiceUsage::V1::GetServiceRequest.new
420
+ #
421
+ # # Call the get_service method.
422
+ # result = client.get_service request
423
+ #
424
+ # # The returned object is of type Google::Cloud::ServiceUsage::V1::Service.
425
+ # p result
426
+ #
364
427
  def get_service request, options = nil
365
428
  raise ::ArgumentError, "request must be provided" if request.nil?
366
429
 
@@ -378,9 +441,11 @@ module Google
378
441
  gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION
379
442
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
380
443
 
381
- header_params = {
382
- "name" => request.name
383
- }
444
+ header_params = {}
445
+ if request.name
446
+ header_params["name"] = request.name
447
+ end
448
+
384
449
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
385
450
  metadata[:"x-goog-request-params"] ||= request_params_header
386
451
 
@@ -438,7 +503,7 @@ module Google
438
503
  # @param page_size [::Integer]
439
504
  # Requested size of the next page of data.
440
505
  # Requested page size cannot exceed 200.
441
- # If not set, the default page size is 50.
506
+ # If not set, the default page size is 50.
442
507
  # @param page_token [::String]
443
508
  # Token identifying which result to start with, which is returned by a
444
509
  # previous list call.
@@ -454,6 +519,27 @@ module Google
454
519
  #
455
520
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
456
521
  #
522
+ # @example Basic example
523
+ # require "google/cloud/service_usage/v1"
524
+ #
525
+ # # Create a client object. The client can be reused for multiple calls.
526
+ # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new
527
+ #
528
+ # # Create a request. To set request fields, pass in keyword arguments.
529
+ # request = Google::Cloud::ServiceUsage::V1::ListServicesRequest.new
530
+ #
531
+ # # Call the list_services method.
532
+ # result = client.list_services request
533
+ #
534
+ # # The returned object is of type Gapic::PagedEnumerable. You can
535
+ # # iterate over all elements by calling #each, and the enumerable
536
+ # # will lazily make API calls to fetch subsequent pages. Other
537
+ # # methods are also available for managing paging directly.
538
+ # result.each do |response|
539
+ # # Each element is of type ::Google::Cloud::ServiceUsage::V1::Service.
540
+ # p response
541
+ # end
542
+ #
457
543
  def list_services request, options = nil
458
544
  raise ::ArgumentError, "request must be provided" if request.nil?
459
545
 
@@ -471,9 +557,11 @@ module Google
471
557
  gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION
472
558
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
473
559
 
474
- header_params = {
475
- "parent" => request.parent
476
- }
560
+ header_params = {}
561
+ if request.parent
562
+ header_params["parent"] = request.parent
563
+ end
564
+
477
565
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
478
566
  metadata[:"x-goog-request-params"] ||= request_params_header
479
567
 
@@ -542,6 +630,28 @@ module Google
542
630
  #
543
631
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
544
632
  #
633
+ # @example Basic example
634
+ # require "google/cloud/service_usage/v1"
635
+ #
636
+ # # Create a client object. The client can be reused for multiple calls.
637
+ # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new
638
+ #
639
+ # # Create a request. To set request fields, pass in keyword arguments.
640
+ # request = Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new
641
+ #
642
+ # # Call the batch_enable_services method.
643
+ # result = client.batch_enable_services request
644
+ #
645
+ # # The returned object is of type Gapic::Operation. You can use this
646
+ # # object to check the status of an operation, cancel it, or wait
647
+ # # for results. Here is how to block until completion:
648
+ # result.wait_until_done! timeout: 60
649
+ # if result.response?
650
+ # p result.response
651
+ # else
652
+ # puts "Error!"
653
+ # end
654
+ #
545
655
  def batch_enable_services request, options = nil
546
656
  raise ::ArgumentError, "request must be provided" if request.nil?
547
657
 
@@ -559,9 +669,11 @@ module Google
559
669
  gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION
560
670
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
561
671
 
562
- header_params = {
563
- "parent" => request.parent
564
- }
672
+ header_params = {}
673
+ if request.parent
674
+ header_params["parent"] = request.parent
675
+ end
676
+
565
677
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
566
678
  metadata[:"x-goog-request-params"] ||= request_params_header
567
679
 
@@ -623,6 +735,21 @@ module Google
623
735
  #
624
736
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
625
737
  #
738
+ # @example Basic example
739
+ # require "google/cloud/service_usage/v1"
740
+ #
741
+ # # Create a client object. The client can be reused for multiple calls.
742
+ # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new
743
+ #
744
+ # # Create a request. To set request fields, pass in keyword arguments.
745
+ # request = Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new
746
+ #
747
+ # # Call the batch_get_services method.
748
+ # result = client.batch_get_services request
749
+ #
750
+ # # The returned object is of type Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse.
751
+ # p result
752
+ #
626
753
  def batch_get_services request, options = nil
627
754
  raise ::ArgumentError, "request must be provided" if request.nil?
628
755
 
@@ -640,9 +767,11 @@ module Google
640
767
  gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION
641
768
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
642
769
 
643
- header_params = {
644
- "parent" => request.parent
645
- }
770
+ header_params = {}
771
+ if request.parent
772
+ header_params["parent"] = request.parent
773
+ end
774
+
646
775
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
647
776
  metadata[:"x-goog-request-params"] ||= request_params_header
648
777
 
@@ -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::ServiceUsage::V1::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::ServiceUsage::V1::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::ServiceUsage::V1::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::ServiceUsage::V1::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
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ServiceUsage
23
23
  module V1
24
- VERSION = "0.1.2"
24
+ VERSION = "0.1.3"
25
25
  end
26
26
  end
27
27
  end
@@ -126,7 +126,7 @@ module Google
126
126
  # @return [::Integer]
127
127
  # Requested size of the next page of data.
128
128
  # Requested page size cannot exceed 200.
129
- # If not set, the default page size is 50.
129
+ # If not set, the default page size is 50.
130
130
  # @!attribute [rw] page_token
131
131
  # @return [::String]
132
132
  # Token identifying which result to start with, which is returned by a
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-service_usage-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-11 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common