google-cloud-pubsub-v1 0.6.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +1 -1
- data/lib/google/cloud/pubsub/v1/iam_policy/client.rb +60 -9
- data/lib/google/cloud/pubsub/v1/publisher/client.rb +186 -27
- data/lib/google/cloud/pubsub/v1/schema_service/client.rb +126 -18
- data/lib/google/cloud/pubsub/v1/subscriber/client.rb +349 -46
- data/lib/google/cloud/pubsub/v1/version.rb +1 -1
- data/lib/google/pubsub/v1/pubsub_pb.rb +17 -2
- data/lib/google/pubsub/v1/pubsub_services_pb.rb +2 -2
- data/lib/google/pubsub/v1/schema_pb.rb +2 -2
- data/lib/google/pubsub/v1/schema_services_pb.rb +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/pubsub/v1/pubsub.rb +55 -0
- metadata +3 -3
@@ -186,6 +186,21 @@ module Google
|
|
186
186
|
#
|
187
187
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
188
188
|
#
|
189
|
+
# @example Basic example
|
190
|
+
# require "google/cloud/pubsub/v1"
|
191
|
+
#
|
192
|
+
# # Create a client object. The client can be reused for multiple calls.
|
193
|
+
# client = Google::Cloud::PubSub::V1::SchemaService::Client.new
|
194
|
+
#
|
195
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
196
|
+
# request = Google::Cloud::PubSub::V1::CreateSchemaRequest.new
|
197
|
+
#
|
198
|
+
# # Call the create_schema method.
|
199
|
+
# result = client.create_schema request
|
200
|
+
#
|
201
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::Schema.
|
202
|
+
# p result
|
203
|
+
#
|
189
204
|
def create_schema request, options = nil
|
190
205
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
191
206
|
|
@@ -203,9 +218,11 @@ module Google
|
|
203
218
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
204
219
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
205
220
|
|
206
|
-
header_params = {
|
207
|
-
|
208
|
-
|
221
|
+
header_params = {}
|
222
|
+
if request.parent
|
223
|
+
header_params["parent"] = request.parent
|
224
|
+
end
|
225
|
+
|
209
226
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
210
227
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
211
228
|
|
@@ -259,6 +276,21 @@ module Google
|
|
259
276
|
#
|
260
277
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
261
278
|
#
|
279
|
+
# @example Basic example
|
280
|
+
# require "google/cloud/pubsub/v1"
|
281
|
+
#
|
282
|
+
# # Create a client object. The client can be reused for multiple calls.
|
283
|
+
# client = Google::Cloud::PubSub::V1::SchemaService::Client.new
|
284
|
+
#
|
285
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
286
|
+
# request = Google::Cloud::PubSub::V1::GetSchemaRequest.new
|
287
|
+
#
|
288
|
+
# # Call the get_schema method.
|
289
|
+
# result = client.get_schema request
|
290
|
+
#
|
291
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::Schema.
|
292
|
+
# p result
|
293
|
+
#
|
262
294
|
def get_schema request, options = nil
|
263
295
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
264
296
|
|
@@ -276,9 +308,11 @@ module Google
|
|
276
308
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
277
309
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
278
310
|
|
279
|
-
header_params = {
|
280
|
-
|
281
|
-
|
311
|
+
header_params = {}
|
312
|
+
if request.name
|
313
|
+
header_params["name"] = request.name
|
314
|
+
end
|
315
|
+
|
282
316
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
283
317
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
284
318
|
|
@@ -338,6 +372,27 @@ module Google
|
|
338
372
|
#
|
339
373
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
340
374
|
#
|
375
|
+
# @example Basic example
|
376
|
+
# require "google/cloud/pubsub/v1"
|
377
|
+
#
|
378
|
+
# # Create a client object. The client can be reused for multiple calls.
|
379
|
+
# client = Google::Cloud::PubSub::V1::SchemaService::Client.new
|
380
|
+
#
|
381
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
382
|
+
# request = Google::Cloud::PubSub::V1::ListSchemasRequest.new
|
383
|
+
#
|
384
|
+
# # Call the list_schemas method.
|
385
|
+
# result = client.list_schemas request
|
386
|
+
#
|
387
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
388
|
+
# # iterate over all elements by calling #each, and the enumerable
|
389
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
390
|
+
# # methods are also available for managing paging directly.
|
391
|
+
# result.each do |response|
|
392
|
+
# # Each element is of type ::Google::Cloud::PubSub::V1::Schema.
|
393
|
+
# p response
|
394
|
+
# end
|
395
|
+
#
|
341
396
|
def list_schemas request, options = nil
|
342
397
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
343
398
|
|
@@ -355,9 +410,11 @@ module Google
|
|
355
410
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
356
411
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
357
412
|
|
358
|
-
header_params = {
|
359
|
-
|
360
|
-
|
413
|
+
header_params = {}
|
414
|
+
if request.parent
|
415
|
+
header_params["parent"] = request.parent
|
416
|
+
end
|
417
|
+
|
361
418
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
362
419
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
363
420
|
|
@@ -408,6 +465,21 @@ module Google
|
|
408
465
|
#
|
409
466
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
410
467
|
#
|
468
|
+
# @example Basic example
|
469
|
+
# require "google/cloud/pubsub/v1"
|
470
|
+
#
|
471
|
+
# # Create a client object. The client can be reused for multiple calls.
|
472
|
+
# client = Google::Cloud::PubSub::V1::SchemaService::Client.new
|
473
|
+
#
|
474
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
475
|
+
# request = Google::Cloud::PubSub::V1::DeleteSchemaRequest.new
|
476
|
+
#
|
477
|
+
# # Call the delete_schema method.
|
478
|
+
# result = client.delete_schema request
|
479
|
+
#
|
480
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
481
|
+
# p result
|
482
|
+
#
|
411
483
|
def delete_schema request, options = nil
|
412
484
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
413
485
|
|
@@ -425,9 +497,11 @@ module Google
|
|
425
497
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
426
498
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
427
499
|
|
428
|
-
header_params = {
|
429
|
-
|
430
|
-
|
500
|
+
header_params = {}
|
501
|
+
if request.name
|
502
|
+
header_params["name"] = request.name
|
503
|
+
end
|
504
|
+
|
431
505
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
432
506
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
433
507
|
|
@@ -479,6 +553,21 @@ module Google
|
|
479
553
|
#
|
480
554
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
481
555
|
#
|
556
|
+
# @example Basic example
|
557
|
+
# require "google/cloud/pubsub/v1"
|
558
|
+
#
|
559
|
+
# # Create a client object. The client can be reused for multiple calls.
|
560
|
+
# client = Google::Cloud::PubSub::V1::SchemaService::Client.new
|
561
|
+
#
|
562
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
563
|
+
# request = Google::Cloud::PubSub::V1::ValidateSchemaRequest.new
|
564
|
+
#
|
565
|
+
# # Call the validate_schema method.
|
566
|
+
# result = client.validate_schema request
|
567
|
+
#
|
568
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::ValidateSchemaResponse.
|
569
|
+
# p result
|
570
|
+
#
|
482
571
|
def validate_schema request, options = nil
|
483
572
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
484
573
|
|
@@ -496,9 +585,11 @@ module Google
|
|
496
585
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
497
586
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
498
587
|
|
499
|
-
header_params = {
|
500
|
-
|
501
|
-
|
588
|
+
header_params = {}
|
589
|
+
if request.parent
|
590
|
+
header_params["parent"] = request.parent
|
591
|
+
end
|
592
|
+
|
502
593
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
503
594
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
504
595
|
|
@@ -558,6 +649,21 @@ module Google
|
|
558
649
|
#
|
559
650
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
560
651
|
#
|
652
|
+
# @example Basic example
|
653
|
+
# require "google/cloud/pubsub/v1"
|
654
|
+
#
|
655
|
+
# # Create a client object. The client can be reused for multiple calls.
|
656
|
+
# client = Google::Cloud::PubSub::V1::SchemaService::Client.new
|
657
|
+
#
|
658
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
659
|
+
# request = Google::Cloud::PubSub::V1::ValidateMessageRequest.new
|
660
|
+
#
|
661
|
+
# # Call the validate_message method.
|
662
|
+
# result = client.validate_message request
|
663
|
+
#
|
664
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::ValidateMessageResponse.
|
665
|
+
# p result
|
666
|
+
#
|
561
667
|
def validate_message request, options = nil
|
562
668
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
563
669
|
|
@@ -575,9 +681,11 @@ module Google
|
|
575
681
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
576
682
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
577
683
|
|
578
|
-
header_params = {
|
579
|
-
|
580
|
-
|
684
|
+
header_params = {}
|
685
|
+
if request.parent
|
686
|
+
header_params["parent"] = request.parent
|
687
|
+
end
|
688
|
+
|
581
689
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
582
690
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
583
691
|
|