google-cloud-pubsub-v1 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +336 -45
- data/lib/google/cloud/pubsub/v1/version.rb +1 -1
- data/lib/google/pubsub/v1/pubsub_pb.rb +2 -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
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d56cc17594032fd9f7922440bb1e361788d9fb761af4f97818b094715bf2e75a
|
4
|
+
data.tar.gz: f112e0ff2369f89d662c02b1cebc913b9096c88ddb5c13df3c1c19d7d71e6c0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b72839c23b21ae5b20db0abecf75199238ce0e2808fe75774fe3199ab65e08243e32dae9698a02f9da531f6204f72d67afd781ac05d5209cab35673e3df6a8d
|
7
|
+
data.tar.gz: 3bd6d52b3e4cd305275056d9ddcdb9710d9a56e957da8e030e1d1b7d8eede13cff168537e1cfdcc84bfd8d8ac9e69cdb7fc62c148e31e985f304522a62ebe26b
|
@@ -202,6 +202,21 @@ module Google
|
|
202
202
|
#
|
203
203
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
204
204
|
#
|
205
|
+
# @example Basic example
|
206
|
+
# require "google/iam/v1"
|
207
|
+
#
|
208
|
+
# # Create a client object. The client can be reused for multiple calls.
|
209
|
+
# client = Google::Cloud::PubSub::V1::IAMPolicy::Client.new
|
210
|
+
#
|
211
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
212
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
213
|
+
#
|
214
|
+
# # Call the set_iam_policy method.
|
215
|
+
# result = client.set_iam_policy request
|
216
|
+
#
|
217
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
218
|
+
# p result
|
219
|
+
#
|
205
220
|
def set_iam_policy request, options = nil
|
206
221
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
207
222
|
|
@@ -219,9 +234,11 @@ module Google
|
|
219
234
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
220
235
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
221
236
|
|
222
|
-
header_params = {
|
223
|
-
|
224
|
-
|
237
|
+
header_params = {}
|
238
|
+
if request.resource
|
239
|
+
header_params["resource"] = request.resource
|
240
|
+
end
|
241
|
+
|
225
242
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
226
243
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
227
244
|
|
@@ -276,6 +293,21 @@ module Google
|
|
276
293
|
#
|
277
294
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
278
295
|
#
|
296
|
+
# @example Basic example
|
297
|
+
# require "google/iam/v1"
|
298
|
+
#
|
299
|
+
# # Create a client object. The client can be reused for multiple calls.
|
300
|
+
# client = Google::Cloud::PubSub::V1::IAMPolicy::Client.new
|
301
|
+
#
|
302
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
303
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
304
|
+
#
|
305
|
+
# # Call the get_iam_policy method.
|
306
|
+
# result = client.get_iam_policy request
|
307
|
+
#
|
308
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
309
|
+
# p result
|
310
|
+
#
|
279
311
|
def get_iam_policy request, options = nil
|
280
312
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
281
313
|
|
@@ -293,9 +325,11 @@ module Google
|
|
293
325
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
294
326
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
295
327
|
|
296
|
-
header_params = {
|
297
|
-
|
298
|
-
|
328
|
+
header_params = {}
|
329
|
+
if request.resource
|
330
|
+
header_params["resource"] = request.resource
|
331
|
+
end
|
332
|
+
|
299
333
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
300
334
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
301
335
|
|
@@ -356,6 +390,21 @@ module Google
|
|
356
390
|
#
|
357
391
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
358
392
|
#
|
393
|
+
# @example Basic example
|
394
|
+
# require "google/iam/v1"
|
395
|
+
#
|
396
|
+
# # Create a client object. The client can be reused for multiple calls.
|
397
|
+
# client = Google::Cloud::PubSub::V1::IAMPolicy::Client.new
|
398
|
+
#
|
399
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
400
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
401
|
+
#
|
402
|
+
# # Call the test_iam_permissions method.
|
403
|
+
# result = client.test_iam_permissions request
|
404
|
+
#
|
405
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
406
|
+
# p result
|
407
|
+
#
|
359
408
|
def test_iam_permissions request, options = nil
|
360
409
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
361
410
|
|
@@ -373,9 +422,11 @@ module Google
|
|
373
422
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
374
423
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
375
424
|
|
376
|
-
header_params = {
|
377
|
-
|
378
|
-
|
425
|
+
header_params = {}
|
426
|
+
if request.resource
|
427
|
+
header_params["resource"] = request.resource
|
428
|
+
end
|
429
|
+
|
379
430
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
380
431
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
381
432
|
|
@@ -251,6 +251,21 @@ module Google
|
|
251
251
|
#
|
252
252
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
253
253
|
#
|
254
|
+
# @example Basic example
|
255
|
+
# require "google/cloud/pubsub/v1"
|
256
|
+
#
|
257
|
+
# # Create a client object. The client can be reused for multiple calls.
|
258
|
+
# client = Google::Cloud::PubSub::V1::Publisher::Client.new
|
259
|
+
#
|
260
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
261
|
+
# request = Google::Cloud::PubSub::V1::Topic.new
|
262
|
+
#
|
263
|
+
# # Call the create_topic method.
|
264
|
+
# result = client.create_topic request
|
265
|
+
#
|
266
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::Topic.
|
267
|
+
# p result
|
268
|
+
#
|
254
269
|
def create_topic request, options = nil
|
255
270
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
256
271
|
|
@@ -268,9 +283,11 @@ module Google
|
|
268
283
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
269
284
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
270
285
|
|
271
|
-
header_params = {
|
272
|
-
|
273
|
-
|
286
|
+
header_params = {}
|
287
|
+
if request.name
|
288
|
+
header_params["name"] = request.name
|
289
|
+
end
|
290
|
+
|
274
291
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
275
292
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
276
293
|
|
@@ -326,6 +343,21 @@ module Google
|
|
326
343
|
#
|
327
344
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
328
345
|
#
|
346
|
+
# @example Basic example
|
347
|
+
# require "google/cloud/pubsub/v1"
|
348
|
+
#
|
349
|
+
# # Create a client object. The client can be reused for multiple calls.
|
350
|
+
# client = Google::Cloud::PubSub::V1::Publisher::Client.new
|
351
|
+
#
|
352
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
353
|
+
# request = Google::Cloud::PubSub::V1::UpdateTopicRequest.new
|
354
|
+
#
|
355
|
+
# # Call the update_topic method.
|
356
|
+
# result = client.update_topic request
|
357
|
+
#
|
358
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::Topic.
|
359
|
+
# p result
|
360
|
+
#
|
329
361
|
def update_topic request, options = nil
|
330
362
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
331
363
|
|
@@ -343,9 +375,11 @@ module Google
|
|
343
375
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
344
376
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
345
377
|
|
346
|
-
header_params = {
|
347
|
-
|
348
|
-
|
378
|
+
header_params = {}
|
379
|
+
if request.topic&.name
|
380
|
+
header_params["topic.name"] = request.topic.name
|
381
|
+
end
|
382
|
+
|
349
383
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
350
384
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
351
385
|
|
@@ -398,6 +432,21 @@ module Google
|
|
398
432
|
#
|
399
433
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
400
434
|
#
|
435
|
+
# @example Basic example
|
436
|
+
# require "google/cloud/pubsub/v1"
|
437
|
+
#
|
438
|
+
# # Create a client object. The client can be reused for multiple calls.
|
439
|
+
# client = Google::Cloud::PubSub::V1::Publisher::Client.new
|
440
|
+
#
|
441
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
442
|
+
# request = Google::Cloud::PubSub::V1::PublishRequest.new
|
443
|
+
#
|
444
|
+
# # Call the publish method.
|
445
|
+
# result = client.publish request
|
446
|
+
#
|
447
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::PublishResponse.
|
448
|
+
# p result
|
449
|
+
#
|
401
450
|
def publish request, options = nil
|
402
451
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
403
452
|
|
@@ -415,9 +464,11 @@ module Google
|
|
415
464
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
416
465
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
417
466
|
|
418
|
-
header_params = {
|
419
|
-
|
420
|
-
|
467
|
+
header_params = {}
|
468
|
+
if request.topic
|
469
|
+
header_params["topic"] = request.topic
|
470
|
+
end
|
471
|
+
|
421
472
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
422
473
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
423
474
|
|
@@ -467,6 +518,21 @@ module Google
|
|
467
518
|
#
|
468
519
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
469
520
|
#
|
521
|
+
# @example Basic example
|
522
|
+
# require "google/cloud/pubsub/v1"
|
523
|
+
#
|
524
|
+
# # Create a client object. The client can be reused for multiple calls.
|
525
|
+
# client = Google::Cloud::PubSub::V1::Publisher::Client.new
|
526
|
+
#
|
527
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
528
|
+
# request = Google::Cloud::PubSub::V1::GetTopicRequest.new
|
529
|
+
#
|
530
|
+
# # Call the get_topic method.
|
531
|
+
# result = client.get_topic request
|
532
|
+
#
|
533
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::Topic.
|
534
|
+
# p result
|
535
|
+
#
|
470
536
|
def get_topic request, options = nil
|
471
537
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
472
538
|
|
@@ -484,9 +550,11 @@ module Google
|
|
484
550
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
485
551
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
486
552
|
|
487
|
-
header_params = {
|
488
|
-
|
489
|
-
|
553
|
+
header_params = {}
|
554
|
+
if request.topic
|
555
|
+
header_params["topic"] = request.topic
|
556
|
+
end
|
557
|
+
|
490
558
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
491
559
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
492
560
|
|
@@ -542,6 +610,27 @@ module Google
|
|
542
610
|
#
|
543
611
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
544
612
|
#
|
613
|
+
# @example Basic example
|
614
|
+
# require "google/cloud/pubsub/v1"
|
615
|
+
#
|
616
|
+
# # Create a client object. The client can be reused for multiple calls.
|
617
|
+
# client = Google::Cloud::PubSub::V1::Publisher::Client.new
|
618
|
+
#
|
619
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
620
|
+
# request = Google::Cloud::PubSub::V1::ListTopicsRequest.new
|
621
|
+
#
|
622
|
+
# # Call the list_topics method.
|
623
|
+
# result = client.list_topics request
|
624
|
+
#
|
625
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
626
|
+
# # iterate over all elements by calling #each, and the enumerable
|
627
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
628
|
+
# # methods are also available for managing paging directly.
|
629
|
+
# result.each do |response|
|
630
|
+
# # Each element is of type ::Google::Cloud::PubSub::V1::Topic.
|
631
|
+
# p response
|
632
|
+
# end
|
633
|
+
#
|
545
634
|
def list_topics request, options = nil
|
546
635
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
547
636
|
|
@@ -559,9 +648,11 @@ module Google
|
|
559
648
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
560
649
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
561
650
|
|
562
|
-
header_params = {
|
563
|
-
|
564
|
-
|
651
|
+
header_params = {}
|
652
|
+
if request.project
|
653
|
+
header_params["project"] = request.project
|
654
|
+
end
|
655
|
+
|
565
656
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
566
657
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
567
658
|
|
@@ -618,6 +709,21 @@ module Google
|
|
618
709
|
#
|
619
710
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
620
711
|
#
|
712
|
+
# @example Basic example
|
713
|
+
# require "google/cloud/pubsub/v1"
|
714
|
+
#
|
715
|
+
# # Create a client object. The client can be reused for multiple calls.
|
716
|
+
# client = Google::Cloud::PubSub::V1::Publisher::Client.new
|
717
|
+
#
|
718
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
719
|
+
# request = Google::Cloud::PubSub::V1::ListTopicSubscriptionsRequest.new
|
720
|
+
#
|
721
|
+
# # Call the list_topic_subscriptions method.
|
722
|
+
# result = client.list_topic_subscriptions request
|
723
|
+
#
|
724
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::ListTopicSubscriptionsResponse.
|
725
|
+
# p result
|
726
|
+
#
|
621
727
|
def list_topic_subscriptions request, options = nil
|
622
728
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
623
729
|
|
@@ -635,9 +741,11 @@ module Google
|
|
635
741
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
636
742
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
637
743
|
|
638
|
-
header_params = {
|
639
|
-
|
640
|
-
|
744
|
+
header_params = {}
|
745
|
+
if request.topic
|
746
|
+
header_params["topic"] = request.topic
|
747
|
+
end
|
748
|
+
|
641
749
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
642
750
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
643
751
|
|
@@ -697,6 +805,21 @@ module Google
|
|
697
805
|
#
|
698
806
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
699
807
|
#
|
808
|
+
# @example Basic example
|
809
|
+
# require "google/cloud/pubsub/v1"
|
810
|
+
#
|
811
|
+
# # Create a client object. The client can be reused for multiple calls.
|
812
|
+
# client = Google::Cloud::PubSub::V1::Publisher::Client.new
|
813
|
+
#
|
814
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
815
|
+
# request = Google::Cloud::PubSub::V1::ListTopicSnapshotsRequest.new
|
816
|
+
#
|
817
|
+
# # Call the list_topic_snapshots method.
|
818
|
+
# result = client.list_topic_snapshots request
|
819
|
+
#
|
820
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::ListTopicSnapshotsResponse.
|
821
|
+
# p result
|
822
|
+
#
|
700
823
|
def list_topic_snapshots request, options = nil
|
701
824
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
702
825
|
|
@@ -714,9 +837,11 @@ module Google
|
|
714
837
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
715
838
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
716
839
|
|
717
|
-
header_params = {
|
718
|
-
|
719
|
-
|
840
|
+
header_params = {}
|
841
|
+
if request.topic
|
842
|
+
header_params["topic"] = request.topic
|
843
|
+
end
|
844
|
+
|
720
845
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
721
846
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
722
847
|
|
@@ -770,6 +895,21 @@ module Google
|
|
770
895
|
#
|
771
896
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
772
897
|
#
|
898
|
+
# @example Basic example
|
899
|
+
# require "google/cloud/pubsub/v1"
|
900
|
+
#
|
901
|
+
# # Create a client object. The client can be reused for multiple calls.
|
902
|
+
# client = Google::Cloud::PubSub::V1::Publisher::Client.new
|
903
|
+
#
|
904
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
905
|
+
# request = Google::Cloud::PubSub::V1::DeleteTopicRequest.new
|
906
|
+
#
|
907
|
+
# # Call the delete_topic method.
|
908
|
+
# result = client.delete_topic request
|
909
|
+
#
|
910
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
911
|
+
# p result
|
912
|
+
#
|
773
913
|
def delete_topic request, options = nil
|
774
914
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
775
915
|
|
@@ -787,9 +927,11 @@ module Google
|
|
787
927
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
788
928
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
789
929
|
|
790
|
-
header_params = {
|
791
|
-
|
792
|
-
|
930
|
+
header_params = {}
|
931
|
+
if request.topic
|
932
|
+
header_params["topic"] = request.topic
|
933
|
+
end
|
934
|
+
|
793
935
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
794
936
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
795
937
|
|
@@ -842,6 +984,21 @@ module Google
|
|
842
984
|
#
|
843
985
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
844
986
|
#
|
987
|
+
# @example Basic example
|
988
|
+
# require "google/cloud/pubsub/v1"
|
989
|
+
#
|
990
|
+
# # Create a client object. The client can be reused for multiple calls.
|
991
|
+
# client = Google::Cloud::PubSub::V1::Publisher::Client.new
|
992
|
+
#
|
993
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
994
|
+
# request = Google::Cloud::PubSub::V1::DetachSubscriptionRequest.new
|
995
|
+
#
|
996
|
+
# # Call the detach_subscription method.
|
997
|
+
# result = client.detach_subscription request
|
998
|
+
#
|
999
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::DetachSubscriptionResponse.
|
1000
|
+
# p result
|
1001
|
+
#
|
845
1002
|
def detach_subscription request, options = nil
|
846
1003
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
847
1004
|
|
@@ -859,9 +1016,11 @@ module Google
|
|
859
1016
|
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
860
1017
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
861
1018
|
|
862
|
-
header_params = {
|
863
|
-
|
864
|
-
|
1019
|
+
header_params = {}
|
1020
|
+
if request.subscription
|
1021
|
+
header_params["subscription"] = request.subscription
|
1022
|
+
end
|
1023
|
+
|
865
1024
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
866
1025
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
867
1026
|
|
@@ -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
|
|