From 6f271db0feadcd338e2c5a0735e3828df5327772 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 May 2022 15:07:32 -0400 Subject: [PATCH] feat: add BigQuery configuration for subscriptions (#1133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add BigQuery configuration for subscriptions PiperOrigin-RevId: 449031535 Source-Link: https://github.com/googleapis/googleapis/commit/feec34dfac930eb0ab8c3e72ff5794c3f4c5924d Source-Link: https://github.com/googleapis/googleapis-gen/commit/89664e9708c19d532c63f7a16fd79cb631d87aa1 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODk2NjRlOTcwOGMxOWQ1MzJjNjNmN2ExNmZkNzljYjYzMWQ4N2FhMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../pubsub/v1/SubscriptionAdminClient.java | 18 +- .../v1/SubscriptionAdminClientTest.java | 8 + .../com/google/pubsub/v1/BigQueryConfig.java | 1318 +++++++++++++++++ .../pubsub/v1/BigQueryConfigOrBuilder.java | 131 ++ .../com/google/pubsub/v1/PubsubProto.java | 533 +++---- .../com/google/pubsub/v1/PullRequest.java | 8 +- .../pubsub/v1/PullRequestOrBuilder.java | 2 +- .../com/google/pubsub/v1/Subscription.java | 705 ++++++++- .../pubsub/v1/SubscriptionOrBuilder.java | 90 +- .../main/proto/google/pubsub/v1/pubsub.proto | 78 +- 10 files changed, 2591 insertions(+), 300 deletions(-) create mode 100644 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java create mode 100644 proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index 9b48ca018..f65dba119 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -235,8 +235,8 @@ public SubscriberStub getStub() { * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be * `_deleted-topic_` if the topic has been deleted. * @param 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. + * 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. * @param ackDeadlineSeconds 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 is considered to be @@ -303,8 +303,8 @@ public final Subscription createSubscription( * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be * `_deleted-topic_` if the topic has been deleted. * @param 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. + * 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. * @param ackDeadlineSeconds 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 is considered to be @@ -371,8 +371,8 @@ public final Subscription createSubscription( * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be * `_deleted-topic_` if the topic has been deleted. * @param 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. + * 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. * @param ackDeadlineSeconds 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 is considered to be @@ -439,8 +439,8 @@ public final Subscription createSubscription( * messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be * `_deleted-topic_` if the topic has been deleted. * @param 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. + * 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. * @param ackDeadlineSeconds 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 is considered to be @@ -494,6 +494,7 @@ public final Subscription createSubscription( * .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) * .setPushConfig(PushConfig.newBuilder().build()) + * .setBigqueryConfig(BigQueryConfig.newBuilder().build()) * .setAckDeadlineSeconds(2135351438) * .setRetainAckedMessages(true) * .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -752,6 +753,7 @@ public final Subscription createSubscription( * .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) * .setPushConfig(PushConfig.newBuilder().build()) + * .setBigqueryConfig(BigQueryConfig.newBuilder().build()) * .setAckDeadlineSeconds(2135351438) * .setRetainAckedMessages(true) * .setMessageRetentionDuration(Duration.newBuilder().build()) diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java index d3402991a..e3476adf7 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java @@ -46,6 +46,7 @@ import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import com.google.pubsub.v1.AcknowledgeRequest; +import com.google.pubsub.v1.BigQueryConfig; import com.google.pubsub.v1.CreateSnapshotRequest; import com.google.pubsub.v1.DeadLetterPolicy; import com.google.pubsub.v1.DeleteSnapshotRequest; @@ -140,6 +141,7 @@ public void createSubscriptionTest() throws Exception { .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .setPushConfig(PushConfig.newBuilder().build()) + .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -202,6 +204,7 @@ public void createSubscriptionTest2() throws Exception { .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .setPushConfig(PushConfig.newBuilder().build()) + .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -264,6 +267,7 @@ public void createSubscriptionTest3() throws Exception { .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .setPushConfig(PushConfig.newBuilder().build()) + .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -326,6 +330,7 @@ public void createSubscriptionTest4() throws Exception { .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .setPushConfig(PushConfig.newBuilder().build()) + .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -388,6 +393,7 @@ public void getSubscriptionTest() throws Exception { .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .setPushConfig(PushConfig.newBuilder().build()) + .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -440,6 +446,7 @@ public void getSubscriptionTest2() throws Exception { .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .setPushConfig(PushConfig.newBuilder().build()) + .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) @@ -492,6 +499,7 @@ public void updateSubscriptionTest() throws Exception { .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .setPushConfig(PushConfig.newBuilder().build()) + .setBigqueryConfig(BigQueryConfig.newBuilder().build()) .setAckDeadlineSeconds(2135351438) .setRetainAckedMessages(true) .setMessageRetentionDuration(Duration.newBuilder().build()) diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java new file mode 100644 index 000000000..fb58c043b --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfig.java @@ -0,0 +1,1318 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +/** + * + * + *
+ * Configuration for a BigQuery subscription.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.BigQueryConfig} + */ +public final class BigQueryConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.BigQueryConfig) + BigQueryConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryConfig.newBuilder() to construct. + private BigQueryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryConfig() { + table_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BigQueryConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + table_ = s; + break; + } + case 16: + { + useTopicSchema_ = input.readBool(); + break; + } + case 24: + { + writeMetadata_ = input.readBool(); + break; + } + case 32: + { + dropUnknownFields_ = input.readBool(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_BigQueryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_BigQueryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.BigQueryConfig.class, + com.google.pubsub.v1.BigQueryConfig.Builder.class); + } + + /** + * + * + *
+   * Possible states for a BigQuery subscription.
+   * 
+ * + * Protobuf enum {@code google.pubsub.v1.BigQueryConfig.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The subscription can actively send messages to BigQuery
+     * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+     * Cannot write to the BigQuery table because of permission denied errors.
+     * 
+ * + * PERMISSION_DENIED = 2; + */ + PERMISSION_DENIED(2), + /** + * + * + *
+     * Cannot write to the BigQuery table because it does not exist.
+     * 
+ * + * NOT_FOUND = 3; + */ + NOT_FOUND(3), + /** + * + * + *
+     * Cannot write to the BigQuery table due to a schema mismatch.
+     * 
+ * + * SCHEMA_MISMATCH = 4; + */ + SCHEMA_MISMATCH(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The subscription can actively send messages to BigQuery
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + * + * + *
+     * Cannot write to the BigQuery table because of permission denied errors.
+     * 
+ * + * PERMISSION_DENIED = 2; + */ + public static final int PERMISSION_DENIED_VALUE = 2; + /** + * + * + *
+     * Cannot write to the BigQuery table because it does not exist.
+     * 
+ * + * NOT_FOUND = 3; + */ + public static final int NOT_FOUND_VALUE = 3; + /** + * + * + *
+     * Cannot write to the BigQuery table due to a schema mismatch.
+     * 
+ * + * SCHEMA_MISMATCH = 4; + */ + public static final int SCHEMA_MISMATCH_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return PERMISSION_DENIED; + case 3: + return NOT_FOUND; + case 4: + return SCHEMA_MISMATCH; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.pubsub.v1.BigQueryConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.pubsub.v1.BigQueryConfig.State) + } + + public static final int TABLE_FIELD_NUMBER = 1; + private volatile java.lang.Object table_; + /** + * + * + *
+   * The name of the table to which to write data, of the form
+   * {projectId}:{datasetId}.{tableId}
+   * 
+ * + * string table = 1; + * + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the table to which to write data, of the form
+   * {projectId}:{datasetId}.{tableId}
+   * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USE_TOPIC_SCHEMA_FIELD_NUMBER = 2; + private boolean useTopicSchema_; + /** + * + * + *
+   * When true, use the topic's schema as the columns to write to in BigQuery,
+   * if it exists.
+   * 
+ * + * bool use_topic_schema = 2; + * + * @return The useTopicSchema. + */ + @java.lang.Override + public boolean getUseTopicSchema() { + return useTopicSchema_; + } + + public static final int WRITE_METADATA_FIELD_NUMBER = 3; + private boolean writeMetadata_; + /** + * + * + *
+   * 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.
+   * 
+ * + * bool write_metadata = 3; + * + * @return The writeMetadata. + */ + @java.lang.Override + public boolean getWriteMetadata() { + return writeMetadata_; + } + + public static final int DROP_UNKNOWN_FIELDS_FIELD_NUMBER = 4; + private boolean dropUnknownFields_; + /** + * + * + *
+   * 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.
+   * 
+ * + * bool drop_unknown_fields = 4; + * + * @return The dropUnknownFields. + */ + @java.lang.Override + public boolean getDropUnknownFields() { + return dropUnknownFields_; + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_; + /** + * + * + *
+   * Output only. An output-only field that indicates whether or not the subscription can
+   * receive messages.
+   * 
+ * + * + * .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. An output-only field that indicates whether or not the subscription can
+   * receive messages.
+   * 
+ * + * + * .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.BigQueryConfig.State getState() { + @SuppressWarnings("deprecation") + com.google.pubsub.v1.BigQueryConfig.State result = + com.google.pubsub.v1.BigQueryConfig.State.valueOf(state_); + return result == null ? com.google.pubsub.v1.BigQueryConfig.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, table_); + } + if (useTopicSchema_ != false) { + output.writeBool(2, useTopicSchema_); + } + if (writeMetadata_ != false) { + output.writeBool(3, writeMetadata_); + } + if (dropUnknownFields_ != false) { + output.writeBool(4, dropUnknownFields_); + } + if (state_ != com.google.pubsub.v1.BigQueryConfig.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + } + if (useTopicSchema_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, useTopicSchema_); + } + if (writeMetadata_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, writeMetadata_); + } + if (dropUnknownFields_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, dropUnknownFields_); + } + if (state_ != com.google.pubsub.v1.BigQueryConfig.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.BigQueryConfig)) { + return super.equals(obj); + } + com.google.pubsub.v1.BigQueryConfig other = (com.google.pubsub.v1.BigQueryConfig) obj; + + if (!getTable().equals(other.getTable())) return false; + if (getUseTopicSchema() != other.getUseTopicSchema()) return false; + if (getWriteMetadata() != other.getWriteMetadata()) return false; + if (getDropUnknownFields() != other.getDropUnknownFields()) return false; + if (state_ != other.state_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + hash = (37 * hash) + USE_TOPIC_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseTopicSchema()); + hash = (37 * hash) + WRITE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWriteMetadata()); + hash = (37 * hash) + DROP_UNKNOWN_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDropUnknownFields()); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.BigQueryConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.BigQueryConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.BigQueryConfig parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.BigQueryConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.BigQueryConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.BigQueryConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.BigQueryConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.BigQueryConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.BigQueryConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.BigQueryConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.BigQueryConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.BigQueryConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.BigQueryConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration for a BigQuery subscription.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.BigQueryConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.BigQueryConfig) + com.google.pubsub.v1.BigQueryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_BigQueryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_BigQueryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.BigQueryConfig.class, + com.google.pubsub.v1.BigQueryConfig.Builder.class); + } + + // Construct using com.google.pubsub.v1.BigQueryConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + table_ = ""; + + useTopicSchema_ = false; + + writeMetadata_ = false; + + dropUnknownFields_ = false; + + state_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_BigQueryConfig_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.BigQueryConfig getDefaultInstanceForType() { + return com.google.pubsub.v1.BigQueryConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.BigQueryConfig build() { + com.google.pubsub.v1.BigQueryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.BigQueryConfig buildPartial() { + com.google.pubsub.v1.BigQueryConfig result = new com.google.pubsub.v1.BigQueryConfig(this); + result.table_ = table_; + result.useTopicSchema_ = useTopicSchema_; + result.writeMetadata_ = writeMetadata_; + result.dropUnknownFields_ = dropUnknownFields_; + result.state_ = state_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.BigQueryConfig) { + return mergeFrom((com.google.pubsub.v1.BigQueryConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.BigQueryConfig other) { + if (other == com.google.pubsub.v1.BigQueryConfig.getDefaultInstance()) return this; + if (!other.getTable().isEmpty()) { + table_ = other.table_; + onChanged(); + } + if (other.getUseTopicSchema() != false) { + setUseTopicSchema(other.getUseTopicSchema()); + } + if (other.getWriteMetadata() != false) { + setWriteMetadata(other.getWriteMetadata()); + } + if (other.getDropUnknownFields() != false) { + setDropUnknownFields(other.getDropUnknownFields()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.BigQueryConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.BigQueryConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object table_ = ""; + /** + * + * + *
+     * The name of the table to which to write data, of the form
+     * {projectId}:{datasetId}.{tableId}
+     * 
+ * + * string table = 1; + * + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the table to which to write data, of the form
+     * {projectId}:{datasetId}.{tableId}
+     * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the table to which to write data, of the form
+     * {projectId}:{datasetId}.{tableId}
+     * 
+ * + * string table = 1; + * + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + table_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the table to which to write data, of the form
+     * {projectId}:{datasetId}.{tableId}
+     * 
+ * + * string table = 1; + * + * @return This builder for chaining. + */ + public Builder clearTable() { + + table_ = getDefaultInstance().getTable(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the table to which to write data, of the form
+     * {projectId}:{datasetId}.{tableId}
+     * 
+ * + * string table = 1; + * + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + table_ = value; + onChanged(); + return this; + } + + private boolean useTopicSchema_; + /** + * + * + *
+     * When true, use the topic's schema as the columns to write to in BigQuery,
+     * if it exists.
+     * 
+ * + * bool use_topic_schema = 2; + * + * @return The useTopicSchema. + */ + @java.lang.Override + public boolean getUseTopicSchema() { + return useTopicSchema_; + } + /** + * + * + *
+     * When true, use the topic's schema as the columns to write to in BigQuery,
+     * if it exists.
+     * 
+ * + * bool use_topic_schema = 2; + * + * @param value The useTopicSchema to set. + * @return This builder for chaining. + */ + public Builder setUseTopicSchema(boolean value) { + + useTopicSchema_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * When true, use the topic's schema as the columns to write to in BigQuery,
+     * if it exists.
+     * 
+ * + * bool use_topic_schema = 2; + * + * @return This builder for chaining. + */ + public Builder clearUseTopicSchema() { + + useTopicSchema_ = false; + onChanged(); + return this; + } + + private boolean writeMetadata_; + /** + * + * + *
+     * 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.
+     * 
+ * + * bool write_metadata = 3; + * + * @return The writeMetadata. + */ + @java.lang.Override + public boolean getWriteMetadata() { + return writeMetadata_; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * bool write_metadata = 3; + * + * @param value The writeMetadata to set. + * @return This builder for chaining. + */ + public Builder setWriteMetadata(boolean value) { + + writeMetadata_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * bool write_metadata = 3; + * + * @return This builder for chaining. + */ + public Builder clearWriteMetadata() { + + writeMetadata_ = false; + onChanged(); + return this; + } + + private boolean dropUnknownFields_; + /** + * + * + *
+     * 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.
+     * 
+ * + * bool drop_unknown_fields = 4; + * + * @return The dropUnknownFields. + */ + @java.lang.Override + public boolean getDropUnknownFields() { + return dropUnknownFields_; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * bool drop_unknown_fields = 4; + * + * @param value The dropUnknownFields to set. + * @return This builder for chaining. + */ + public Builder setDropUnknownFields(boolean value) { + + dropUnknownFields_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * bool drop_unknown_fields = 4; + * + * @return This builder for chaining. + */ + public Builder clearDropUnknownFields() { + + dropUnknownFields_ = false; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. An output-only field that indicates whether or not the subscription can
+     * receive messages.
+     * 
+ * + * + * .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. An output-only field that indicates whether or not the subscription can
+     * receive messages.
+     * 
+ * + * + * .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An output-only field that indicates whether or not the subscription can
+     * receive messages.
+     * 
+ * + * + * .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.BigQueryConfig.State getState() { + @SuppressWarnings("deprecation") + com.google.pubsub.v1.BigQueryConfig.State result = + com.google.pubsub.v1.BigQueryConfig.State.valueOf(state_); + return result == null ? com.google.pubsub.v1.BigQueryConfig.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. An output-only field that indicates whether or not the subscription can
+     * receive messages.
+     * 
+ * + * + * .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.pubsub.v1.BigQueryConfig.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An output-only field that indicates whether or not the subscription can
+     * receive messages.
+     * 
+ * + * + * .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.BigQueryConfig) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.BigQueryConfig) + private static final com.google.pubsub.v1.BigQueryConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.BigQueryConfig(); + } + + public static com.google.pubsub.v1.BigQueryConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.BigQueryConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java new file mode 100644 index 000000000..0b972a679 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/BigQueryConfigOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +package com.google.pubsub.v1; + +public interface BigQueryConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.BigQueryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the table to which to write data, of the form
+   * {projectId}:{datasetId}.{tableId}
+   * 
+ * + * string table = 1; + * + * @return The table. + */ + java.lang.String getTable(); + /** + * + * + *
+   * The name of the table to which to write data, of the form
+   * {projectId}:{datasetId}.{tableId}
+   * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + com.google.protobuf.ByteString getTableBytes(); + + /** + * + * + *
+   * When true, use the topic's schema as the columns to write to in BigQuery,
+   * if it exists.
+   * 
+ * + * bool use_topic_schema = 2; + * + * @return The useTopicSchema. + */ + boolean getUseTopicSchema(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * bool write_metadata = 3; + * + * @return The writeMetadata. + */ + boolean getWriteMetadata(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * bool drop_unknown_fields = 4; + * + * @return The dropUnknownFields. + */ + boolean getDropUnknownFields(); + + /** + * + * + *
+   * Output only. An output-only field that indicates whether or not the subscription can
+   * receive messages.
+   * 
+ * + * + * .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. An output-only field that indicates whether or not the subscription can
+   * receive messages.
+   * 
+ * + * + * .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.pubsub.v1.BigQueryConfig.State getState(); +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java index 9875c7fe8..509ddd3e4 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java @@ -135,6 +135,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_pubsub_v1_PushConfig_AttributesEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_PushConfig_AttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_BigQueryConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_BigQueryConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_ReceivedMessage_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -312,241 +316,252 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "is.com/Topic\"]\n\031DetachSubscriptionReques" + "t\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub." + "googleapis.com/Subscription\"\034\n\032DetachSub" - + "scriptionResponse\"\260\006\n\014Subscription\022\021\n\004na" + + "scriptionResponse\"\345\007\n\014Subscription\022\021\n\004na" + "me\030\001 \001(\tB\003\340A\002\0222\n\005topic\030\002 \001(\tB#\340A\002\372A\035\n\033pu" + "bsub.googleapis.com/Topic\0221\n\013push_config" - + "\030\004 \001(\0132\034.google.pubsub.v1.PushConfig\022\034\n\024" - + "ack_deadline_seconds\030\005 \001(\005\022\035\n\025retain_ack" - + "ed_messages\030\007 \001(\010\022=\n\032message_retention_d" - + "uration\030\010 \001(\0132\031.google.protobuf.Duration" - + "\022:\n\006labels\030\t \003(\0132*.google.pubsub.v1.Subs" - + "cription.LabelsEntry\022\037\n\027enable_message_o" - + "rdering\030\n \001(\010\022=\n\021expiration_policy\030\013 \001(\013" - + "2\".google.pubsub.v1.ExpirationPolicy\022\016\n\006" - + "filter\030\014 \001(\t\022>\n\022dead_letter_policy\030\r \001(\013" - + "2\".google.pubsub.v1.DeadLetterPolicy\0223\n\014" - + "retry_policy\030\016 \001(\0132\035.google.pubsub.v1.Re" - + "tryPolicy\022\020\n\010detached\030\017 \001(\010\022$\n\034enable_ex" - + "actly_once_delivery\030\020 \001(\010\022H\n topic_messa" - + "ge_retention_duration\030\021 \001(\0132\031.google.pro" - + "tobuf.DurationB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:X\352AU\n\"pubsub." - + "googleapis.com/Subscription\022/projects/{p" - + "roject}/subscriptions/{subscription}\"u\n\013" - + "RetryPolicy\0222\n\017minimum_backoff\030\001 \001(\0132\031.g" - + "oogle.protobuf.Duration\0222\n\017maximum_backo" - + "ff\030\002 \001(\0132\031.google.protobuf.Duration\"L\n\020D" - + "eadLetterPolicy\022\031\n\021dead_letter_topic\030\001 \001" - + "(\t\022\035\n\025max_delivery_attempts\030\002 \001(\005\":\n\020Exp" - + "irationPolicy\022&\n\003ttl\030\001 \001(\0132\031.google.prot" - + "obuf.Duration\"\255\002\n\nPushConfig\022\025\n\rpush_end" - + "point\030\001 \001(\t\022@\n\nattributes\030\002 \003(\0132,.google" - + ".pubsub.v1.PushConfig.AttributesEntry\022<\n" - + "\noidc_token\030\003 \001(\0132&.google.pubsub.v1.Pus" - + "hConfig.OidcTokenH\000\032<\n\tOidcToken\022\035\n\025serv" - + "ice_account_email\030\001 \001(\t\022\020\n\010audience\030\002 \001(" - + "\t\0321\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - + "ue\030\002 \001(\t:\0028\001B\027\n\025authentication_method\"m\n" - + "\017ReceivedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007mess" - + "age\030\002 \001(\0132\037.google.pubsub.v1.PubsubMessa" - + "ge\022\030\n\020delivery_attempt\030\003 \001(\005\"Z\n\026GetSubsc" - + "riptionRequest\022@\n\014subscription\030\001 \001(\tB*\340A" - + "\002\372A$\n\"pubsub.googleapis.com/Subscription" - + "\"\214\001\n\031UpdateSubscriptionRequest\0229\n\014subscr" - + "iption\030\001 \001(\0132\036.google.pubsub.v1.Subscrip" - + "tionB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google." - + "protobuf.FieldMaskB\003\340A\002\"\207\001\n\030ListSubscrip" - + "tionsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+c" - + "loudresourcemanager.googleapis.com/Proje" - + "ct\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" - + "\t\"k\n\031ListSubscriptionsResponse\0225\n\rsubscr" - + "iptions\030\001 \003(\0132\036.google.pubsub.v1.Subscri" - + "ption\022\027\n\017next_page_token\030\002 \001(\t\"]\n\031Delete" - + "SubscriptionRequest\022@\n\014subscription\030\001 \001(" - + "\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subscri" - + "ption\"\223\001\n\027ModifyPushConfigRequest\022@\n\014sub" - + "scription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleap" - + "is.com/Subscription\0226\n\013push_config\030\002 \001(\013" - + "2\034.google.pubsub.v1.PushConfigB\003\340A\002\"\215\001\n\013" - + "PullRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A" - + "$\n\"pubsub.googleapis.com/Subscription\022!\n" - + "\022return_immediately\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014max_" - + "messages\030\003 \001(\005B\003\340A\002\"L\n\014PullResponse\022<\n\021r" - + "eceived_messages\030\001 \003(\0132!.google.pubsub.v" - + "1.ReceivedMessage\"\225\001\n\030ModifyAckDeadlineR" - + "equest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pu" - + "bsub.googleapis.com/Subscription\022\024\n\007ack_" - + "ids\030\004 \003(\tB\003\340A\002\022!\n\024ack_deadline_seconds\030\003" - + " \001(\005B\003\340A\002\"l\n\022AcknowledgeRequest\022@\n\014subsc" + + "\030\004 \001(\0132\034.google.pubsub.v1.PushConfig\0229\n\017" + + "bigquery_config\030\022 \001(\0132 .google.pubsub.v1" + + ".BigQueryConfig\022\034\n\024ack_deadline_seconds\030" + + "\005 \001(\005\022\035\n\025retain_acked_messages\030\007 \001(\010\022=\n\032" + + "message_retention_duration\030\010 \001(\0132\031.googl" + + "e.protobuf.Duration\022:\n\006labels\030\t \003(\0132*.go" + + "ogle.pubsub.v1.Subscription.LabelsEntry\022" + + "\037\n\027enable_message_ordering\030\n \001(\010\022=\n\021expi" + + "ration_policy\030\013 \001(\0132\".google.pubsub.v1.E" + + "xpirationPolicy\022\016\n\006filter\030\014 \001(\t\022>\n\022dead_" + + "letter_policy\030\r \001(\0132\".google.pubsub.v1.D" + + "eadLetterPolicy\0223\n\014retry_policy\030\016 \001(\0132\035." + + "google.pubsub.v1.RetryPolicy\022\020\n\010detached" + + "\030\017 \001(\010\022$\n\034enable_exactly_once_delivery\030\020" + + " \001(\010\022H\n topic_message_retention_duration" + + "\030\021 \001(\0132\031.google.protobuf.DurationB\003\340A\003\0228" + + "\n\005state\030\023 \001(\0162$.google.pubsub.v1.Subscri" + + "ption.StateB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\">\n\005State\022\025\n\021STAT" + + "E_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\022\n\016RESOURCE_" + + "ERROR\020\002:X\352AU\n\"pubsub.googleapis.com/Subs" + + "cription\022/projects/{project}/subscriptio" + + "ns/{subscription}\"u\n\013RetryPolicy\0222\n\017mini" + + "mum_backoff\030\001 \001(\0132\031.google.protobuf.Dura" + + "tion\0222\n\017maximum_backoff\030\002 \001(\0132\031.google.p" + + "rotobuf.Duration\"L\n\020DeadLetterPolicy\022\031\n\021" + + "dead_letter_topic\030\001 \001(\t\022\035\n\025max_delivery_" + + "attempts\030\002 \001(\005\":\n\020ExpirationPolicy\022&\n\003tt" + + "l\030\001 \001(\0132\031.google.protobuf.Duration\"\255\002\n\nP" + + "ushConfig\022\025\n\rpush_endpoint\030\001 \001(\t\022@\n\nattr" + + "ibutes\030\002 \003(\0132,.google.pubsub.v1.PushConf" + + "ig.AttributesEntry\022<\n\noidc_token\030\003 \001(\0132&" + + ".google.pubsub.v1.PushConfig.OidcTokenH\000" + + "\032<\n\tOidcToken\022\035\n\025service_account_email\030\001" + + " \001(\t\022\020\n\010audience\030\002 \001(\t\0321\n\017AttributesEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\027\n\025aut" + + "hentication_method\"\221\002\n\016BigQueryConfig\022\r\n" + + "\005table\030\001 \001(\t\022\030\n\020use_topic_schema\030\002 \001(\010\022\026" + + "\n\016write_metadata\030\003 \001(\010\022\033\n\023drop_unknown_f" + + "ields\030\004 \001(\010\022:\n\005state\030\005 \001(\0162&.google.pubs" + + "ub.v1.BigQueryConfig.StateB\003\340A\003\"e\n\005State" + + "\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021P" + + "ERMISSION_DENIED\020\002\022\r\n\tNOT_FOUND\020\003\022\023\n\017SCH" + + "EMA_MISMATCH\020\004\"m\n\017ReceivedMessage\022\016\n\006ack" + + "_id\030\001 \001(\t\0220\n\007message\030\002 \001(\0132\037.google.pubs" + + "ub.v1.PubsubMessage\022\030\n\020delivery_attempt\030" + + "\003 \001(\005\"Z\n\026GetSubscriptionRequest\022@\n\014subsc" + "ription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis" - + ".com/Subscription\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\002\"" - + "\251\002\n\024StreamingPullRequest\022@\n\014subscription" - + "\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Su" - + "bscription\022\017\n\007ack_ids\030\002 \003(\t\022\037\n\027modify_de" - + "adline_seconds\030\003 \003(\005\022\037\n\027modify_deadline_" - + "ack_ids\030\004 \003(\t\022(\n\033stream_ack_deadline_sec" - + "onds\030\005 \001(\005B\003\340A\002\022\021\n\tclient_id\030\006 \001(\t\022 \n\030ma" - + "x_outstanding_messages\030\007 \001(\003\022\035\n\025max_outs" - + "tanding_bytes\030\010 \001(\003\"\262\005\n\025StreamingPullRes" - + "ponse\022<\n\021received_messages\030\001 \003(\0132!.googl" - + "e.pubsub.v1.ReceivedMessage\022a\n\030acknowled" - + "ge_confirmation\030\005 \001(\0132?.google.pubsub.v1" - + ".StreamingPullResponse.AcknowledgeConfir" - + "mation\022o\n modify_ack_deadline_confirmati" - + "on\030\003 \001(\0132E.google.pubsub.v1.StreamingPul" - + "lResponse.ModifyAckDeadlineConfirmation\022" - + "_\n\027subscription_properties\030\004 \001(\0132>.googl" - + "e.pubsub.v1.StreamingPullResponse.Subscr" - + "iptionProperties\032j\n\027AcknowledgeConfirmat" - + "ion\022\023\n\007ack_ids\030\001 \003(\tB\002\010\001\022\033\n\017invalid_ack_" - + "ids\030\002 \003(\tB\002\010\001\022\035\n\021unordered_ack_ids\030\003 \003(\t" - + "B\002\010\001\032Q\n\035ModifyAckDeadlineConfirmation\022\023\n" - + "\007ack_ids\030\001 \003(\tB\002\010\001\022\033\n\017invalid_ack_ids\030\002 " - + "\003(\tB\002\010\001\032a\n\026SubscriptionProperties\022%\n\035exa" - + "ctly_once_delivery_enabled\030\001 \001(\010\022 \n\030mess" - + "age_ordering_enabled\030\002 \001(\010J\004\010\002\020\003\"\203\002\n\025Cre" - + "ateSnapshotRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A " - + "\n\036pubsub.googleapis.com/Snapshot\022@\n\014subs" - + "cription\030\002 \001(\tB*\340A\002\372A$\n\"pubsub.googleapi" - + "s.com/Subscription\022C\n\006labels\030\003 \003(\01323.goo" - + "gle.pubsub.v1.CreateSnapshotRequest.Labe" - + "lsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - + "alue\030\002 \001(\t:\0028\001\"\200\001\n\025UpdateSnapshotRequest" - + "\0221\n\010snapshot\030\001 \001(\0132\032.google.pubsub.v1.Sn" - + "apshotB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.googl" - + "e.protobuf.FieldMaskB\003\340A\002\"\257\002\n\010Snapshot\022\014" - + "\n\004name\030\001 \001(\t\022/\n\005topic\030\002 \001(\tB \372A\035\n\033pubsub" - + ".googleapis.com/Topic\022/\n\013expire_time\030\003 \001" - + "(\0132\032.google.protobuf.Timestamp\0226\n\006labels" - + "\030\004 \003(\0132&.google.pubsub.v1.Snapshot.Label" - + "sEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" - + "lue\030\002 \001(\t:\0028\001:L\352AI\n\036pubsub.googleapis.co" - + "m/Snapshot\022\'projects/{project}/snapshots" - + "/{snapshot}\"N\n\022GetSnapshotRequest\0228\n\010sna" - + "pshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.c" - + "om/Snapshot\"\203\001\n\024ListSnapshotsRequest\022D\n\007" - + "project\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemana" - + "ger.googleapis.com/Project\022\021\n\tpage_size\030" - + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"_\n\025ListSnapsho" - + "tsResponse\022-\n\tsnapshots\030\001 \003(\0132\032.google.p" - + "ubsub.v1.Snapshot\022\027\n\017next_page_token\030\002 \001" - + "(\t\"Q\n\025DeleteSnapshotRequest\0228\n\010snapshot\030" - + "\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.com/Sna" - + "pshot\"\276\001\n\013SeekRequest\022@\n\014subscription\030\001 " - + "\001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subsc" - + "ription\022*\n\004time\030\002 \001(\0132\032.google.protobuf." - + "TimestampH\000\0227\n\010snapshot\030\003 \001(\tB#\372A \n\036pubs" - + "ub.googleapis.com/SnapshotH\000B\010\n\006target\"\016" - + "\n\014SeekResponse2\243\013\n\tPublisher\022q\n\013CreateTo" - + "pic\022\027.google.pubsub.v1.Topic\032\027.google.pu" - + "bsub.v1.Topic\"0\202\323\344\223\002#\032\036/v1/{name=project" - + "s/*/topics/*}:\001*\332A\004name\022}\n\013UpdateTopic\022$" - + ".google.pubsub.v1.UpdateTopicRequest\032\027.g" - + "oogle.pubsub.v1.Topic\"/\202\323\344\223\002)2$/v1/{topi" - + "c.name=projects/*/topics/*}:\001*\022\223\001\n\007Publi" - + "sh\022 .google.pubsub.v1.PublishRequest\032!.g" - + "oogle.pubsub.v1.PublishResponse\"C\202\323\344\223\002,\"" - + "\'/v1/{topic=projects/*/topics/*}:publish" - + ":\001*\332A\016topic,messages\022w\n\010GetTopic\022!.googl" - + "e.pubsub.v1.GetTopicRequest\032\027.google.pub" - + "sub.v1.Topic\"/\202\323\344\223\002!\022\037/v1/{topic=project" - + "s/*/topics/*}\332A\005topic\022\212\001\n\nListTopics\022#.g" - + "oogle.pubsub.v1.ListTopicsRequest\032$.goog" - + "le.pubsub.v1.ListTopicsResponse\"1\202\323\344\223\002!\022" - + "\037/v1/{project=projects/*}/topics\332A\007proje" - + "ct\022\272\001\n\026ListTopicSubscriptions\022/.google.p" - + "ubsub.v1.ListTopicSubscriptionsRequest\0320" - + ".google.pubsub.v1.ListTopicSubscriptions" - + "Response\"=\202\323\344\223\002/\022-/v1/{topic=projects/*/" - + "topics/*}/subscriptions\332A\005topic\022\252\001\n\022List" - + "TopicSnapshots\022+.google.pubsub.v1.ListTo" - + "picSnapshotsRequest\032,.google.pubsub.v1.L" - + "istTopicSnapshotsResponse\"9\202\323\344\223\002+\022)/v1/{" - + "topic=projects/*/topics/*}/snapshots\332A\005t" - + "opic\022|\n\013DeleteTopic\022$.google.pubsub.v1.D" - + "eleteTopicRequest\032\026.google.protobuf.Empt" - + "y\"/\202\323\344\223\002!*\037/v1/{topic=projects/*/topics/" - + "*}\332A\005topic\022\255\001\n\022DetachSubscription\022+.goog" - + "le.pubsub.v1.DetachSubscriptionRequest\032," - + ".google.pubsub.v1.DetachSubscriptionResp" - + "onse\"<\202\323\344\223\0026\"4/v1/{subscription=projects" - + "/*/subscriptions/*}:detach\032p\312A\025pubsub.go" - + "ogleapis.com\322AUhttps://www.googleapis.co" - + "m/auth/cloud-platform,https://www.google" - + "apis.com/auth/pubsub2\240\025\n\nSubscriber\022\264\001\n\022" - + "CreateSubscription\022\036.google.pubsub.v1.Su" - + "bscription\032\036.google.pubsub.v1.Subscripti" - + "on\"^\202\323\344\223\002*\032%/v1/{name=projects/*/subscri" - + "ptions/*}:\001*\332A+name,topic,push_config,ac" - + "k_deadline_seconds\022\241\001\n\017GetSubscription\022(" - + ".google.pubsub.v1.GetSubscriptionRequest" - + "\032\036.google.pubsub.v1.Subscription\"D\202\323\344\223\002/" - + "\022-/v1/{subscription=projects/*/subscript" - + "ions/*}\332A\014subscription\022\240\001\n\022UpdateSubscri" - + "ption\022+.google.pubsub.v1.UpdateSubscript" - + "ionRequest\032\036.google.pubsub.v1.Subscripti" - + "on\"=\202\323\344\223\002722/v1/{subscription.name=proje" - + "cts/*/subscriptions/*}:\001*\022\246\001\n\021ListSubscr" - + "iptions\022*.google.pubsub.v1.ListSubscript" - + "ionsRequest\032+.google.pubsub.v1.ListSubsc" - + "riptionsResponse\"8\202\323\344\223\002(\022&/v1/{project=p" - + "rojects/*}/subscriptions\332A\007project\022\237\001\n\022D" - + "eleteSubscription\022+.google.pubsub.v1.Del" - + "eteSubscriptionRequest\032\026.google.protobuf" - + ".Empty\"D\202\323\344\223\002/*-/v1/{subscription=projec" - + "ts/*/subscriptions/*}\332A\014subscription\022\317\001\n" - + "\021ModifyAckDeadline\022*.google.pubsub.v1.Mo" - + "difyAckDeadlineRequest\032\026.google.protobuf" - + ".Empty\"v\202\323\344\223\002D\"?/v1/{subscription=projec" - + "ts/*/subscriptions/*}:modifyAckDeadline:" - + "\001*\332A)subscription,ack_ids,ack_deadline_s" - + "econds\022\250\001\n\013Acknowledge\022$.google.pubsub.v" - + "1.AcknowledgeRequest\032\026.google.protobuf.E" - + "mpty\"[\202\323\344\223\002>\"9/v1/{subscription=projects" - + "/*/subscriptions/*}:acknowledge:\001*\332A\024sub" - + "scription,ack_ids\022\320\001\n\004Pull\022\035.google.pubs" - + "ub.v1.PullRequest\032\036.google.pubsub.v1.Pul" - + "lResponse\"\210\001\202\323\344\223\0027\"2/v1/{subscription=pr" - + "ojects/*/subscriptions/*}:pull:\001*\332A,subs" - + "cription,return_immediately,max_messages" - + "\332A\031subscription,max_messages\022f\n\rStreamin" - + "gPull\022&.google.pubsub.v1.StreamingPullRe" - + "quest\032\'.google.pubsub.v1.StreamingPullRe" - + "sponse\"\000(\0010\001\022\273\001\n\020ModifyPushConfig\022).goog" - + "le.pubsub.v1.ModifyPushConfigRequest\032\026.g" - + "oogle.protobuf.Empty\"d\202\323\344\223\002C\">/v1/{subsc" - + "ription=projects/*/subscriptions/*}:modi" - + "fyPushConfig:\001*\332A\030subscription,push_conf" - + "ig\022\211\001\n\013GetSnapshot\022$.google.pubsub.v1.Ge" - + "tSnapshotRequest\032\032.google.pubsub.v1.Snap" - + "shot\"8\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/s" - + "napshots/*}\332A\010snapshot\022\226\001\n\rListSnapshots" - + "\022&.google.pubsub.v1.ListSnapshotsRequest" - + "\032\'.google.pubsub.v1.ListSnapshotsRespons" - + "e\"4\202\323\344\223\002$\022\"/v1/{project=projects/*}/snap" - + "shots\332A\007project\022\227\001\n\016CreateSnapshot\022\'.goo" - + "gle.pubsub.v1.CreateSnapshotRequest\032\032.go" - + "ogle.pubsub.v1.Snapshot\"@\202\323\344\223\002&\032!/v1/{na" - + "me=projects/*/snapshots/*}:\001*\332A\021name,sub" - + "scription\022\214\001\n\016UpdateSnapshot\022\'.google.pu" - + "bsub.v1.UpdateSnapshotRequest\032\032.google.p" - + "ubsub.v1.Snapshot\"5\202\323\344\223\002/2*/v1/{snapshot" - + ".name=projects/*/snapshots/*}:\001*\022\213\001\n\016Del" - + "eteSnapshot\022\'.google.pubsub.v1.DeleteSna" - + "pshotRequest\032\026.google.protobuf.Empty\"8\202\323" - + "\344\223\002\'*%/v1/{snapshot=projects/*/snapshots" - + "/*}\332A\010snapshot\022\204\001\n\004Seek\022\035.google.pubsub." - + "v1.SeekRequest\032\036.google.pubsub.v1.SeekRe" - + "sponse\"=\202\323\344\223\0027\"2/v1/{subscription=projec" - + "ts/*/subscriptions/*}:seek:\001*\032p\312A\025pubsub" - + ".googleapis.com\322AUhttps://www.googleapis" - + ".com/auth/cloud-platform,https://www.goo" - + "gleapis.com/auth/pubsubB\256\001\n\024com.google.p" - + "ubsub.v1B\013PubsubProtoP\001Z6google.golang.o" - + "rg/genproto/googleapis/pubsub/v1;pubsub\370" - + "\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026Google\\Clo" - + "ud\\PubSub\\V1\352\002\031Google::Cloud::PubSub::V1" - + "b\006proto3" + + ".com/Subscription\"\214\001\n\031UpdateSubscription" + + "Request\0229\n\014subscription\030\001 \001(\0132\036.google.p" + + "ubsub.v1.SubscriptionB\003\340A\002\0224\n\013update_mas" + + "k\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002" + + "\"\207\001\n\030ListSubscriptionsRequest\022D\n\007project" + + "\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.goo" + + "gleapis.com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022" + + "\n\npage_token\030\003 \001(\t\"k\n\031ListSubscriptionsR" + + "esponse\0225\n\rsubscriptions\030\001 \003(\0132\036.google." + + "pubsub.v1.Subscription\022\027\n\017next_page_toke" + + "n\030\002 \001(\t\"]\n\031DeleteSubscriptionRequest\022@\n\014" + + "subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googl" + + "eapis.com/Subscription\"\223\001\n\027ModifyPushCon" + + "figRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$" + + "\n\"pubsub.googleapis.com/Subscription\0226\n\013" + + "push_config\030\002 \001(\0132\034.google.pubsub.v1.Pus" + + "hConfigB\003\340A\002\"\215\001\n\013PullRequest\022@\n\014subscrip" + + "tion\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.co" + + "m/Subscription\022!\n\022return_immediately\030\002 \001" + + "(\010B\005\030\001\340A\001\022\031\n\014max_messages\030\003 \001(\005B\003\340A\002\"L\n\014" + + "PullResponse\022<\n\021received_messages\030\001 \003(\0132" + + "!.google.pubsub.v1.ReceivedMessage\"\225\001\n\030M" + + "odifyAckDeadlineRequest\022@\n\014subscription\030" + + "\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Sub" + + "scription\022\024\n\007ack_ids\030\004 \003(\tB\003\340A\002\022!\n\024ack_d" + + "eadline_seconds\030\003 \001(\005B\003\340A\002\"l\n\022Acknowledg" + + "eRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"" + + "pubsub.googleapis.com/Subscription\022\024\n\007ac" + + "k_ids\030\002 \003(\tB\003\340A\002\"\251\002\n\024StreamingPullReques" + + "t\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub." + + "googleapis.com/Subscription\022\017\n\007ack_ids\030\002" + + " \003(\t\022\037\n\027modify_deadline_seconds\030\003 \003(\005\022\037\n" + + "\027modify_deadline_ack_ids\030\004 \003(\t\022(\n\033stream" + + "_ack_deadline_seconds\030\005 \001(\005B\003\340A\002\022\021\n\tclie" + + "nt_id\030\006 \001(\t\022 \n\030max_outstanding_messages\030" + + "\007 \001(\003\022\035\n\025max_outstanding_bytes\030\010 \001(\003\"\262\005\n" + + "\025StreamingPullResponse\022<\n\021received_messa" + + "ges\030\001 \003(\0132!.google.pubsub.v1.ReceivedMes" + + "sage\022a\n\030acknowledge_confirmation\030\005 \001(\0132?" + + ".google.pubsub.v1.StreamingPullResponse." + + "AcknowledgeConfirmation\022o\n modify_ack_de" + + "adline_confirmation\030\003 \001(\0132E.google.pubsu" + + "b.v1.StreamingPullResponse.ModifyAckDead" + + "lineConfirmation\022_\n\027subscription_propert" + + "ies\030\004 \001(\0132>.google.pubsub.v1.StreamingPu" + + "llResponse.SubscriptionProperties\032j\n\027Ack" + + "nowledgeConfirmation\022\023\n\007ack_ids\030\001 \003(\tB\002\010" + + "\001\022\033\n\017invalid_ack_ids\030\002 \003(\tB\002\010\001\022\035\n\021unorde" + + "red_ack_ids\030\003 \003(\tB\002\010\001\032Q\n\035ModifyAckDeadli" + + "neConfirmation\022\023\n\007ack_ids\030\001 \003(\tB\002\010\001\022\033\n\017i" + + "nvalid_ack_ids\030\002 \003(\tB\002\010\001\032a\n\026Subscription" + + "Properties\022%\n\035exactly_once_delivery_enab" + + "led\030\001 \001(\010\022 \n\030message_ordering_enabled\030\002 " + + "\001(\010J\004\010\002\020\003\"\203\002\n\025CreateSnapshotRequest\0224\n\004n" + + "ame\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.com" + + "/Snapshot\022@\n\014subscription\030\002 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\022C\n\006l" + + "abels\030\003 \003(\01323.google.pubsub.v1.CreateSna" + + "pshotRequest.LabelsEntry\032-\n\013LabelsEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\025Upda" + + "teSnapshotRequest\0221\n\010snapshot\030\001 \001(\0132\032.go" + + "ogle.pubsub.v1.SnapshotB\003\340A\002\0224\n\013update_m" + + "ask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340" + + "A\002\"\257\002\n\010Snapshot\022\014\n\004name\030\001 \001(\t\022/\n\005topic\030\002" + + " \001(\tB \372A\035\n\033pubsub.googleapis.com/Topic\022/" + + "\n\013expire_time\030\003 \001(\0132\032.google.protobuf.Ti" + + "mestamp\0226\n\006labels\030\004 \003(\0132&.google.pubsub." + + "v1.Snapshot.LabelsEntry\032-\n\013LabelsEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:L\352AI\n\036pub" + + "sub.googleapis.com/Snapshot\022\'projects/{p" + + "roject}/snapshots/{snapshot}\"N\n\022GetSnaps" + + "hotRequest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pu" + + "bsub.googleapis.com/Snapshot\"\203\001\n\024ListSna" + + "pshotsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+" + + "cloudresourcemanager.googleapis.com/Proj" + + "ect\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + + "(\t\"_\n\025ListSnapshotsResponse\022-\n\tsnapshots" + + "\030\001 \003(\0132\032.google.pubsub.v1.Snapshot\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\"Q\n\025DeleteSnapshotReq" + + "uest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub.g" + + "oogleapis.com/Snapshot\"\276\001\n\013SeekRequest\022@" + + "\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.goo" + + "gleapis.com/Subscription\022*\n\004time\030\002 \001(\0132\032" + + ".google.protobuf.TimestampH\000\0227\n\010snapshot" + + "\030\003 \001(\tB#\372A \n\036pubsub.googleapis.com/Snaps" + + "hotH\000B\010\n\006target\"\016\n\014SeekResponse2\243\013\n\tPubl" + + "isher\022q\n\013CreateTopic\022\027.google.pubsub.v1." + + "Topic\032\027.google.pubsub.v1.Topic\"0\202\323\344\223\002#\032\036" + + "/v1/{name=projects/*/topics/*}:\001*\332A\004name" + + "\022}\n\013UpdateTopic\022$.google.pubsub.v1.Updat" + + "eTopicRequest\032\027.google.pubsub.v1.Topic\"/" + + "\202\323\344\223\002)2$/v1/{topic.name=projects/*/topic" + + "s/*}:\001*\022\223\001\n\007Publish\022 .google.pubsub.v1.P" + + "ublishRequest\032!.google.pubsub.v1.Publish" + + "Response\"C\202\323\344\223\002,\"\'/v1/{topic=projects/*/" + + "topics/*}:publish:\001*\332A\016topic,messages\022w\n" + + "\010GetTopic\022!.google.pubsub.v1.GetTopicReq" + + "uest\032\027.google.pubsub.v1.Topic\"/\202\323\344\223\002!\022\037/" + + "v1/{topic=projects/*/topics/*}\332A\005topic\022\212" + + "\001\n\nListTopics\022#.google.pubsub.v1.ListTop" + + "icsRequest\032$.google.pubsub.v1.ListTopics" + + "Response\"1\202\323\344\223\002!\022\037/v1/{project=projects/" + + "*}/topics\332A\007project\022\272\001\n\026ListTopicSubscri" + + "ptions\022/.google.pubsub.v1.ListTopicSubsc" + + "riptionsRequest\0320.google.pubsub.v1.ListT" + + "opicSubscriptionsResponse\"=\202\323\344\223\002/\022-/v1/{" + + "topic=projects/*/topics/*}/subscriptions" + + "\332A\005topic\022\252\001\n\022ListTopicSnapshots\022+.google" + + ".pubsub.v1.ListTopicSnapshotsRequest\032,.g" + + "oogle.pubsub.v1.ListTopicSnapshotsRespon" + + "se\"9\202\323\344\223\002+\022)/v1/{topic=projects/*/topics" + + "/*}/snapshots\332A\005topic\022|\n\013DeleteTopic\022$.g" + + "oogle.pubsub.v1.DeleteTopicRequest\032\026.goo" + + "gle.protobuf.Empty\"/\202\323\344\223\002!*\037/v1/{topic=p" + + "rojects/*/topics/*}\332A\005topic\022\255\001\n\022DetachSu" + + "bscription\022+.google.pubsub.v1.DetachSubs" + + "criptionRequest\032,.google.pubsub.v1.Detac" + + "hSubscriptionResponse\"<\202\323\344\223\0026\"4/v1/{subs" + + "cription=projects/*/subscriptions/*}:det" + + "ach\032p\312A\025pubsub.googleapis.com\322AUhttps://" + + "www.googleapis.com/auth/cloud-platform,h" + + "ttps://www.googleapis.com/auth/pubsub2\240\025" + + "\n\nSubscriber\022\264\001\n\022CreateSubscription\022\036.go" + + "ogle.pubsub.v1.Subscription\032\036.google.pub" + + "sub.v1.Subscription\"^\202\323\344\223\002*\032%/v1/{name=p" + + "rojects/*/subscriptions/*}:\001*\332A+name,top" + + "ic,push_config,ack_deadline_seconds\022\241\001\n\017" + + "GetSubscription\022(.google.pubsub.v1.GetSu" + + "bscriptionRequest\032\036.google.pubsub.v1.Sub" + + "scription\"D\202\323\344\223\002/\022-/v1/{subscription=pro" + + "jects/*/subscriptions/*}\332A\014subscription\022" + + "\240\001\n\022UpdateSubscription\022+.google.pubsub.v" + + "1.UpdateSubscriptionRequest\032\036.google.pub" + + "sub.v1.Subscription\"=\202\323\344\223\002722/v1/{subscr" + + "iption.name=projects/*/subscriptions/*}:" + + "\001*\022\246\001\n\021ListSubscriptions\022*.google.pubsub" + + ".v1.ListSubscriptionsRequest\032+.google.pu" + + "bsub.v1.ListSubscriptionsResponse\"8\202\323\344\223\002" + + "(\022&/v1/{project=projects/*}/subscription" + + "s\332A\007project\022\237\001\n\022DeleteSubscription\022+.goo" + + "gle.pubsub.v1.DeleteSubscriptionRequest\032" + + "\026.google.protobuf.Empty\"D\202\323\344\223\002/*-/v1/{su" + + "bscription=projects/*/subscriptions/*}\332A" + + "\014subscription\022\317\001\n\021ModifyAckDeadline\022*.go" + + "ogle.pubsub.v1.ModifyAckDeadlineRequest\032" + + "\026.google.protobuf.Empty\"v\202\323\344\223\002D\"?/v1/{su" + + "bscription=projects/*/subscriptions/*}:m" + + "odifyAckDeadline:\001*\332A)subscription,ack_i" + + "ds,ack_deadline_seconds\022\250\001\n\013Acknowledge\022" + + "$.google.pubsub.v1.AcknowledgeRequest\032\026." + + "google.protobuf.Empty\"[\202\323\344\223\002>\"9/v1/{subs" + + "cription=projects/*/subscriptions/*}:ack" + + "nowledge:\001*\332A\024subscription,ack_ids\022\320\001\n\004P" + + "ull\022\035.google.pubsub.v1.PullRequest\032\036.goo" + + "gle.pubsub.v1.PullResponse\"\210\001\202\323\344\223\0027\"2/v1" + + "/{subscription=projects/*/subscriptions/" + + "*}:pull:\001*\332A,subscription,return_immedia" + + "tely,max_messages\332A\031subscription,max_mes" + + "sages\022f\n\rStreamingPull\022&.google.pubsub.v" + + "1.StreamingPullRequest\032\'.google.pubsub.v" + + "1.StreamingPullResponse\"\000(\0010\001\022\273\001\n\020Modify" + + "PushConfig\022).google.pubsub.v1.ModifyPush" + + "ConfigRequest\032\026.google.protobuf.Empty\"d\202" + + "\323\344\223\002C\">/v1/{subscription=projects/*/subs" + + "criptions/*}:modifyPushConfig:\001*\332A\030subsc" + + "ription,push_config\022\211\001\n\013GetSnapshot\022$.go" + + "ogle.pubsub.v1.GetSnapshotRequest\032\032.goog" + + "le.pubsub.v1.Snapshot\"8\202\323\344\223\002\'\022%/v1/{snap" + + "shot=projects/*/snapshots/*}\332A\010snapshot\022" + + "\226\001\n\rListSnapshots\022&.google.pubsub.v1.Lis" + + "tSnapshotsRequest\032\'.google.pubsub.v1.Lis" + + "tSnapshotsResponse\"4\202\323\344\223\002$\022\"/v1/{project" + + "=projects/*}/snapshots\332A\007project\022\227\001\n\016Cre" + + "ateSnapshot\022\'.google.pubsub.v1.CreateSna" + + "pshotRequest\032\032.google.pubsub.v1.Snapshot" + + "\"@\202\323\344\223\002&\032!/v1/{name=projects/*/snapshots" + + "/*}:\001*\332A\021name,subscription\022\214\001\n\016UpdateSna" + + "pshot\022\'.google.pubsub.v1.UpdateSnapshotR" + + "equest\032\032.google.pubsub.v1.Snapshot\"5\202\323\344\223" + + "\002/2*/v1/{snapshot.name=projects/*/snapsh" + + "ots/*}:\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pu" + + "bsub.v1.DeleteSnapshotRequest\032\026.google.p" + + "rotobuf.Empty\"8\202\323\344\223\002\'*%/v1/{snapshot=pro" + + "jects/*/snapshots/*}\332A\010snapshot\022\204\001\n\004Seek" + + "\022\035.google.pubsub.v1.SeekRequest\032\036.google" + + ".pubsub.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{su" + + "bscription=projects/*/subscriptions/*}:s" + + "eek:\001*\032p\312A\025pubsub.googleapis.com\322AUhttps" + + "://www.googleapis.com/auth/cloud-platfor" + + "m,https://www.googleapis.com/auth/pubsub" + + "B\256\001\n\024com.google.pubsub.v1B\013PubsubProtoP\001" + + "Z6google.golang.org/genproto/googleapis/" + + "pubsub/v1;pubsub\370\001\001\252\002\026Google.Cloud.PubSu" + + "b.V1\312\002\026Google\\Cloud\\PubSub\\V1\352\002\031Google::" + + "Cloud::PubSub::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -726,6 +741,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Topic", "PushConfig", + "BigqueryConfig", "AckDeadlineSeconds", "RetainAckedMessages", "MessageRetentionDuration", @@ -738,6 +754,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Detached", "EnableExactlyOnceDelivery", "TopicMessageRetentionDuration", + "State", }); internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor = internal_static_google_pubsub_v1_Subscription_descriptor.getNestedTypes().get(0); @@ -795,8 +812,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); - internal_static_google_pubsub_v1_ReceivedMessage_descriptor = + internal_static_google_pubsub_v1_BigQueryConfig_descriptor = getDescriptor().getMessageTypes().get(22); + internal_static_google_pubsub_v1_BigQueryConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_BigQueryConfig_descriptor, + new java.lang.String[] { + "Table", "UseTopicSchema", "WriteMetadata", "DropUnknownFields", "State", + }); + internal_static_google_pubsub_v1_ReceivedMessage_descriptor = + getDescriptor().getMessageTypes().get(23); internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ReceivedMessage_descriptor, @@ -804,7 +829,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AckId", "Message", "DeliveryAttempt", }); internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor, @@ -812,7 +837,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", }); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(25); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor, @@ -820,7 +845,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "UpdateMask", }); internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(26); internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor, @@ -828,7 +853,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(27); internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor, @@ -836,7 +861,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscriptions", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(28); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor, @@ -844,7 +869,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", }); internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(29); internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor, @@ -852,7 +877,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "PushConfig", }); internal_static_google_pubsub_v1_PullRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(30); internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PullRequest_descriptor, @@ -860,7 +885,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "ReturnImmediately", "MaxMessages", }); internal_static_google_pubsub_v1_PullResponse_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(31); internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PullResponse_descriptor, @@ -868,7 +893,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReceivedMessages", }); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(32); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor, @@ -876,7 +901,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "AckIds", "AckDeadlineSeconds", }); internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(33); internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor, @@ -884,7 +909,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "AckIds", }); internal_static_google_pubsub_v1_StreamingPullRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(34); internal_static_google_pubsub_v1_StreamingPullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullRequest_descriptor, @@ -899,7 +924,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MaxOutstandingBytes", }); internal_static_google_pubsub_v1_StreamingPullResponse_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(35); internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_descriptor, @@ -934,7 +959,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExactlyOnceDeliveryEnabled", "MessageOrderingEnabled", }); internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(36); internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor, @@ -950,7 +975,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(37); internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor, @@ -958,7 +983,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", "UpdateMask", }); internal_static_google_pubsub_v1_Snapshot_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(38); internal_static_google_pubsub_v1_Snapshot_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Snapshot_descriptor, @@ -974,7 +999,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(39); internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor, @@ -982,7 +1007,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", }); internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(40); internal_static_google_pubsub_v1_ListSnapshotsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor, @@ -990,7 +1015,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(41); internal_static_google_pubsub_v1_ListSnapshotsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor, @@ -998,7 +1023,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshots", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(42); internal_static_google_pubsub_v1_DeleteSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor, @@ -1006,7 +1031,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", }); internal_static_google_pubsub_v1_SeekRequest_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(43); internal_static_google_pubsub_v1_SeekRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_SeekRequest_descriptor, @@ -1014,7 +1039,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "Time", "Snapshot", "Target", }); internal_static_google_pubsub_v1_SeekResponse_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(44); internal_static_google_pubsub_v1_SeekResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_SeekResponse_descriptor, new java.lang.String[] {}); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java index 81ff04645..c6d954e25 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java @@ -195,7 +195,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1035 + * google/pubsub/v1/pubsub.proto;l=1107 * @return The returnImmediately. */ @java.lang.Override @@ -707,7 +707,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1035 + * google/pubsub/v1/pubsub.proto;l=1107 * @return The returnImmediately. */ @java.lang.Override @@ -733,7 +733,7 @@ public boolean getReturnImmediately() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1035 + * google/pubsub/v1/pubsub.proto;l=1107 * @param value The returnImmediately to set. * @return This builder for chaining. */ @@ -762,7 +762,7 @@ public Builder setReturnImmediately(boolean value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1035 + * google/pubsub/v1/pubsub.proto;l=1107 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java index 962ab3955..7c9a4f954 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java @@ -71,7 +71,7 @@ public interface PullRequestOrBuilder * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1035 + * google/pubsub/v1/pubsub.proto;l=1107 * @return The returnImmediately. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java index c05fea07e..acf2462db 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java @@ -41,6 +41,7 @@ private Subscription() { name_ = ""; topic_ = ""; filter_ = ""; + state_ = 0; } @java.lang.Override @@ -222,6 +223,29 @@ private Subscription( topicMessageRetentionDuration_ = subBuilder.buildPartial(); } + break; + } + case 146: + { + com.google.pubsub.v1.BigQueryConfig.Builder subBuilder = null; + if (bigqueryConfig_ != null) { + subBuilder = bigqueryConfig_.toBuilder(); + } + bigqueryConfig_ = + input.readMessage( + com.google.pubsub.v1.BigQueryConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(bigqueryConfig_); + bigqueryConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 152: + { + int rawValue = input.readEnum(); + + state_ = rawValue; break; } default: @@ -271,6 +295,167 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { com.google.pubsub.v1.Subscription.Builder.class); } + /** + * + * + *
+   * Possible states for a subscription.
+   * 
+ * + * Protobuf enum {@code google.pubsub.v1.Subscription.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The subscription can actively receive messages
+     * 
+ * + * ACTIVE = 1; + */ + 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; + */ + RESOURCE_ERROR(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The subscription can actively receive messages
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 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; + */ + public static final int RESOURCE_ERROR_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return RESOURCE_ERROR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.pubsub.v1.Subscription.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.pubsub.v1.Subscription.State) + } + public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -394,8 +579,9 @@ public com.google.protobuf.ByteString getTopicBytes() { * *
    * 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.
    * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -411,8 +597,9 @@ public boolean hasPushConfig() { * *
    * 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.
    * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -428,8 +615,9 @@ public com.google.pubsub.v1.PushConfig getPushConfig() { * *
    * 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.
    * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -439,6 +627,63 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { return getPushConfig(); } + public static final int BIGQUERY_CONFIG_FIELD_NUMBER = 18; + private com.google.pubsub.v1.BigQueryConfig 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.
+   * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + * + * @return Whether the bigqueryConfig field is set. + */ + @java.lang.Override + public boolean hasBigqueryConfig() { + return bigqueryConfig_ != null; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + * + * @return The bigqueryConfig. + */ + @java.lang.Override + public com.google.pubsub.v1.BigQueryConfig getBigqueryConfig() { + return bigqueryConfig_ == null + ? com.google.pubsub.v1.BigQueryConfig.getDefaultInstance() + : 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.
+   * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + */ + @java.lang.Override + public com.google.pubsub.v1.BigQueryConfigOrBuilder getBigqueryConfigOrBuilder() { + return getBigqueryConfig(); + } + public static final int ACK_DEADLINE_SECONDS_FIELD_NUMBER = 5; private int ackDeadlineSeconds_; /** @@ -1048,6 +1293,48 @@ public com.google.protobuf.DurationOrBuilder getTopicMessageRetentionDurationOrB return getTopicMessageRetentionDuration(); } + public static final int STATE_FIELD_NUMBER = 19; + private int state_; + /** + * + * + *
+   * Output only. An output-only field indicating whether or not the subscription can receive
+   * messages.
+   * 
+ * + * + * .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. An output-only field indicating whether or not the subscription can receive
+   * messages.
+   * 
+ * + * + * .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.Subscription.State getState() { + @SuppressWarnings("deprecation") + com.google.pubsub.v1.Subscription.State result = + com.google.pubsub.v1.Subscription.State.valueOf(state_); + return result == null ? com.google.pubsub.v1.Subscription.State.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1106,6 +1393,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (topicMessageRetentionDuration_ != null) { output.writeMessage(17, getTopicMessageRetentionDuration()); } + if (bigqueryConfig_ != null) { + output.writeMessage(18, getBigqueryConfig()); + } + if (state_ != com.google.pubsub.v1.Subscription.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(19, state_); + } unknownFields.writeTo(output); } @@ -1171,6 +1464,12 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 17, getTopicMessageRetentionDuration()); } + if (bigqueryConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getBigqueryConfig()); + } + if (state_ != com.google.pubsub.v1.Subscription.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, state_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1192,6 +1491,10 @@ public boolean equals(final java.lang.Object obj) { if (hasPushConfig()) { if (!getPushConfig().equals(other.getPushConfig())) return false; } + if (hasBigqueryConfig() != other.hasBigqueryConfig()) return false; + if (hasBigqueryConfig()) { + if (!getBigqueryConfig().equals(other.getBigqueryConfig())) return false; + } if (getAckDeadlineSeconds() != other.getAckDeadlineSeconds()) return false; if (getRetainAckedMessages() != other.getRetainAckedMessages()) return false; if (hasMessageRetentionDuration() != other.hasMessageRetentionDuration()) return false; @@ -1221,6 +1524,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTopicMessageRetentionDuration().equals(other.getTopicMessageRetentionDuration())) return false; } + if (state_ != other.state_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1240,6 +1544,10 @@ public int hashCode() { hash = (37 * hash) + PUSH_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getPushConfig().hashCode(); } + if (hasBigqueryConfig()) { + hash = (37 * hash) + BIGQUERY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryConfig().hashCode(); + } hash = (37 * hash) + ACK_DEADLINE_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getAckDeadlineSeconds(); hash = (37 * hash) + RETAIN_ACKED_MESSAGES_FIELD_NUMBER; @@ -1276,6 +1584,8 @@ public int hashCode() { hash = (37 * hash) + TOPIC_MESSAGE_RETENTION_DURATION_FIELD_NUMBER; hash = (53 * hash) + getTopicMessageRetentionDuration().hashCode(); } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1450,6 +1760,12 @@ public Builder clear() { pushConfig_ = null; pushConfigBuilder_ = null; } + if (bigqueryConfigBuilder_ == null) { + bigqueryConfig_ = null; + } else { + bigqueryConfig_ = null; + bigqueryConfigBuilder_ = null; + } ackDeadlineSeconds_ = 0; retainAckedMessages_ = false; @@ -1493,6 +1809,8 @@ public Builder clear() { topicMessageRetentionDuration_ = null; topicMessageRetentionDurationBuilder_ = null; } + state_ = 0; + return this; } @@ -1527,6 +1845,11 @@ public com.google.pubsub.v1.Subscription buildPartial() { } else { result.pushConfig_ = pushConfigBuilder_.build(); } + if (bigqueryConfigBuilder_ == null) { + result.bigqueryConfig_ = bigqueryConfig_; + } else { + result.bigqueryConfig_ = bigqueryConfigBuilder_.build(); + } result.ackDeadlineSeconds_ = ackDeadlineSeconds_; result.retainAckedMessages_ = retainAckedMessages_; if (messageRetentionDurationBuilder_ == null) { @@ -1560,6 +1883,7 @@ public com.google.pubsub.v1.Subscription buildPartial() { } else { result.topicMessageRetentionDuration_ = topicMessageRetentionDurationBuilder_.build(); } + result.state_ = state_; onBuilt(); return result; } @@ -1620,6 +1944,9 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other.hasPushConfig()) { mergePushConfig(other.getPushConfig()); } + if (other.hasBigqueryConfig()) { + mergeBigqueryConfig(other.getBigqueryConfig()); + } if (other.getAckDeadlineSeconds() != 0) { setAckDeadlineSeconds(other.getAckDeadlineSeconds()); } @@ -1655,6 +1982,9 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other.hasTopicMessageRetentionDuration()) { mergeTopicMessageRetentionDuration(other.getTopicMessageRetentionDuration()); } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1954,8 +2284,9 @@ public Builder setTopicBytes(com.google.protobuf.ByteString value) { * *
      * 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.
      * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -1970,8 +2301,9 @@ public boolean hasPushConfig() { * *
      * 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.
      * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -1992,8 +2324,9 @@ public com.google.pubsub.v1.PushConfig getPushConfig() { * *
      * 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.
      * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -2016,8 +2349,9 @@ public Builder setPushConfig(com.google.pubsub.v1.PushConfig value) { * *
      * 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.
      * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -2037,8 +2371,9 @@ public Builder setPushConfig(com.google.pubsub.v1.PushConfig.Builder builderForV * *
      * 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.
      * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -2065,8 +2400,9 @@ public Builder mergePushConfig(com.google.pubsub.v1.PushConfig value) { * *
      * 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.
      * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -2087,8 +2423,9 @@ public Builder clearPushConfig() { * *
      * 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.
      * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -2103,8 +2440,9 @@ public com.google.pubsub.v1.PushConfig.Builder getPushConfigBuilder() { * *
      * 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.
      * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -2123,8 +2461,9 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { * *
      * 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.
      * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -2146,6 +2485,218 @@ public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { return pushConfigBuilder_; } + private com.google.pubsub.v1.BigQueryConfig bigqueryConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.BigQueryConfig, + com.google.pubsub.v1.BigQueryConfig.Builder, + com.google.pubsub.v1.BigQueryConfigOrBuilder> + bigqueryConfigBuilder_; + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + * + * @return Whether the bigqueryConfig field is set. + */ + public boolean hasBigqueryConfig() { + return bigqueryConfigBuilder_ != null || bigqueryConfig_ != null; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + * + * @return The bigqueryConfig. + */ + public com.google.pubsub.v1.BigQueryConfig getBigqueryConfig() { + if (bigqueryConfigBuilder_ == null) { + return bigqueryConfig_ == null + ? com.google.pubsub.v1.BigQueryConfig.getDefaultInstance() + : bigqueryConfig_; + } else { + return bigqueryConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + */ + public Builder setBigqueryConfig(com.google.pubsub.v1.BigQueryConfig value) { + if (bigqueryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigqueryConfig_ = value; + onChanged(); + } else { + bigqueryConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + */ + public Builder setBigqueryConfig(com.google.pubsub.v1.BigQueryConfig.Builder builderForValue) { + if (bigqueryConfigBuilder_ == null) { + bigqueryConfig_ = builderForValue.build(); + onChanged(); + } else { + bigqueryConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + */ + public Builder mergeBigqueryConfig(com.google.pubsub.v1.BigQueryConfig value) { + if (bigqueryConfigBuilder_ == null) { + if (bigqueryConfig_ != null) { + bigqueryConfig_ = + com.google.pubsub.v1.BigQueryConfig.newBuilder(bigqueryConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + bigqueryConfig_ = value; + } + onChanged(); + } else { + bigqueryConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + */ + public Builder clearBigqueryConfig() { + if (bigqueryConfigBuilder_ == null) { + bigqueryConfig_ = null; + onChanged(); + } else { + bigqueryConfig_ = null; + bigqueryConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + */ + public com.google.pubsub.v1.BigQueryConfig.Builder getBigqueryConfigBuilder() { + + onChanged(); + return getBigqueryConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + */ + public com.google.pubsub.v1.BigQueryConfigOrBuilder getBigqueryConfigOrBuilder() { + if (bigqueryConfigBuilder_ != null) { + return bigqueryConfigBuilder_.getMessageOrBuilder(); + } else { + return bigqueryConfig_ == null + ? com.google.pubsub.v1.BigQueryConfig.getDefaultInstance() + : 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.
+     * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.BigQueryConfig, + com.google.pubsub.v1.BigQueryConfig.Builder, + com.google.pubsub.v1.BigQueryConfigOrBuilder> + getBigqueryConfigFieldBuilder() { + if (bigqueryConfigBuilder_ == null) { + bigqueryConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.BigQueryConfig, + com.google.pubsub.v1.BigQueryConfig.Builder, + com.google.pubsub.v1.BigQueryConfigOrBuilder>( + getBigqueryConfig(), getParentForChildren(), isClean()); + bigqueryConfig_ = null; + } + return bigqueryConfigBuilder_; + } + private int ackDeadlineSeconds_; /** * @@ -3987,6 +4538,112 @@ public com.google.protobuf.DurationOrBuilder getTopicMessageRetentionDurationOrB return topicMessageRetentionDurationBuilder_; } + private int state_ = 0; + /** + * + * + *
+     * Output only. An output-only field indicating whether or not the subscription can receive
+     * messages.
+     * 
+ * + * + * .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. An output-only field indicating whether or not the subscription can receive
+     * messages.
+     * 
+ * + * + * .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An output-only field indicating whether or not the subscription can receive
+     * messages.
+     * 
+ * + * + * .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.pubsub.v1.Subscription.State getState() { + @SuppressWarnings("deprecation") + com.google.pubsub.v1.Subscription.State result = + com.google.pubsub.v1.Subscription.State.valueOf(state_); + return result == null ? com.google.pubsub.v1.Subscription.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. An output-only field indicating whether or not the subscription can receive
+     * messages.
+     * 
+ * + * + * .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.pubsub.v1.Subscription.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An output-only field indicating whether or not the subscription can receive
+     * messages.
+     * 
+ * + * + * .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java index 2c85e903f..cd5819192 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java @@ -96,8 +96,9 @@ public interface SubscriptionOrBuilder * *
    * 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.
    * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -110,8 +111,9 @@ public interface SubscriptionOrBuilder * *
    * 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.
    * 
* * .google.pubsub.v1.PushConfig push_config = 4; @@ -124,14 +126,59 @@ public interface SubscriptionOrBuilder * *
    * 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.
    * 
* * .google.pubsub.v1.PushConfig push_config = 4; */ com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + * + * @return Whether the bigqueryConfig field is set. + */ + boolean hasBigqueryConfig(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + * + * @return The bigqueryConfig. + */ + com.google.pubsub.v1.BigQueryConfig getBigqueryConfig(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.pubsub.v1.BigQueryConfig bigquery_config = 18; + */ + com.google.pubsub.v1.BigQueryConfigOrBuilder getBigqueryConfigOrBuilder(); + /** * * @@ -588,4 +635,35 @@ java.lang.String getLabelsOrDefault( * */ com.google.protobuf.DurationOrBuilder getTopicMessageRetentionDurationOrBuilder(); + + /** + * + * + *
+   * Output only. An output-only field indicating whether or not the subscription can receive
+   * messages.
+   * 
+ * + * + * .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. An output-only field indicating whether or not the subscription can receive
+   * messages.
+   * 
+ * + * + * .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.pubsub.v1.Subscription.State getState(); } diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto index 172801ba3..5ab209bbd 100644 --- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto +++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -642,6 +642,20 @@ message Subscription { pattern: "projects/{project}/subscriptions/{subscription}" }; + // Possible states for a subscription. + enum 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; + } + // Required. The name of the subscription. It must have the format // `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must // start with a letter, and contain only letters (`[A-Za-z]`), numbers @@ -659,10 +673,17 @@ message Subscription { ]; // 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. PushConfig push_config = 4; + // 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. + BigQueryConfig bigquery_config = 18; + // 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 @@ -773,6 +794,10 @@ message Subscription { // in responses from the server; it is ignored if it is set in any requests. google.protobuf.Duration topic_message_retention_duration = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An output-only field indicating whether or not the subscription can receive + // messages. + State state = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A policy that specifies how Cloud Pub/Sub retries message delivery. @@ -902,6 +927,53 @@ message PushConfig { } } +// Configuration for a BigQuery subscription. +message BigQueryConfig { + // Possible states for a BigQuery subscription. + enum 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; + } + + // The name of the table to which to write data, of the form + // {projectId}:{datasetId}.{tableId} + string table = 1; + + // When true, use the topic's schema as the columns to write to in BigQuery, + // if it exists. + bool use_topic_schema = 2; + + // 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. + bool write_metadata = 3; + + // 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. + bool drop_unknown_fields = 4; + + // Output only. An output-only field that indicates whether or not the subscription can + // receive messages. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // A message and its corresponding acknowledgment ID. message ReceivedMessage { // This ID can be used to acknowledge the received message.