google-cloud-pubsub-v1 0.12.1 → 0.13.0
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.
- checksums.yaml +4 -4
- data/lib/google/cloud/pubsub/v1/schema_service/client.rb +401 -2
- data/lib/google/cloud/pubsub/v1/version.rb +1 -1
- data/lib/google/pubsub/v1/pubsub_pb.rb +2 -0
- data/lib/google/pubsub/v1/schema_pb.rb +30 -0
- data/lib/google/pubsub/v1/schema_services_pb.rb +8 -0
- data/proto_docs/google/pubsub/v1/pubsub.rb +10 -0
- data/proto_docs/google/pubsub/v1/schema.rb +87 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20d47bf223f21d94ee61e469782fc6edde8925ac281cd2f14c56c6ccdf68cd27
|
4
|
+
data.tar.gz: bd929c7bbe9ce143dd10cc2eb3c1fb65091beea2aeb6ff4798045b4395c49bd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5091cfd7ef79c315beacec26919f5ea360e618b6511086eeaafed355d627356ade29d41901cdeb4507c2170f6b9a5b3f3d3a0504d6a1ea45dfd3f2b9b8a6dd87
|
7
|
+
data.tar.gz: a460c298e7e6643aa312a0d2c474c14b3556aa2d5b3ef592844366b19bc4fa694a5cc01a509ecc57b115032169f124abfd0a1e0565c7754879eb9f5f3e512193
|
@@ -279,8 +279,7 @@ module Google
|
|
279
279
|
# Format is `projects/{project}/schemas/{schema}`.
|
280
280
|
# @param view [::Google::Cloud::PubSub::V1::SchemaView]
|
281
281
|
# The set of fields to return in the response. If not set, returns a Schema
|
282
|
-
# with
|
283
|
-
# fields.
|
282
|
+
# with all fields filled out. Set to `BASIC` to omit the `definition`.
|
284
283
|
#
|
285
284
|
# @yield [response, operation] Access the result along with the RPC operation
|
286
285
|
# @yieldparam response [::Google::Cloud::PubSub::V1::Schema]
|
@@ -449,6 +448,378 @@ module Google
|
|
449
448
|
raise ::Google::Cloud::Error.from_error(e)
|
450
449
|
end
|
451
450
|
|
451
|
+
##
|
452
|
+
# Lists all schema revisions for the named schema.
|
453
|
+
#
|
454
|
+
# @overload list_schema_revisions(request, options = nil)
|
455
|
+
# Pass arguments to `list_schema_revisions` via a request object, either of type
|
456
|
+
# {::Google::Cloud::PubSub::V1::ListSchemaRevisionsRequest} or an equivalent Hash.
|
457
|
+
#
|
458
|
+
# @param request [::Google::Cloud::PubSub::V1::ListSchemaRevisionsRequest, ::Hash]
|
459
|
+
# A request object representing the call parameters. Required. To specify no
|
460
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
461
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
462
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
463
|
+
#
|
464
|
+
# @overload list_schema_revisions(name: nil, view: nil, page_size: nil, page_token: nil)
|
465
|
+
# Pass arguments to `list_schema_revisions` via keyword arguments. Note that at
|
466
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
467
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
468
|
+
#
|
469
|
+
# @param name [::String]
|
470
|
+
# Required. The name of the schema to list revisions for.
|
471
|
+
# @param view [::Google::Cloud::PubSub::V1::SchemaView]
|
472
|
+
# The set of Schema fields to return in the response. If not set, returns
|
473
|
+
# Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
474
|
+
# retrieve all fields.
|
475
|
+
# @param page_size [::Integer]
|
476
|
+
# The maximum number of revisions to return per page.
|
477
|
+
# @param page_token [::String]
|
478
|
+
# The page token, received from a previous ListSchemaRevisions call.
|
479
|
+
# Provide this to retrieve the subsequent page.
|
480
|
+
#
|
481
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
482
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Schema>]
|
483
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
484
|
+
#
|
485
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::PubSub::V1::Schema>]
|
486
|
+
#
|
487
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
488
|
+
#
|
489
|
+
# @example Basic example
|
490
|
+
# require "google/cloud/pubsub/v1"
|
491
|
+
#
|
492
|
+
# # Create a client object. The client can be reused for multiple calls.
|
493
|
+
# client = Google::Cloud::PubSub::V1::SchemaService::Client.new
|
494
|
+
#
|
495
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
496
|
+
# request = Google::Cloud::PubSub::V1::ListSchemaRevisionsRequest.new
|
497
|
+
#
|
498
|
+
# # Call the list_schema_revisions method.
|
499
|
+
# result = client.list_schema_revisions request
|
500
|
+
#
|
501
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
502
|
+
# # iterate over all elements by calling #each, and the enumerable
|
503
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
504
|
+
# # methods are also available for managing paging directly.
|
505
|
+
# result.each do |response|
|
506
|
+
# # Each element is of type ::Google::Cloud::PubSub::V1::Schema.
|
507
|
+
# p response
|
508
|
+
# end
|
509
|
+
#
|
510
|
+
def list_schema_revisions request, options = nil
|
511
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
512
|
+
|
513
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PubSub::V1::ListSchemaRevisionsRequest
|
514
|
+
|
515
|
+
# Converts hash and nil to an options object
|
516
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
517
|
+
|
518
|
+
# Customize the options with defaults
|
519
|
+
metadata = @config.rpcs.list_schema_revisions.metadata.to_h
|
520
|
+
|
521
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
522
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
523
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
524
|
+
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
525
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
526
|
+
|
527
|
+
header_params = {}
|
528
|
+
if request.name
|
529
|
+
header_params["name"] = request.name
|
530
|
+
end
|
531
|
+
|
532
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
533
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
534
|
+
|
535
|
+
options.apply_defaults timeout: @config.rpcs.list_schema_revisions.timeout,
|
536
|
+
metadata: metadata,
|
537
|
+
retry_policy: @config.rpcs.list_schema_revisions.retry_policy
|
538
|
+
|
539
|
+
options.apply_defaults timeout: @config.timeout,
|
540
|
+
metadata: @config.metadata,
|
541
|
+
retry_policy: @config.retry_policy
|
542
|
+
|
543
|
+
@schema_service_stub.call_rpc :list_schema_revisions, request, options: options do |response, operation|
|
544
|
+
response = ::Gapic::PagedEnumerable.new @schema_service_stub, :list_schema_revisions, request, response, operation, options
|
545
|
+
yield response, operation if block_given?
|
546
|
+
return response
|
547
|
+
end
|
548
|
+
rescue ::GRPC::BadStatus => e
|
549
|
+
raise ::Google::Cloud::Error.from_error(e)
|
550
|
+
end
|
551
|
+
|
552
|
+
##
|
553
|
+
# Commits a new schema revision to an existing schema.
|
554
|
+
#
|
555
|
+
# @overload commit_schema(request, options = nil)
|
556
|
+
# Pass arguments to `commit_schema` via a request object, either of type
|
557
|
+
# {::Google::Cloud::PubSub::V1::CommitSchemaRequest} or an equivalent Hash.
|
558
|
+
#
|
559
|
+
# @param request [::Google::Cloud::PubSub::V1::CommitSchemaRequest, ::Hash]
|
560
|
+
# A request object representing the call parameters. Required. To specify no
|
561
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
562
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
563
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
564
|
+
#
|
565
|
+
# @overload commit_schema(name: nil, schema: nil)
|
566
|
+
# Pass arguments to `commit_schema` via keyword arguments. Note that at
|
567
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
568
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
569
|
+
#
|
570
|
+
# @param name [::String]
|
571
|
+
# Required. The name of the schema we are revising.
|
572
|
+
# Format is `projects/{project}/schemas/{schema}`.
|
573
|
+
# @param schema [::Google::Cloud::PubSub::V1::Schema, ::Hash]
|
574
|
+
# Required. The schema revision to commit.
|
575
|
+
#
|
576
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
577
|
+
# @yieldparam response [::Google::Cloud::PubSub::V1::Schema]
|
578
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
579
|
+
#
|
580
|
+
# @return [::Google::Cloud::PubSub::V1::Schema]
|
581
|
+
#
|
582
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
583
|
+
#
|
584
|
+
# @example Basic example
|
585
|
+
# require "google/cloud/pubsub/v1"
|
586
|
+
#
|
587
|
+
# # Create a client object. The client can be reused for multiple calls.
|
588
|
+
# client = Google::Cloud::PubSub::V1::SchemaService::Client.new
|
589
|
+
#
|
590
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
591
|
+
# request = Google::Cloud::PubSub::V1::CommitSchemaRequest.new
|
592
|
+
#
|
593
|
+
# # Call the commit_schema method.
|
594
|
+
# result = client.commit_schema request
|
595
|
+
#
|
596
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::Schema.
|
597
|
+
# p result
|
598
|
+
#
|
599
|
+
def commit_schema request, options = nil
|
600
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
601
|
+
|
602
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PubSub::V1::CommitSchemaRequest
|
603
|
+
|
604
|
+
# Converts hash and nil to an options object
|
605
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
606
|
+
|
607
|
+
# Customize the options with defaults
|
608
|
+
metadata = @config.rpcs.commit_schema.metadata.to_h
|
609
|
+
|
610
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
611
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
612
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
613
|
+
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
614
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
615
|
+
|
616
|
+
header_params = {}
|
617
|
+
if request.name
|
618
|
+
header_params["name"] = request.name
|
619
|
+
end
|
620
|
+
|
621
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
622
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
623
|
+
|
624
|
+
options.apply_defaults timeout: @config.rpcs.commit_schema.timeout,
|
625
|
+
metadata: metadata,
|
626
|
+
retry_policy: @config.rpcs.commit_schema.retry_policy
|
627
|
+
|
628
|
+
options.apply_defaults timeout: @config.timeout,
|
629
|
+
metadata: @config.metadata,
|
630
|
+
retry_policy: @config.retry_policy
|
631
|
+
|
632
|
+
@schema_service_stub.call_rpc :commit_schema, request, options: options do |response, operation|
|
633
|
+
yield response, operation if block_given?
|
634
|
+
return response
|
635
|
+
end
|
636
|
+
rescue ::GRPC::BadStatus => e
|
637
|
+
raise ::Google::Cloud::Error.from_error(e)
|
638
|
+
end
|
639
|
+
|
640
|
+
##
|
641
|
+
# Creates a new schema revision that is a copy of the provided revision_id.
|
642
|
+
#
|
643
|
+
# @overload rollback_schema(request, options = nil)
|
644
|
+
# Pass arguments to `rollback_schema` via a request object, either of type
|
645
|
+
# {::Google::Cloud::PubSub::V1::RollbackSchemaRequest} or an equivalent Hash.
|
646
|
+
#
|
647
|
+
# @param request [::Google::Cloud::PubSub::V1::RollbackSchemaRequest, ::Hash]
|
648
|
+
# A request object representing the call parameters. Required. To specify no
|
649
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
650
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
651
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
652
|
+
#
|
653
|
+
# @overload rollback_schema(name: nil, revision_id: nil)
|
654
|
+
# Pass arguments to `rollback_schema` via keyword arguments. Note that at
|
655
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
656
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
657
|
+
#
|
658
|
+
# @param name [::String]
|
659
|
+
# Required. The schema being rolled back with revision id.
|
660
|
+
# @param revision_id [::String]
|
661
|
+
# Required. The revision ID to roll back to.
|
662
|
+
# It must be a revision of the same schema.
|
663
|
+
#
|
664
|
+
# Example: c7cfa2a8
|
665
|
+
#
|
666
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
667
|
+
# @yieldparam response [::Google::Cloud::PubSub::V1::Schema]
|
668
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
669
|
+
#
|
670
|
+
# @return [::Google::Cloud::PubSub::V1::Schema]
|
671
|
+
#
|
672
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
673
|
+
#
|
674
|
+
# @example Basic example
|
675
|
+
# require "google/cloud/pubsub/v1"
|
676
|
+
#
|
677
|
+
# # Create a client object. The client can be reused for multiple calls.
|
678
|
+
# client = Google::Cloud::PubSub::V1::SchemaService::Client.new
|
679
|
+
#
|
680
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
681
|
+
# request = Google::Cloud::PubSub::V1::RollbackSchemaRequest.new
|
682
|
+
#
|
683
|
+
# # Call the rollback_schema method.
|
684
|
+
# result = client.rollback_schema request
|
685
|
+
#
|
686
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::Schema.
|
687
|
+
# p result
|
688
|
+
#
|
689
|
+
def rollback_schema request, options = nil
|
690
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
691
|
+
|
692
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PubSub::V1::RollbackSchemaRequest
|
693
|
+
|
694
|
+
# Converts hash and nil to an options object
|
695
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
696
|
+
|
697
|
+
# Customize the options with defaults
|
698
|
+
metadata = @config.rpcs.rollback_schema.metadata.to_h
|
699
|
+
|
700
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
701
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
702
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
703
|
+
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
704
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
705
|
+
|
706
|
+
header_params = {}
|
707
|
+
if request.name
|
708
|
+
header_params["name"] = request.name
|
709
|
+
end
|
710
|
+
|
711
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
712
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
713
|
+
|
714
|
+
options.apply_defaults timeout: @config.rpcs.rollback_schema.timeout,
|
715
|
+
metadata: metadata,
|
716
|
+
retry_policy: @config.rpcs.rollback_schema.retry_policy
|
717
|
+
|
718
|
+
options.apply_defaults timeout: @config.timeout,
|
719
|
+
metadata: @config.metadata,
|
720
|
+
retry_policy: @config.retry_policy
|
721
|
+
|
722
|
+
@schema_service_stub.call_rpc :rollback_schema, request, options: options do |response, operation|
|
723
|
+
yield response, operation if block_given?
|
724
|
+
return response
|
725
|
+
end
|
726
|
+
rescue ::GRPC::BadStatus => e
|
727
|
+
raise ::Google::Cloud::Error.from_error(e)
|
728
|
+
end
|
729
|
+
|
730
|
+
##
|
731
|
+
# Deletes a specific schema revision.
|
732
|
+
#
|
733
|
+
# @overload delete_schema_revision(request, options = nil)
|
734
|
+
# Pass arguments to `delete_schema_revision` via a request object, either of type
|
735
|
+
# {::Google::Cloud::PubSub::V1::DeleteSchemaRevisionRequest} or an equivalent Hash.
|
736
|
+
#
|
737
|
+
# @param request [::Google::Cloud::PubSub::V1::DeleteSchemaRevisionRequest, ::Hash]
|
738
|
+
# A request object representing the call parameters. Required. To specify no
|
739
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
740
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
741
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
742
|
+
#
|
743
|
+
# @overload delete_schema_revision(name: nil, revision_id: nil)
|
744
|
+
# Pass arguments to `delete_schema_revision` via keyword arguments. Note that at
|
745
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
746
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
747
|
+
#
|
748
|
+
# @param name [::String]
|
749
|
+
# Required. The name of the schema revision to be deleted, with a revision ID
|
750
|
+
# explicitly included.
|
751
|
+
#
|
752
|
+
# Example: projects/123/schemas/my-schema@c7cfa2a8
|
753
|
+
# @param revision_id [::String]
|
754
|
+
# Required. The revision ID to roll back to.
|
755
|
+
# It must be a revision of the same schema.
|
756
|
+
#
|
757
|
+
# Example: c7cfa2a8
|
758
|
+
#
|
759
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
760
|
+
# @yieldparam response [::Google::Cloud::PubSub::V1::Schema]
|
761
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
762
|
+
#
|
763
|
+
# @return [::Google::Cloud::PubSub::V1::Schema]
|
764
|
+
#
|
765
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
766
|
+
#
|
767
|
+
# @example Basic example
|
768
|
+
# require "google/cloud/pubsub/v1"
|
769
|
+
#
|
770
|
+
# # Create a client object. The client can be reused for multiple calls.
|
771
|
+
# client = Google::Cloud::PubSub::V1::SchemaService::Client.new
|
772
|
+
#
|
773
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
774
|
+
# request = Google::Cloud::PubSub::V1::DeleteSchemaRevisionRequest.new
|
775
|
+
#
|
776
|
+
# # Call the delete_schema_revision method.
|
777
|
+
# result = client.delete_schema_revision request
|
778
|
+
#
|
779
|
+
# # The returned object is of type Google::Cloud::PubSub::V1::Schema.
|
780
|
+
# p result
|
781
|
+
#
|
782
|
+
def delete_schema_revision request, options = nil
|
783
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
784
|
+
|
785
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PubSub::V1::DeleteSchemaRevisionRequest
|
786
|
+
|
787
|
+
# Converts hash and nil to an options object
|
788
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
789
|
+
|
790
|
+
# Customize the options with defaults
|
791
|
+
metadata = @config.rpcs.delete_schema_revision.metadata.to_h
|
792
|
+
|
793
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
794
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
795
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
796
|
+
gapic_version: ::Google::Cloud::PubSub::V1::VERSION
|
797
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
798
|
+
|
799
|
+
header_params = {}
|
800
|
+
if request.name
|
801
|
+
header_params["name"] = request.name
|
802
|
+
end
|
803
|
+
|
804
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
805
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
806
|
+
|
807
|
+
options.apply_defaults timeout: @config.rpcs.delete_schema_revision.timeout,
|
808
|
+
metadata: metadata,
|
809
|
+
retry_policy: @config.rpcs.delete_schema_revision.retry_policy
|
810
|
+
|
811
|
+
options.apply_defaults timeout: @config.timeout,
|
812
|
+
metadata: @config.metadata,
|
813
|
+
retry_policy: @config.retry_policy
|
814
|
+
|
815
|
+
@schema_service_stub.call_rpc :delete_schema_revision, request, options: options do |response, operation|
|
816
|
+
yield response, operation if block_given?
|
817
|
+
return response
|
818
|
+
end
|
819
|
+
rescue ::GRPC::BadStatus => e
|
820
|
+
raise ::Google::Cloud::Error.from_error(e)
|
821
|
+
end
|
822
|
+
|
452
823
|
##
|
453
824
|
# Deletes a schema.
|
454
825
|
#
|
@@ -870,6 +1241,26 @@ module Google
|
|
870
1241
|
#
|
871
1242
|
attr_reader :list_schemas
|
872
1243
|
##
|
1244
|
+
# RPC-specific configuration for `list_schema_revisions`
|
1245
|
+
# @return [::Gapic::Config::Method]
|
1246
|
+
#
|
1247
|
+
attr_reader :list_schema_revisions
|
1248
|
+
##
|
1249
|
+
# RPC-specific configuration for `commit_schema`
|
1250
|
+
# @return [::Gapic::Config::Method]
|
1251
|
+
#
|
1252
|
+
attr_reader :commit_schema
|
1253
|
+
##
|
1254
|
+
# RPC-specific configuration for `rollback_schema`
|
1255
|
+
# @return [::Gapic::Config::Method]
|
1256
|
+
#
|
1257
|
+
attr_reader :rollback_schema
|
1258
|
+
##
|
1259
|
+
# RPC-specific configuration for `delete_schema_revision`
|
1260
|
+
# @return [::Gapic::Config::Method]
|
1261
|
+
#
|
1262
|
+
attr_reader :delete_schema_revision
|
1263
|
+
##
|
873
1264
|
# RPC-specific configuration for `delete_schema`
|
874
1265
|
# @return [::Gapic::Config::Method]
|
875
1266
|
#
|
@@ -893,6 +1284,14 @@ module Google
|
|
893
1284
|
@get_schema = ::Gapic::Config::Method.new get_schema_config
|
894
1285
|
list_schemas_config = parent_rpcs.list_schemas if parent_rpcs.respond_to? :list_schemas
|
895
1286
|
@list_schemas = ::Gapic::Config::Method.new list_schemas_config
|
1287
|
+
list_schema_revisions_config = parent_rpcs.list_schema_revisions if parent_rpcs.respond_to? :list_schema_revisions
|
1288
|
+
@list_schema_revisions = ::Gapic::Config::Method.new list_schema_revisions_config
|
1289
|
+
commit_schema_config = parent_rpcs.commit_schema if parent_rpcs.respond_to? :commit_schema
|
1290
|
+
@commit_schema = ::Gapic::Config::Method.new commit_schema_config
|
1291
|
+
rollback_schema_config = parent_rpcs.rollback_schema if parent_rpcs.respond_to? :rollback_schema
|
1292
|
+
@rollback_schema = ::Gapic::Config::Method.new rollback_schema_config
|
1293
|
+
delete_schema_revision_config = parent_rpcs.delete_schema_revision if parent_rpcs.respond_to? :delete_schema_revision
|
1294
|
+
@delete_schema_revision = ::Gapic::Config::Method.new delete_schema_revision_config
|
896
1295
|
delete_schema_config = parent_rpcs.delete_schema if parent_rpcs.respond_to? :delete_schema
|
897
1296
|
@delete_schema = ::Gapic::Config::Method.new delete_schema_config
|
898
1297
|
validate_schema_config = parent_rpcs.validate_schema if parent_rpcs.respond_to? :validate_schema
|
@@ -21,6 +21,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
21
21
|
add_message "google.pubsub.v1.SchemaSettings" do
|
22
22
|
optional :schema, :string, 1
|
23
23
|
optional :encoding, :enum, 2, "google.pubsub.v1.Encoding"
|
24
|
+
optional :first_revision_id, :string, 3
|
25
|
+
optional :last_revision_id, :string, 4
|
24
26
|
end
|
25
27
|
add_message "google.pubsub.v1.Topic" do
|
26
28
|
optional :name, :string, 1
|
@@ -8,6 +8,7 @@ require 'google/api/client_pb'
|
|
8
8
|
require 'google/api/field_behavior_pb'
|
9
9
|
require 'google/api/resource_pb'
|
10
10
|
require 'google/protobuf/empty_pb'
|
11
|
+
require 'google/protobuf/timestamp_pb'
|
11
12
|
|
12
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
14
|
add_file("google/pubsub/v1/schema.proto", :syntax => :proto3) do
|
@@ -15,6 +16,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
15
16
|
optional :name, :string, 1
|
16
17
|
optional :type, :enum, 2, "google.pubsub.v1.Schema.Type"
|
17
18
|
optional :definition, :string, 3
|
19
|
+
optional :revision_id, :string, 4
|
20
|
+
optional :revision_create_time, :message, 6, "google.protobuf.Timestamp"
|
18
21
|
end
|
19
22
|
add_enum "google.pubsub.v1.Schema.Type" do
|
20
23
|
value :TYPE_UNSPECIFIED, 0
|
@@ -40,6 +43,28 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
40
43
|
repeated :schemas, :message, 1, "google.pubsub.v1.Schema"
|
41
44
|
optional :next_page_token, :string, 2
|
42
45
|
end
|
46
|
+
add_message "google.pubsub.v1.ListSchemaRevisionsRequest" do
|
47
|
+
optional :name, :string, 1
|
48
|
+
optional :view, :enum, 2, "google.pubsub.v1.SchemaView"
|
49
|
+
optional :page_size, :int32, 3
|
50
|
+
optional :page_token, :string, 4
|
51
|
+
end
|
52
|
+
add_message "google.pubsub.v1.ListSchemaRevisionsResponse" do
|
53
|
+
repeated :schemas, :message, 1, "google.pubsub.v1.Schema"
|
54
|
+
optional :next_page_token, :string, 2
|
55
|
+
end
|
56
|
+
add_message "google.pubsub.v1.CommitSchemaRequest" do
|
57
|
+
optional :name, :string, 1
|
58
|
+
optional :schema, :message, 2, "google.pubsub.v1.Schema"
|
59
|
+
end
|
60
|
+
add_message "google.pubsub.v1.RollbackSchemaRequest" do
|
61
|
+
optional :name, :string, 1
|
62
|
+
optional :revision_id, :string, 2
|
63
|
+
end
|
64
|
+
add_message "google.pubsub.v1.DeleteSchemaRevisionRequest" do
|
65
|
+
optional :name, :string, 1
|
66
|
+
optional :revision_id, :string, 2
|
67
|
+
end
|
43
68
|
add_message "google.pubsub.v1.DeleteSchemaRequest" do
|
44
69
|
optional :name, :string, 1
|
45
70
|
end
|
@@ -83,6 +108,11 @@ module Google
|
|
83
108
|
GetSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSchemaRequest").msgclass
|
84
109
|
ListSchemasRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSchemasRequest").msgclass
|
85
110
|
ListSchemasResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSchemasResponse").msgclass
|
111
|
+
ListSchemaRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSchemaRevisionsRequest").msgclass
|
112
|
+
ListSchemaRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSchemaRevisionsResponse").msgclass
|
113
|
+
CommitSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.CommitSchemaRequest").msgclass
|
114
|
+
RollbackSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.RollbackSchemaRequest").msgclass
|
115
|
+
DeleteSchemaRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSchemaRevisionRequest").msgclass
|
86
116
|
DeleteSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSchemaRequest").msgclass
|
87
117
|
ValidateSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ValidateSchemaRequest").msgclass
|
88
118
|
ValidateSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ValidateSchemaResponse").msgclass
|
@@ -39,6 +39,14 @@ module Google
|
|
39
39
|
rpc :GetSchema, ::Google::Cloud::PubSub::V1::GetSchemaRequest, ::Google::Cloud::PubSub::V1::Schema
|
40
40
|
# Lists schemas in a project.
|
41
41
|
rpc :ListSchemas, ::Google::Cloud::PubSub::V1::ListSchemasRequest, ::Google::Cloud::PubSub::V1::ListSchemasResponse
|
42
|
+
# Lists all schema revisions for the named schema.
|
43
|
+
rpc :ListSchemaRevisions, ::Google::Cloud::PubSub::V1::ListSchemaRevisionsRequest, ::Google::Cloud::PubSub::V1::ListSchemaRevisionsResponse
|
44
|
+
# Commits a new schema revision to an existing schema.
|
45
|
+
rpc :CommitSchema, ::Google::Cloud::PubSub::V1::CommitSchemaRequest, ::Google::Cloud::PubSub::V1::Schema
|
46
|
+
# Creates a new schema revision that is a copy of the provided revision_id.
|
47
|
+
rpc :RollbackSchema, ::Google::Cloud::PubSub::V1::RollbackSchemaRequest, ::Google::Cloud::PubSub::V1::Schema
|
48
|
+
# Deletes a specific schema revision.
|
49
|
+
rpc :DeleteSchemaRevision, ::Google::Cloud::PubSub::V1::DeleteSchemaRevisionRequest, ::Google::Cloud::PubSub::V1::Schema
|
42
50
|
# Deletes a schema.
|
43
51
|
rpc :DeleteSchema, ::Google::Cloud::PubSub::V1::DeleteSchemaRequest, ::Google::Protobuf::Empty
|
44
52
|
# Validates a schema.
|
@@ -44,6 +44,16 @@ module Google
|
|
44
44
|
# @!attribute [rw] encoding
|
45
45
|
# @return [::Google::Cloud::PubSub::V1::Encoding]
|
46
46
|
# The encoding of messages validated against `schema`.
|
47
|
+
# @!attribute [rw] first_revision_id
|
48
|
+
# @return [::String]
|
49
|
+
# The minimum (inclusive) revision allowed for validating messages. If empty
|
50
|
+
# or not present, allow any revision to be validated against last_revision or
|
51
|
+
# any revision created before.
|
52
|
+
# @!attribute [rw] last_revision_id
|
53
|
+
# @return [::String]
|
54
|
+
# The maximum (inclusive) revision allowed for validating messages. If empty
|
55
|
+
# or not present, allow any revision to be validated against first_revision
|
56
|
+
# or any revision created after.
|
47
57
|
class SchemaSettings
|
48
58
|
include ::Google::Protobuf::MessageExts
|
49
59
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -34,6 +34,12 @@ module Google
|
|
34
34
|
# The definition of the schema. This should contain a string representing
|
35
35
|
# the full definition of the schema that is a valid schema definition of
|
36
36
|
# the type specified in `type`.
|
37
|
+
# @!attribute [r] revision_id
|
38
|
+
# @return [::String]
|
39
|
+
# Output only. Immutable. The revision ID of the schema.
|
40
|
+
# @!attribute [r] revision_create_time
|
41
|
+
# @return [::Google::Protobuf::Timestamp]
|
42
|
+
# Output only. The timestamp that the revision was created.
|
37
43
|
class Schema
|
38
44
|
include ::Google::Protobuf::MessageExts
|
39
45
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -83,8 +89,7 @@ module Google
|
|
83
89
|
# @!attribute [rw] view
|
84
90
|
# @return [::Google::Cloud::PubSub::V1::SchemaView]
|
85
91
|
# The set of fields to return in the response. If not set, returns a Schema
|
86
|
-
# with
|
87
|
-
# fields.
|
92
|
+
# with all fields filled out. Set to `BASIC` to omit the `definition`.
|
88
93
|
class GetSchemaRequest
|
89
94
|
include ::Google::Protobuf::MessageExts
|
90
95
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -126,6 +131,86 @@ module Google
|
|
126
131
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
127
132
|
end
|
128
133
|
|
134
|
+
# Request for the `ListSchemaRevisions` method.
|
135
|
+
# @!attribute [rw] name
|
136
|
+
# @return [::String]
|
137
|
+
# Required. The name of the schema to list revisions for.
|
138
|
+
# @!attribute [rw] view
|
139
|
+
# @return [::Google::Cloud::PubSub::V1::SchemaView]
|
140
|
+
# The set of Schema fields to return in the response. If not set, returns
|
141
|
+
# Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
142
|
+
# retrieve all fields.
|
143
|
+
# @!attribute [rw] page_size
|
144
|
+
# @return [::Integer]
|
145
|
+
# The maximum number of revisions to return per page.
|
146
|
+
# @!attribute [rw] page_token
|
147
|
+
# @return [::String]
|
148
|
+
# The page token, received from a previous ListSchemaRevisions call.
|
149
|
+
# Provide this to retrieve the subsequent page.
|
150
|
+
class ListSchemaRevisionsRequest
|
151
|
+
include ::Google::Protobuf::MessageExts
|
152
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
153
|
+
end
|
154
|
+
|
155
|
+
# Response for the `ListSchemaRevisions` method.
|
156
|
+
# @!attribute [rw] schemas
|
157
|
+
# @return [::Array<::Google::Cloud::PubSub::V1::Schema>]
|
158
|
+
# The revisions of the schema.
|
159
|
+
# @!attribute [rw] next_page_token
|
160
|
+
# @return [::String]
|
161
|
+
# A token that can be sent as `page_token` to retrieve the next page.
|
162
|
+
# If this field is empty, there are no subsequent pages.
|
163
|
+
class ListSchemaRevisionsResponse
|
164
|
+
include ::Google::Protobuf::MessageExts
|
165
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
166
|
+
end
|
167
|
+
|
168
|
+
# Request for CommitSchema method.
|
169
|
+
# @!attribute [rw] name
|
170
|
+
# @return [::String]
|
171
|
+
# Required. The name of the schema we are revising.
|
172
|
+
# Format is `projects/{project}/schemas/{schema}`.
|
173
|
+
# @!attribute [rw] schema
|
174
|
+
# @return [::Google::Cloud::PubSub::V1::Schema]
|
175
|
+
# Required. The schema revision to commit.
|
176
|
+
class CommitSchemaRequest
|
177
|
+
include ::Google::Protobuf::MessageExts
|
178
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
179
|
+
end
|
180
|
+
|
181
|
+
# Request for the `RollbackSchema` method.
|
182
|
+
# @!attribute [rw] name
|
183
|
+
# @return [::String]
|
184
|
+
# Required. The schema being rolled back with revision id.
|
185
|
+
# @!attribute [rw] revision_id
|
186
|
+
# @return [::String]
|
187
|
+
# Required. The revision ID to roll back to.
|
188
|
+
# It must be a revision of the same schema.
|
189
|
+
#
|
190
|
+
# Example: c7cfa2a8
|
191
|
+
class RollbackSchemaRequest
|
192
|
+
include ::Google::Protobuf::MessageExts
|
193
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
194
|
+
end
|
195
|
+
|
196
|
+
# Request for the `DeleteSchemaRevision` method.
|
197
|
+
# @!attribute [rw] name
|
198
|
+
# @return [::String]
|
199
|
+
# Required. The name of the schema revision to be deleted, with a revision ID
|
200
|
+
# explicitly included.
|
201
|
+
#
|
202
|
+
# Example: projects/123/schemas/my-schema@c7cfa2a8
|
203
|
+
# @!attribute [rw] revision_id
|
204
|
+
# @return [::String]
|
205
|
+
# Required. The revision ID to roll back to.
|
206
|
+
# It must be a revision of the same schema.
|
207
|
+
#
|
208
|
+
# Example: c7cfa2a8
|
209
|
+
class DeleteSchemaRevisionRequest
|
210
|
+
include ::Google::Protobuf::MessageExts
|
211
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
212
|
+
end
|
213
|
+
|
129
214
|
# Request for the `DeleteSchema` method.
|
130
215
|
# @!attribute [rw] name
|
131
216
|
# @return [::String]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-pubsub-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
245
|
- !ruby/object:Gem::Version
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
|
-
rubygems_version: 3.
|
248
|
+
rubygems_version: 3.4.2
|
249
249
|
signing_key:
|
250
250
|
specification_version: 4
|
251
251
|
summary: API Client library for the Cloud Pub/Sub V1 API
|