google-cloud-pubsub-v1 0.9.0 → 0.10.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: 5b8d4a04b957bf51f78e7cdfd7855287072ea18b92ca22bd3deb0d69108565ca
4
- data.tar.gz: 9bb5b1febf8dfbe5764ae2576674e658dd784ae97c207af9476658a836a94ea8
3
+ metadata.gz: cca9d3319952549629377f2711733a83ebc7e7df2f0fc6252c807bf06abaadbb
4
+ data.tar.gz: 33ee951144993321545c68373e1db7a349fcb788b581d1d69bbfccf113ff2a01
5
5
  SHA512:
6
- metadata.gz: 06e2c616cca3ee3911ac3b47ec32682cb1e15194b5287691a5e2c1811b993b9b2b0a250397573cc768a9967af5a8168464777fb4b7c0ee48d3cbdcd2b6cfc116
7
- data.tar.gz: 99589685f3ae59c8e00eccc010751f8ddf5acdbe0766411f672a533e2367840dc449116977d4981d0254707fe1bcec3df62a286061c5ae90a46e259c5a96c1fe
6
+ metadata.gz: c09ad2ff9cb8f6b34879b4f8c3cd83a4f061efc2fec9c57ef101f542cfae5cadbeed8d20273613f5bb2be7d7a5934b7951d2c12ed7df67ed6d81515c53b82c66
7
+ data.tar.gz: b7ceb6290a46805732d3732ea44fdb63875ba21ff192ad08da34796cdbc2c85b6f7e7d4879e79f0316f6886b400470493498c72446fc588529f16c5eb3e90aee
data/README.md CHANGED
@@ -69,6 +69,11 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
79
  This library is supported on Ruby 2.5+.
@@ -249,7 +249,7 @@ module Google
249
249
  # @param options [::Gapic::CallOptions, ::Hash]
250
250
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
251
251
  #
252
- # @overload create_subscription(name: nil, topic: nil, push_config: nil, ack_deadline_seconds: nil, retain_acked_messages: nil, message_retention_duration: nil, labels: nil, enable_message_ordering: nil, expiration_policy: nil, filter: nil, dead_letter_policy: nil, retry_policy: nil, detached: nil, enable_exactly_once_delivery: nil)
252
+ # @overload create_subscription(name: nil, topic: nil, push_config: nil, bigquery_config: nil, ack_deadline_seconds: nil, retain_acked_messages: nil, message_retention_duration: nil, labels: nil, enable_message_ordering: nil, expiration_policy: nil, filter: nil, dead_letter_policy: nil, retry_policy: nil, detached: nil, enable_exactly_once_delivery: nil)
253
253
  # Pass arguments to `create_subscription` via keyword arguments. Note that at
254
254
  # least one keyword argument is required. To specify no parameters, or to keep all
255
255
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -267,8 +267,14 @@ module Google
267
267
  # field will be `_deleted-topic_` if the topic has been deleted.
268
268
  # @param push_config [::Google::Cloud::PubSub::V1::PushConfig, ::Hash]
269
269
  # If push delivery is used with this subscription, this field is
270
- # used to configure it. An empty `pushConfig` signifies that the subscriber
271
- # will pull and ack messages using API methods.
270
+ # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
271
+ # but not both. If both are empty, then the subscriber will pull and ack
272
+ # messages using API methods.
273
+ # @param bigquery_config [::Google::Cloud::PubSub::V1::BigQueryConfig, ::Hash]
274
+ # If delivery to BigQuery is used with this subscription, this field is
275
+ # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
276
+ # but not both. If both are empty, then the subscriber will pull and ack
277
+ # messages using API methods.
272
278
  # @param ack_deadline_seconds [::Integer]
273
279
  # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
274
280
  # the subscriber to acknowledge receipt before resending the message. In the
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module PubSub
23
23
  module V1
24
- VERSION = "0.9.0"
24
+ VERSION = "0.10.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/pubsub/v1/pubsub.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -10,7 +12,6 @@ require 'google/protobuf/empty_pb'
10
12
  require 'google/protobuf/field_mask_pb'
11
13
  require 'google/protobuf/timestamp_pb'
12
14
  require 'google/pubsub/v1/schema_pb'
13
- require 'google/protobuf'
14
15
 
15
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
17
  add_file("google/pubsub/v1/pubsub.proto", :syntax => :proto3) do
@@ -90,6 +91,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
90
91
  optional :name, :string, 1
91
92
  optional :topic, :string, 2
92
93
  optional :push_config, :message, 4, "google.pubsub.v1.PushConfig"
94
+ optional :bigquery_config, :message, 18, "google.pubsub.v1.BigQueryConfig"
93
95
  optional :ack_deadline_seconds, :int32, 5
94
96
  optional :retain_acked_messages, :bool, 7
95
97
  optional :message_retention_duration, :message, 8, "google.protobuf.Duration"
@@ -102,6 +104,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
102
104
  optional :detached, :bool, 15
103
105
  optional :enable_exactly_once_delivery, :bool, 16
104
106
  optional :topic_message_retention_duration, :message, 17, "google.protobuf.Duration"
107
+ optional :state, :enum, 19, "google.pubsub.v1.Subscription.State"
108
+ end
109
+ add_enum "google.pubsub.v1.Subscription.State" do
110
+ value :STATE_UNSPECIFIED, 0
111
+ value :ACTIVE, 1
112
+ value :RESOURCE_ERROR, 2
105
113
  end
106
114
  add_message "google.pubsub.v1.RetryPolicy" do
107
115
  optional :minimum_backoff, :message, 1, "google.protobuf.Duration"
@@ -125,6 +133,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
125
133
  optional :service_account_email, :string, 1
126
134
  optional :audience, :string, 2
127
135
  end
136
+ add_message "google.pubsub.v1.BigQueryConfig" do
137
+ optional :table, :string, 1
138
+ optional :use_topic_schema, :bool, 2
139
+ optional :write_metadata, :bool, 3
140
+ optional :drop_unknown_fields, :bool, 4
141
+ optional :state, :enum, 5, "google.pubsub.v1.BigQueryConfig.State"
142
+ end
143
+ add_enum "google.pubsub.v1.BigQueryConfig.State" do
144
+ value :STATE_UNSPECIFIED, 0
145
+ value :ACTIVE, 1
146
+ value :PERMISSION_DENIED, 2
147
+ value :NOT_FOUND, 3
148
+ value :SCHEMA_MISMATCH, 4
149
+ end
128
150
  add_message "google.pubsub.v1.ReceivedMessage" do
129
151
  optional :ack_id, :string, 1
130
152
  optional :message, :message, 2, "google.pubsub.v1.PubsubMessage"
@@ -263,11 +285,14 @@ module Google
263
285
  DetachSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DetachSubscriptionRequest").msgclass
264
286
  DetachSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DetachSubscriptionResponse").msgclass
265
287
  Subscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription").msgclass
288
+ Subscription::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription.State").enummodule
266
289
  RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.RetryPolicy").msgclass
267
290
  DeadLetterPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeadLetterPolicy").msgclass
268
291
  ExpirationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ExpirationPolicy").msgclass
269
292
  PushConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig").msgclass
270
293
  PushConfig::OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig.OidcToken").msgclass
294
+ BigQueryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.BigQueryConfig").msgclass
295
+ BigQueryConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.BigQueryConfig.State").enummodule
271
296
  ReceivedMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ReceivedMessage").msgclass
272
297
  GetSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSubscriptionRequest").msgclass
273
298
  UpdateSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSubscriptionRequest").msgclass
@@ -1,12 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/pubsub/v1/schema.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
7
9
  require 'google/api/resource_pb'
8
10
  require 'google/protobuf/empty_pb'
9
- require 'google/protobuf'
10
11
 
11
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
13
  add_file("google/pubsub/v1/schema.proto", :syntax => :proto3) do
@@ -343,8 +343,15 @@ module Google
343
343
  # @!attribute [rw] push_config
344
344
  # @return [::Google::Cloud::PubSub::V1::PushConfig]
345
345
  # If push delivery is used with this subscription, this field is
346
- # used to configure it. An empty `pushConfig` signifies that the subscriber
347
- # will pull and ack messages using API methods.
346
+ # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
347
+ # but not both. If both are empty, then the subscriber will pull and ack
348
+ # messages using API methods.
349
+ # @!attribute [rw] bigquery_config
350
+ # @return [::Google::Cloud::PubSub::V1::BigQueryConfig]
351
+ # If delivery to BigQuery is used with this subscription, this field is
352
+ # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
353
+ # but not both. If both are empty, then the subscriber will pull and ack
354
+ # messages using API methods.
348
355
  # @!attribute [rw] ack_deadline_seconds
349
356
  # @return [::Integer]
350
357
  # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
@@ -455,6 +462,10 @@ module Google
455
462
  # `topic_message_retention_duration` are always available to subscribers. See
456
463
  # the `message_retention_duration` field in `Topic`. This field is set only
457
464
  # in responses from the server; it is ignored if it is set in any requests.
465
+ # @!attribute [r] state
466
+ # @return [::Google::Cloud::PubSub::V1::Subscription::State]
467
+ # Output only. An output-only field indicating whether or not the subscription can receive
468
+ # messages.
458
469
  class Subscription
459
470
  include ::Google::Protobuf::MessageExts
460
471
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -467,6 +478,20 @@ module Google
467
478
  include ::Google::Protobuf::MessageExts
468
479
  extend ::Google::Protobuf::MessageExts::ClassMethods
469
480
  end
481
+
482
+ # Possible states for a subscription.
483
+ module State
484
+ # Default value. This value is unused.
485
+ STATE_UNSPECIFIED = 0
486
+
487
+ # The subscription can actively receive messages
488
+ ACTIVE = 1
489
+
490
+ # The subscription cannot receive messages because of an error with the
491
+ # resource to which it pushes messages. See the more detailed error state
492
+ # in the corresponding configuration.
493
+ RESOURCE_ERROR = 2
494
+ end
470
495
  end
471
496
 
472
497
  # A policy that specifies how Cloud Pub/Sub retries message delivery.
@@ -613,6 +638,56 @@ module Google
613
638
  end
614
639
  end
615
640
 
641
+ # Configuration for a BigQuery subscription.
642
+ # @!attribute [rw] table
643
+ # @return [::String]
644
+ # The name of the table to which to write data, of the form
645
+ # \\{projectId}:\\{datasetId}.\\{tableId}
646
+ # @!attribute [rw] use_topic_schema
647
+ # @return [::Boolean]
648
+ # When true, use the topic's schema as the columns to write to in BigQuery,
649
+ # if it exists.
650
+ # @!attribute [rw] write_metadata
651
+ # @return [::Boolean]
652
+ # When true, write the subscription name, message_id, publish_time,
653
+ # attributes, and ordering_key to additional columns in the table. The
654
+ # subscription name, message_id, and publish_time fields are put in their own
655
+ # columns while all other message properties (other than data) are written to
656
+ # a JSON object in the attributes column.
657
+ # @!attribute [rw] drop_unknown_fields
658
+ # @return [::Boolean]
659
+ # When true and use_topic_schema is true, any fields that are a part of the
660
+ # topic schema that are not part of the BigQuery table schema are dropped
661
+ # when writing to BigQuery. Otherwise, the schemas must be kept in sync and
662
+ # any messages with extra fields are not written and remain in the
663
+ # subscription's backlog.
664
+ # @!attribute [r] state
665
+ # @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.
668
+ class BigQueryConfig
669
+ include ::Google::Protobuf::MessageExts
670
+ extend ::Google::Protobuf::MessageExts::ClassMethods
671
+
672
+ # Possible states for a BigQuery subscription.
673
+ module State
674
+ # Default value. This value is unused.
675
+ STATE_UNSPECIFIED = 0
676
+
677
+ # The subscription can actively send messages to BigQuery
678
+ ACTIVE = 1
679
+
680
+ # Cannot write to the BigQuery table because of permission denied errors.
681
+ PERMISSION_DENIED = 2
682
+
683
+ # Cannot write to the BigQuery table because it does not exist.
684
+ NOT_FOUND = 3
685
+
686
+ # Cannot write to the BigQuery table due to a schema mismatch.
687
+ SCHEMA_MISMATCH = 4
688
+ end
689
+ end
690
+
616
691
  # A message and its corresponding acknowledgment ID.
617
692
  # @!attribute [rw] ack_id
618
693
  # @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.9.0
4
+ version: 0.10.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-04-20 00:00:00.000000000 Z
11
+ date: 2022-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common