All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.pubsub.v1.BigQueryConfig Maven / Gradle / Ivy

There is a newer version: 1.114.2
Show newest version
/*
 * Copyright 2024 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

// Protobuf Java Version: 3.25.3
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(); } 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.
     * This can happen if
     * - Pub/Sub SA has not been granted the [appropriate BigQuery IAM
     * permissions](https://cloud.google.com/pubsub/docs/create-subscription#assign_bigquery_service_account)
     * - bigquery.googleapis.com API is not enabled for the project
     * ([instructions](https://cloud.google.com/service-usage/docs/enable-disable))
     * 
* * 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), /** * * *
     * Cannot write to the destination because enforce_in_transit is set to true
     * and the destination locations are not in the allowed regions.
     * 
* * IN_TRANSIT_LOCATION_RESTRICTION = 5; */ IN_TRANSIT_LOCATION_RESTRICTION(5), 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.
     * This can happen if
     * - Pub/Sub SA has not been granted the [appropriate BigQuery IAM
     * permissions](https://cloud.google.com/pubsub/docs/create-subscription#assign_bigquery_service_account)
     * - bigquery.googleapis.com API is not enabled for the project
     * ([instructions](https://cloud.google.com/service-usage/docs/enable-disable))
     * 
* * 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; /** * * *
     * Cannot write to the destination because enforce_in_transit is set to true
     * and the destination locations are not in the allowed regions.
     * 
* * IN_TRANSIT_LOCATION_RESTRICTION = 5; */ public static final int IN_TRANSIT_LOCATION_RESTRICTION_VALUE = 5; 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; case 5: return IN_TRANSIT_LOCATION_RESTRICTION; 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; @SuppressWarnings("serial") private volatile java.lang.Object table_ = ""; /** * * *
   * Optional. The name of the table to which to write data, of the form
   * {projectId}.{datasetId}.{tableId}
   * 
* * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @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; } } /** * * *
   * Optional. The name of the table to which to write data, of the form
   * {projectId}.{datasetId}.{tableId}
   * 
* * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @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_ = false; /** * * *
   * Optional. When true, use the topic's schema as the columns to write to in
   * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
   * enabled at the same time.
   * 
* * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The useTopicSchema. */ @java.lang.Override public boolean getUseTopicSchema() { return useTopicSchema_; } public static final int WRITE_METADATA_FIELD_NUMBER = 3; private boolean writeMetadata_ = false; /** * * *
   * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; * * @return The writeMetadata. */ @java.lang.Override public boolean getWriteMetadata() { return writeMetadata_; } public static final int DROP_UNKNOWN_FIELDS_FIELD_NUMBER = 4; private boolean dropUnknownFields_ = false; /** * * *
   * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; * * @return The dropUnknownFields. */ @java.lang.Override public boolean getDropUnknownFields() { return dropUnknownFields_; } public static final int STATE_FIELD_NUMBER = 5; 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]; * * * @return The state. */ @java.lang.Override public com.google.pubsub.v1.BigQueryConfig.State getState() { com.google.pubsub.v1.BigQueryConfig.State result = com.google.pubsub.v1.BigQueryConfig.State.forNumber(state_); return result == null ? com.google.pubsub.v1.BigQueryConfig.State.UNRECOGNIZED : result; } public static final int USE_TABLE_SCHEMA_FIELD_NUMBER = 6; private boolean useTableSchema_ = false; /** * * *
   * Optional. When true, use the BigQuery table's schema as the columns to
   * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
   * enabled at the same time.
   * 
* * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The useTableSchema. */ @java.lang.Override public boolean getUseTableSchema() { return useTableSchema_; } 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_); } if (useTableSchema_ != false) { output.writeBool(6, useTableSchema_); } getUnknownFields().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_); } if (useTableSchema_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, useTableSchema_); } size += getUnknownFields().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 (getUseTableSchema() != other.getUseTableSchema()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) 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 = (37 * hash) + USE_TABLE_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseTableSchema()); hash = (29 * hash) + getUnknownFields().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() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; table_ = ""; useTopicSchema_ = false; writeMetadata_ = false; dropUnknownFields_ = false; state_ = 0; useTableSchema_ = false; 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); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.pubsub.v1.BigQueryConfig result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.table_ = table_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.useTopicSchema_ = useTopicSchema_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.writeMetadata_ = writeMetadata_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.dropUnknownFields_ = dropUnknownFields_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.state_ = state_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.useTableSchema_ = useTableSchema_; } } @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_; bitField0_ |= 0x00000001; 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()); } if (other.getUseTableSchema() != false) { setUseTableSchema(other.getUseTableSchema()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { table_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { useTopicSchema_ = input.readBool(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { writeMetadata_ = input.readBool(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { dropUnknownFields_ = input.readBool(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { state_ = input.readEnum(); bitField0_ |= 0x00000010; break; } // case 40 case 48: { useTableSchema_ = input.readBool(); bitField0_ |= 0x00000020; break; } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object table_ = ""; /** * * *
     * Optional. The name of the table to which to write data, of the form
     * {projectId}.{datasetId}.{tableId}
     * 
* * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @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; } } /** * * *
     * Optional. The name of the table to which to write data, of the form
     * {projectId}.{datasetId}.{tableId}
     * 
* * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @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; } } /** * * *
     * Optional. The name of the table to which to write data, of the form
     * {projectId}.{datasetId}.{tableId}
     * 
* * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @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; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Optional. The name of the table to which to write data, of the form
     * {projectId}.{datasetId}.{tableId}
     * 
* * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearTable() { table_ = getDefaultInstance().getTable(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Optional. The name of the table to which to write data, of the form
     * {projectId}.{datasetId}.{tableId}
     * 
* * string table = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @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; bitField0_ |= 0x00000001; onChanged(); return this; } private boolean useTopicSchema_; /** * * *
     * Optional. When true, use the topic's schema as the columns to write to in
     * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
     * enabled at the same time.
     * 
* * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The useTopicSchema. */ @java.lang.Override public boolean getUseTopicSchema() { return useTopicSchema_; } /** * * *
     * Optional. When true, use the topic's schema as the columns to write to in
     * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
     * enabled at the same time.
     * 
* * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The useTopicSchema to set. * @return This builder for chaining. */ public Builder setUseTopicSchema(boolean value) { useTopicSchema_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Optional. When true, use the topic's schema as the columns to write to in
     * BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
     * enabled at the same time.
     * 
* * bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearUseTopicSchema() { bitField0_ = (bitField0_ & ~0x00000002); useTopicSchema_ = false; onChanged(); return this; } private boolean writeMetadata_; /** * * *
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; * * @return The writeMetadata. */ @java.lang.Override public boolean getWriteMetadata() { return writeMetadata_; } /** * * *
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The writeMetadata to set. * @return This builder for chaining. */ public Builder setWriteMetadata(boolean value) { writeMetadata_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearWriteMetadata() { bitField0_ = (bitField0_ & ~0x00000004); writeMetadata_ = false; onChanged(); return this; } private boolean dropUnknownFields_; /** * * *
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; * * @return The dropUnknownFields. */ @java.lang.Override public boolean getDropUnknownFields() { return dropUnknownFields_; } /** * * *
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The dropUnknownFields to set. * @return This builder for chaining. */ public Builder setDropUnknownFields(boolean value) { dropUnknownFields_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearDropUnknownFields() { bitField0_ = (bitField0_ & ~0x00000008); 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; bitField0_ |= 0x00000010; 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() { com.google.pubsub.v1.BigQueryConfig.State result = com.google.pubsub.v1.BigQueryConfig.State.forNumber(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(); } bitField0_ |= 0x00000010; 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() { bitField0_ = (bitField0_ & ~0x00000010); state_ = 0; onChanged(); return this; } private boolean useTableSchema_; /** * * *
     * Optional. When true, use the BigQuery table's schema as the columns to
     * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
     * enabled at the same time.
     * 
* * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The useTableSchema. */ @java.lang.Override public boolean getUseTableSchema() { return useTableSchema_; } /** * * *
     * Optional. When true, use the BigQuery table's schema as the columns to
     * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
     * enabled at the same time.
     * 
* * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The useTableSchema to set. * @return This builder for chaining. */ public Builder setUseTableSchema(boolean value) { useTableSchema_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Optional. When true, use the BigQuery table's schema as the columns to
     * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
     * enabled at the same time.
     * 
* * bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearUseTableSchema() { bitField0_ = (bitField0_ & ~0x00000020); useTableSchema_ = false; 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 { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; 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; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy