proto_docs/google/pubsub/v1/pubsub.rb in google-cloud-pubsub-v1-0.9.0 vs proto_docs/google/pubsub/v1/pubsub.rb in google-cloud-pubsub-v1-0.10.0

- old
+ new

@@ -341,12 +341,19 @@ # messages. Format is `projects/{project}/topics/{topic}`. The value of this # field will be `_deleted-topic_` if the topic has been deleted. # @!attribute [rw] push_config # @return [::Google::Cloud::PubSub::V1::PushConfig] # If push delivery is used with this subscription, this field is - # used to configure it. An empty `pushConfig` signifies that the subscriber - # will pull and ack messages using API methods. + # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set, + # but not both. If both are empty, then the subscriber will pull and ack + # messages using API methods. + # @!attribute [rw] bigquery_config + # @return [::Google::Cloud::PubSub::V1::BigQueryConfig] + # If delivery to BigQuery is used with this subscription, this field is + # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set, + # but not both. If both are empty, then the subscriber will pull and ack + # messages using API methods. # @!attribute [rw] ack_deadline_seconds # @return [::Integer] # The approximate amount of time (on a best-effort basis) Pub/Sub waits for # the subscriber to acknowledge receipt before resending the message. In the # interval after the message is delivered and before it is acknowledged, it @@ -453,10 +460,14 @@ # after it is published to the subscription's topic. If this field is set, # messages published to the subscription's topic in the last # `topic_message_retention_duration` are always available to subscribers. See # the `message_retention_duration` field in `Topic`. This field is set only # in responses from the server; it is ignored if it is set in any requests. + # @!attribute [r] state + # @return [::Google::Cloud::PubSub::V1::Subscription::State] + # Output only. An output-only field indicating whether or not the subscription can receive + # messages. class Subscription include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key @@ -465,10 +476,24 @@ # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Possible states for a subscription. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The subscription can actively receive messages + ACTIVE = 1 + + # The subscription cannot receive messages because of an error with the + # resource to which it pushes messages. See the more detailed error state + # in the corresponding configuration. + RESOURCE_ERROR = 2 + end end # A policy that specifies how Cloud Pub/Sub retries message delivery. # # Retry delay will be exponential based on provided minimum and maximum @@ -608,9 +633,59 @@ # @!attribute [rw] value # @return [::String] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for a BigQuery subscription. + # @!attribute [rw] table + # @return [::String] + # The name of the table to which to write data, of the form + # \\{projectId}:\\{datasetId}.\\{tableId} + # @!attribute [rw] use_topic_schema + # @return [::Boolean] + # When true, use the topic's schema as the columns to write to in BigQuery, + # if it exists. + # @!attribute [rw] write_metadata + # @return [::Boolean] + # When true, write the subscription name, message_id, publish_time, + # attributes, and ordering_key to additional columns in the table. The + # subscription name, message_id, and publish_time fields are put in their own + # columns while all other message properties (other than data) are written to + # a JSON object in the attributes column. + # @!attribute [rw] drop_unknown_fields + # @return [::Boolean] + # When true and use_topic_schema is true, any fields that are a part of the + # topic schema that are not part of the BigQuery table schema are dropped + # when writing to BigQuery. Otherwise, the schemas must be kept in sync and + # any messages with extra fields are not written and remain in the + # subscription's backlog. + # @!attribute [r] state + # @return [::Google::Cloud::PubSub::V1::BigQueryConfig::State] + # Output only. An output-only field that indicates whether or not the subscription can + # receive messages. + class BigQueryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states for a BigQuery subscription. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The subscription can actively send messages to BigQuery + ACTIVE = 1 + + # Cannot write to the BigQuery table because of permission denied errors. + PERMISSION_DENIED = 2 + + # Cannot write to the BigQuery table because it does not exist. + NOT_FOUND = 3 + + # Cannot write to the BigQuery table due to a schema mismatch. + SCHEMA_MISMATCH = 4 end end # A message and its corresponding acknowledgment ID. # @!attribute [rw] ack_id