google-cloud-pubsub-v1 0.12.0 → 0.13.0

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: d98ae127654ffa655c567eadff7dfc28cc131e68ac7716d40f68704d8f061118
4
- data.tar.gz: d8da26f605fb01815b937f5fdc56634492c51157db87670e41b50f281e8c0eb6
3
+ metadata.gz: 20d47bf223f21d94ee61e469782fc6edde8925ac281cd2f14c56c6ccdf68cd27
4
+ data.tar.gz: bd929c7bbe9ce143dd10cc2eb3c1fb65091beea2aeb6ff4798045b4395c49bd9
5
5
  SHA512:
6
- metadata.gz: f04d0ec694b3cebd2daaa541a0295aa212b8eaad7d939d7222219358e3acc69e44d6f5f2f11e1a717c45cce3d34fad165a11c86341ff8d46bdcaaef1a50194e5
7
- data.tar.gz: 95d5cb21ecc54d183846406d5546508c6f496a65390c3461420cbf9b477c22a34c1f18bcd0134c6377e1feb9189d99c9ea756a6ba65f6571b7918faaeb298843
6
+ metadata.gz: 5091cfd7ef79c315beacec26919f5ea360e618b6511086eeaafed355d627356ade29d41901cdeb4507c2170f6b9a5b3f3d3a0504d6a1ea45dfd3f2b9b8a6dd87
7
+ data.tar.gz: a460c298e7e6643aa312a0d2c474c14b3556aa2d5b3ef592844366b19bc4fa694a5cc01a509ecc57b115032169f124abfd0a1e0565c7754879eb9f5f3e512193
data/README.md CHANGED
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -34,7 +34,7 @@ module Google
34
34
  # The service that an application uses to manipulate topics, and to send
35
35
  # messages to a topic.
36
36
  #
37
- # To load this service and instantiate a client:
37
+ # @example Load this service and instantiate a gRPC client
38
38
  #
39
39
  # require "google/cloud/pubsub/v1/publisher"
40
40
  # client = ::Google::Cloud::PubSub::V1::Publisher::Client.new
@@ -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 `name` and `type`, but not `definition`. Set to `FULL` to retrieve all
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
@@ -33,7 +33,7 @@ module Google
33
33
  ##
34
34
  # Service for doing schema-related operations.
35
35
  #
36
- # To load this service and instantiate a client:
36
+ # @example Load this service and instantiate a gRPC client
37
37
  #
38
38
  # require "google/cloud/pubsub/v1/schema_service"
39
39
  # client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new
@@ -35,7 +35,7 @@ module Google
35
35
  # consume messages from a subscription via the `Pull` method or by
36
36
  # establishing a bi-directional stream using the `StreamingPull` method.
37
37
  #
38
- # To load this service and instantiate a client:
38
+ # @example Load this service and instantiate a gRPC client
39
39
  #
40
40
  # require "google/cloud/pubsub/v1/subscriber"
41
41
  # client = ::Google::Cloud::PubSub::V1::Subscriber::Client.new
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module PubSub
23
23
  module V1
24
- VERSION = "0.12.0"
24
+ VERSION = "0.13.0"
25
25
  end
26
26
  end
27
27
  end
@@ -25,9 +25,9 @@ module Google
25
25
  module Cloud
26
26
  module PubSub
27
27
  ##
28
- # To load this package, including all its services, and instantiate a client:
28
+ # API client module.
29
29
  #
30
- # @example
30
+ # @example Load this package, including all its services, and instantiate a gRPC client
31
31
  #
32
32
  # require "google/cloud/pubsub/v1"
33
33
  # client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new
@@ -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.
@@ -0,0 +1,318 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # Required information for every language.
23
+ # @!attribute [rw] reference_docs_uri
24
+ # @return [::String]
25
+ # Link to automatically generated reference documentation. Example:
26
+ # https://cloud.google.com/nodejs/docs/reference/asset/latest
27
+ # @!attribute [rw] destinations
28
+ # @return [::Array<::Google::Api::ClientLibraryDestination>]
29
+ # The destination where API teams want this client library to be published.
30
+ class CommonLanguageSettings
31
+ include ::Google::Protobuf::MessageExts
32
+ extend ::Google::Protobuf::MessageExts::ClassMethods
33
+ end
34
+
35
+ # Details about how and where to publish client libraries.
36
+ # @!attribute [rw] version
37
+ # @return [::String]
38
+ # Version of the API to apply these settings to.
39
+ # @!attribute [rw] launch_stage
40
+ # @return [::Google::Api::LaunchStage]
41
+ # Launch stage of this version of the API.
42
+ # @!attribute [rw] rest_numeric_enums
43
+ # @return [::Boolean]
44
+ # When using transport=rest, the client request will encode enums as
45
+ # numbers rather than strings.
46
+ # @!attribute [rw] java_settings
47
+ # @return [::Google::Api::JavaSettings]
48
+ # Settings for legacy Java features, supported in the Service YAML.
49
+ # @!attribute [rw] cpp_settings
50
+ # @return [::Google::Api::CppSettings]
51
+ # Settings for C++ client libraries.
52
+ # @!attribute [rw] php_settings
53
+ # @return [::Google::Api::PhpSettings]
54
+ # Settings for PHP client libraries.
55
+ # @!attribute [rw] python_settings
56
+ # @return [::Google::Api::PythonSettings]
57
+ # Settings for Python client libraries.
58
+ # @!attribute [rw] node_settings
59
+ # @return [::Google::Api::NodeSettings]
60
+ # Settings for Node client libraries.
61
+ # @!attribute [rw] dotnet_settings
62
+ # @return [::Google::Api::DotnetSettings]
63
+ # Settings for .NET client libraries.
64
+ # @!attribute [rw] ruby_settings
65
+ # @return [::Google::Api::RubySettings]
66
+ # Settings for Ruby client libraries.
67
+ # @!attribute [rw] go_settings
68
+ # @return [::Google::Api::GoSettings]
69
+ # Settings for Go client libraries.
70
+ class ClientLibrarySettings
71
+ include ::Google::Protobuf::MessageExts
72
+ extend ::Google::Protobuf::MessageExts::ClassMethods
73
+ end
74
+
75
+ # This message configures the settings for publishing [Google Cloud Client
76
+ # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
77
+ # generated from the service config.
78
+ # @!attribute [rw] method_settings
79
+ # @return [::Array<::Google::Api::MethodSettings>]
80
+ # A list of API method settings, e.g. the behavior for methods that use the
81
+ # long-running operation pattern.
82
+ # @!attribute [rw] new_issue_uri
83
+ # @return [::String]
84
+ # Link to a place that API users can report issues. Example:
85
+ # https://issuetracker.google.com/issues/new?component=190865&template=1161103
86
+ # @!attribute [rw] documentation_uri
87
+ # @return [::String]
88
+ # Link to product home page. Example:
89
+ # https://cloud.google.com/asset-inventory/docs/overview
90
+ # @!attribute [rw] api_short_name
91
+ # @return [::String]
92
+ # Used as a tracking tag when collecting data about the APIs developer
93
+ # relations artifacts like docs, packages delivered to package managers,
94
+ # etc. Example: "speech".
95
+ # @!attribute [rw] github_label
96
+ # @return [::String]
97
+ # GitHub label to apply to issues and pull requests opened for this API.
98
+ # @!attribute [rw] codeowner_github_teams
99
+ # @return [::Array<::String>]
100
+ # GitHub teams to be added to CODEOWNERS in the directory in GitHub
101
+ # containing source code for the client libraries for this API.
102
+ # @!attribute [rw] doc_tag_prefix
103
+ # @return [::String]
104
+ # A prefix used in sample code when demarking regions to be included in
105
+ # documentation.
106
+ # @!attribute [rw] organization
107
+ # @return [::Google::Api::ClientLibraryOrganization]
108
+ # For whom the client library is being published.
109
+ # @!attribute [rw] library_settings
110
+ # @return [::Array<::Google::Api::ClientLibrarySettings>]
111
+ # Client library settings. If the same version string appears multiple
112
+ # times in this list, then the last one wins. Settings from earlier
113
+ # settings with the same version string are discarded.
114
+ class Publishing
115
+ include ::Google::Protobuf::MessageExts
116
+ extend ::Google::Protobuf::MessageExts::ClassMethods
117
+ end
118
+
119
+ # Settings for Java client libraries.
120
+ # @!attribute [rw] library_package
121
+ # @return [::String]
122
+ # The package name to use in Java. Clobbers the java_package option
123
+ # set in the protobuf. This should be used **only** by APIs
124
+ # who have already set the language_settings.java.package_name" field
125
+ # in gapic.yaml. API teams should use the protobuf java_package option
126
+ # where possible.
127
+ #
128
+ # Example of a YAML configuration::
129
+ #
130
+ # publishing:
131
+ # java_settings:
132
+ # library_package: com.google.cloud.pubsub.v1
133
+ # @!attribute [rw] service_class_names
134
+ # @return [::Google::Protobuf::Map{::String => ::String}]
135
+ # Configure the Java class name to use instead of the service's for its
136
+ # corresponding generated GAPIC client. Keys are fully-qualified
137
+ # service names as they appear in the protobuf (including the full
138
+ # the language_settings.java.interface_names" field in gapic.yaml. API
139
+ # teams should otherwise use the service name as it appears in the
140
+ # protobuf.
141
+ #
142
+ # Example of a YAML configuration::
143
+ #
144
+ # publishing:
145
+ # java_settings:
146
+ # service_class_names:
147
+ # - google.pubsub.v1.Publisher: TopicAdmin
148
+ # - google.pubsub.v1.Subscriber: SubscriptionAdmin
149
+ # @!attribute [rw] common
150
+ # @return [::Google::Api::CommonLanguageSettings]
151
+ # Some settings.
152
+ class JavaSettings
153
+ include ::Google::Protobuf::MessageExts
154
+ extend ::Google::Protobuf::MessageExts::ClassMethods
155
+
156
+ # @!attribute [rw] key
157
+ # @return [::String]
158
+ # @!attribute [rw] value
159
+ # @return [::String]
160
+ class ServiceClassNamesEntry
161
+ include ::Google::Protobuf::MessageExts
162
+ extend ::Google::Protobuf::MessageExts::ClassMethods
163
+ end
164
+ end
165
+
166
+ # Settings for C++ client libraries.
167
+ # @!attribute [rw] common
168
+ # @return [::Google::Api::CommonLanguageSettings]
169
+ # Some settings.
170
+ class CppSettings
171
+ include ::Google::Protobuf::MessageExts
172
+ extend ::Google::Protobuf::MessageExts::ClassMethods
173
+ end
174
+
175
+ # Settings for Php client libraries.
176
+ # @!attribute [rw] common
177
+ # @return [::Google::Api::CommonLanguageSettings]
178
+ # Some settings.
179
+ class PhpSettings
180
+ include ::Google::Protobuf::MessageExts
181
+ extend ::Google::Protobuf::MessageExts::ClassMethods
182
+ end
183
+
184
+ # Settings for Python client libraries.
185
+ # @!attribute [rw] common
186
+ # @return [::Google::Api::CommonLanguageSettings]
187
+ # Some settings.
188
+ class PythonSettings
189
+ include ::Google::Protobuf::MessageExts
190
+ extend ::Google::Protobuf::MessageExts::ClassMethods
191
+ end
192
+
193
+ # Settings for Node client libraries.
194
+ # @!attribute [rw] common
195
+ # @return [::Google::Api::CommonLanguageSettings]
196
+ # Some settings.
197
+ class NodeSettings
198
+ include ::Google::Protobuf::MessageExts
199
+ extend ::Google::Protobuf::MessageExts::ClassMethods
200
+ end
201
+
202
+ # Settings for Dotnet client libraries.
203
+ # @!attribute [rw] common
204
+ # @return [::Google::Api::CommonLanguageSettings]
205
+ # Some settings.
206
+ class DotnetSettings
207
+ include ::Google::Protobuf::MessageExts
208
+ extend ::Google::Protobuf::MessageExts::ClassMethods
209
+ end
210
+
211
+ # Settings for Ruby client libraries.
212
+ # @!attribute [rw] common
213
+ # @return [::Google::Api::CommonLanguageSettings]
214
+ # Some settings.
215
+ class RubySettings
216
+ include ::Google::Protobuf::MessageExts
217
+ extend ::Google::Protobuf::MessageExts::ClassMethods
218
+ end
219
+
220
+ # Settings for Go client libraries.
221
+ # @!attribute [rw] common
222
+ # @return [::Google::Api::CommonLanguageSettings]
223
+ # Some settings.
224
+ class GoSettings
225
+ include ::Google::Protobuf::MessageExts
226
+ extend ::Google::Protobuf::MessageExts::ClassMethods
227
+ end
228
+
229
+ # Describes the generator configuration for a method.
230
+ # @!attribute [rw] selector
231
+ # @return [::String]
232
+ # The fully qualified name of the method, for which the options below apply.
233
+ # This is used to find the method to apply the options.
234
+ # @!attribute [rw] long_running
235
+ # @return [::Google::Api::MethodSettings::LongRunning]
236
+ # Describes settings to use for long-running operations when generating
237
+ # API methods for RPCs. Complements RPCs that use the annotations in
238
+ # google/longrunning/operations.proto.
239
+ #
240
+ # Example of a YAML configuration::
241
+ #
242
+ # publishing:
243
+ # method_behavior:
244
+ # - selector: CreateAdDomain
245
+ # long_running:
246
+ # initial_poll_delay:
247
+ # seconds: 60 # 1 minute
248
+ # poll_delay_multiplier: 1.5
249
+ # max_poll_delay:
250
+ # seconds: 360 # 6 minutes
251
+ # total_poll_timeout:
252
+ # seconds: 54000 # 90 minutes
253
+ class MethodSettings
254
+ include ::Google::Protobuf::MessageExts
255
+ extend ::Google::Protobuf::MessageExts::ClassMethods
256
+
257
+ # Describes settings to use when generating API methods that use the
258
+ # long-running operation pattern.
259
+ # All default values below are from those used in the client library
260
+ # generators (e.g.
261
+ # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
262
+ # @!attribute [rw] initial_poll_delay
263
+ # @return [::Google::Protobuf::Duration]
264
+ # Initial delay after which the first poll request will be made.
265
+ # Default value: 5 seconds.
266
+ # @!attribute [rw] poll_delay_multiplier
267
+ # @return [::Float]
268
+ # Multiplier to gradually increase delay between subsequent polls until it
269
+ # reaches max_poll_delay.
270
+ # Default value: 1.5.
271
+ # @!attribute [rw] max_poll_delay
272
+ # @return [::Google::Protobuf::Duration]
273
+ # Maximum time between two subsequent poll requests.
274
+ # Default value: 45 seconds.
275
+ # @!attribute [rw] total_poll_timeout
276
+ # @return [::Google::Protobuf::Duration]
277
+ # Total polling timeout.
278
+ # Default value: 5 minutes.
279
+ class LongRunning
280
+ include ::Google::Protobuf::MessageExts
281
+ extend ::Google::Protobuf::MessageExts::ClassMethods
282
+ end
283
+ end
284
+
285
+ # The organization for which the client libraries are being published.
286
+ # Affects the url where generated docs are published, etc.
287
+ module ClientLibraryOrganization
288
+ # Not useful.
289
+ CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0
290
+
291
+ # Google Cloud Platform Org.
292
+ CLOUD = 1
293
+
294
+ # Ads (Advertising) Org.
295
+ ADS = 2
296
+
297
+ # Photos Org.
298
+ PHOTOS = 3
299
+
300
+ # Street View Org.
301
+ STREET_VIEW = 4
302
+ end
303
+
304
+ # To where should client libraries be published?
305
+ module ClientLibraryDestination
306
+ # Client libraries will neither be generated nor published to package
307
+ # managers.
308
+ CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0
309
+
310
+ # Generate the client library in a repo under github.com/googleapis,
311
+ # but don't publish it to package managers.
312
+ GITHUB = 10
313
+
314
+ # Publish the library to package managers like nuget.org and npmjs.com.
315
+ PACKAGE_MANAGER = 20
316
+ end
317
+ end
318
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # The launch stage as defined by [Google Cloud Platform
23
+ # Launch Stages](https://cloud.google.com/terms/launch-stages).
24
+ module LaunchStage
25
+ # Do not use this default value.
26
+ LAUNCH_STAGE_UNSPECIFIED = 0
27
+
28
+ # The feature is not yet implemented. Users can not use it.
29
+ UNIMPLEMENTED = 6
30
+
31
+ # Prelaunch features are hidden from users and are only visible internally.
32
+ PRELAUNCH = 7
33
+
34
+ # Early Access features are limited to a closed group of testers. To use
35
+ # these features, you must sign up in advance and sign a Trusted Tester
36
+ # agreement (which includes confidentiality provisions). These features may
37
+ # be unstable, changed in backward-incompatible ways, and are not
38
+ # guaranteed to be released.
39
+ EARLY_ACCESS = 1
40
+
41
+ # Alpha is a limited availability test for releases before they are cleared
42
+ # for widespread use. By Alpha, all significant design issues are resolved
43
+ # and we are in the process of verifying functionality. Alpha customers
44
+ # need to apply for access, agree to applicable terms, and have their
45
+ # projects allowlisted. Alpha releases don't have to be feature complete,
46
+ # no SLAs are provided, and there are no technical support obligations, but
47
+ # they will be far enough along that customers can actually use them in
48
+ # test environments or for limited-use tests -- just like they would in
49
+ # normal production cases.
50
+ ALPHA = 2
51
+
52
+ # Beta is the point at which we are ready to open a release for any
53
+ # customer to use. There are no SLA or technical support obligations in a
54
+ # Beta release. Products will be complete from a feature perspective, but
55
+ # may have some open outstanding issues. Beta releases are suitable for
56
+ # limited production use cases.
57
+ BETA = 3
58
+
59
+ # GA features are open to all developers and are considered stable and
60
+ # fully qualified for production use.
61
+ GA = 4
62
+
63
+ # Deprecated features are scheduled to be shut down and removed. For more
64
+ # information, see the "Deprecation Policy" section of our [Terms of
65
+ # Service](https://cloud.google.com/terms/)
66
+ # and the [Google Cloud Platform Subject to the Deprecation
67
+ # Policy](https://cloud.google.com/terms/deprecation) documentation.
68
+ DEPRECATED = 5
69
+ end
70
+ end
71
+ end
@@ -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
@@ -464,8 +474,8 @@ module Google
464
474
  # in responses from the server; it is ignored if it is set in any requests.
465
475
  # @!attribute [r] state
466
476
  # @return [::Google::Cloud::PubSub::V1::Subscription::State]
467
- # Output only. An output-only field indicating whether or not the subscription can receive
468
- # messages.
477
+ # Output only. An output-only field indicating whether or not the
478
+ # subscription can receive messages.
469
479
  class Subscription
470
480
  include ::Google::Protobuf::MessageExts
471
481
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -663,8 +673,8 @@ module Google
663
673
  # subscription's backlog.
664
674
  # @!attribute [r] state
665
675
  # @return [::Google::Cloud::PubSub::V1::BigQueryConfig::State]
666
- # Output only. An output-only field that indicates whether or not the subscription can
667
- # receive messages.
676
+ # Output only. An output-only field that indicates whether or not the
677
+ # subscription can receive messages.
668
678
  class BigQueryConfig
669
679
  include ::Google::Protobuf::MessageExts
670
680
  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 `name` and `type`, but not `definition`. Set to `FULL` to retrieve all
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.12.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: 2022-10-21 00:00:00.000000000 Z
11
+ date: 2023-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.12'
19
+ version: 0.16.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.12'
29
+ version: 0.16.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -215,7 +215,9 @@ files:
215
215
  - lib/google/pubsub/v1/schema_pb.rb
216
216
  - lib/google/pubsub/v1/schema_services_pb.rb
217
217
  - proto_docs/README.md
218
+ - proto_docs/google/api/client.rb
218
219
  - proto_docs/google/api/field_behavior.rb
220
+ - proto_docs/google/api/launch_stage.rb
219
221
  - proto_docs/google/api/resource.rb
220
222
  - proto_docs/google/protobuf/duration.rb
221
223
  - proto_docs/google/protobuf/empty.rb
@@ -243,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
245
  - !ruby/object:Gem::Version
244
246
  version: '0'
245
247
  requirements: []
246
- rubygems_version: 3.3.14
248
+ rubygems_version: 3.4.2
247
249
  signing_key:
248
250
  specification_version: 4
249
251
  summary: API Client library for the Cloud Pub/Sub V1 API