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

com.clickhouse.client.grpc.impl.ExternalTable Maven / Gradle / Ivy

Go to download

gRPC client for ClickHouse planed to be deprecated from version 0.6.0 and removed at 0.7.0

There is a newer version: 0.6.4
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: clickhouse_grpc.proto

package com.clickhouse.client.grpc.impl;

/**
 * 
 * Describes an external table - a table which will exists only while a query is executing.
 * 
* * Protobuf type {@code clickhouse.grpc.ExternalTable} */ public final class ExternalTable extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:clickhouse.grpc.ExternalTable) ExternalTableOrBuilder { private static final long serialVersionUID = 0L; // Use ExternalTable.newBuilder() to construct. private ExternalTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ExternalTable() { name_ = ""; columns_ = java.util.Collections.emptyList(); data_ = com.google.protobuf.ByteString.EMPTY; format_ = ""; compressionType_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ExternalTable(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clickhouse.client.grpc.impl.ClickHouseGrpcImpl.internal_static_clickhouse_grpc_ExternalTable_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 5: return internalGetSettings(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clickhouse.client.grpc.impl.ClickHouseGrpcImpl.internal_static_clickhouse_grpc_ExternalTable_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clickhouse.client.grpc.impl.ExternalTable.class, com.clickhouse.client.grpc.impl.ExternalTable.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** *
   * Name of the table. If omitted, "_data" is used.
   * 
* * string name = 1; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; 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(); name_ = s; return s; } } /** *
   * Name of the table. If omitted, "_data" is used.
   * 
* * string name = 1; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COLUMNS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List columns_; /** *
   * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
   * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ @java.lang.Override public java.util.List getColumnsList() { return columns_; } /** *
   * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
   * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ @java.lang.Override public java.util.List getColumnsOrBuilderList() { return columns_; } /** *
   * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
   * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ @java.lang.Override public int getColumnsCount() { return columns_.size(); } /** *
   * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
   * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ @java.lang.Override public com.clickhouse.client.grpc.impl.NameAndType getColumns(int index) { return columns_.get(index); } /** *
   * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
   * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ @java.lang.Override public com.clickhouse.client.grpc.impl.NameAndTypeOrBuilder getColumnsOrBuilder( int index) { return columns_.get(index); } public static final int DATA_FIELD_NUMBER = 3; private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** *
   * Data to insert to the external table.
   * If a method with streaming input (i.e. ExecuteQueryWithStreamInput() or ExecuteQueryWithStreamIO()) is used,
   * then data for insertion to the same external table can be split between multiple QueryInfos.
   * 
* * bytes data = 3; * @return The data. */ @java.lang.Override public com.google.protobuf.ByteString getData() { return data_; } public static final int FORMAT_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object format_ = ""; /** *
   * Format of the data to insert to the external table.
   * 
* * string format = 4; * @return The format. */ @java.lang.Override public java.lang.String getFormat() { java.lang.Object ref = format_; 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(); format_ = s; return s; } } /** *
   * Format of the data to insert to the external table.
   * 
* * string format = 4; * @return The bytes for format. */ @java.lang.Override public com.google.protobuf.ByteString getFormatBytes() { java.lang.Object ref = format_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); format_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COMPRESSION_TYPE_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object compressionType_ = ""; /** *
   * Compression type used to compress `data`.
   * Supported values: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
   * 
* * string compression_type = 6; * @return The compressionType. */ @java.lang.Override public java.lang.String getCompressionType() { java.lang.Object ref = compressionType_; 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(); compressionType_ = s; return s; } } /** *
   * Compression type used to compress `data`.
   * Supported values: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
   * 
* * string compression_type = 6; * @return The bytes for compressionType. */ @java.lang.Override public com.google.protobuf.ByteString getCompressionTypeBytes() { java.lang.Object ref = compressionType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); compressionType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SETTINGS_FIELD_NUMBER = 5; private static final class SettingsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( com.clickhouse.client.grpc.impl.ClickHouseGrpcImpl.internal_static_clickhouse_grpc_ExternalTable_SettingsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> settings_; private com.google.protobuf.MapField internalGetSettings() { if (settings_ == null) { return com.google.protobuf.MapField.emptyMapField( SettingsDefaultEntryHolder.defaultEntry); } return settings_; } public int getSettingsCount() { return internalGetSettings().getMap().size(); } /** *
   * Settings for executing that insertion, applied after QueryInfo.settings.
   * 
* * map<string, string> settings = 5; */ @java.lang.Override public boolean containsSettings( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetSettings().getMap().containsKey(key); } /** * Use {@link #getSettingsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getSettings() { return getSettingsMap(); } /** *
   * Settings for executing that insertion, applied after QueryInfo.settings.
   * 
* * map<string, string> settings = 5; */ @java.lang.Override public java.util.Map getSettingsMap() { return internalGetSettings().getMap(); } /** *
   * Settings for executing that insertion, applied after QueryInfo.settings.
   * 
* * map<string, string> settings = 5; */ @java.lang.Override public /* nullable */ java.lang.String getSettingsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetSettings().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Settings for executing that insertion, applied after QueryInfo.settings.
   * 
* * map<string, string> settings = 5; */ @java.lang.Override public java.lang.String getSettingsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetSettings().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } 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(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < columns_.size(); i++) { output.writeMessage(2, columns_.get(i)); } if (!data_.isEmpty()) { output.writeBytes(3, data_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, format_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetSettings(), SettingsDefaultEntryHolder.defaultEntry, 5); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compressionType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, compressionType_); } 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(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < columns_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, columns_.get(i)); } if (!data_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, data_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, format_); } for (java.util.Map.Entry entry : internalGetSettings().getMap().entrySet()) { com.google.protobuf.MapEntry settings__ = SettingsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, settings__); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compressionType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, compressionType_); } 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.clickhouse.client.grpc.impl.ExternalTable)) { return super.equals(obj); } com.clickhouse.client.grpc.impl.ExternalTable other = (com.clickhouse.client.grpc.impl.ExternalTable) obj; if (!getName() .equals(other.getName())) return false; if (!getColumnsList() .equals(other.getColumnsList())) return false; if (!getData() .equals(other.getData())) return false; if (!getFormat() .equals(other.getFormat())) return false; if (!getCompressionType() .equals(other.getCompressionType())) return false; if (!internalGetSettings().equals( other.internalGetSettings())) 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (getColumnsCount() > 0) { hash = (37 * hash) + COLUMNS_FIELD_NUMBER; hash = (53 * hash) + getColumnsList().hashCode(); } hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); hash = (37 * hash) + FORMAT_FIELD_NUMBER; hash = (53 * hash) + getFormat().hashCode(); hash = (37 * hash) + COMPRESSION_TYPE_FIELD_NUMBER; hash = (53 * hash) + getCompressionType().hashCode(); if (!internalGetSettings().getMap().isEmpty()) { hash = (37 * hash) + SETTINGS_FIELD_NUMBER; hash = (53 * hash) + internalGetSettings().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.clickhouse.client.grpc.impl.ExternalTable parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clickhouse.client.grpc.impl.ExternalTable parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clickhouse.client.grpc.impl.ExternalTable parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clickhouse.client.grpc.impl.ExternalTable parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clickhouse.client.grpc.impl.ExternalTable parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clickhouse.client.grpc.impl.ExternalTable parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clickhouse.client.grpc.impl.ExternalTable parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clickhouse.client.grpc.impl.ExternalTable 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.clickhouse.client.grpc.impl.ExternalTable parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clickhouse.client.grpc.impl.ExternalTable 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.clickhouse.client.grpc.impl.ExternalTable parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clickhouse.client.grpc.impl.ExternalTable 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.clickhouse.client.grpc.impl.ExternalTable 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; } /** *
   * Describes an external table - a table which will exists only while a query is executing.
   * 
* * Protobuf type {@code clickhouse.grpc.ExternalTable} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clickhouse.grpc.ExternalTable) com.clickhouse.client.grpc.impl.ExternalTableOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clickhouse.client.grpc.impl.ClickHouseGrpcImpl.internal_static_clickhouse_grpc_ExternalTable_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 5: return internalGetSettings(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 5: return internalGetMutableSettings(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clickhouse.client.grpc.impl.ClickHouseGrpcImpl.internal_static_clickhouse_grpc_ExternalTable_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clickhouse.client.grpc.impl.ExternalTable.class, com.clickhouse.client.grpc.impl.ExternalTable.Builder.class); } // Construct using com.clickhouse.client.grpc.impl.ExternalTable.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; if (columnsBuilder_ == null) { columns_ = java.util.Collections.emptyList(); } else { columns_ = null; columnsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); data_ = com.google.protobuf.ByteString.EMPTY; format_ = ""; compressionType_ = ""; internalGetMutableSettings().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.clickhouse.client.grpc.impl.ClickHouseGrpcImpl.internal_static_clickhouse_grpc_ExternalTable_descriptor; } @java.lang.Override public com.clickhouse.client.grpc.impl.ExternalTable getDefaultInstanceForType() { return com.clickhouse.client.grpc.impl.ExternalTable.getDefaultInstance(); } @java.lang.Override public com.clickhouse.client.grpc.impl.ExternalTable build() { com.clickhouse.client.grpc.impl.ExternalTable result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clickhouse.client.grpc.impl.ExternalTable buildPartial() { com.clickhouse.client.grpc.impl.ExternalTable result = new com.clickhouse.client.grpc.impl.ExternalTable(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.clickhouse.client.grpc.impl.ExternalTable result) { if (columnsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { columns_ = java.util.Collections.unmodifiableList(columns_); bitField0_ = (bitField0_ & ~0x00000002); } result.columns_ = columns_; } else { result.columns_ = columnsBuilder_.build(); } } private void buildPartial0(com.clickhouse.client.grpc.impl.ExternalTable result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.data_ = data_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.format_ = format_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.compressionType_ = compressionType_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.settings_ = internalGetSettings(); result.settings_.makeImmutable(); } } @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.clickhouse.client.grpc.impl.ExternalTable) { return mergeFrom((com.clickhouse.client.grpc.impl.ExternalTable)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clickhouse.client.grpc.impl.ExternalTable other) { if (other == com.clickhouse.client.grpc.impl.ExternalTable.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (columnsBuilder_ == null) { if (!other.columns_.isEmpty()) { if (columns_.isEmpty()) { columns_ = other.columns_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureColumnsIsMutable(); columns_.addAll(other.columns_); } onChanged(); } } else { if (!other.columns_.isEmpty()) { if (columnsBuilder_.isEmpty()) { columnsBuilder_.dispose(); columnsBuilder_ = null; columns_ = other.columns_; bitField0_ = (bitField0_ & ~0x00000002); columnsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getColumnsFieldBuilder() : null; } else { columnsBuilder_.addAllMessages(other.columns_); } } } if (other.getData() != com.google.protobuf.ByteString.EMPTY) { setData(other.getData()); } if (!other.getFormat().isEmpty()) { format_ = other.format_; bitField0_ |= 0x00000008; onChanged(); } if (!other.getCompressionType().isEmpty()) { compressionType_ = other.compressionType_; bitField0_ |= 0x00000010; onChanged(); } internalGetMutableSettings().mergeFrom( other.internalGetSettings()); bitField0_ |= 0x00000020; 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: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { com.clickhouse.client.grpc.impl.NameAndType m = input.readMessage( com.clickhouse.client.grpc.impl.NameAndType.parser(), extensionRegistry); if (columnsBuilder_ == null) { ensureColumnsIsMutable(); columns_.add(m); } else { columnsBuilder_.addMessage(m); } break; } // case 18 case 26: { data_ = input.readBytes(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { format_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 case 42: { com.google.protobuf.MapEntry settings__ = input.readMessage( SettingsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableSettings().getMutableMap().put( settings__.getKey(), settings__.getValue()); bitField0_ |= 0x00000020; break; } // case 42 case 50: { compressionType_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 50 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 name_ = ""; /** *
     * Name of the table. If omitted, "_data" is used.
     * 
* * string name = 1; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Name of the table. If omitted, "_data" is used.
     * 
* * string name = 1; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Name of the table. If omitted, "_data" is used.
     * 
* * string name = 1; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Name of the table. If omitted, "_data" is used.
     * 
* * string name = 1; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * Name of the table. If omitted, "_data" is used.
     * 
* * string name = 1; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.util.List columns_ = java.util.Collections.emptyList(); private void ensureColumnsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { columns_ = new java.util.ArrayList(columns_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.clickhouse.client.grpc.impl.NameAndType, com.clickhouse.client.grpc.impl.NameAndType.Builder, com.clickhouse.client.grpc.impl.NameAndTypeOrBuilder> columnsBuilder_; /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public java.util.List getColumnsList() { if (columnsBuilder_ == null) { return java.util.Collections.unmodifiableList(columns_); } else { return columnsBuilder_.getMessageList(); } } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public int getColumnsCount() { if (columnsBuilder_ == null) { return columns_.size(); } else { return columnsBuilder_.getCount(); } } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public com.clickhouse.client.grpc.impl.NameAndType getColumns(int index) { if (columnsBuilder_ == null) { return columns_.get(index); } else { return columnsBuilder_.getMessage(index); } } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public Builder setColumns( int index, com.clickhouse.client.grpc.impl.NameAndType value) { if (columnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureColumnsIsMutable(); columns_.set(index, value); onChanged(); } else { columnsBuilder_.setMessage(index, value); } return this; } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public Builder setColumns( int index, com.clickhouse.client.grpc.impl.NameAndType.Builder builderForValue) { if (columnsBuilder_ == null) { ensureColumnsIsMutable(); columns_.set(index, builderForValue.build()); onChanged(); } else { columnsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public Builder addColumns(com.clickhouse.client.grpc.impl.NameAndType value) { if (columnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureColumnsIsMutable(); columns_.add(value); onChanged(); } else { columnsBuilder_.addMessage(value); } return this; } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public Builder addColumns( int index, com.clickhouse.client.grpc.impl.NameAndType value) { if (columnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureColumnsIsMutable(); columns_.add(index, value); onChanged(); } else { columnsBuilder_.addMessage(index, value); } return this; } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public Builder addColumns( com.clickhouse.client.grpc.impl.NameAndType.Builder builderForValue) { if (columnsBuilder_ == null) { ensureColumnsIsMutable(); columns_.add(builderForValue.build()); onChanged(); } else { columnsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public Builder addColumns( int index, com.clickhouse.client.grpc.impl.NameAndType.Builder builderForValue) { if (columnsBuilder_ == null) { ensureColumnsIsMutable(); columns_.add(index, builderForValue.build()); onChanged(); } else { columnsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public Builder addAllColumns( java.lang.Iterable values) { if (columnsBuilder_ == null) { ensureColumnsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, columns_); onChanged(); } else { columnsBuilder_.addAllMessages(values); } return this; } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public Builder clearColumns() { if (columnsBuilder_ == null) { columns_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { columnsBuilder_.clear(); } return this; } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public Builder removeColumns(int index) { if (columnsBuilder_ == null) { ensureColumnsIsMutable(); columns_.remove(index); onChanged(); } else { columnsBuilder_.remove(index); } return this; } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public com.clickhouse.client.grpc.impl.NameAndType.Builder getColumnsBuilder( int index) { return getColumnsFieldBuilder().getBuilder(index); } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public com.clickhouse.client.grpc.impl.NameAndTypeOrBuilder getColumnsOrBuilder( int index) { if (columnsBuilder_ == null) { return columns_.get(index); } else { return columnsBuilder_.getMessageOrBuilder(index); } } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public java.util.List getColumnsOrBuilderList() { if (columnsBuilder_ != null) { return columnsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(columns_); } } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public com.clickhouse.client.grpc.impl.NameAndType.Builder addColumnsBuilder() { return getColumnsFieldBuilder().addBuilder( com.clickhouse.client.grpc.impl.NameAndType.getDefaultInstance()); } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public com.clickhouse.client.grpc.impl.NameAndType.Builder addColumnsBuilder( int index) { return getColumnsFieldBuilder().addBuilder( index, com.clickhouse.client.grpc.impl.NameAndType.getDefaultInstance()); } /** *
     * Columns of the table. Types are required, names can be omitted. If the names are omitted, "_1", "_2", ... is used.
     * 
* * repeated .clickhouse.grpc.NameAndType columns = 2; */ public java.util.List getColumnsBuilderList() { return getColumnsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.clickhouse.client.grpc.impl.NameAndType, com.clickhouse.client.grpc.impl.NameAndType.Builder, com.clickhouse.client.grpc.impl.NameAndTypeOrBuilder> getColumnsFieldBuilder() { if (columnsBuilder_ == null) { columnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.clickhouse.client.grpc.impl.NameAndType, com.clickhouse.client.grpc.impl.NameAndType.Builder, com.clickhouse.client.grpc.impl.NameAndTypeOrBuilder>( columns_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); columns_ = null; } return columnsBuilder_; } private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** *
     * Data to insert to the external table.
     * If a method with streaming input (i.e. ExecuteQueryWithStreamInput() or ExecuteQueryWithStreamIO()) is used,
     * then data for insertion to the same external table can be split between multiple QueryInfos.
     * 
* * bytes data = 3; * @return The data. */ @java.lang.Override public com.google.protobuf.ByteString getData() { return data_; } /** *
     * Data to insert to the external table.
     * If a method with streaming input (i.e. ExecuteQueryWithStreamInput() or ExecuteQueryWithStreamIO()) is used,
     * then data for insertion to the same external table can be split between multiple QueryInfos.
     * 
* * bytes data = 3; * @param value The data to set. * @return This builder for chaining. */ public Builder setData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } data_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Data to insert to the external table.
     * If a method with streaming input (i.e. ExecuteQueryWithStreamInput() or ExecuteQueryWithStreamIO()) is used,
     * then data for insertion to the same external table can be split between multiple QueryInfos.
     * 
* * bytes data = 3; * @return This builder for chaining. */ public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000004); data_ = getDefaultInstance().getData(); onChanged(); return this; } private java.lang.Object format_ = ""; /** *
     * Format of the data to insert to the external table.
     * 
* * string format = 4; * @return The format. */ public java.lang.String getFormat() { java.lang.Object ref = format_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); format_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Format of the data to insert to the external table.
     * 
* * string format = 4; * @return The bytes for format. */ public com.google.protobuf.ByteString getFormatBytes() { java.lang.Object ref = format_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); format_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Format of the data to insert to the external table.
     * 
* * string format = 4; * @param value The format to set. * @return This builder for chaining. */ public Builder setFormat( java.lang.String value) { if (value == null) { throw new NullPointerException(); } format_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * Format of the data to insert to the external table.
     * 
* * string format = 4; * @return This builder for chaining. */ public Builder clearFormat() { format_ = getDefaultInstance().getFormat(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** *
     * Format of the data to insert to the external table.
     * 
* * string format = 4; * @param value The bytes for format to set. * @return This builder for chaining. */ public Builder setFormatBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); format_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } private java.lang.Object compressionType_ = ""; /** *
     * Compression type used to compress `data`.
     * Supported values: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
     * 
* * string compression_type = 6; * @return The compressionType. */ public java.lang.String getCompressionType() { java.lang.Object ref = compressionType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); compressionType_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Compression type used to compress `data`.
     * Supported values: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
     * 
* * string compression_type = 6; * @return The bytes for compressionType. */ public com.google.protobuf.ByteString getCompressionTypeBytes() { java.lang.Object ref = compressionType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); compressionType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Compression type used to compress `data`.
     * Supported values: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
     * 
* * string compression_type = 6; * @param value The compressionType to set. * @return This builder for chaining. */ public Builder setCompressionType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } compressionType_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * Compression type used to compress `data`.
     * Supported values: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
     * 
* * string compression_type = 6; * @return This builder for chaining. */ public Builder clearCompressionType() { compressionType_ = getDefaultInstance().getCompressionType(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** *
     * Compression type used to compress `data`.
     * Supported values: none, gzip(gz), deflate, brotli(br), lzma(xz), zstd(zst), lz4, bz2.
     * 
* * string compression_type = 6; * @param value The bytes for compressionType to set. * @return This builder for chaining. */ public Builder setCompressionTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); compressionType_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> settings_; private com.google.protobuf.MapField internalGetSettings() { if (settings_ == null) { return com.google.protobuf.MapField.emptyMapField( SettingsDefaultEntryHolder.defaultEntry); } return settings_; } private com.google.protobuf.MapField internalGetMutableSettings() { if (settings_ == null) { settings_ = com.google.protobuf.MapField.newMapField( SettingsDefaultEntryHolder.defaultEntry); } if (!settings_.isMutable()) { settings_ = settings_.copy(); } bitField0_ |= 0x00000020; onChanged(); return settings_; } public int getSettingsCount() { return internalGetSettings().getMap().size(); } /** *
     * Settings for executing that insertion, applied after QueryInfo.settings.
     * 
* * map<string, string> settings = 5; */ @java.lang.Override public boolean containsSettings( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetSettings().getMap().containsKey(key); } /** * Use {@link #getSettingsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getSettings() { return getSettingsMap(); } /** *
     * Settings for executing that insertion, applied after QueryInfo.settings.
     * 
* * map<string, string> settings = 5; */ @java.lang.Override public java.util.Map getSettingsMap() { return internalGetSettings().getMap(); } /** *
     * Settings for executing that insertion, applied after QueryInfo.settings.
     * 
* * map<string, string> settings = 5; */ @java.lang.Override public /* nullable */ java.lang.String getSettingsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetSettings().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Settings for executing that insertion, applied after QueryInfo.settings.
     * 
* * map<string, string> settings = 5; */ @java.lang.Override public java.lang.String getSettingsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetSettings().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearSettings() { bitField0_ = (bitField0_ & ~0x00000020); internalGetMutableSettings().getMutableMap() .clear(); return this; } /** *
     * Settings for executing that insertion, applied after QueryInfo.settings.
     * 
* * map<string, string> settings = 5; */ public Builder removeSettings( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableSettings().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableSettings() { bitField0_ |= 0x00000020; return internalGetMutableSettings().getMutableMap(); } /** *
     * Settings for executing that insertion, applied after QueryInfo.settings.
     * 
* * map<string, string> settings = 5; */ public Builder putSettings( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableSettings().getMutableMap() .put(key, value); bitField0_ |= 0x00000020; return this; } /** *
     * Settings for executing that insertion, applied after QueryInfo.settings.
     * 
* * map<string, string> settings = 5; */ public Builder putAllSettings( java.util.Map values) { internalGetMutableSettings().getMutableMap() .putAll(values); bitField0_ |= 0x00000020; 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:clickhouse.grpc.ExternalTable) } // @@protoc_insertion_point(class_scope:clickhouse.grpc.ExternalTable) private static final com.clickhouse.client.grpc.impl.ExternalTable DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clickhouse.client.grpc.impl.ExternalTable(); } public static com.clickhouse.client.grpc.impl.ExternalTable getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ExternalTable 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.clickhouse.client.grpc.impl.ExternalTable getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy