com.youtube.vitess.proto.Topodata Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: topodata.proto
package com.youtube.vitess.proto;
public final class Topodata {
private Topodata() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
*
* KeyspaceIdType describes the type of the sharding key for a
* range-based sharded keyspace.
*
*
* Protobuf enum {@code topodata.KeyspaceIdType}
*/
public enum KeyspaceIdType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* UNSET is the default value, when range-based sharding is not used.
*
*
* UNSET = 0;
*/
UNSET(0),
/**
*
* UINT64 is when uint64 value is used.
* This is represented as 'unsigned bigint' in mysql
*
*
* UINT64 = 1;
*/
UINT64(1),
/**
*
* BYTES is when an array of bytes is used.
* This is represented as 'varbinary' in mysql
*
*
* BYTES = 2;
*/
BYTES(2),
UNRECOGNIZED(-1),
;
/**
*
* UNSET is the default value, when range-based sharding is not used.
*
*
* UNSET = 0;
*/
public static final int UNSET_VALUE = 0;
/**
*
* UINT64 is when uint64 value is used.
* This is represented as 'unsigned bigint' in mysql
*
*
* UINT64 = 1;
*/
public static final int UINT64_VALUE = 1;
/**
*
* BYTES is when an array of bytes is used.
* This is represented as 'varbinary' in mysql
*
*
* BYTES = 2;
*/
public static final int BYTES_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;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static KeyspaceIdType valueOf(int value) {
return forNumber(value);
}
public static KeyspaceIdType forNumber(int value) {
switch (value) {
case 0: return UNSET;
case 1: return UINT64;
case 2: return BYTES;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
KeyspaceIdType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public KeyspaceIdType findValueByNumber(int number) {
return KeyspaceIdType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
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.youtube.vitess.proto.Topodata.getDescriptor().getEnumTypes().get(0);
}
private static final KeyspaceIdType[] VALUES = values();
public static KeyspaceIdType 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 KeyspaceIdType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:topodata.KeyspaceIdType)
}
/**
*
* TabletType represents the type of a given tablet.
*
*
* Protobuf enum {@code topodata.TabletType}
*/
public enum TabletType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* UNKNOWN is not a valid value.
*
*
* UNKNOWN = 0;
*/
UNKNOWN(0, 0),
/**
*
* MASTER is the master server for the shard. Only MASTER allows DMLs.
*
*
* MASTER = 1;
*/
MASTER(1, 1),
/**
*
* REPLICA is a slave type. It is used to serve live traffic.
* A REPLICA can be promoted to MASTER. A demoted MASTER will go to REPLICA.
*
*
* REPLICA = 2;
*/
REPLICA(2, 2),
/**
*
* RDONLY (old name) / BATCH (new name) is used to serve traffic for
* long-running jobs. It is a separate type from REPLICA so
* long-running queries don't affect web-like traffic.
*
*
* RDONLY = 3;
*/
RDONLY(3, 3),
/**
*
* SPARE is a type of servers that cannot serve queries, but is available
* in case an extra server is needed.
*
*
* SPARE = 4;
*/
SPARE(5, 4),
/**
*
* EXPERIMENTAL is like SPARE, except it can serve queries. This
* type can be used for usages not planned by Vitess, like online
* export to another storage engine.
*
*
* EXPERIMENTAL = 5;
*/
EXPERIMENTAL(6, 5),
/**
*
* BACKUP is the type a server goes to when taking a backup. No queries
* can be served in BACKUP mode.
*
*
* BACKUP = 6;
*/
BACKUP(7, 6),
/**
*
* RESTORE is the type a server uses when restoring a backup, at
* startup time. No queries can be served in RESTORE mode.
*
*
* RESTORE = 7;
*/
RESTORE(8, 7),
/**
*
* DRAINED is the type a server goes into when used by Vitess tools
* to perform an offline action. It is a serving type (as
* the tools processes may need to run queries), but it's not used
* to route queries from Vitess users. In this state,
* this tablet is dedicated to the process that uses it.
*
*
* DRAINED = 8;
*/
DRAINED(9, 8),
UNRECOGNIZED(-1, -1),
;
/**
* BATCH = 3;
*/
public static final TabletType BATCH = RDONLY;
/**
*
* UNKNOWN is not a valid value.
*
*
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
*
* MASTER is the master server for the shard. Only MASTER allows DMLs.
*
*
* MASTER = 1;
*/
public static final int MASTER_VALUE = 1;
/**
*
* REPLICA is a slave type. It is used to serve live traffic.
* A REPLICA can be promoted to MASTER. A demoted MASTER will go to REPLICA.
*
*
* REPLICA = 2;
*/
public static final int REPLICA_VALUE = 2;
/**
*
* RDONLY (old name) / BATCH (new name) is used to serve traffic for
* long-running jobs. It is a separate type from REPLICA so
* long-running queries don't affect web-like traffic.
*
*
* RDONLY = 3;
*/
public static final int RDONLY_VALUE = 3;
/**
* BATCH = 3;
*/
public static final int BATCH_VALUE = 3;
/**
*
* SPARE is a type of servers that cannot serve queries, but is available
* in case an extra server is needed.
*
*
* SPARE = 4;
*/
public static final int SPARE_VALUE = 4;
/**
*
* EXPERIMENTAL is like SPARE, except it can serve queries. This
* type can be used for usages not planned by Vitess, like online
* export to another storage engine.
*
*
* EXPERIMENTAL = 5;
*/
public static final int EXPERIMENTAL_VALUE = 5;
/**
*
* BACKUP is the type a server goes to when taking a backup. No queries
* can be served in BACKUP mode.
*
*
* BACKUP = 6;
*/
public static final int BACKUP_VALUE = 6;
/**
*
* RESTORE is the type a server uses when restoring a backup, at
* startup time. No queries can be served in RESTORE mode.
*
*
* RESTORE = 7;
*/
public static final int RESTORE_VALUE = 7;
/**
*
* DRAINED is the type a server goes into when used by Vitess tools
* to perform an offline action. It is a serving type (as
* the tools processes may need to run queries), but it's not used
* to route queries from Vitess users. In this state,
* this tablet is dedicated to the process that uses it.
*
*
* DRAINED = 8;
*/
public static final int DRAINED_VALUE = 8;
public final int getNumber() {
if (index == -1) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TabletType valueOf(int value) {
return forNumber(value);
}
public static TabletType forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return MASTER;
case 2: return REPLICA;
case 3: return RDONLY;
case 4: return SPARE;
case 5: return EXPERIMENTAL;
case 6: return BACKUP;
case 7: return RESTORE;
case 8: return DRAINED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TabletType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TabletType findValueByNumber(int number) {
return TabletType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.getDescriptor().getEnumTypes().get(1);
}
private static final TabletType[] VALUES = {
UNKNOWN, MASTER, REPLICA, RDONLY, BATCH, SPARE, EXPERIMENTAL, BACKUP, RESTORE, DRAINED,
};
public static TabletType 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 index;
private final int value;
private TabletType(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:topodata.TabletType)
}
public interface KeyRangeOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.KeyRange)
com.google.protobuf.MessageOrBuilder {
/**
* optional bytes start = 1;
*/
com.google.protobuf.ByteString getStart();
/**
* optional bytes end = 2;
*/
com.google.protobuf.ByteString getEnd();
}
/**
*
* KeyRange describes a range of sharding keys, when range-based
* sharding is used.
*
*
* Protobuf type {@code topodata.KeyRange}
*/
public static final class KeyRange extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.KeyRange)
KeyRangeOrBuilder {
// Use KeyRange.newBuilder() to construct.
private KeyRange(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private KeyRange() {
start_ = com.google.protobuf.ByteString.EMPTY;
end_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private KeyRange(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
start_ = input.readBytes();
break;
}
case 18: {
end_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_KeyRange_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_KeyRange_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.KeyRange.class, com.youtube.vitess.proto.Topodata.KeyRange.Builder.class);
}
public static final int START_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString start_;
/**
* optional bytes start = 1;
*/
public com.google.protobuf.ByteString getStart() {
return start_;
}
public static final int END_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString end_;
/**
* optional bytes end = 2;
*/
public com.google.protobuf.ByteString getEnd() {
return end_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!start_.isEmpty()) {
output.writeBytes(1, start_);
}
if (!end_.isEmpty()) {
output.writeBytes(2, end_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!start_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, start_);
}
if (!end_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, end_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.KeyRange)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.KeyRange other = (com.youtube.vitess.proto.Topodata.KeyRange) obj;
boolean result = true;
result = result && getStart()
.equals(other.getStart());
result = result && getEnd()
.equals(other.getEnd());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + START_FIELD_NUMBER;
hash = (53 * hash) + getStart().hashCode();
hash = (37 * hash) + END_FIELD_NUMBER;
hash = (53 * hash) + getEnd().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.KeyRange parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.KeyRange parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.KeyRange parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.KeyRange parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.KeyRange parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.KeyRange 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.youtube.vitess.proto.Topodata.KeyRange parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.KeyRange 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.youtube.vitess.proto.Topodata.KeyRange parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.KeyRange parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.KeyRange prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* KeyRange describes a range of sharding keys, when range-based
* sharding is used.
*
*
* Protobuf type {@code topodata.KeyRange}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.KeyRange)
com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_KeyRange_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_KeyRange_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.KeyRange.class, com.youtube.vitess.proto.Topodata.KeyRange.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.KeyRange.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
start_ = com.google.protobuf.ByteString.EMPTY;
end_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_KeyRange_descriptor;
}
public com.youtube.vitess.proto.Topodata.KeyRange getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.KeyRange build() {
com.youtube.vitess.proto.Topodata.KeyRange result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.KeyRange buildPartial() {
com.youtube.vitess.proto.Topodata.KeyRange result = new com.youtube.vitess.proto.Topodata.KeyRange(this);
result.start_ = start_;
result.end_ = end_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.KeyRange) {
return mergeFrom((com.youtube.vitess.proto.Topodata.KeyRange)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.KeyRange other) {
if (other == com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance()) return this;
if (other.getStart() != com.google.protobuf.ByteString.EMPTY) {
setStart(other.getStart());
}
if (other.getEnd() != com.google.protobuf.ByteString.EMPTY) {
setEnd(other.getEnd());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.KeyRange parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.KeyRange) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString start_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes start = 1;
*/
public com.google.protobuf.ByteString getStart() {
return start_;
}
/**
* optional bytes start = 1;
*/
public Builder setStart(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
start_ = value;
onChanged();
return this;
}
/**
* optional bytes start = 1;
*/
public Builder clearStart() {
start_ = getDefaultInstance().getStart();
onChanged();
return this;
}
private com.google.protobuf.ByteString end_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes end = 2;
*/
public com.google.protobuf.ByteString getEnd() {
return end_;
}
/**
* optional bytes end = 2;
*/
public Builder setEnd(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
end_ = value;
onChanged();
return this;
}
/**
* optional bytes end = 2;
*/
public Builder clearEnd() {
end_ = getDefaultInstance().getEnd();
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.KeyRange)
}
// @@protoc_insertion_point(class_scope:topodata.KeyRange)
private static final com.youtube.vitess.proto.Topodata.KeyRange DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.KeyRange();
}
public static com.youtube.vitess.proto.Topodata.KeyRange getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public KeyRange parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new KeyRange(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.KeyRange getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TabletAliasOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.TabletAlias)
com.google.protobuf.MessageOrBuilder {
/**
*
* cell is the cell (or datacenter) the tablet is in
*
*
* optional string cell = 1;
*/
java.lang.String getCell();
/**
*
* cell is the cell (or datacenter) the tablet is in
*
*
* optional string cell = 1;
*/
com.google.protobuf.ByteString
getCellBytes();
/**
*
* uid is a unique id for this tablet within the shard
* (this is the MySQL server id as well).
*
*
* optional uint32 uid = 2;
*/
int getUid();
}
/**
*
* TabletAlias is a globally unique tablet identifier.
*
*
* Protobuf type {@code topodata.TabletAlias}
*/
public static final class TabletAlias extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.TabletAlias)
TabletAliasOrBuilder {
// Use TabletAlias.newBuilder() to construct.
private TabletAlias(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TabletAlias() {
cell_ = "";
uid_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private TabletAlias(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
cell_ = s;
break;
}
case 16: {
uid_ = input.readUInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_TabletAlias_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_TabletAlias_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.TabletAlias.class, com.youtube.vitess.proto.Topodata.TabletAlias.Builder.class);
}
public static final int CELL_FIELD_NUMBER = 1;
private volatile java.lang.Object cell_;
/**
*
* cell is the cell (or datacenter) the tablet is in
*
*
* optional string cell = 1;
*/
public java.lang.String getCell() {
java.lang.Object ref = cell_;
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();
cell_ = s;
return s;
}
}
/**
*
* cell is the cell (or datacenter) the tablet is in
*
*
* optional string cell = 1;
*/
public com.google.protobuf.ByteString
getCellBytes() {
java.lang.Object ref = cell_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
cell_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int UID_FIELD_NUMBER = 2;
private int uid_;
/**
*
* uid is a unique id for this tablet within the shard
* (this is the MySQL server id as well).
*
*
* optional uint32 uid = 2;
*/
public int getUid() {
return uid_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getCellBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cell_);
}
if (uid_ != 0) {
output.writeUInt32(2, uid_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getCellBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cell_);
}
if (uid_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, uid_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.TabletAlias)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.TabletAlias other = (com.youtube.vitess.proto.Topodata.TabletAlias) obj;
boolean result = true;
result = result && getCell()
.equals(other.getCell());
result = result && (getUid()
== other.getUid());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + CELL_FIELD_NUMBER;
hash = (53 * hash) + getCell().hashCode();
hash = (37 * hash) + UID_FIELD_NUMBER;
hash = (53 * hash) + getUid();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.TabletAlias parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.TabletAlias parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.TabletAlias parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.TabletAlias parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.TabletAlias parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.TabletAlias 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.youtube.vitess.proto.Topodata.TabletAlias parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.TabletAlias 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.youtube.vitess.proto.Topodata.TabletAlias parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.TabletAlias parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.TabletAlias prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* TabletAlias is a globally unique tablet identifier.
*
*
* Protobuf type {@code topodata.TabletAlias}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.TabletAlias)
com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_TabletAlias_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_TabletAlias_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.TabletAlias.class, com.youtube.vitess.proto.Topodata.TabletAlias.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.TabletAlias.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
cell_ = "";
uid_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_TabletAlias_descriptor;
}
public com.youtube.vitess.proto.Topodata.TabletAlias getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.TabletAlias build() {
com.youtube.vitess.proto.Topodata.TabletAlias result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.TabletAlias buildPartial() {
com.youtube.vitess.proto.Topodata.TabletAlias result = new com.youtube.vitess.proto.Topodata.TabletAlias(this);
result.cell_ = cell_;
result.uid_ = uid_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.TabletAlias) {
return mergeFrom((com.youtube.vitess.proto.Topodata.TabletAlias)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.TabletAlias other) {
if (other == com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance()) return this;
if (!other.getCell().isEmpty()) {
cell_ = other.cell_;
onChanged();
}
if (other.getUid() != 0) {
setUid(other.getUid());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.TabletAlias parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.TabletAlias) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object cell_ = "";
/**
*
* cell is the cell (or datacenter) the tablet is in
*
*
* optional string cell = 1;
*/
public java.lang.String getCell() {
java.lang.Object ref = cell_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cell_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* cell is the cell (or datacenter) the tablet is in
*
*
* optional string cell = 1;
*/
public com.google.protobuf.ByteString
getCellBytes() {
java.lang.Object ref = cell_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
cell_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* cell is the cell (or datacenter) the tablet is in
*
*
* optional string cell = 1;
*/
public Builder setCell(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
cell_ = value;
onChanged();
return this;
}
/**
*
* cell is the cell (or datacenter) the tablet is in
*
*
* optional string cell = 1;
*/
public Builder clearCell() {
cell_ = getDefaultInstance().getCell();
onChanged();
return this;
}
/**
*
* cell is the cell (or datacenter) the tablet is in
*
*
* optional string cell = 1;
*/
public Builder setCellBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
cell_ = value;
onChanged();
return this;
}
private int uid_ ;
/**
*
* uid is a unique id for this tablet within the shard
* (this is the MySQL server id as well).
*
*
* optional uint32 uid = 2;
*/
public int getUid() {
return uid_;
}
/**
*
* uid is a unique id for this tablet within the shard
* (this is the MySQL server id as well).
*
*
* optional uint32 uid = 2;
*/
public Builder setUid(int value) {
uid_ = value;
onChanged();
return this;
}
/**
*
* uid is a unique id for this tablet within the shard
* (this is the MySQL server id as well).
*
*
* optional uint32 uid = 2;
*/
public Builder clearUid() {
uid_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.TabletAlias)
}
// @@protoc_insertion_point(class_scope:topodata.TabletAlias)
private static final com.youtube.vitess.proto.Topodata.TabletAlias DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.TabletAlias();
}
public static com.youtube.vitess.proto.Topodata.TabletAlias getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public TabletAlias parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TabletAlias(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.TabletAlias getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TabletOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.Tablet)
com.google.protobuf.MessageOrBuilder {
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
boolean hasAlias();
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
com.youtube.vitess.proto.Topodata.TabletAlias getAlias();
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder getAliasOrBuilder();
/**
*
* Fully qualified domain name of the host.
*
*
* optional string hostname = 2;
*/
java.lang.String getHostname();
/**
*
* Fully qualified domain name of the host.
*
*
* optional string hostname = 2;
*/
com.google.protobuf.ByteString
getHostnameBytes();
/**
*
* IP address, stored as a string.
*
*
* optional string ip = 3;
*/
java.lang.String getIp();
/**
*
* IP address, stored as a string.
*
*
* optional string ip = 3;
*/
com.google.protobuf.ByteString
getIpBytes();
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
int getPortMapCount();
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
boolean containsPortMap(
java.lang.String key);
/**
* Use {@link #getPortMapMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getPortMap();
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
java.util.Map
getPortMapMap();
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
int getPortMapOrDefault(
java.lang.String key,
int defaultValue);
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
int getPortMapOrThrow(
java.lang.String key);
/**
*
* Keyspace name.
*
*
* optional string keyspace = 5;
*/
java.lang.String getKeyspace();
/**
*
* Keyspace name.
*
*
* optional string keyspace = 5;
*/
com.google.protobuf.ByteString
getKeyspaceBytes();
/**
*
* Shard name. If range based sharding is used, it should match
* key_range.
*
*
* optional string shard = 6;
*/
java.lang.String getShard();
/**
*
* Shard name. If range based sharding is used, it should match
* key_range.
*
*
* optional string shard = 6;
*/
com.google.protobuf.ByteString
getShardBytes();
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
boolean hasKeyRange();
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
com.youtube.vitess.proto.Topodata.KeyRange getKeyRange();
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder();
/**
*
* type is the current type of the tablet.
*
*
* optional .topodata.TabletType type = 8;
*/
int getTypeValue();
/**
*
* type is the current type of the tablet.
*
*
* optional .topodata.TabletType type = 8;
*/
com.youtube.vitess.proto.Topodata.TabletType getType();
/**
*
* It this is set, it is used as the database name instead of the
* normal "vt_" + keyspace.
*
*
* optional string db_name_override = 9;
*/
java.lang.String getDbNameOverride();
/**
*
* It this is set, it is used as the database name instead of the
* normal "vt_" + keyspace.
*
*
* optional string db_name_override = 9;
*/
com.google.protobuf.ByteString
getDbNameOverrideBytes();
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
int getTagsCount();
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
boolean containsTags(
java.lang.String key);
/**
* Use {@link #getTagsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getTags();
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
java.util.Map
getTagsMap();
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
java.lang.String getTagsOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
java.lang.String getTagsOrThrow(
java.lang.String key);
}
/**
*
* Tablet represents information about a running instance of vttablet.
*
*
* Protobuf type {@code topodata.Tablet}
*/
public static final class Tablet extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.Tablet)
TabletOrBuilder {
// Use Tablet.newBuilder() to construct.
private Tablet(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Tablet() {
hostname_ = "";
ip_ = "";
keyspace_ = "";
shard_ = "";
type_ = 0;
dbNameOverride_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Tablet(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
com.youtube.vitess.proto.Topodata.TabletAlias.Builder subBuilder = null;
if (alias_ != null) {
subBuilder = alias_.toBuilder();
}
alias_ = input.readMessage(com.youtube.vitess.proto.Topodata.TabletAlias.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(alias_);
alias_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
hostname_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
ip_ = s;
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
portMap_ = com.google.protobuf.MapField.newMapField(
PortMapDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000008;
}
com.google.protobuf.MapEntry
portMap = input.readMessage(
PortMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
portMap_.getMutableMap().put(portMap.getKey(), portMap.getValue());
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
keyspace_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
shard_ = s;
break;
}
case 58: {
com.youtube.vitess.proto.Topodata.KeyRange.Builder subBuilder = null;
if (keyRange_ != null) {
subBuilder = keyRange_.toBuilder();
}
keyRange_ = input.readMessage(com.youtube.vitess.proto.Topodata.KeyRange.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(keyRange_);
keyRange_ = subBuilder.buildPartial();
}
break;
}
case 64: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
dbNameOverride_ = s;
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
tags_ = com.google.protobuf.MapField.newMapField(
TagsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000200;
}
com.google.protobuf.MapEntry
tags = input.readMessage(
TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
tags_.getMutableMap().put(tags.getKey(), tags.getValue());
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Tablet_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetPortMap();
case 10:
return internalGetTags();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Tablet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Tablet.class, com.youtube.vitess.proto.Topodata.Tablet.Builder.class);
}
private int bitField0_;
public static final int ALIAS_FIELD_NUMBER = 1;
private com.youtube.vitess.proto.Topodata.TabletAlias alias_;
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public boolean hasAlias() {
return alias_ != null;
}
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAlias getAlias() {
return alias_ == null ? com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance() : alias_;
}
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder getAliasOrBuilder() {
return getAlias();
}
public static final int HOSTNAME_FIELD_NUMBER = 2;
private volatile java.lang.Object hostname_;
/**
*
* Fully qualified domain name of the host.
*
*
* optional string hostname = 2;
*/
public java.lang.String getHostname() {
java.lang.Object ref = hostname_;
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();
hostname_ = s;
return s;
}
}
/**
*
* Fully qualified domain name of the host.
*
*
* optional string hostname = 2;
*/
public com.google.protobuf.ByteString
getHostnameBytes() {
java.lang.Object ref = hostname_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hostname_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IP_FIELD_NUMBER = 3;
private volatile java.lang.Object ip_;
/**
*
* IP address, stored as a string.
*
*
* optional string ip = 3;
*/
public java.lang.String getIp() {
java.lang.Object ref = ip_;
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();
ip_ = s;
return s;
}
}
/**
*
* IP address, stored as a string.
*
*
* optional string ip = 3;
*/
public com.google.protobuf.ByteString
getIpBytes() {
java.lang.Object ref = ip_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ip_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PORT_MAP_FIELD_NUMBER = 4;
private static final class PortMapDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.Integer> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.youtube.vitess.proto.Topodata.internal_static_topodata_Tablet_PortMapEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.INT32,
0);
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Integer> portMap_;
private com.google.protobuf.MapField
internalGetPortMap() {
if (portMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PortMapDefaultEntryHolder.defaultEntry);
}
return portMap_;
}
public int getPortMapCount() {
return internalGetPortMap().getMap().size();
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public boolean containsPortMap(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetPortMap().getMap().containsKey(key);
}
/**
* Use {@link #getPortMapMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getPortMap() {
return getPortMapMap();
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public java.util.Map getPortMapMap() {
return internalGetPortMap().getMap();
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public int getPortMapOrDefault(
java.lang.String key,
int defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPortMap().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public int getPortMapOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPortMap().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int KEYSPACE_FIELD_NUMBER = 5;
private volatile java.lang.Object keyspace_;
/**
*
* Keyspace name.
*
*
* optional string keyspace = 5;
*/
public java.lang.String getKeyspace() {
java.lang.Object ref = keyspace_;
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();
keyspace_ = s;
return s;
}
}
/**
*
* Keyspace name.
*
*
* optional string keyspace = 5;
*/
public com.google.protobuf.ByteString
getKeyspaceBytes() {
java.lang.Object ref = keyspace_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyspace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHARD_FIELD_NUMBER = 6;
private volatile java.lang.Object shard_;
/**
*
* Shard name. If range based sharding is used, it should match
* key_range.
*
*
* optional string shard = 6;
*/
public java.lang.String getShard() {
java.lang.Object ref = shard_;
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();
shard_ = s;
return s;
}
}
/**
*
* Shard name. If range based sharding is used, it should match
* key_range.
*
*
* optional string shard = 6;
*/
public com.google.protobuf.ByteString
getShardBytes() {
java.lang.Object ref = shard_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shard_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int KEY_RANGE_FIELD_NUMBER = 7;
private com.youtube.vitess.proto.Topodata.KeyRange keyRange_;
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public boolean hasKeyRange() {
return keyRange_ != null;
}
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public com.youtube.vitess.proto.Topodata.KeyRange getKeyRange() {
return keyRange_ == null ? com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
}
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder() {
return getKeyRange();
}
public static final int TYPE_FIELD_NUMBER = 8;
private int type_;
/**
*
* type is the current type of the tablet.
*
*
* optional .topodata.TabletType type = 8;
*/
public int getTypeValue() {
return type_;
}
/**
*
* type is the current type of the tablet.
*
*
* optional .topodata.TabletType type = 8;
*/
public com.youtube.vitess.proto.Topodata.TabletType getType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(type_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
public static final int DB_NAME_OVERRIDE_FIELD_NUMBER = 9;
private volatile java.lang.Object dbNameOverride_;
/**
*
* It this is set, it is used as the database name instead of the
* normal "vt_" + keyspace.
*
*
* optional string db_name_override = 9;
*/
public java.lang.String getDbNameOverride() {
java.lang.Object ref = dbNameOverride_;
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();
dbNameOverride_ = s;
return s;
}
}
/**
*
* It this is set, it is used as the database name instead of the
* normal "vt_" + keyspace.
*
*
* optional string db_name_override = 9;
*/
public com.google.protobuf.ByteString
getDbNameOverrideBytes() {
java.lang.Object ref = dbNameOverride_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
dbNameOverride_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TAGS_FIELD_NUMBER = 10;
private static final class TagsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.youtube.vitess.proto.Topodata.internal_static_topodata_Tablet_TagsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> tags_;
private com.google.protobuf.MapField
internalGetTags() {
if (tags_ == null) {
return com.google.protobuf.MapField.emptyMapField(
TagsDefaultEntryHolder.defaultEntry);
}
return tags_;
}
public int getTagsCount() {
return internalGetTags().getMap().size();
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public boolean containsTags(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetTags().getMap().containsKey(key);
}
/**
* Use {@link #getTagsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getTags() {
return getTagsMap();
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public java.util.Map getTagsMap() {
return internalGetTags().getMap();
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public java.lang.String getTagsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTags().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public java.lang.String getTagsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTags().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (alias_ != null) {
output.writeMessage(1, getAlias());
}
if (!getHostnameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hostname_);
}
if (!getIpBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ip_);
}
for (java.util.Map.Entry entry
: internalGetPortMap().getMap().entrySet()) {
com.google.protobuf.MapEntry
portMap = PortMapDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
output.writeMessage(4, portMap);
}
if (!getKeyspaceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, keyspace_);
}
if (!getShardBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, shard_);
}
if (keyRange_ != null) {
output.writeMessage(7, getKeyRange());
}
if (type_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
output.writeEnum(8, type_);
}
if (!getDbNameOverrideBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, dbNameOverride_);
}
for (java.util.Map.Entry entry
: internalGetTags().getMap().entrySet()) {
com.google.protobuf.MapEntry
tags = TagsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
output.writeMessage(10, tags);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (alias_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getAlias());
}
if (!getHostnameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, hostname_);
}
if (!getIpBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ip_);
}
for (java.util.Map.Entry entry
: internalGetPortMap().getMap().entrySet()) {
com.google.protobuf.MapEntry
portMap = PortMapDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, portMap);
}
if (!getKeyspaceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, keyspace_);
}
if (!getShardBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, shard_);
}
if (keyRange_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getKeyRange());
}
if (type_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(8, type_);
}
if (!getDbNameOverrideBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, dbNameOverride_);
}
for (java.util.Map.Entry entry
: internalGetTags().getMap().entrySet()) {
com.google.protobuf.MapEntry
tags = TagsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, tags);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.Tablet)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.Tablet other = (com.youtube.vitess.proto.Topodata.Tablet) obj;
boolean result = true;
result = result && (hasAlias() == other.hasAlias());
if (hasAlias()) {
result = result && getAlias()
.equals(other.getAlias());
}
result = result && getHostname()
.equals(other.getHostname());
result = result && getIp()
.equals(other.getIp());
result = result && internalGetPortMap().equals(
other.internalGetPortMap());
result = result && getKeyspace()
.equals(other.getKeyspace());
result = result && getShard()
.equals(other.getShard());
result = result && (hasKeyRange() == other.hasKeyRange());
if (hasKeyRange()) {
result = result && getKeyRange()
.equals(other.getKeyRange());
}
result = result && type_ == other.type_;
result = result && getDbNameOverride()
.equals(other.getDbNameOverride());
result = result && internalGetTags().equals(
other.internalGetTags());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasAlias()) {
hash = (37 * hash) + ALIAS_FIELD_NUMBER;
hash = (53 * hash) + getAlias().hashCode();
}
hash = (37 * hash) + HOSTNAME_FIELD_NUMBER;
hash = (53 * hash) + getHostname().hashCode();
hash = (37 * hash) + IP_FIELD_NUMBER;
hash = (53 * hash) + getIp().hashCode();
if (!internalGetPortMap().getMap().isEmpty()) {
hash = (37 * hash) + PORT_MAP_FIELD_NUMBER;
hash = (53 * hash) + internalGetPortMap().hashCode();
}
hash = (37 * hash) + KEYSPACE_FIELD_NUMBER;
hash = (53 * hash) + getKeyspace().hashCode();
hash = (37 * hash) + SHARD_FIELD_NUMBER;
hash = (53 * hash) + getShard().hashCode();
if (hasKeyRange()) {
hash = (37 * hash) + KEY_RANGE_FIELD_NUMBER;
hash = (53 * hash) + getKeyRange().hashCode();
}
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + DB_NAME_OVERRIDE_FIELD_NUMBER;
hash = (53 * hash) + getDbNameOverride().hashCode();
if (!internalGetTags().getMap().isEmpty()) {
hash = (37 * hash) + TAGS_FIELD_NUMBER;
hash = (53 * hash) + internalGetTags().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.Tablet parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Tablet parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Tablet parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Tablet parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Tablet parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Tablet 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.youtube.vitess.proto.Topodata.Tablet parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Tablet 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.youtube.vitess.proto.Topodata.Tablet parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Tablet parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.Tablet prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Tablet represents information about a running instance of vttablet.
*
*
* Protobuf type {@code topodata.Tablet}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.Tablet)
com.youtube.vitess.proto.Topodata.TabletOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Tablet_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetPortMap();
case 10:
return internalGetTags();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 4:
return internalGetMutablePortMap();
case 10:
return internalGetMutableTags();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Tablet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Tablet.class, com.youtube.vitess.proto.Topodata.Tablet.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.Tablet.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (aliasBuilder_ == null) {
alias_ = null;
} else {
alias_ = null;
aliasBuilder_ = null;
}
hostname_ = "";
ip_ = "";
internalGetMutablePortMap().clear();
keyspace_ = "";
shard_ = "";
if (keyRangeBuilder_ == null) {
keyRange_ = null;
} else {
keyRange_ = null;
keyRangeBuilder_ = null;
}
type_ = 0;
dbNameOverride_ = "";
internalGetMutableTags().clear();
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Tablet_descriptor;
}
public com.youtube.vitess.proto.Topodata.Tablet getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.Tablet.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.Tablet build() {
com.youtube.vitess.proto.Topodata.Tablet result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.Tablet buildPartial() {
com.youtube.vitess.proto.Topodata.Tablet result = new com.youtube.vitess.proto.Topodata.Tablet(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (aliasBuilder_ == null) {
result.alias_ = alias_;
} else {
result.alias_ = aliasBuilder_.build();
}
result.hostname_ = hostname_;
result.ip_ = ip_;
result.portMap_ = internalGetPortMap();
result.portMap_.makeImmutable();
result.keyspace_ = keyspace_;
result.shard_ = shard_;
if (keyRangeBuilder_ == null) {
result.keyRange_ = keyRange_;
} else {
result.keyRange_ = keyRangeBuilder_.build();
}
result.type_ = type_;
result.dbNameOverride_ = dbNameOverride_;
result.tags_ = internalGetTags();
result.tags_.makeImmutable();
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.Tablet) {
return mergeFrom((com.youtube.vitess.proto.Topodata.Tablet)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.Tablet other) {
if (other == com.youtube.vitess.proto.Topodata.Tablet.getDefaultInstance()) return this;
if (other.hasAlias()) {
mergeAlias(other.getAlias());
}
if (!other.getHostname().isEmpty()) {
hostname_ = other.hostname_;
onChanged();
}
if (!other.getIp().isEmpty()) {
ip_ = other.ip_;
onChanged();
}
internalGetMutablePortMap().mergeFrom(
other.internalGetPortMap());
if (!other.getKeyspace().isEmpty()) {
keyspace_ = other.keyspace_;
onChanged();
}
if (!other.getShard().isEmpty()) {
shard_ = other.shard_;
onChanged();
}
if (other.hasKeyRange()) {
mergeKeyRange(other.getKeyRange());
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (!other.getDbNameOverride().isEmpty()) {
dbNameOverride_ = other.dbNameOverride_;
onChanged();
}
internalGetMutableTags().mergeFrom(
other.internalGetTags());
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.Tablet parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.Tablet) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.youtube.vitess.proto.Topodata.TabletAlias alias_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.TabletAlias, com.youtube.vitess.proto.Topodata.TabletAlias.Builder, com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder> aliasBuilder_;
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public boolean hasAlias() {
return aliasBuilder_ != null || alias_ != null;
}
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAlias getAlias() {
if (aliasBuilder_ == null) {
return alias_ == null ? com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance() : alias_;
} else {
return aliasBuilder_.getMessage();
}
}
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public Builder setAlias(com.youtube.vitess.proto.Topodata.TabletAlias value) {
if (aliasBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
alias_ = value;
onChanged();
} else {
aliasBuilder_.setMessage(value);
}
return this;
}
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public Builder setAlias(
com.youtube.vitess.proto.Topodata.TabletAlias.Builder builderForValue) {
if (aliasBuilder_ == null) {
alias_ = builderForValue.build();
onChanged();
} else {
aliasBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public Builder mergeAlias(com.youtube.vitess.proto.Topodata.TabletAlias value) {
if (aliasBuilder_ == null) {
if (alias_ != null) {
alias_ =
com.youtube.vitess.proto.Topodata.TabletAlias.newBuilder(alias_).mergeFrom(value).buildPartial();
} else {
alias_ = value;
}
onChanged();
} else {
aliasBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public Builder clearAlias() {
if (aliasBuilder_ == null) {
alias_ = null;
onChanged();
} else {
alias_ = null;
aliasBuilder_ = null;
}
return this;
}
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAlias.Builder getAliasBuilder() {
onChanged();
return getAliasFieldBuilder().getBuilder();
}
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder getAliasOrBuilder() {
if (aliasBuilder_ != null) {
return aliasBuilder_.getMessageOrBuilder();
} else {
return alias_ == null ?
com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance() : alias_;
}
}
/**
*
* alias is the unique name of the tablet.
*
*
* optional .topodata.TabletAlias alias = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.TabletAlias, com.youtube.vitess.proto.Topodata.TabletAlias.Builder, com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder>
getAliasFieldBuilder() {
if (aliasBuilder_ == null) {
aliasBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.TabletAlias, com.youtube.vitess.proto.Topodata.TabletAlias.Builder, com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder>(
getAlias(),
getParentForChildren(),
isClean());
alias_ = null;
}
return aliasBuilder_;
}
private java.lang.Object hostname_ = "";
/**
*
* Fully qualified domain name of the host.
*
*
* optional string hostname = 2;
*/
public java.lang.String getHostname() {
java.lang.Object ref = hostname_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
hostname_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Fully qualified domain name of the host.
*
*
* optional string hostname = 2;
*/
public com.google.protobuf.ByteString
getHostnameBytes() {
java.lang.Object ref = hostname_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hostname_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Fully qualified domain name of the host.
*
*
* optional string hostname = 2;
*/
public Builder setHostname(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hostname_ = value;
onChanged();
return this;
}
/**
*
* Fully qualified domain name of the host.
*
*
* optional string hostname = 2;
*/
public Builder clearHostname() {
hostname_ = getDefaultInstance().getHostname();
onChanged();
return this;
}
/**
*
* Fully qualified domain name of the host.
*
*
* optional string hostname = 2;
*/
public Builder setHostnameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hostname_ = value;
onChanged();
return this;
}
private java.lang.Object ip_ = "";
/**
*
* IP address, stored as a string.
*
*
* optional string ip = 3;
*/
public java.lang.String getIp() {
java.lang.Object ref = ip_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ip_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* IP address, stored as a string.
*
*
* optional string ip = 3;
*/
public com.google.protobuf.ByteString
getIpBytes() {
java.lang.Object ref = ip_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ip_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* IP address, stored as a string.
*
*
* optional string ip = 3;
*/
public Builder setIp(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ip_ = value;
onChanged();
return this;
}
/**
*
* IP address, stored as a string.
*
*
* optional string ip = 3;
*/
public Builder clearIp() {
ip_ = getDefaultInstance().getIp();
onChanged();
return this;
}
/**
*
* IP address, stored as a string.
*
*
* optional string ip = 3;
*/
public Builder setIpBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ip_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Integer> portMap_;
private com.google.protobuf.MapField
internalGetPortMap() {
if (portMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PortMapDefaultEntryHolder.defaultEntry);
}
return portMap_;
}
private com.google.protobuf.MapField
internalGetMutablePortMap() {
onChanged();;
if (portMap_ == null) {
portMap_ = com.google.protobuf.MapField.newMapField(
PortMapDefaultEntryHolder.defaultEntry);
}
if (!portMap_.isMutable()) {
portMap_ = portMap_.copy();
}
return portMap_;
}
public int getPortMapCount() {
return internalGetPortMap().getMap().size();
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public boolean containsPortMap(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetPortMap().getMap().containsKey(key);
}
/**
* Use {@link #getPortMapMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getPortMap() {
return getPortMapMap();
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public java.util.Map getPortMapMap() {
return internalGetPortMap().getMap();
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public int getPortMapOrDefault(
java.lang.String key,
int defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPortMap().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public int getPortMapOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPortMap().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearPortMap() {
getMutablePortMap().clear();
return this;
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public Builder removePortMap(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
getMutablePortMap().remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutablePortMap() {
return internalGetMutablePortMap().getMutableMap();
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public Builder putPortMap(
java.lang.String key,
int value) {
if (key == null) { throw new java.lang.NullPointerException(); }
getMutablePortMap().put(key, value);
return this;
}
/**
*
* Map of named ports. Normally this should include vt, grpc, and mysql.
*
*
* map<string, int32> port_map = 4;
*/
public Builder putAllPortMap(
java.util.Map values) {
getMutablePortMap().putAll(values);
return this;
}
private java.lang.Object keyspace_ = "";
/**
*
* Keyspace name.
*
*
* optional string keyspace = 5;
*/
public java.lang.String getKeyspace() {
java.lang.Object ref = keyspace_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
keyspace_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Keyspace name.
*
*
* optional string keyspace = 5;
*/
public com.google.protobuf.ByteString
getKeyspaceBytes() {
java.lang.Object ref = keyspace_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyspace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Keyspace name.
*
*
* optional string keyspace = 5;
*/
public Builder setKeyspace(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
keyspace_ = value;
onChanged();
return this;
}
/**
*
* Keyspace name.
*
*
* optional string keyspace = 5;
*/
public Builder clearKeyspace() {
keyspace_ = getDefaultInstance().getKeyspace();
onChanged();
return this;
}
/**
*
* Keyspace name.
*
*
* optional string keyspace = 5;
*/
public Builder setKeyspaceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
keyspace_ = value;
onChanged();
return this;
}
private java.lang.Object shard_ = "";
/**
*
* Shard name. If range based sharding is used, it should match
* key_range.
*
*
* optional string shard = 6;
*/
public java.lang.String getShard() {
java.lang.Object ref = shard_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shard_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Shard name. If range based sharding is used, it should match
* key_range.
*
*
* optional string shard = 6;
*/
public com.google.protobuf.ByteString
getShardBytes() {
java.lang.Object ref = shard_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shard_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Shard name. If range based sharding is used, it should match
* key_range.
*
*
* optional string shard = 6;
*/
public Builder setShard(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
shard_ = value;
onChanged();
return this;
}
/**
*
* Shard name. If range based sharding is used, it should match
* key_range.
*
*
* optional string shard = 6;
*/
public Builder clearShard() {
shard_ = getDefaultInstance().getShard();
onChanged();
return this;
}
/**
*
* Shard name. If range based sharding is used, it should match
* key_range.
*
*
* optional string shard = 6;
*/
public Builder setShardBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
shard_ = value;
onChanged();
return this;
}
private com.youtube.vitess.proto.Topodata.KeyRange keyRange_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder> keyRangeBuilder_;
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public boolean hasKeyRange() {
return keyRangeBuilder_ != null || keyRange_ != null;
}
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public com.youtube.vitess.proto.Topodata.KeyRange getKeyRange() {
if (keyRangeBuilder_ == null) {
return keyRange_ == null ? com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
} else {
return keyRangeBuilder_.getMessage();
}
}
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public Builder setKeyRange(com.youtube.vitess.proto.Topodata.KeyRange value) {
if (keyRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
keyRange_ = value;
onChanged();
} else {
keyRangeBuilder_.setMessage(value);
}
return this;
}
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public Builder setKeyRange(
com.youtube.vitess.proto.Topodata.KeyRange.Builder builderForValue) {
if (keyRangeBuilder_ == null) {
keyRange_ = builderForValue.build();
onChanged();
} else {
keyRangeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public Builder mergeKeyRange(com.youtube.vitess.proto.Topodata.KeyRange value) {
if (keyRangeBuilder_ == null) {
if (keyRange_ != null) {
keyRange_ =
com.youtube.vitess.proto.Topodata.KeyRange.newBuilder(keyRange_).mergeFrom(value).buildPartial();
} else {
keyRange_ = value;
}
onChanged();
} else {
keyRangeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public Builder clearKeyRange() {
if (keyRangeBuilder_ == null) {
keyRange_ = null;
onChanged();
} else {
keyRange_ = null;
keyRangeBuilder_ = null;
}
return this;
}
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public com.youtube.vitess.proto.Topodata.KeyRange.Builder getKeyRangeBuilder() {
onChanged();
return getKeyRangeFieldBuilder().getBuilder();
}
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
public com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder() {
if (keyRangeBuilder_ != null) {
return keyRangeBuilder_.getMessageOrBuilder();
} else {
return keyRange_ == null ?
com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
}
}
/**
*
* If range based sharding is used, range for the tablet's shard.
*
*
* optional .topodata.KeyRange key_range = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder>
getKeyRangeFieldBuilder() {
if (keyRangeBuilder_ == null) {
keyRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder>(
getKeyRange(),
getParentForChildren(),
isClean());
keyRange_ = null;
}
return keyRangeBuilder_;
}
private int type_ = 0;
/**
*
* type is the current type of the tablet.
*
*
* optional .topodata.TabletType type = 8;
*/
public int getTypeValue() {
return type_;
}
/**
*
* type is the current type of the tablet.
*
*
* optional .topodata.TabletType type = 8;
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
*
* type is the current type of the tablet.
*
*
* optional .topodata.TabletType type = 8;
*/
public com.youtube.vitess.proto.Topodata.TabletType getType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(type_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
/**
*
* type is the current type of the tablet.
*
*
* optional .topodata.TabletType type = 8;
*/
public Builder setType(com.youtube.vitess.proto.Topodata.TabletType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* type is the current type of the tablet.
*
*
* optional .topodata.TabletType type = 8;
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private java.lang.Object dbNameOverride_ = "";
/**
*
* It this is set, it is used as the database name instead of the
* normal "vt_" + keyspace.
*
*
* optional string db_name_override = 9;
*/
public java.lang.String getDbNameOverride() {
java.lang.Object ref = dbNameOverride_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
dbNameOverride_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* It this is set, it is used as the database name instead of the
* normal "vt_" + keyspace.
*
*
* optional string db_name_override = 9;
*/
public com.google.protobuf.ByteString
getDbNameOverrideBytes() {
java.lang.Object ref = dbNameOverride_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
dbNameOverride_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* It this is set, it is used as the database name instead of the
* normal "vt_" + keyspace.
*
*
* optional string db_name_override = 9;
*/
public Builder setDbNameOverride(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
dbNameOverride_ = value;
onChanged();
return this;
}
/**
*
* It this is set, it is used as the database name instead of the
* normal "vt_" + keyspace.
*
*
* optional string db_name_override = 9;
*/
public Builder clearDbNameOverride() {
dbNameOverride_ = getDefaultInstance().getDbNameOverride();
onChanged();
return this;
}
/**
*
* It this is set, it is used as the database name instead of the
* normal "vt_" + keyspace.
*
*
* optional string db_name_override = 9;
*/
public Builder setDbNameOverrideBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
dbNameOverride_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> tags_;
private com.google.protobuf.MapField
internalGetTags() {
if (tags_ == null) {
return com.google.protobuf.MapField.emptyMapField(
TagsDefaultEntryHolder.defaultEntry);
}
return tags_;
}
private com.google.protobuf.MapField
internalGetMutableTags() {
onChanged();;
if (tags_ == null) {
tags_ = com.google.protobuf.MapField.newMapField(
TagsDefaultEntryHolder.defaultEntry);
}
if (!tags_.isMutable()) {
tags_ = tags_.copy();
}
return tags_;
}
public int getTagsCount() {
return internalGetTags().getMap().size();
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public boolean containsTags(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetTags().getMap().containsKey(key);
}
/**
* Use {@link #getTagsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getTags() {
return getTagsMap();
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public java.util.Map getTagsMap() {
return internalGetTags().getMap();
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public java.lang.String getTagsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTags().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public java.lang.String getTagsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTags().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearTags() {
getMutableTags().clear();
return this;
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public Builder removeTags(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
getMutableTags().remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableTags() {
return internalGetMutableTags().getMutableMap();
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public Builder putTags(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
getMutableTags().put(key, value);
return this;
}
/**
*
* tablet tags
*
*
* map<string, string> tags = 10;
*/
public Builder putAllTags(
java.util.Map values) {
getMutableTags().putAll(values);
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.Tablet)
}
// @@protoc_insertion_point(class_scope:topodata.Tablet)
private static final com.youtube.vitess.proto.Topodata.Tablet DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.Tablet();
}
public static com.youtube.vitess.proto.Topodata.Tablet getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Tablet parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Tablet(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.Tablet getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ShardOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.Shard)
com.google.protobuf.MessageOrBuilder {
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
boolean hasMasterAlias();
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
com.youtube.vitess.proto.Topodata.TabletAlias getMasterAlias();
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder getMasterAliasOrBuilder();
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
boolean hasKeyRange();
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
com.youtube.vitess.proto.Topodata.KeyRange getKeyRange();
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder();
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
java.util.List
getServedTypesList();
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
com.youtube.vitess.proto.Topodata.Shard.ServedType getServedTypes(int index);
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
int getServedTypesCount();
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
java.util.List extends com.youtube.vitess.proto.Topodata.Shard.ServedTypeOrBuilder>
getServedTypesOrBuilderList();
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
com.youtube.vitess.proto.Topodata.Shard.ServedTypeOrBuilder getServedTypesOrBuilder(
int index);
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
java.util.List
getSourceShardsList();
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
com.youtube.vitess.proto.Topodata.Shard.SourceShard getSourceShards(int index);
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
int getSourceShardsCount();
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
java.util.List extends com.youtube.vitess.proto.Topodata.Shard.SourceShardOrBuilder>
getSourceShardsOrBuilderList();
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
com.youtube.vitess.proto.Topodata.Shard.SourceShardOrBuilder getSourceShardsOrBuilder(
int index);
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
java.util.List
getCellsList();
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
int getCellsCount();
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
java.lang.String getCells(int index);
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
com.google.protobuf.ByteString
getCellsBytes(int index);
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
java.util.List
getTabletControlsList();
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
com.youtube.vitess.proto.Topodata.Shard.TabletControl getTabletControls(int index);
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
int getTabletControlsCount();
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
java.util.List extends com.youtube.vitess.proto.Topodata.Shard.TabletControlOrBuilder>
getTabletControlsOrBuilderList();
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
com.youtube.vitess.proto.Topodata.Shard.TabletControlOrBuilder getTabletControlsOrBuilder(
int index);
}
/**
*
* A Shard contains data about a subset of the data whithin a keyspace.
*
*
* Protobuf type {@code topodata.Shard}
*/
public static final class Shard extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.Shard)
ShardOrBuilder {
// Use Shard.newBuilder() to construct.
private Shard(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Shard() {
servedTypes_ = java.util.Collections.emptyList();
sourceShards_ = java.util.Collections.emptyList();
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
tabletControls_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Shard(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
com.youtube.vitess.proto.Topodata.TabletAlias.Builder subBuilder = null;
if (masterAlias_ != null) {
subBuilder = masterAlias_.toBuilder();
}
masterAlias_ = input.readMessage(com.youtube.vitess.proto.Topodata.TabletAlias.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(masterAlias_);
masterAlias_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.youtube.vitess.proto.Topodata.KeyRange.Builder subBuilder = null;
if (keyRange_ != null) {
subBuilder = keyRange_.toBuilder();
}
keyRange_ = input.readMessage(com.youtube.vitess.proto.Topodata.KeyRange.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(keyRange_);
keyRange_ = subBuilder.buildPartial();
}
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
servedTypes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
servedTypes_.add(
input.readMessage(com.youtube.vitess.proto.Topodata.Shard.ServedType.parser(), extensionRegistry));
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
sourceShards_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
sourceShards_.add(
input.readMessage(com.youtube.vitess.proto.Topodata.Shard.SourceShard.parser(), extensionRegistry));
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
cells_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000010;
}
cells_.add(s);
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
tabletControls_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
tabletControls_.add(
input.readMessage(com.youtube.vitess.proto.Topodata.Shard.TabletControl.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
servedTypes_ = java.util.Collections.unmodifiableList(servedTypes_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
sourceShards_ = java.util.Collections.unmodifiableList(sourceShards_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
cells_ = cells_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
tabletControls_ = java.util.Collections.unmodifiableList(tabletControls_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Shard.class, com.youtube.vitess.proto.Topodata.Shard.Builder.class);
}
public interface ServedTypeOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.Shard.ServedType)
com.google.protobuf.MessageOrBuilder {
/**
* optional .topodata.TabletType tablet_type = 1;
*/
int getTabletTypeValue();
/**
* optional .topodata.TabletType tablet_type = 1;
*/
com.youtube.vitess.proto.Topodata.TabletType getTabletType();
/**
* repeated string cells = 2;
*/
java.util.List
getCellsList();
/**
* repeated string cells = 2;
*/
int getCellsCount();
/**
* repeated string cells = 2;
*/
java.lang.String getCells(int index);
/**
* repeated string cells = 2;
*/
com.google.protobuf.ByteString
getCellsBytes(int index);
}
/**
*
* ServedType is an entry in the served_types
*
*
* Protobuf type {@code topodata.Shard.ServedType}
*/
public static final class ServedType extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.Shard.ServedType)
ServedTypeOrBuilder {
// Use ServedType.newBuilder() to construct.
private ServedType(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ServedType() {
tabletType_ = 0;
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ServedType(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
tabletType_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
cells_.add(s);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = cells_.getUnmodifiableView();
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_ServedType_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_ServedType_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Shard.ServedType.class, com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder.class);
}
private int bitField0_;
public static final int TABLET_TYPE_FIELD_NUMBER = 1;
private int tabletType_;
/**
* optional .topodata.TabletType tablet_type = 1;
*/
public int getTabletTypeValue() {
return tabletType_;
}
/**
* optional .topodata.TabletType tablet_type = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletType getTabletType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(tabletType_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
public static final int CELLS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList cells_;
/**
* repeated string cells = 2;
*/
public com.google.protobuf.ProtocolStringList
getCellsList() {
return cells_;
}
/**
* repeated string cells = 2;
*/
public int getCellsCount() {
return cells_.size();
}
/**
* repeated string cells = 2;
*/
public java.lang.String getCells(int index) {
return cells_.get(index);
}
/**
* repeated string cells = 2;
*/
public com.google.protobuf.ByteString
getCellsBytes(int index) {
return cells_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (tabletType_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
output.writeEnum(1, tabletType_);
}
for (int i = 0; i < cells_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cells_.getRaw(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (tabletType_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, tabletType_);
}
{
int dataSize = 0;
for (int i = 0; i < cells_.size(); i++) {
dataSize += computeStringSizeNoTag(cells_.getRaw(i));
}
size += dataSize;
size += 1 * getCellsList().size();
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.Shard.ServedType)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.Shard.ServedType other = (com.youtube.vitess.proto.Topodata.Shard.ServedType) obj;
boolean result = true;
result = result && tabletType_ == other.tabletType_;
result = result && getCellsList()
.equals(other.getCellsList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + TABLET_TYPE_FIELD_NUMBER;
hash = (53 * hash) + tabletType_;
if (getCellsCount() > 0) {
hash = (37 * hash) + CELLS_FIELD_NUMBER;
hash = (53 * hash) + getCellsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.Shard.ServedType parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Shard.ServedType parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Shard.ServedType parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Shard.ServedType parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Shard.ServedType parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard.ServedType 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.youtube.vitess.proto.Topodata.Shard.ServedType parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard.ServedType 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.youtube.vitess.proto.Topodata.Shard.ServedType parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard.ServedType parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.Shard.ServedType prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* ServedType is an entry in the served_types
*
*
* Protobuf type {@code topodata.Shard.ServedType}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.Shard.ServedType)
com.youtube.vitess.proto.Topodata.Shard.ServedTypeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_ServedType_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_ServedType_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Shard.ServedType.class, com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.Shard.ServedType.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
tabletType_ = 0;
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_ServedType_descriptor;
}
public com.youtube.vitess.proto.Topodata.Shard.ServedType getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.Shard.ServedType.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.Shard.ServedType build() {
com.youtube.vitess.proto.Topodata.Shard.ServedType result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.Shard.ServedType buildPartial() {
com.youtube.vitess.proto.Topodata.Shard.ServedType result = new com.youtube.vitess.proto.Topodata.Shard.ServedType(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.tabletType_ = tabletType_;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = cells_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.cells_ = cells_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.Shard.ServedType) {
return mergeFrom((com.youtube.vitess.proto.Topodata.Shard.ServedType)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.Shard.ServedType other) {
if (other == com.youtube.vitess.proto.Topodata.Shard.ServedType.getDefaultInstance()) return this;
if (other.tabletType_ != 0) {
setTabletTypeValue(other.getTabletTypeValue());
}
if (!other.cells_.isEmpty()) {
if (cells_.isEmpty()) {
cells_ = other.cells_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureCellsIsMutable();
cells_.addAll(other.cells_);
}
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.Shard.ServedType parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.Shard.ServedType) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int tabletType_ = 0;
/**
* optional .topodata.TabletType tablet_type = 1;
*/
public int getTabletTypeValue() {
return tabletType_;
}
/**
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder setTabletTypeValue(int value) {
tabletType_ = value;
onChanged();
return this;
}
/**
* optional .topodata.TabletType tablet_type = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletType getTabletType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(tabletType_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
/**
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder setTabletType(com.youtube.vitess.proto.Topodata.TabletType value) {
if (value == null) {
throw new NullPointerException();
}
tabletType_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder clearTabletType() {
tabletType_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureCellsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = new com.google.protobuf.LazyStringArrayList(cells_);
bitField0_ |= 0x00000002;
}
}
/**
* repeated string cells = 2;
*/
public com.google.protobuf.ProtocolStringList
getCellsList() {
return cells_.getUnmodifiableView();
}
/**
* repeated string cells = 2;
*/
public int getCellsCount() {
return cells_.size();
}
/**
* repeated string cells = 2;
*/
public java.lang.String getCells(int index) {
return cells_.get(index);
}
/**
* repeated string cells = 2;
*/
public com.google.protobuf.ByteString
getCellsBytes(int index) {
return cells_.getByteString(index);
}
/**
* repeated string cells = 2;
*/
public Builder setCells(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.set(index, value);
onChanged();
return this;
}
/**
* repeated string cells = 2;
*/
public Builder addCells(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.add(value);
onChanged();
return this;
}
/**
* repeated string cells = 2;
*/
public Builder addAllCells(
java.lang.Iterable values) {
ensureCellsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, cells_);
onChanged();
return this;
}
/**
* repeated string cells = 2;
*/
public Builder clearCells() {
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* repeated string cells = 2;
*/
public Builder addCellsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureCellsIsMutable();
cells_.add(value);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.Shard.ServedType)
}
// @@protoc_insertion_point(class_scope:topodata.Shard.ServedType)
private static final com.youtube.vitess.proto.Topodata.Shard.ServedType DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.Shard.ServedType();
}
public static com.youtube.vitess.proto.Topodata.Shard.ServedType getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ServedType parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ServedType(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.Shard.ServedType getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SourceShardOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.Shard.SourceShard)
com.google.protobuf.MessageOrBuilder {
/**
*
* Uid is the unique ID for this SourceShard object.
*
*
* optional uint32 uid = 1;
*/
int getUid();
/**
*
* the source keyspace
*
*
* optional string keyspace = 2;
*/
java.lang.String getKeyspace();
/**
*
* the source keyspace
*
*
* optional string keyspace = 2;
*/
com.google.protobuf.ByteString
getKeyspaceBytes();
/**
*
* the source shard
*
*
* optional string shard = 3;
*/
java.lang.String getShard();
/**
*
* the source shard
*
*
* optional string shard = 3;
*/
com.google.protobuf.ByteString
getShardBytes();
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
boolean hasKeyRange();
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
com.youtube.vitess.proto.Topodata.KeyRange getKeyRange();
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder();
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
java.util.List
getTablesList();
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
int getTablesCount();
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
java.lang.String getTables(int index);
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
com.google.protobuf.ByteString
getTablesBytes(int index);
}
/**
*
* SourceShard represents a data source for filtered replication
* accross shards. When this is used in a destination shard, the master
* of that shard will run filtered replication.
*
*
* Protobuf type {@code topodata.Shard.SourceShard}
*/
public static final class SourceShard extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.Shard.SourceShard)
SourceShardOrBuilder {
// Use SourceShard.newBuilder() to construct.
private SourceShard(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SourceShard() {
uid_ = 0;
keyspace_ = "";
shard_ = "";
tables_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private SourceShard(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
uid_ = input.readUInt32();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
keyspace_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
shard_ = s;
break;
}
case 34: {
com.youtube.vitess.proto.Topodata.KeyRange.Builder subBuilder = null;
if (keyRange_ != null) {
subBuilder = keyRange_.toBuilder();
}
keyRange_ = input.readMessage(com.youtube.vitess.proto.Topodata.KeyRange.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(keyRange_);
keyRange_ = subBuilder.buildPartial();
}
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
tables_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000010;
}
tables_.add(s);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
tables_ = tables_.getUnmodifiableView();
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_SourceShard_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_SourceShard_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Shard.SourceShard.class, com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder.class);
}
private int bitField0_;
public static final int UID_FIELD_NUMBER = 1;
private int uid_;
/**
*
* Uid is the unique ID for this SourceShard object.
*
*
* optional uint32 uid = 1;
*/
public int getUid() {
return uid_;
}
public static final int KEYSPACE_FIELD_NUMBER = 2;
private volatile java.lang.Object keyspace_;
/**
*
* the source keyspace
*
*
* optional string keyspace = 2;
*/
public java.lang.String getKeyspace() {
java.lang.Object ref = keyspace_;
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();
keyspace_ = s;
return s;
}
}
/**
*
* the source keyspace
*
*
* optional string keyspace = 2;
*/
public com.google.protobuf.ByteString
getKeyspaceBytes() {
java.lang.Object ref = keyspace_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyspace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHARD_FIELD_NUMBER = 3;
private volatile java.lang.Object shard_;
/**
*
* the source shard
*
*
* optional string shard = 3;
*/
public java.lang.String getShard() {
java.lang.Object ref = shard_;
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();
shard_ = s;
return s;
}
}
/**
*
* the source shard
*
*
* optional string shard = 3;
*/
public com.google.protobuf.ByteString
getShardBytes() {
java.lang.Object ref = shard_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shard_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int KEY_RANGE_FIELD_NUMBER = 4;
private com.youtube.vitess.proto.Topodata.KeyRange keyRange_;
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public boolean hasKeyRange() {
return keyRange_ != null;
}
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public com.youtube.vitess.proto.Topodata.KeyRange getKeyRange() {
return keyRange_ == null ? com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
}
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder() {
return getKeyRange();
}
public static final int TABLES_FIELD_NUMBER = 5;
private com.google.protobuf.LazyStringList tables_;
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public com.google.protobuf.ProtocolStringList
getTablesList() {
return tables_;
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public int getTablesCount() {
return tables_.size();
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public java.lang.String getTables(int index) {
return tables_.get(index);
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public com.google.protobuf.ByteString
getTablesBytes(int index) {
return tables_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (uid_ != 0) {
output.writeUInt32(1, uid_);
}
if (!getKeyspaceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyspace_);
}
if (!getShardBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, shard_);
}
if (keyRange_ != null) {
output.writeMessage(4, getKeyRange());
}
for (int i = 0; i < tables_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tables_.getRaw(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (uid_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, uid_);
}
if (!getKeyspaceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyspace_);
}
if (!getShardBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, shard_);
}
if (keyRange_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getKeyRange());
}
{
int dataSize = 0;
for (int i = 0; i < tables_.size(); i++) {
dataSize += computeStringSizeNoTag(tables_.getRaw(i));
}
size += dataSize;
size += 1 * getTablesList().size();
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.Shard.SourceShard)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.Shard.SourceShard other = (com.youtube.vitess.proto.Topodata.Shard.SourceShard) obj;
boolean result = true;
result = result && (getUid()
== other.getUid());
result = result && getKeyspace()
.equals(other.getKeyspace());
result = result && getShard()
.equals(other.getShard());
result = result && (hasKeyRange() == other.hasKeyRange());
if (hasKeyRange()) {
result = result && getKeyRange()
.equals(other.getKeyRange());
}
result = result && getTablesList()
.equals(other.getTablesList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + UID_FIELD_NUMBER;
hash = (53 * hash) + getUid();
hash = (37 * hash) + KEYSPACE_FIELD_NUMBER;
hash = (53 * hash) + getKeyspace().hashCode();
hash = (37 * hash) + SHARD_FIELD_NUMBER;
hash = (53 * hash) + getShard().hashCode();
if (hasKeyRange()) {
hash = (37 * hash) + KEY_RANGE_FIELD_NUMBER;
hash = (53 * hash) + getKeyRange().hashCode();
}
if (getTablesCount() > 0) {
hash = (37 * hash) + TABLES_FIELD_NUMBER;
hash = (53 * hash) + getTablesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.Shard.SourceShard parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Shard.SourceShard parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Shard.SourceShard parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Shard.SourceShard parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Shard.SourceShard parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard.SourceShard 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.youtube.vitess.proto.Topodata.Shard.SourceShard parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard.SourceShard 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.youtube.vitess.proto.Topodata.Shard.SourceShard parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard.SourceShard parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.Shard.SourceShard prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* SourceShard represents a data source for filtered replication
* accross shards. When this is used in a destination shard, the master
* of that shard will run filtered replication.
*
*
* Protobuf type {@code topodata.Shard.SourceShard}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.Shard.SourceShard)
com.youtube.vitess.proto.Topodata.Shard.SourceShardOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_SourceShard_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_SourceShard_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Shard.SourceShard.class, com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.Shard.SourceShard.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
uid_ = 0;
keyspace_ = "";
shard_ = "";
if (keyRangeBuilder_ == null) {
keyRange_ = null;
} else {
keyRange_ = null;
keyRangeBuilder_ = null;
}
tables_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_SourceShard_descriptor;
}
public com.youtube.vitess.proto.Topodata.Shard.SourceShard getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.Shard.SourceShard.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.Shard.SourceShard build() {
com.youtube.vitess.proto.Topodata.Shard.SourceShard result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.Shard.SourceShard buildPartial() {
com.youtube.vitess.proto.Topodata.Shard.SourceShard result = new com.youtube.vitess.proto.Topodata.Shard.SourceShard(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.uid_ = uid_;
result.keyspace_ = keyspace_;
result.shard_ = shard_;
if (keyRangeBuilder_ == null) {
result.keyRange_ = keyRange_;
} else {
result.keyRange_ = keyRangeBuilder_.build();
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
tables_ = tables_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000010);
}
result.tables_ = tables_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.Shard.SourceShard) {
return mergeFrom((com.youtube.vitess.proto.Topodata.Shard.SourceShard)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.Shard.SourceShard other) {
if (other == com.youtube.vitess.proto.Topodata.Shard.SourceShard.getDefaultInstance()) return this;
if (other.getUid() != 0) {
setUid(other.getUid());
}
if (!other.getKeyspace().isEmpty()) {
keyspace_ = other.keyspace_;
onChanged();
}
if (!other.getShard().isEmpty()) {
shard_ = other.shard_;
onChanged();
}
if (other.hasKeyRange()) {
mergeKeyRange(other.getKeyRange());
}
if (!other.tables_.isEmpty()) {
if (tables_.isEmpty()) {
tables_ = other.tables_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureTablesIsMutable();
tables_.addAll(other.tables_);
}
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.Shard.SourceShard parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.Shard.SourceShard) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int uid_ ;
/**
*
* Uid is the unique ID for this SourceShard object.
*
*
* optional uint32 uid = 1;
*/
public int getUid() {
return uid_;
}
/**
*
* Uid is the unique ID for this SourceShard object.
*
*
* optional uint32 uid = 1;
*/
public Builder setUid(int value) {
uid_ = value;
onChanged();
return this;
}
/**
*
* Uid is the unique ID for this SourceShard object.
*
*
* optional uint32 uid = 1;
*/
public Builder clearUid() {
uid_ = 0;
onChanged();
return this;
}
private java.lang.Object keyspace_ = "";
/**
*
* the source keyspace
*
*
* optional string keyspace = 2;
*/
public java.lang.String getKeyspace() {
java.lang.Object ref = keyspace_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
keyspace_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* the source keyspace
*
*
* optional string keyspace = 2;
*/
public com.google.protobuf.ByteString
getKeyspaceBytes() {
java.lang.Object ref = keyspace_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyspace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* the source keyspace
*
*
* optional string keyspace = 2;
*/
public Builder setKeyspace(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
keyspace_ = value;
onChanged();
return this;
}
/**
*
* the source keyspace
*
*
* optional string keyspace = 2;
*/
public Builder clearKeyspace() {
keyspace_ = getDefaultInstance().getKeyspace();
onChanged();
return this;
}
/**
*
* the source keyspace
*
*
* optional string keyspace = 2;
*/
public Builder setKeyspaceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
keyspace_ = value;
onChanged();
return this;
}
private java.lang.Object shard_ = "";
/**
*
* the source shard
*
*
* optional string shard = 3;
*/
public java.lang.String getShard() {
java.lang.Object ref = shard_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shard_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* the source shard
*
*
* optional string shard = 3;
*/
public com.google.protobuf.ByteString
getShardBytes() {
java.lang.Object ref = shard_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shard_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* the source shard
*
*
* optional string shard = 3;
*/
public Builder setShard(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
shard_ = value;
onChanged();
return this;
}
/**
*
* the source shard
*
*
* optional string shard = 3;
*/
public Builder clearShard() {
shard_ = getDefaultInstance().getShard();
onChanged();
return this;
}
/**
*
* the source shard
*
*
* optional string shard = 3;
*/
public Builder setShardBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
shard_ = value;
onChanged();
return this;
}
private com.youtube.vitess.proto.Topodata.KeyRange keyRange_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder> keyRangeBuilder_;
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public boolean hasKeyRange() {
return keyRangeBuilder_ != null || keyRange_ != null;
}
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public com.youtube.vitess.proto.Topodata.KeyRange getKeyRange() {
if (keyRangeBuilder_ == null) {
return keyRange_ == null ? com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
} else {
return keyRangeBuilder_.getMessage();
}
}
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public Builder setKeyRange(com.youtube.vitess.proto.Topodata.KeyRange value) {
if (keyRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
keyRange_ = value;
onChanged();
} else {
keyRangeBuilder_.setMessage(value);
}
return this;
}
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public Builder setKeyRange(
com.youtube.vitess.proto.Topodata.KeyRange.Builder builderForValue) {
if (keyRangeBuilder_ == null) {
keyRange_ = builderForValue.build();
onChanged();
} else {
keyRangeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public Builder mergeKeyRange(com.youtube.vitess.proto.Topodata.KeyRange value) {
if (keyRangeBuilder_ == null) {
if (keyRange_ != null) {
keyRange_ =
com.youtube.vitess.proto.Topodata.KeyRange.newBuilder(keyRange_).mergeFrom(value).buildPartial();
} else {
keyRange_ = value;
}
onChanged();
} else {
keyRangeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public Builder clearKeyRange() {
if (keyRangeBuilder_ == null) {
keyRange_ = null;
onChanged();
} else {
keyRange_ = null;
keyRangeBuilder_ = null;
}
return this;
}
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public com.youtube.vitess.proto.Topodata.KeyRange.Builder getKeyRangeBuilder() {
onChanged();
return getKeyRangeFieldBuilder().getBuilder();
}
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
public com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder() {
if (keyRangeBuilder_ != null) {
return keyRangeBuilder_.getMessageOrBuilder();
} else {
return keyRange_ == null ?
com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
}
}
/**
*
* the source shard keyrange
*
*
* optional .topodata.KeyRange key_range = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder>
getKeyRangeFieldBuilder() {
if (keyRangeBuilder_ == null) {
keyRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder>(
getKeyRange(),
getParentForChildren(),
isClean());
keyRange_ = null;
}
return keyRangeBuilder_;
}
private com.google.protobuf.LazyStringList tables_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureTablesIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
tables_ = new com.google.protobuf.LazyStringArrayList(tables_);
bitField0_ |= 0x00000010;
}
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public com.google.protobuf.ProtocolStringList
getTablesList() {
return tables_.getUnmodifiableView();
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public int getTablesCount() {
return tables_.size();
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public java.lang.String getTables(int index) {
return tables_.get(index);
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public com.google.protobuf.ByteString
getTablesBytes(int index) {
return tables_.getByteString(index);
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public Builder setTables(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTablesIsMutable();
tables_.set(index, value);
onChanged();
return this;
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public Builder addTables(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTablesIsMutable();
tables_.add(value);
onChanged();
return this;
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public Builder addAllTables(
java.lang.Iterable values) {
ensureTablesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tables_);
onChanged();
return this;
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public Builder clearTables() {
tables_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* the source table list to replicate
*
*
* repeated string tables = 5;
*/
public Builder addTablesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureTablesIsMutable();
tables_.add(value);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.Shard.SourceShard)
}
// @@protoc_insertion_point(class_scope:topodata.Shard.SourceShard)
private static final com.youtube.vitess.proto.Topodata.Shard.SourceShard DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.Shard.SourceShard();
}
public static com.youtube.vitess.proto.Topodata.Shard.SourceShard getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public SourceShard parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SourceShard(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.Shard.SourceShard getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TabletControlOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.Shard.TabletControl)
com.google.protobuf.MessageOrBuilder {
/**
*
* which tablet type is affected
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
int getTabletTypeValue();
/**
*
* which tablet type is affected
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
com.youtube.vitess.proto.Topodata.TabletType getTabletType();
/**
* repeated string cells = 2;
*/
java.util.List
getCellsList();
/**
* repeated string cells = 2;
*/
int getCellsCount();
/**
* repeated string cells = 2;
*/
java.lang.String getCells(int index);
/**
* repeated string cells = 2;
*/
com.google.protobuf.ByteString
getCellsBytes(int index);
/**
*
* what to do
*
*
* optional bool disable_query_service = 3;
*/
boolean getDisableQueryService();
/**
* repeated string blacklisted_tables = 4;
*/
java.util.List
getBlacklistedTablesList();
/**
* repeated string blacklisted_tables = 4;
*/
int getBlacklistedTablesCount();
/**
* repeated string blacklisted_tables = 4;
*/
java.lang.String getBlacklistedTables(int index);
/**
* repeated string blacklisted_tables = 4;
*/
com.google.protobuf.ByteString
getBlacklistedTablesBytes(int index);
}
/**
*
* TabletControl controls tablet's behavior
*
*
* Protobuf type {@code topodata.Shard.TabletControl}
*/
public static final class TabletControl extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.Shard.TabletControl)
TabletControlOrBuilder {
// Use TabletControl.newBuilder() to construct.
private TabletControl(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TabletControl() {
tabletType_ = 0;
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
disableQueryService_ = false;
blacklistedTables_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private TabletControl(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
tabletType_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
cells_.add(s);
break;
}
case 24: {
disableQueryService_ = input.readBool();
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
blacklistedTables_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
blacklistedTables_.add(s);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = cells_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
blacklistedTables_ = blacklistedTables_.getUnmodifiableView();
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_TabletControl_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_TabletControl_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Shard.TabletControl.class, com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder.class);
}
private int bitField0_;
public static final int TABLET_TYPE_FIELD_NUMBER = 1;
private int tabletType_;
/**
*
* which tablet type is affected
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public int getTabletTypeValue() {
return tabletType_;
}
/**
*
* which tablet type is affected
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletType getTabletType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(tabletType_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
public static final int CELLS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList cells_;
/**
* repeated string cells = 2;
*/
public com.google.protobuf.ProtocolStringList
getCellsList() {
return cells_;
}
/**
* repeated string cells = 2;
*/
public int getCellsCount() {
return cells_.size();
}
/**
* repeated string cells = 2;
*/
public java.lang.String getCells(int index) {
return cells_.get(index);
}
/**
* repeated string cells = 2;
*/
public com.google.protobuf.ByteString
getCellsBytes(int index) {
return cells_.getByteString(index);
}
public static final int DISABLE_QUERY_SERVICE_FIELD_NUMBER = 3;
private boolean disableQueryService_;
/**
*
* what to do
*
*
* optional bool disable_query_service = 3;
*/
public boolean getDisableQueryService() {
return disableQueryService_;
}
public static final int BLACKLISTED_TABLES_FIELD_NUMBER = 4;
private com.google.protobuf.LazyStringList blacklistedTables_;
/**
* repeated string blacklisted_tables = 4;
*/
public com.google.protobuf.ProtocolStringList
getBlacklistedTablesList() {
return blacklistedTables_;
}
/**
* repeated string blacklisted_tables = 4;
*/
public int getBlacklistedTablesCount() {
return blacklistedTables_.size();
}
/**
* repeated string blacklisted_tables = 4;
*/
public java.lang.String getBlacklistedTables(int index) {
return blacklistedTables_.get(index);
}
/**
* repeated string blacklisted_tables = 4;
*/
public com.google.protobuf.ByteString
getBlacklistedTablesBytes(int index) {
return blacklistedTables_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (tabletType_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
output.writeEnum(1, tabletType_);
}
for (int i = 0; i < cells_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cells_.getRaw(i));
}
if (disableQueryService_ != false) {
output.writeBool(3, disableQueryService_);
}
for (int i = 0; i < blacklistedTables_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, blacklistedTables_.getRaw(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (tabletType_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, tabletType_);
}
{
int dataSize = 0;
for (int i = 0; i < cells_.size(); i++) {
dataSize += computeStringSizeNoTag(cells_.getRaw(i));
}
size += dataSize;
size += 1 * getCellsList().size();
}
if (disableQueryService_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, disableQueryService_);
}
{
int dataSize = 0;
for (int i = 0; i < blacklistedTables_.size(); i++) {
dataSize += computeStringSizeNoTag(blacklistedTables_.getRaw(i));
}
size += dataSize;
size += 1 * getBlacklistedTablesList().size();
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.Shard.TabletControl)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.Shard.TabletControl other = (com.youtube.vitess.proto.Topodata.Shard.TabletControl) obj;
boolean result = true;
result = result && tabletType_ == other.tabletType_;
result = result && getCellsList()
.equals(other.getCellsList());
result = result && (getDisableQueryService()
== other.getDisableQueryService());
result = result && getBlacklistedTablesList()
.equals(other.getBlacklistedTablesList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + TABLET_TYPE_FIELD_NUMBER;
hash = (53 * hash) + tabletType_;
if (getCellsCount() > 0) {
hash = (37 * hash) + CELLS_FIELD_NUMBER;
hash = (53 * hash) + getCellsList().hashCode();
}
hash = (37 * hash) + DISABLE_QUERY_SERVICE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDisableQueryService());
if (getBlacklistedTablesCount() > 0) {
hash = (37 * hash) + BLACKLISTED_TABLES_FIELD_NUMBER;
hash = (53 * hash) + getBlacklistedTablesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.Shard.TabletControl parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Shard.TabletControl parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Shard.TabletControl parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Shard.TabletControl parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Shard.TabletControl parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard.TabletControl 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.youtube.vitess.proto.Topodata.Shard.TabletControl parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard.TabletControl 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.youtube.vitess.proto.Topodata.Shard.TabletControl parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard.TabletControl parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.Shard.TabletControl prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* TabletControl controls tablet's behavior
*
*
* Protobuf type {@code topodata.Shard.TabletControl}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.Shard.TabletControl)
com.youtube.vitess.proto.Topodata.Shard.TabletControlOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_TabletControl_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_TabletControl_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Shard.TabletControl.class, com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.Shard.TabletControl.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
tabletType_ = 0;
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
disableQueryService_ = false;
blacklistedTables_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_TabletControl_descriptor;
}
public com.youtube.vitess.proto.Topodata.Shard.TabletControl getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.Shard.TabletControl.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.Shard.TabletControl build() {
com.youtube.vitess.proto.Topodata.Shard.TabletControl result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.Shard.TabletControl buildPartial() {
com.youtube.vitess.proto.Topodata.Shard.TabletControl result = new com.youtube.vitess.proto.Topodata.Shard.TabletControl(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.tabletType_ = tabletType_;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = cells_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.cells_ = cells_;
result.disableQueryService_ = disableQueryService_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
blacklistedTables_ = blacklistedTables_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000008);
}
result.blacklistedTables_ = blacklistedTables_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.Shard.TabletControl) {
return mergeFrom((com.youtube.vitess.proto.Topodata.Shard.TabletControl)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.Shard.TabletControl other) {
if (other == com.youtube.vitess.proto.Topodata.Shard.TabletControl.getDefaultInstance()) return this;
if (other.tabletType_ != 0) {
setTabletTypeValue(other.getTabletTypeValue());
}
if (!other.cells_.isEmpty()) {
if (cells_.isEmpty()) {
cells_ = other.cells_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureCellsIsMutable();
cells_.addAll(other.cells_);
}
onChanged();
}
if (other.getDisableQueryService() != false) {
setDisableQueryService(other.getDisableQueryService());
}
if (!other.blacklistedTables_.isEmpty()) {
if (blacklistedTables_.isEmpty()) {
blacklistedTables_ = other.blacklistedTables_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureBlacklistedTablesIsMutable();
blacklistedTables_.addAll(other.blacklistedTables_);
}
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.Shard.TabletControl parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.Shard.TabletControl) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int tabletType_ = 0;
/**
*
* which tablet type is affected
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public int getTabletTypeValue() {
return tabletType_;
}
/**
*
* which tablet type is affected
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder setTabletTypeValue(int value) {
tabletType_ = value;
onChanged();
return this;
}
/**
*
* which tablet type is affected
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletType getTabletType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(tabletType_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
/**
*
* which tablet type is affected
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder setTabletType(com.youtube.vitess.proto.Topodata.TabletType value) {
if (value == null) {
throw new NullPointerException();
}
tabletType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* which tablet type is affected
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder clearTabletType() {
tabletType_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureCellsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = new com.google.protobuf.LazyStringArrayList(cells_);
bitField0_ |= 0x00000002;
}
}
/**
* repeated string cells = 2;
*/
public com.google.protobuf.ProtocolStringList
getCellsList() {
return cells_.getUnmodifiableView();
}
/**
* repeated string cells = 2;
*/
public int getCellsCount() {
return cells_.size();
}
/**
* repeated string cells = 2;
*/
public java.lang.String getCells(int index) {
return cells_.get(index);
}
/**
* repeated string cells = 2;
*/
public com.google.protobuf.ByteString
getCellsBytes(int index) {
return cells_.getByteString(index);
}
/**
* repeated string cells = 2;
*/
public Builder setCells(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.set(index, value);
onChanged();
return this;
}
/**
* repeated string cells = 2;
*/
public Builder addCells(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.add(value);
onChanged();
return this;
}
/**
* repeated string cells = 2;
*/
public Builder addAllCells(
java.lang.Iterable values) {
ensureCellsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, cells_);
onChanged();
return this;
}
/**
* repeated string cells = 2;
*/
public Builder clearCells() {
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* repeated string cells = 2;
*/
public Builder addCellsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureCellsIsMutable();
cells_.add(value);
onChanged();
return this;
}
private boolean disableQueryService_ ;
/**
*
* what to do
*
*
* optional bool disable_query_service = 3;
*/
public boolean getDisableQueryService() {
return disableQueryService_;
}
/**
*
* what to do
*
*
* optional bool disable_query_service = 3;
*/
public Builder setDisableQueryService(boolean value) {
disableQueryService_ = value;
onChanged();
return this;
}
/**
*
* what to do
*
*
* optional bool disable_query_service = 3;
*/
public Builder clearDisableQueryService() {
disableQueryService_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList blacklistedTables_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureBlacklistedTablesIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
blacklistedTables_ = new com.google.protobuf.LazyStringArrayList(blacklistedTables_);
bitField0_ |= 0x00000008;
}
}
/**
* repeated string blacklisted_tables = 4;
*/
public com.google.protobuf.ProtocolStringList
getBlacklistedTablesList() {
return blacklistedTables_.getUnmodifiableView();
}
/**
* repeated string blacklisted_tables = 4;
*/
public int getBlacklistedTablesCount() {
return blacklistedTables_.size();
}
/**
* repeated string blacklisted_tables = 4;
*/
public java.lang.String getBlacklistedTables(int index) {
return blacklistedTables_.get(index);
}
/**
* repeated string blacklisted_tables = 4;
*/
public com.google.protobuf.ByteString
getBlacklistedTablesBytes(int index) {
return blacklistedTables_.getByteString(index);
}
/**
* repeated string blacklisted_tables = 4;
*/
public Builder setBlacklistedTables(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureBlacklistedTablesIsMutable();
blacklistedTables_.set(index, value);
onChanged();
return this;
}
/**
* repeated string blacklisted_tables = 4;
*/
public Builder addBlacklistedTables(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureBlacklistedTablesIsMutable();
blacklistedTables_.add(value);
onChanged();
return this;
}
/**
* repeated string blacklisted_tables = 4;
*/
public Builder addAllBlacklistedTables(
java.lang.Iterable values) {
ensureBlacklistedTablesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, blacklistedTables_);
onChanged();
return this;
}
/**
* repeated string blacklisted_tables = 4;
*/
public Builder clearBlacklistedTables() {
blacklistedTables_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
* repeated string blacklisted_tables = 4;
*/
public Builder addBlacklistedTablesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureBlacklistedTablesIsMutable();
blacklistedTables_.add(value);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.Shard.TabletControl)
}
// @@protoc_insertion_point(class_scope:topodata.Shard.TabletControl)
private static final com.youtube.vitess.proto.Topodata.Shard.TabletControl DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.Shard.TabletControl();
}
public static com.youtube.vitess.proto.Topodata.Shard.TabletControl getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public TabletControl parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TabletControl(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.Shard.TabletControl getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int MASTER_ALIAS_FIELD_NUMBER = 1;
private com.youtube.vitess.proto.Topodata.TabletAlias masterAlias_;
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public boolean hasMasterAlias() {
return masterAlias_ != null;
}
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAlias getMasterAlias() {
return masterAlias_ == null ? com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance() : masterAlias_;
}
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder getMasterAliasOrBuilder() {
return getMasterAlias();
}
public static final int KEY_RANGE_FIELD_NUMBER = 2;
private com.youtube.vitess.proto.Topodata.KeyRange keyRange_;
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public boolean hasKeyRange() {
return keyRange_ != null;
}
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyRange getKeyRange() {
return keyRange_ == null ? com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
}
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder() {
return getKeyRange();
}
public static final int SERVED_TYPES_FIELD_NUMBER = 3;
private java.util.List servedTypes_;
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public java.util.List getServedTypesList() {
return servedTypes_;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.Shard.ServedTypeOrBuilder>
getServedTypesOrBuilderList() {
return servedTypes_;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public int getServedTypesCount() {
return servedTypes_.size();
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public com.youtube.vitess.proto.Topodata.Shard.ServedType getServedTypes(int index) {
return servedTypes_.get(index);
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public com.youtube.vitess.proto.Topodata.Shard.ServedTypeOrBuilder getServedTypesOrBuilder(
int index) {
return servedTypes_.get(index);
}
public static final int SOURCE_SHARDS_FIELD_NUMBER = 4;
private java.util.List sourceShards_;
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public java.util.List getSourceShardsList() {
return sourceShards_;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.Shard.SourceShardOrBuilder>
getSourceShardsOrBuilderList() {
return sourceShards_;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public int getSourceShardsCount() {
return sourceShards_.size();
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public com.youtube.vitess.proto.Topodata.Shard.SourceShard getSourceShards(int index) {
return sourceShards_.get(index);
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public com.youtube.vitess.proto.Topodata.Shard.SourceShardOrBuilder getSourceShardsOrBuilder(
int index) {
return sourceShards_.get(index);
}
public static final int CELLS_FIELD_NUMBER = 5;
private com.google.protobuf.LazyStringList cells_;
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public com.google.protobuf.ProtocolStringList
getCellsList() {
return cells_;
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public int getCellsCount() {
return cells_.size();
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public java.lang.String getCells(int index) {
return cells_.get(index);
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public com.google.protobuf.ByteString
getCellsBytes(int index) {
return cells_.getByteString(index);
}
public static final int TABLET_CONTROLS_FIELD_NUMBER = 6;
private java.util.List tabletControls_;
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public java.util.List getTabletControlsList() {
return tabletControls_;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.Shard.TabletControlOrBuilder>
getTabletControlsOrBuilderList() {
return tabletControls_;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public int getTabletControlsCount() {
return tabletControls_.size();
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public com.youtube.vitess.proto.Topodata.Shard.TabletControl getTabletControls(int index) {
return tabletControls_.get(index);
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public com.youtube.vitess.proto.Topodata.Shard.TabletControlOrBuilder getTabletControlsOrBuilder(
int index) {
return tabletControls_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (masterAlias_ != null) {
output.writeMessage(1, getMasterAlias());
}
if (keyRange_ != null) {
output.writeMessage(2, getKeyRange());
}
for (int i = 0; i < servedTypes_.size(); i++) {
output.writeMessage(3, servedTypes_.get(i));
}
for (int i = 0; i < sourceShards_.size(); i++) {
output.writeMessage(4, sourceShards_.get(i));
}
for (int i = 0; i < cells_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, cells_.getRaw(i));
}
for (int i = 0; i < tabletControls_.size(); i++) {
output.writeMessage(6, tabletControls_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (masterAlias_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getMasterAlias());
}
if (keyRange_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getKeyRange());
}
for (int i = 0; i < servedTypes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, servedTypes_.get(i));
}
for (int i = 0; i < sourceShards_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, sourceShards_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < cells_.size(); i++) {
dataSize += computeStringSizeNoTag(cells_.getRaw(i));
}
size += dataSize;
size += 1 * getCellsList().size();
}
for (int i = 0; i < tabletControls_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, tabletControls_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.Shard)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.Shard other = (com.youtube.vitess.proto.Topodata.Shard) obj;
boolean result = true;
result = result && (hasMasterAlias() == other.hasMasterAlias());
if (hasMasterAlias()) {
result = result && getMasterAlias()
.equals(other.getMasterAlias());
}
result = result && (hasKeyRange() == other.hasKeyRange());
if (hasKeyRange()) {
result = result && getKeyRange()
.equals(other.getKeyRange());
}
result = result && getServedTypesList()
.equals(other.getServedTypesList());
result = result && getSourceShardsList()
.equals(other.getSourceShardsList());
result = result && getCellsList()
.equals(other.getCellsList());
result = result && getTabletControlsList()
.equals(other.getTabletControlsList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasMasterAlias()) {
hash = (37 * hash) + MASTER_ALIAS_FIELD_NUMBER;
hash = (53 * hash) + getMasterAlias().hashCode();
}
if (hasKeyRange()) {
hash = (37 * hash) + KEY_RANGE_FIELD_NUMBER;
hash = (53 * hash) + getKeyRange().hashCode();
}
if (getServedTypesCount() > 0) {
hash = (37 * hash) + SERVED_TYPES_FIELD_NUMBER;
hash = (53 * hash) + getServedTypesList().hashCode();
}
if (getSourceShardsCount() > 0) {
hash = (37 * hash) + SOURCE_SHARDS_FIELD_NUMBER;
hash = (53 * hash) + getSourceShardsList().hashCode();
}
if (getCellsCount() > 0) {
hash = (37 * hash) + CELLS_FIELD_NUMBER;
hash = (53 * hash) + getCellsList().hashCode();
}
if (getTabletControlsCount() > 0) {
hash = (37 * hash) + TABLET_CONTROLS_FIELD_NUMBER;
hash = (53 * hash) + getTabletControlsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.Shard parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Shard parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Shard parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Shard parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Shard parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard 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.youtube.vitess.proto.Topodata.Shard parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard 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.youtube.vitess.proto.Topodata.Shard parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Shard parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.Shard prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* A Shard contains data about a subset of the data whithin a keyspace.
*
*
* Protobuf type {@code topodata.Shard}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.Shard)
com.youtube.vitess.proto.Topodata.ShardOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Shard.class, com.youtube.vitess.proto.Topodata.Shard.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.Shard.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getServedTypesFieldBuilder();
getSourceShardsFieldBuilder();
getTabletControlsFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (masterAliasBuilder_ == null) {
masterAlias_ = null;
} else {
masterAlias_ = null;
masterAliasBuilder_ = null;
}
if (keyRangeBuilder_ == null) {
keyRange_ = null;
} else {
keyRange_ = null;
keyRangeBuilder_ = null;
}
if (servedTypesBuilder_ == null) {
servedTypes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
servedTypesBuilder_.clear();
}
if (sourceShardsBuilder_ == null) {
sourceShards_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
sourceShardsBuilder_.clear();
}
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
if (tabletControlsBuilder_ == null) {
tabletControls_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
} else {
tabletControlsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Shard_descriptor;
}
public com.youtube.vitess.proto.Topodata.Shard getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.Shard.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.Shard build() {
com.youtube.vitess.proto.Topodata.Shard result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.Shard buildPartial() {
com.youtube.vitess.proto.Topodata.Shard result = new com.youtube.vitess.proto.Topodata.Shard(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (masterAliasBuilder_ == null) {
result.masterAlias_ = masterAlias_;
} else {
result.masterAlias_ = masterAliasBuilder_.build();
}
if (keyRangeBuilder_ == null) {
result.keyRange_ = keyRange_;
} else {
result.keyRange_ = keyRangeBuilder_.build();
}
if (servedTypesBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
servedTypes_ = java.util.Collections.unmodifiableList(servedTypes_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.servedTypes_ = servedTypes_;
} else {
result.servedTypes_ = servedTypesBuilder_.build();
}
if (sourceShardsBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
sourceShards_ = java.util.Collections.unmodifiableList(sourceShards_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.sourceShards_ = sourceShards_;
} else {
result.sourceShards_ = sourceShardsBuilder_.build();
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
cells_ = cells_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000010);
}
result.cells_ = cells_;
if (tabletControlsBuilder_ == null) {
if (((bitField0_ & 0x00000020) == 0x00000020)) {
tabletControls_ = java.util.Collections.unmodifiableList(tabletControls_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.tabletControls_ = tabletControls_;
} else {
result.tabletControls_ = tabletControlsBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.Shard) {
return mergeFrom((com.youtube.vitess.proto.Topodata.Shard)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.Shard other) {
if (other == com.youtube.vitess.proto.Topodata.Shard.getDefaultInstance()) return this;
if (other.hasMasterAlias()) {
mergeMasterAlias(other.getMasterAlias());
}
if (other.hasKeyRange()) {
mergeKeyRange(other.getKeyRange());
}
if (servedTypesBuilder_ == null) {
if (!other.servedTypes_.isEmpty()) {
if (servedTypes_.isEmpty()) {
servedTypes_ = other.servedTypes_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureServedTypesIsMutable();
servedTypes_.addAll(other.servedTypes_);
}
onChanged();
}
} else {
if (!other.servedTypes_.isEmpty()) {
if (servedTypesBuilder_.isEmpty()) {
servedTypesBuilder_.dispose();
servedTypesBuilder_ = null;
servedTypes_ = other.servedTypes_;
bitField0_ = (bitField0_ & ~0x00000004);
servedTypesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getServedTypesFieldBuilder() : null;
} else {
servedTypesBuilder_.addAllMessages(other.servedTypes_);
}
}
}
if (sourceShardsBuilder_ == null) {
if (!other.sourceShards_.isEmpty()) {
if (sourceShards_.isEmpty()) {
sourceShards_ = other.sourceShards_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureSourceShardsIsMutable();
sourceShards_.addAll(other.sourceShards_);
}
onChanged();
}
} else {
if (!other.sourceShards_.isEmpty()) {
if (sourceShardsBuilder_.isEmpty()) {
sourceShardsBuilder_.dispose();
sourceShardsBuilder_ = null;
sourceShards_ = other.sourceShards_;
bitField0_ = (bitField0_ & ~0x00000008);
sourceShardsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSourceShardsFieldBuilder() : null;
} else {
sourceShardsBuilder_.addAllMessages(other.sourceShards_);
}
}
}
if (!other.cells_.isEmpty()) {
if (cells_.isEmpty()) {
cells_ = other.cells_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureCellsIsMutable();
cells_.addAll(other.cells_);
}
onChanged();
}
if (tabletControlsBuilder_ == null) {
if (!other.tabletControls_.isEmpty()) {
if (tabletControls_.isEmpty()) {
tabletControls_ = other.tabletControls_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureTabletControlsIsMutable();
tabletControls_.addAll(other.tabletControls_);
}
onChanged();
}
} else {
if (!other.tabletControls_.isEmpty()) {
if (tabletControlsBuilder_.isEmpty()) {
tabletControlsBuilder_.dispose();
tabletControlsBuilder_ = null;
tabletControls_ = other.tabletControls_;
bitField0_ = (bitField0_ & ~0x00000020);
tabletControlsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTabletControlsFieldBuilder() : null;
} else {
tabletControlsBuilder_.addAllMessages(other.tabletControls_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.Shard parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.Shard) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.youtube.vitess.proto.Topodata.TabletAlias masterAlias_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.TabletAlias, com.youtube.vitess.proto.Topodata.TabletAlias.Builder, com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder> masterAliasBuilder_;
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public boolean hasMasterAlias() {
return masterAliasBuilder_ != null || masterAlias_ != null;
}
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAlias getMasterAlias() {
if (masterAliasBuilder_ == null) {
return masterAlias_ == null ? com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance() : masterAlias_;
} else {
return masterAliasBuilder_.getMessage();
}
}
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public Builder setMasterAlias(com.youtube.vitess.proto.Topodata.TabletAlias value) {
if (masterAliasBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
masterAlias_ = value;
onChanged();
} else {
masterAliasBuilder_.setMessage(value);
}
return this;
}
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public Builder setMasterAlias(
com.youtube.vitess.proto.Topodata.TabletAlias.Builder builderForValue) {
if (masterAliasBuilder_ == null) {
masterAlias_ = builderForValue.build();
onChanged();
} else {
masterAliasBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public Builder mergeMasterAlias(com.youtube.vitess.proto.Topodata.TabletAlias value) {
if (masterAliasBuilder_ == null) {
if (masterAlias_ != null) {
masterAlias_ =
com.youtube.vitess.proto.Topodata.TabletAlias.newBuilder(masterAlias_).mergeFrom(value).buildPartial();
} else {
masterAlias_ = value;
}
onChanged();
} else {
masterAliasBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public Builder clearMasterAlias() {
if (masterAliasBuilder_ == null) {
masterAlias_ = null;
onChanged();
} else {
masterAlias_ = null;
masterAliasBuilder_ = null;
}
return this;
}
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAlias.Builder getMasterAliasBuilder() {
onChanged();
return getMasterAliasFieldBuilder().getBuilder();
}
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder getMasterAliasOrBuilder() {
if (masterAliasBuilder_ != null) {
return masterAliasBuilder_.getMessageOrBuilder();
} else {
return masterAlias_ == null ?
com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance() : masterAlias_;
}
}
/**
*
* No lock is necessary to update this field, when for instance
* TabletExternallyReparented updates this. However, we lock the
* shard for reparenting operations (InitShardMaster,
* PlannedReparentShard,EmergencyReparentShard), to guarantee
* exclusive operation.
*
*
* optional .topodata.TabletAlias master_alias = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.TabletAlias, com.youtube.vitess.proto.Topodata.TabletAlias.Builder, com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder>
getMasterAliasFieldBuilder() {
if (masterAliasBuilder_ == null) {
masterAliasBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.TabletAlias, com.youtube.vitess.proto.Topodata.TabletAlias.Builder, com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder>(
getMasterAlias(),
getParentForChildren(),
isClean());
masterAlias_ = null;
}
return masterAliasBuilder_;
}
private com.youtube.vitess.proto.Topodata.KeyRange keyRange_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder> keyRangeBuilder_;
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public boolean hasKeyRange() {
return keyRangeBuilder_ != null || keyRange_ != null;
}
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyRange getKeyRange() {
if (keyRangeBuilder_ == null) {
return keyRange_ == null ? com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
} else {
return keyRangeBuilder_.getMessage();
}
}
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public Builder setKeyRange(com.youtube.vitess.proto.Topodata.KeyRange value) {
if (keyRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
keyRange_ = value;
onChanged();
} else {
keyRangeBuilder_.setMessage(value);
}
return this;
}
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public Builder setKeyRange(
com.youtube.vitess.proto.Topodata.KeyRange.Builder builderForValue) {
if (keyRangeBuilder_ == null) {
keyRange_ = builderForValue.build();
onChanged();
} else {
keyRangeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public Builder mergeKeyRange(com.youtube.vitess.proto.Topodata.KeyRange value) {
if (keyRangeBuilder_ == null) {
if (keyRange_ != null) {
keyRange_ =
com.youtube.vitess.proto.Topodata.KeyRange.newBuilder(keyRange_).mergeFrom(value).buildPartial();
} else {
keyRange_ = value;
}
onChanged();
} else {
keyRangeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public Builder clearKeyRange() {
if (keyRangeBuilder_ == null) {
keyRange_ = null;
onChanged();
} else {
keyRange_ = null;
keyRangeBuilder_ = null;
}
return this;
}
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyRange.Builder getKeyRangeBuilder() {
onChanged();
return getKeyRangeFieldBuilder().getBuilder();
}
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder() {
if (keyRangeBuilder_ != null) {
return keyRangeBuilder_.getMessageOrBuilder();
} else {
return keyRange_ == null ?
com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
}
}
/**
*
* key_range is the KeyRange for this shard. It can be unset if:
* - we are not using range-based sharding in this shard.
* - the shard covers the entire keyrange.
* This must match the shard name based on our other conventions, but
* helpful to have it decomposed here.
* Once set at creation time, it is never changed.
*
*
* optional .topodata.KeyRange key_range = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder>
getKeyRangeFieldBuilder() {
if (keyRangeBuilder_ == null) {
keyRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder>(
getKeyRange(),
getParentForChildren(),
isClean());
keyRange_ = null;
}
return keyRangeBuilder_;
}
private java.util.List servedTypes_ =
java.util.Collections.emptyList();
private void ensureServedTypesIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
servedTypes_ = new java.util.ArrayList(servedTypes_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Shard.ServedType, com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder, com.youtube.vitess.proto.Topodata.Shard.ServedTypeOrBuilder> servedTypesBuilder_;
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public java.util.List getServedTypesList() {
if (servedTypesBuilder_ == null) {
return java.util.Collections.unmodifiableList(servedTypes_);
} else {
return servedTypesBuilder_.getMessageList();
}
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public int getServedTypesCount() {
if (servedTypesBuilder_ == null) {
return servedTypes_.size();
} else {
return servedTypesBuilder_.getCount();
}
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public com.youtube.vitess.proto.Topodata.Shard.ServedType getServedTypes(int index) {
if (servedTypesBuilder_ == null) {
return servedTypes_.get(index);
} else {
return servedTypesBuilder_.getMessage(index);
}
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public Builder setServedTypes(
int index, com.youtube.vitess.proto.Topodata.Shard.ServedType value) {
if (servedTypesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServedTypesIsMutable();
servedTypes_.set(index, value);
onChanged();
} else {
servedTypesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public Builder setServedTypes(
int index, com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder builderForValue) {
if (servedTypesBuilder_ == null) {
ensureServedTypesIsMutable();
servedTypes_.set(index, builderForValue.build());
onChanged();
} else {
servedTypesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public Builder addServedTypes(com.youtube.vitess.proto.Topodata.Shard.ServedType value) {
if (servedTypesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServedTypesIsMutable();
servedTypes_.add(value);
onChanged();
} else {
servedTypesBuilder_.addMessage(value);
}
return this;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public Builder addServedTypes(
int index, com.youtube.vitess.proto.Topodata.Shard.ServedType value) {
if (servedTypesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServedTypesIsMutable();
servedTypes_.add(index, value);
onChanged();
} else {
servedTypesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public Builder addServedTypes(
com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder builderForValue) {
if (servedTypesBuilder_ == null) {
ensureServedTypesIsMutable();
servedTypes_.add(builderForValue.build());
onChanged();
} else {
servedTypesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public Builder addServedTypes(
int index, com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder builderForValue) {
if (servedTypesBuilder_ == null) {
ensureServedTypesIsMutable();
servedTypes_.add(index, builderForValue.build());
onChanged();
} else {
servedTypesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public Builder addAllServedTypes(
java.lang.Iterable extends com.youtube.vitess.proto.Topodata.Shard.ServedType> values) {
if (servedTypesBuilder_ == null) {
ensureServedTypesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, servedTypes_);
onChanged();
} else {
servedTypesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public Builder clearServedTypes() {
if (servedTypesBuilder_ == null) {
servedTypes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
servedTypesBuilder_.clear();
}
return this;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public Builder removeServedTypes(int index) {
if (servedTypesBuilder_ == null) {
ensureServedTypesIsMutable();
servedTypes_.remove(index);
onChanged();
} else {
servedTypesBuilder_.remove(index);
}
return this;
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder getServedTypesBuilder(
int index) {
return getServedTypesFieldBuilder().getBuilder(index);
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public com.youtube.vitess.proto.Topodata.Shard.ServedTypeOrBuilder getServedTypesOrBuilder(
int index) {
if (servedTypesBuilder_ == null) {
return servedTypes_.get(index); } else {
return servedTypesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.Shard.ServedTypeOrBuilder>
getServedTypesOrBuilderList() {
if (servedTypesBuilder_ != null) {
return servedTypesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(servedTypes_);
}
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder addServedTypesBuilder() {
return getServedTypesFieldBuilder().addBuilder(
com.youtube.vitess.proto.Topodata.Shard.ServedType.getDefaultInstance());
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder addServedTypesBuilder(
int index) {
return getServedTypesFieldBuilder().addBuilder(
index, com.youtube.vitess.proto.Topodata.Shard.ServedType.getDefaultInstance());
}
/**
*
* served_types has at most one entry per TabletType
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.ServedType served_types = 3;
*/
public java.util.List
getServedTypesBuilderList() {
return getServedTypesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Shard.ServedType, com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder, com.youtube.vitess.proto.Topodata.Shard.ServedTypeOrBuilder>
getServedTypesFieldBuilder() {
if (servedTypesBuilder_ == null) {
servedTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Shard.ServedType, com.youtube.vitess.proto.Topodata.Shard.ServedType.Builder, com.youtube.vitess.proto.Topodata.Shard.ServedTypeOrBuilder>(
servedTypes_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
servedTypes_ = null;
}
return servedTypesBuilder_;
}
private java.util.List sourceShards_ =
java.util.Collections.emptyList();
private void ensureSourceShardsIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
sourceShards_ = new java.util.ArrayList(sourceShards_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Shard.SourceShard, com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder, com.youtube.vitess.proto.Topodata.Shard.SourceShardOrBuilder> sourceShardsBuilder_;
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public java.util.List getSourceShardsList() {
if (sourceShardsBuilder_ == null) {
return java.util.Collections.unmodifiableList(sourceShards_);
} else {
return sourceShardsBuilder_.getMessageList();
}
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public int getSourceShardsCount() {
if (sourceShardsBuilder_ == null) {
return sourceShards_.size();
} else {
return sourceShardsBuilder_.getCount();
}
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public com.youtube.vitess.proto.Topodata.Shard.SourceShard getSourceShards(int index) {
if (sourceShardsBuilder_ == null) {
return sourceShards_.get(index);
} else {
return sourceShardsBuilder_.getMessage(index);
}
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public Builder setSourceShards(
int index, com.youtube.vitess.proto.Topodata.Shard.SourceShard value) {
if (sourceShardsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSourceShardsIsMutable();
sourceShards_.set(index, value);
onChanged();
} else {
sourceShardsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public Builder setSourceShards(
int index, com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder builderForValue) {
if (sourceShardsBuilder_ == null) {
ensureSourceShardsIsMutable();
sourceShards_.set(index, builderForValue.build());
onChanged();
} else {
sourceShardsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public Builder addSourceShards(com.youtube.vitess.proto.Topodata.Shard.SourceShard value) {
if (sourceShardsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSourceShardsIsMutable();
sourceShards_.add(value);
onChanged();
} else {
sourceShardsBuilder_.addMessage(value);
}
return this;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public Builder addSourceShards(
int index, com.youtube.vitess.proto.Topodata.Shard.SourceShard value) {
if (sourceShardsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSourceShardsIsMutable();
sourceShards_.add(index, value);
onChanged();
} else {
sourceShardsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public Builder addSourceShards(
com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder builderForValue) {
if (sourceShardsBuilder_ == null) {
ensureSourceShardsIsMutable();
sourceShards_.add(builderForValue.build());
onChanged();
} else {
sourceShardsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public Builder addSourceShards(
int index, com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder builderForValue) {
if (sourceShardsBuilder_ == null) {
ensureSourceShardsIsMutable();
sourceShards_.add(index, builderForValue.build());
onChanged();
} else {
sourceShardsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public Builder addAllSourceShards(
java.lang.Iterable extends com.youtube.vitess.proto.Topodata.Shard.SourceShard> values) {
if (sourceShardsBuilder_ == null) {
ensureSourceShardsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, sourceShards_);
onChanged();
} else {
sourceShardsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public Builder clearSourceShards() {
if (sourceShardsBuilder_ == null) {
sourceShards_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
sourceShardsBuilder_.clear();
}
return this;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public Builder removeSourceShards(int index) {
if (sourceShardsBuilder_ == null) {
ensureSourceShardsIsMutable();
sourceShards_.remove(index);
onChanged();
} else {
sourceShardsBuilder_.remove(index);
}
return this;
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder getSourceShardsBuilder(
int index) {
return getSourceShardsFieldBuilder().getBuilder(index);
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public com.youtube.vitess.proto.Topodata.Shard.SourceShardOrBuilder getSourceShardsOrBuilder(
int index) {
if (sourceShardsBuilder_ == null) {
return sourceShards_.get(index); } else {
return sourceShardsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.Shard.SourceShardOrBuilder>
getSourceShardsOrBuilderList() {
if (sourceShardsBuilder_ != null) {
return sourceShardsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(sourceShards_);
}
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder addSourceShardsBuilder() {
return getSourceShardsFieldBuilder().addBuilder(
com.youtube.vitess.proto.Topodata.Shard.SourceShard.getDefaultInstance());
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder addSourceShardsBuilder(
int index) {
return getSourceShardsFieldBuilder().addBuilder(
index, com.youtube.vitess.proto.Topodata.Shard.SourceShard.getDefaultInstance());
}
/**
*
* SourceShards is the list of shards we're replicating from,
* using filtered replication.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.SourceShard source_shards = 4;
*/
public java.util.List
getSourceShardsBuilderList() {
return getSourceShardsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Shard.SourceShard, com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder, com.youtube.vitess.proto.Topodata.Shard.SourceShardOrBuilder>
getSourceShardsFieldBuilder() {
if (sourceShardsBuilder_ == null) {
sourceShardsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Shard.SourceShard, com.youtube.vitess.proto.Topodata.Shard.SourceShard.Builder, com.youtube.vitess.proto.Topodata.Shard.SourceShardOrBuilder>(
sourceShards_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
sourceShards_ = null;
}
return sourceShardsBuilder_;
}
private com.google.protobuf.LazyStringList cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureCellsIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
cells_ = new com.google.protobuf.LazyStringArrayList(cells_);
bitField0_ |= 0x00000010;
}
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public com.google.protobuf.ProtocolStringList
getCellsList() {
return cells_.getUnmodifiableView();
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public int getCellsCount() {
return cells_.size();
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public java.lang.String getCells(int index) {
return cells_.get(index);
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public com.google.protobuf.ByteString
getCellsBytes(int index) {
return cells_.getByteString(index);
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public Builder setCells(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.set(index, value);
onChanged();
return this;
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public Builder addCells(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.add(value);
onChanged();
return this;
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public Builder addAllCells(
java.lang.Iterable values) {
ensureCellsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, cells_);
onChanged();
return this;
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public Builder clearCells() {
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* Cells is the list of cells that contain tablets for this shard.
* No lock is necessary to update this field.
*
*
* repeated string cells = 5;
*/
public Builder addCellsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureCellsIsMutable();
cells_.add(value);
onChanged();
return this;
}
private java.util.List tabletControls_ =
java.util.Collections.emptyList();
private void ensureTabletControlsIsMutable() {
if (!((bitField0_ & 0x00000020) == 0x00000020)) {
tabletControls_ = new java.util.ArrayList(tabletControls_);
bitField0_ |= 0x00000020;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Shard.TabletControl, com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder, com.youtube.vitess.proto.Topodata.Shard.TabletControlOrBuilder> tabletControlsBuilder_;
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public java.util.List getTabletControlsList() {
if (tabletControlsBuilder_ == null) {
return java.util.Collections.unmodifiableList(tabletControls_);
} else {
return tabletControlsBuilder_.getMessageList();
}
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public int getTabletControlsCount() {
if (tabletControlsBuilder_ == null) {
return tabletControls_.size();
} else {
return tabletControlsBuilder_.getCount();
}
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public com.youtube.vitess.proto.Topodata.Shard.TabletControl getTabletControls(int index) {
if (tabletControlsBuilder_ == null) {
return tabletControls_.get(index);
} else {
return tabletControlsBuilder_.getMessage(index);
}
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public Builder setTabletControls(
int index, com.youtube.vitess.proto.Topodata.Shard.TabletControl value) {
if (tabletControlsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTabletControlsIsMutable();
tabletControls_.set(index, value);
onChanged();
} else {
tabletControlsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public Builder setTabletControls(
int index, com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder builderForValue) {
if (tabletControlsBuilder_ == null) {
ensureTabletControlsIsMutable();
tabletControls_.set(index, builderForValue.build());
onChanged();
} else {
tabletControlsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public Builder addTabletControls(com.youtube.vitess.proto.Topodata.Shard.TabletControl value) {
if (tabletControlsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTabletControlsIsMutable();
tabletControls_.add(value);
onChanged();
} else {
tabletControlsBuilder_.addMessage(value);
}
return this;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public Builder addTabletControls(
int index, com.youtube.vitess.proto.Topodata.Shard.TabletControl value) {
if (tabletControlsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTabletControlsIsMutable();
tabletControls_.add(index, value);
onChanged();
} else {
tabletControlsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public Builder addTabletControls(
com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder builderForValue) {
if (tabletControlsBuilder_ == null) {
ensureTabletControlsIsMutable();
tabletControls_.add(builderForValue.build());
onChanged();
} else {
tabletControlsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public Builder addTabletControls(
int index, com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder builderForValue) {
if (tabletControlsBuilder_ == null) {
ensureTabletControlsIsMutable();
tabletControls_.add(index, builderForValue.build());
onChanged();
} else {
tabletControlsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public Builder addAllTabletControls(
java.lang.Iterable extends com.youtube.vitess.proto.Topodata.Shard.TabletControl> values) {
if (tabletControlsBuilder_ == null) {
ensureTabletControlsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tabletControls_);
onChanged();
} else {
tabletControlsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public Builder clearTabletControls() {
if (tabletControlsBuilder_ == null) {
tabletControls_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
} else {
tabletControlsBuilder_.clear();
}
return this;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public Builder removeTabletControls(int index) {
if (tabletControlsBuilder_ == null) {
ensureTabletControlsIsMutable();
tabletControls_.remove(index);
onChanged();
} else {
tabletControlsBuilder_.remove(index);
}
return this;
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder getTabletControlsBuilder(
int index) {
return getTabletControlsFieldBuilder().getBuilder(index);
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public com.youtube.vitess.proto.Topodata.Shard.TabletControlOrBuilder getTabletControlsOrBuilder(
int index) {
if (tabletControlsBuilder_ == null) {
return tabletControls_.get(index); } else {
return tabletControlsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.Shard.TabletControlOrBuilder>
getTabletControlsOrBuilderList() {
if (tabletControlsBuilder_ != null) {
return tabletControlsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(tabletControls_);
}
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder addTabletControlsBuilder() {
return getTabletControlsFieldBuilder().addBuilder(
com.youtube.vitess.proto.Topodata.Shard.TabletControl.getDefaultInstance());
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder addTabletControlsBuilder(
int index) {
return getTabletControlsFieldBuilder().addBuilder(
index, com.youtube.vitess.proto.Topodata.Shard.TabletControl.getDefaultInstance());
}
/**
*
* tablet_controls has at most one entry per TabletType.
* The keyspace lock is always taken when changing this.
*
*
* repeated .topodata.Shard.TabletControl tablet_controls = 6;
*/
public java.util.List
getTabletControlsBuilderList() {
return getTabletControlsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Shard.TabletControl, com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder, com.youtube.vitess.proto.Topodata.Shard.TabletControlOrBuilder>
getTabletControlsFieldBuilder() {
if (tabletControlsBuilder_ == null) {
tabletControlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Shard.TabletControl, com.youtube.vitess.proto.Topodata.Shard.TabletControl.Builder, com.youtube.vitess.proto.Topodata.Shard.TabletControlOrBuilder>(
tabletControls_,
((bitField0_ & 0x00000020) == 0x00000020),
getParentForChildren(),
isClean());
tabletControls_ = null;
}
return tabletControlsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.Shard)
}
// @@protoc_insertion_point(class_scope:topodata.Shard)
private static final com.youtube.vitess.proto.Topodata.Shard DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.Shard();
}
public static com.youtube.vitess.proto.Topodata.Shard getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Shard parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Shard(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.Shard getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface KeyspaceOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.Keyspace)
com.google.protobuf.MessageOrBuilder {
/**
*
* name of the column used for sharding
* empty if the keyspace is not sharded
*
*
* optional string sharding_column_name = 1;
*/
java.lang.String getShardingColumnName();
/**
*
* name of the column used for sharding
* empty if the keyspace is not sharded
*
*
* optional string sharding_column_name = 1;
*/
com.google.protobuf.ByteString
getShardingColumnNameBytes();
/**
*
* type of the column used for sharding
* UNSET if the keyspace is not sharded
*
*
* optional .topodata.KeyspaceIdType sharding_column_type = 2;
*/
int getShardingColumnTypeValue();
/**
*
* type of the column used for sharding
* UNSET if the keyspace is not sharded
*
*
* optional .topodata.KeyspaceIdType sharding_column_type = 2;
*/
com.youtube.vitess.proto.Topodata.KeyspaceIdType getShardingColumnType();
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
java.util.List
getServedFromsList();
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom getServedFroms(int index);
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
int getServedFromsCount();
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
java.util.List extends com.youtube.vitess.proto.Topodata.Keyspace.ServedFromOrBuilder>
getServedFromsOrBuilderList();
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
com.youtube.vitess.proto.Topodata.Keyspace.ServedFromOrBuilder getServedFromsOrBuilder(
int index);
}
/**
*
* A Keyspace contains data about a keyspace.
*
*
* Protobuf type {@code topodata.Keyspace}
*/
public static final class Keyspace extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.Keyspace)
KeyspaceOrBuilder {
// Use Keyspace.newBuilder() to construct.
private Keyspace(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Keyspace() {
shardingColumnName_ = "";
shardingColumnType_ = 0;
servedFroms_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Keyspace(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
shardingColumnName_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
shardingColumnType_ = rawValue;
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
servedFroms_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
servedFroms_.add(
input.readMessage(com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
servedFroms_ = java.util.Collections.unmodifiableList(servedFroms_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Keyspace_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Keyspace_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Keyspace.class, com.youtube.vitess.proto.Topodata.Keyspace.Builder.class);
}
public interface ServedFromOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.Keyspace.ServedFrom)
com.google.protobuf.MessageOrBuilder {
/**
*
* the tablet type (key for the map)
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
int getTabletTypeValue();
/**
*
* the tablet type (key for the map)
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
com.youtube.vitess.proto.Topodata.TabletType getTabletType();
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
java.util.List
getCellsList();
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
int getCellsCount();
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
java.lang.String getCells(int index);
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
com.google.protobuf.ByteString
getCellsBytes(int index);
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 3;
*/
java.lang.String getKeyspace();
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 3;
*/
com.google.protobuf.ByteString
getKeyspaceBytes();
}
/**
*
* ServedFrom indicates a relationship between a TabletType and the
* keyspace name that's serving it.
*
*
* Protobuf type {@code topodata.Keyspace.ServedFrom}
*/
public static final class ServedFrom extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.Keyspace.ServedFrom)
ServedFromOrBuilder {
// Use ServedFrom.newBuilder() to construct.
private ServedFrom(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ServedFrom() {
tabletType_ = 0;
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
keyspace_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ServedFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
tabletType_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
cells_.add(s);
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
keyspace_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = cells_.getUnmodifiableView();
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Keyspace_ServedFrom_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Keyspace_ServedFrom_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.class, com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder.class);
}
private int bitField0_;
public static final int TABLET_TYPE_FIELD_NUMBER = 1;
private int tabletType_;
/**
*
* the tablet type (key for the map)
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public int getTabletTypeValue() {
return tabletType_;
}
/**
*
* the tablet type (key for the map)
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletType getTabletType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(tabletType_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
public static final int CELLS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList cells_;
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public com.google.protobuf.ProtocolStringList
getCellsList() {
return cells_;
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public int getCellsCount() {
return cells_.size();
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public java.lang.String getCells(int index) {
return cells_.get(index);
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public com.google.protobuf.ByteString
getCellsBytes(int index) {
return cells_.getByteString(index);
}
public static final int KEYSPACE_FIELD_NUMBER = 3;
private volatile java.lang.Object keyspace_;
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 3;
*/
public java.lang.String getKeyspace() {
java.lang.Object ref = keyspace_;
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();
keyspace_ = s;
return s;
}
}
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 3;
*/
public com.google.protobuf.ByteString
getKeyspaceBytes() {
java.lang.Object ref = keyspace_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyspace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (tabletType_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
output.writeEnum(1, tabletType_);
}
for (int i = 0; i < cells_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cells_.getRaw(i));
}
if (!getKeyspaceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, keyspace_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (tabletType_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, tabletType_);
}
{
int dataSize = 0;
for (int i = 0; i < cells_.size(); i++) {
dataSize += computeStringSizeNoTag(cells_.getRaw(i));
}
size += dataSize;
size += 1 * getCellsList().size();
}
if (!getKeyspaceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, keyspace_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom other = (com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom) obj;
boolean result = true;
result = result && tabletType_ == other.tabletType_;
result = result && getCellsList()
.equals(other.getCellsList());
result = result && getKeyspace()
.equals(other.getKeyspace());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + TABLET_TYPE_FIELD_NUMBER;
hash = (53 * hash) + tabletType_;
if (getCellsCount() > 0) {
hash = (37 * hash) + CELLS_FIELD_NUMBER;
hash = (53 * hash) + getCellsList().hashCode();
}
hash = (37 * hash) + KEYSPACE_FIELD_NUMBER;
hash = (53 * hash) + getKeyspace().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom 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.youtube.vitess.proto.Topodata.Keyspace.ServedFrom parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom 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.youtube.vitess.proto.Topodata.Keyspace.ServedFrom parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* ServedFrom indicates a relationship between a TabletType and the
* keyspace name that's serving it.
*
*
* Protobuf type {@code topodata.Keyspace.ServedFrom}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.Keyspace.ServedFrom)
com.youtube.vitess.proto.Topodata.Keyspace.ServedFromOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Keyspace_ServedFrom_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Keyspace_ServedFrom_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.class, com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
tabletType_ = 0;
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
keyspace_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Keyspace_ServedFrom_descriptor;
}
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom build() {
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom buildPartial() {
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom result = new com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.tabletType_ = tabletType_;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = cells_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.cells_ = cells_;
result.keyspace_ = keyspace_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom) {
return mergeFrom((com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom other) {
if (other == com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.getDefaultInstance()) return this;
if (other.tabletType_ != 0) {
setTabletTypeValue(other.getTabletTypeValue());
}
if (!other.cells_.isEmpty()) {
if (cells_.isEmpty()) {
cells_ = other.cells_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureCellsIsMutable();
cells_.addAll(other.cells_);
}
onChanged();
}
if (!other.getKeyspace().isEmpty()) {
keyspace_ = other.keyspace_;
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int tabletType_ = 0;
/**
*
* the tablet type (key for the map)
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public int getTabletTypeValue() {
return tabletType_;
}
/**
*
* the tablet type (key for the map)
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder setTabletTypeValue(int value) {
tabletType_ = value;
onChanged();
return this;
}
/**
*
* the tablet type (key for the map)
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletType getTabletType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(tabletType_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
/**
*
* the tablet type (key for the map)
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder setTabletType(com.youtube.vitess.proto.Topodata.TabletType value) {
if (value == null) {
throw new NullPointerException();
}
tabletType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* the tablet type (key for the map)
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder clearTabletType() {
tabletType_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureCellsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
cells_ = new com.google.protobuf.LazyStringArrayList(cells_);
bitField0_ |= 0x00000002;
}
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public com.google.protobuf.ProtocolStringList
getCellsList() {
return cells_.getUnmodifiableView();
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public int getCellsCount() {
return cells_.size();
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public java.lang.String getCells(int index) {
return cells_.get(index);
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public com.google.protobuf.ByteString
getCellsBytes(int index) {
return cells_.getByteString(index);
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public Builder setCells(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.set(index, value);
onChanged();
return this;
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public Builder addCells(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.add(value);
onChanged();
return this;
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public Builder addAllCells(
java.lang.Iterable values) {
ensureCellsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, cells_);
onChanged();
return this;
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public Builder clearCells() {
cells_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* the cells to limit this to
*
*
* repeated string cells = 2;
*/
public Builder addCellsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureCellsIsMutable();
cells_.add(value);
onChanged();
return this;
}
private java.lang.Object keyspace_ = "";
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 3;
*/
public java.lang.String getKeyspace() {
java.lang.Object ref = keyspace_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
keyspace_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 3;
*/
public com.google.protobuf.ByteString
getKeyspaceBytes() {
java.lang.Object ref = keyspace_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyspace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 3;
*/
public Builder setKeyspace(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
keyspace_ = value;
onChanged();
return this;
}
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 3;
*/
public Builder clearKeyspace() {
keyspace_ = getDefaultInstance().getKeyspace();
onChanged();
return this;
}
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 3;
*/
public Builder setKeyspaceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
keyspace_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.Keyspace.ServedFrom)
}
// @@protoc_insertion_point(class_scope:topodata.Keyspace.ServedFrom)
private static final com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom();
}
public static com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ServedFrom parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ServedFrom(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int SHARDING_COLUMN_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object shardingColumnName_;
/**
*
* name of the column used for sharding
* empty if the keyspace is not sharded
*
*
* optional string sharding_column_name = 1;
*/
public java.lang.String getShardingColumnName() {
java.lang.Object ref = shardingColumnName_;
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();
shardingColumnName_ = s;
return s;
}
}
/**
*
* name of the column used for sharding
* empty if the keyspace is not sharded
*
*
* optional string sharding_column_name = 1;
*/
public com.google.protobuf.ByteString
getShardingColumnNameBytes() {
java.lang.Object ref = shardingColumnName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shardingColumnName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHARDING_COLUMN_TYPE_FIELD_NUMBER = 2;
private int shardingColumnType_;
/**
*
* type of the column used for sharding
* UNSET if the keyspace is not sharded
*
*
* optional .topodata.KeyspaceIdType sharding_column_type = 2;
*/
public int getShardingColumnTypeValue() {
return shardingColumnType_;
}
/**
*
* type of the column used for sharding
* UNSET if the keyspace is not sharded
*
*
* optional .topodata.KeyspaceIdType sharding_column_type = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyspaceIdType getShardingColumnType() {
com.youtube.vitess.proto.Topodata.KeyspaceIdType result = com.youtube.vitess.proto.Topodata.KeyspaceIdType.valueOf(shardingColumnType_);
return result == null ? com.youtube.vitess.proto.Topodata.KeyspaceIdType.UNRECOGNIZED : result;
}
public static final int SERVED_FROMS_FIELD_NUMBER = 4;
private java.util.List servedFroms_;
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public java.util.List getServedFromsList() {
return servedFroms_;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.Keyspace.ServedFromOrBuilder>
getServedFromsOrBuilderList() {
return servedFroms_;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public int getServedFromsCount() {
return servedFroms_.size();
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom getServedFroms(int index) {
return servedFroms_.get(index);
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFromOrBuilder getServedFromsOrBuilder(
int index) {
return servedFroms_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getShardingColumnNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, shardingColumnName_);
}
if (shardingColumnType_ != com.youtube.vitess.proto.Topodata.KeyspaceIdType.UNSET.getNumber()) {
output.writeEnum(2, shardingColumnType_);
}
for (int i = 0; i < servedFroms_.size(); i++) {
output.writeMessage(4, servedFroms_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getShardingColumnNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, shardingColumnName_);
}
if (shardingColumnType_ != com.youtube.vitess.proto.Topodata.KeyspaceIdType.UNSET.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, shardingColumnType_);
}
for (int i = 0; i < servedFroms_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, servedFroms_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.Keyspace)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.Keyspace other = (com.youtube.vitess.proto.Topodata.Keyspace) obj;
boolean result = true;
result = result && getShardingColumnName()
.equals(other.getShardingColumnName());
result = result && shardingColumnType_ == other.shardingColumnType_;
result = result && getServedFromsList()
.equals(other.getServedFromsList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + SHARDING_COLUMN_NAME_FIELD_NUMBER;
hash = (53 * hash) + getShardingColumnName().hashCode();
hash = (37 * hash) + SHARDING_COLUMN_TYPE_FIELD_NUMBER;
hash = (53 * hash) + shardingColumnType_;
if (getServedFromsCount() > 0) {
hash = (37 * hash) + SERVED_FROMS_FIELD_NUMBER;
hash = (53 * hash) + getServedFromsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.Keyspace parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Keyspace parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Keyspace parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.Keyspace parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.Keyspace parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Keyspace 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.youtube.vitess.proto.Topodata.Keyspace parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Keyspace 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.youtube.vitess.proto.Topodata.Keyspace parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.Keyspace parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.Keyspace prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* A Keyspace contains data about a keyspace.
*
*
* Protobuf type {@code topodata.Keyspace}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.Keyspace)
com.youtube.vitess.proto.Topodata.KeyspaceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Keyspace_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Keyspace_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.Keyspace.class, com.youtube.vitess.proto.Topodata.Keyspace.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.Keyspace.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getServedFromsFieldBuilder();
}
}
public Builder clear() {
super.clear();
shardingColumnName_ = "";
shardingColumnType_ = 0;
if (servedFromsBuilder_ == null) {
servedFroms_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
servedFromsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_Keyspace_descriptor;
}
public com.youtube.vitess.proto.Topodata.Keyspace getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.Keyspace.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.Keyspace build() {
com.youtube.vitess.proto.Topodata.Keyspace result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.Keyspace buildPartial() {
com.youtube.vitess.proto.Topodata.Keyspace result = new com.youtube.vitess.proto.Topodata.Keyspace(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.shardingColumnName_ = shardingColumnName_;
result.shardingColumnType_ = shardingColumnType_;
if (servedFromsBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
servedFroms_ = java.util.Collections.unmodifiableList(servedFroms_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.servedFroms_ = servedFroms_;
} else {
result.servedFroms_ = servedFromsBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.Keyspace) {
return mergeFrom((com.youtube.vitess.proto.Topodata.Keyspace)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.Keyspace other) {
if (other == com.youtube.vitess.proto.Topodata.Keyspace.getDefaultInstance()) return this;
if (!other.getShardingColumnName().isEmpty()) {
shardingColumnName_ = other.shardingColumnName_;
onChanged();
}
if (other.shardingColumnType_ != 0) {
setShardingColumnTypeValue(other.getShardingColumnTypeValue());
}
if (servedFromsBuilder_ == null) {
if (!other.servedFroms_.isEmpty()) {
if (servedFroms_.isEmpty()) {
servedFroms_ = other.servedFroms_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureServedFromsIsMutable();
servedFroms_.addAll(other.servedFroms_);
}
onChanged();
}
} else {
if (!other.servedFroms_.isEmpty()) {
if (servedFromsBuilder_.isEmpty()) {
servedFromsBuilder_.dispose();
servedFromsBuilder_ = null;
servedFroms_ = other.servedFroms_;
bitField0_ = (bitField0_ & ~0x00000004);
servedFromsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getServedFromsFieldBuilder() : null;
} else {
servedFromsBuilder_.addAllMessages(other.servedFroms_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.Keyspace parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.Keyspace) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object shardingColumnName_ = "";
/**
*
* name of the column used for sharding
* empty if the keyspace is not sharded
*
*
* optional string sharding_column_name = 1;
*/
public java.lang.String getShardingColumnName() {
java.lang.Object ref = shardingColumnName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shardingColumnName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* name of the column used for sharding
* empty if the keyspace is not sharded
*
*
* optional string sharding_column_name = 1;
*/
public com.google.protobuf.ByteString
getShardingColumnNameBytes() {
java.lang.Object ref = shardingColumnName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shardingColumnName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* name of the column used for sharding
* empty if the keyspace is not sharded
*
*
* optional string sharding_column_name = 1;
*/
public Builder setShardingColumnName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
shardingColumnName_ = value;
onChanged();
return this;
}
/**
*
* name of the column used for sharding
* empty if the keyspace is not sharded
*
*
* optional string sharding_column_name = 1;
*/
public Builder clearShardingColumnName() {
shardingColumnName_ = getDefaultInstance().getShardingColumnName();
onChanged();
return this;
}
/**
*
* name of the column used for sharding
* empty if the keyspace is not sharded
*
*
* optional string sharding_column_name = 1;
*/
public Builder setShardingColumnNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
shardingColumnName_ = value;
onChanged();
return this;
}
private int shardingColumnType_ = 0;
/**
*
* type of the column used for sharding
* UNSET if the keyspace is not sharded
*
*
* optional .topodata.KeyspaceIdType sharding_column_type = 2;
*/
public int getShardingColumnTypeValue() {
return shardingColumnType_;
}
/**
*
* type of the column used for sharding
* UNSET if the keyspace is not sharded
*
*
* optional .topodata.KeyspaceIdType sharding_column_type = 2;
*/
public Builder setShardingColumnTypeValue(int value) {
shardingColumnType_ = value;
onChanged();
return this;
}
/**
*
* type of the column used for sharding
* UNSET if the keyspace is not sharded
*
*
* optional .topodata.KeyspaceIdType sharding_column_type = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyspaceIdType getShardingColumnType() {
com.youtube.vitess.proto.Topodata.KeyspaceIdType result = com.youtube.vitess.proto.Topodata.KeyspaceIdType.valueOf(shardingColumnType_);
return result == null ? com.youtube.vitess.proto.Topodata.KeyspaceIdType.UNRECOGNIZED : result;
}
/**
*
* type of the column used for sharding
* UNSET if the keyspace is not sharded
*
*
* optional .topodata.KeyspaceIdType sharding_column_type = 2;
*/
public Builder setShardingColumnType(com.youtube.vitess.proto.Topodata.KeyspaceIdType value) {
if (value == null) {
throw new NullPointerException();
}
shardingColumnType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* type of the column used for sharding
* UNSET if the keyspace is not sharded
*
*
* optional .topodata.KeyspaceIdType sharding_column_type = 2;
*/
public Builder clearShardingColumnType() {
shardingColumnType_ = 0;
onChanged();
return this;
}
private java.util.List servedFroms_ =
java.util.Collections.emptyList();
private void ensureServedFromsIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
servedFroms_ = new java.util.ArrayList(servedFroms_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom, com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder, com.youtube.vitess.proto.Topodata.Keyspace.ServedFromOrBuilder> servedFromsBuilder_;
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public java.util.List getServedFromsList() {
if (servedFromsBuilder_ == null) {
return java.util.Collections.unmodifiableList(servedFroms_);
} else {
return servedFromsBuilder_.getMessageList();
}
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public int getServedFromsCount() {
if (servedFromsBuilder_ == null) {
return servedFroms_.size();
} else {
return servedFromsBuilder_.getCount();
}
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom getServedFroms(int index) {
if (servedFromsBuilder_ == null) {
return servedFroms_.get(index);
} else {
return servedFromsBuilder_.getMessage(index);
}
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public Builder setServedFroms(
int index, com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom value) {
if (servedFromsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServedFromsIsMutable();
servedFroms_.set(index, value);
onChanged();
} else {
servedFromsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public Builder setServedFroms(
int index, com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder builderForValue) {
if (servedFromsBuilder_ == null) {
ensureServedFromsIsMutable();
servedFroms_.set(index, builderForValue.build());
onChanged();
} else {
servedFromsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public Builder addServedFroms(com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom value) {
if (servedFromsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServedFromsIsMutable();
servedFroms_.add(value);
onChanged();
} else {
servedFromsBuilder_.addMessage(value);
}
return this;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public Builder addServedFroms(
int index, com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom value) {
if (servedFromsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServedFromsIsMutable();
servedFroms_.add(index, value);
onChanged();
} else {
servedFromsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public Builder addServedFroms(
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder builderForValue) {
if (servedFromsBuilder_ == null) {
ensureServedFromsIsMutable();
servedFroms_.add(builderForValue.build());
onChanged();
} else {
servedFromsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public Builder addServedFroms(
int index, com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder builderForValue) {
if (servedFromsBuilder_ == null) {
ensureServedFromsIsMutable();
servedFroms_.add(index, builderForValue.build());
onChanged();
} else {
servedFromsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public Builder addAllServedFroms(
java.lang.Iterable extends com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom> values) {
if (servedFromsBuilder_ == null) {
ensureServedFromsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, servedFroms_);
onChanged();
} else {
servedFromsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public Builder clearServedFroms() {
if (servedFromsBuilder_ == null) {
servedFroms_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
servedFromsBuilder_.clear();
}
return this;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public Builder removeServedFroms(int index) {
if (servedFromsBuilder_ == null) {
ensureServedFromsIsMutable();
servedFroms_.remove(index);
onChanged();
} else {
servedFromsBuilder_.remove(index);
}
return this;
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder getServedFromsBuilder(
int index) {
return getServedFromsFieldBuilder().getBuilder(index);
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFromOrBuilder getServedFromsOrBuilder(
int index) {
if (servedFromsBuilder_ == null) {
return servedFroms_.get(index); } else {
return servedFromsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.Keyspace.ServedFromOrBuilder>
getServedFromsOrBuilderList() {
if (servedFromsBuilder_ != null) {
return servedFromsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(servedFroms_);
}
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder addServedFromsBuilder() {
return getServedFromsFieldBuilder().addBuilder(
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.getDefaultInstance());
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder addServedFromsBuilder(
int index) {
return getServedFromsFieldBuilder().addBuilder(
index, com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.getDefaultInstance());
}
/**
*
* ServedFrom will redirect the appropriate traffic to
* another keyspace.
*
*
* repeated .topodata.Keyspace.ServedFrom served_froms = 4;
*/
public java.util.List
getServedFromsBuilderList() {
return getServedFromsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom, com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder, com.youtube.vitess.proto.Topodata.Keyspace.ServedFromOrBuilder>
getServedFromsFieldBuilder() {
if (servedFromsBuilder_ == null) {
servedFromsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom, com.youtube.vitess.proto.Topodata.Keyspace.ServedFrom.Builder, com.youtube.vitess.proto.Topodata.Keyspace.ServedFromOrBuilder>(
servedFroms_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
servedFroms_ = null;
}
return servedFromsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.Keyspace)
}
// @@protoc_insertion_point(class_scope:topodata.Keyspace)
private static final com.youtube.vitess.proto.Topodata.Keyspace DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.Keyspace();
}
public static com.youtube.vitess.proto.Topodata.Keyspace getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Keyspace parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Keyspace(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.Keyspace getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ShardReplicationOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.ShardReplication)
com.google.protobuf.MessageOrBuilder {
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
java.util.List
getNodesList();
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
com.youtube.vitess.proto.Topodata.ShardReplication.Node getNodes(int index);
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
int getNodesCount();
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
java.util.List extends com.youtube.vitess.proto.Topodata.ShardReplication.NodeOrBuilder>
getNodesOrBuilderList();
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
com.youtube.vitess.proto.Topodata.ShardReplication.NodeOrBuilder getNodesOrBuilder(
int index);
}
/**
*
* ShardReplication describes the MySQL replication relationships
* whithin a cell.
*
*
* Protobuf type {@code topodata.ShardReplication}
*/
public static final class ShardReplication extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.ShardReplication)
ShardReplicationOrBuilder {
// Use ShardReplication.newBuilder() to construct.
private ShardReplication(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ShardReplication() {
nodes_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ShardReplication(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
nodes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
nodes_.add(
input.readMessage(com.youtube.vitess.proto.Topodata.ShardReplication.Node.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
nodes_ = java.util.Collections.unmodifiableList(nodes_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReplication_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReplication_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.ShardReplication.class, com.youtube.vitess.proto.Topodata.ShardReplication.Builder.class);
}
public interface NodeOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.ShardReplication.Node)
com.google.protobuf.MessageOrBuilder {
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
boolean hasTabletAlias();
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
com.youtube.vitess.proto.Topodata.TabletAlias getTabletAlias();
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder getTabletAliasOrBuilder();
}
/**
*
* Node describes a tablet instance within the cell
*
*
* Protobuf type {@code topodata.ShardReplication.Node}
*/
public static final class Node extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.ShardReplication.Node)
NodeOrBuilder {
// Use Node.newBuilder() to construct.
private Node(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Node() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Node(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
com.youtube.vitess.proto.Topodata.TabletAlias.Builder subBuilder = null;
if (tabletAlias_ != null) {
subBuilder = tabletAlias_.toBuilder();
}
tabletAlias_ = input.readMessage(com.youtube.vitess.proto.Topodata.TabletAlias.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tabletAlias_);
tabletAlias_ = subBuilder.buildPartial();
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReplication_Node_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReplication_Node_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.ShardReplication.Node.class, com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder.class);
}
public static final int TABLET_ALIAS_FIELD_NUMBER = 1;
private com.youtube.vitess.proto.Topodata.TabletAlias tabletAlias_;
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public boolean hasTabletAlias() {
return tabletAlias_ != null;
}
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAlias getTabletAlias() {
return tabletAlias_ == null ? com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance() : tabletAlias_;
}
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder getTabletAliasOrBuilder() {
return getTabletAlias();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (tabletAlias_ != null) {
output.writeMessage(1, getTabletAlias());
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (tabletAlias_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTabletAlias());
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.ShardReplication.Node)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.ShardReplication.Node other = (com.youtube.vitess.proto.Topodata.ShardReplication.Node) obj;
boolean result = true;
result = result && (hasTabletAlias() == other.hasTabletAlias());
if (hasTabletAlias()) {
result = result && getTabletAlias()
.equals(other.getTabletAlias());
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasTabletAlias()) {
hash = (37 * hash) + TABLET_ALIAS_FIELD_NUMBER;
hash = (53 * hash) + getTabletAlias().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.ShardReplication.Node parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication.Node parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication.Node parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication.Node parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication.Node parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication.Node 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.youtube.vitess.proto.Topodata.ShardReplication.Node parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication.Node 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.youtube.vitess.proto.Topodata.ShardReplication.Node parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication.Node parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.ShardReplication.Node prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Node describes a tablet instance within the cell
*
*
* Protobuf type {@code topodata.ShardReplication.Node}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.ShardReplication.Node)
com.youtube.vitess.proto.Topodata.ShardReplication.NodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReplication_Node_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReplication_Node_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.ShardReplication.Node.class, com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.ShardReplication.Node.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (tabletAliasBuilder_ == null) {
tabletAlias_ = null;
} else {
tabletAlias_ = null;
tabletAliasBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReplication_Node_descriptor;
}
public com.youtube.vitess.proto.Topodata.ShardReplication.Node getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.ShardReplication.Node.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.ShardReplication.Node build() {
com.youtube.vitess.proto.Topodata.ShardReplication.Node result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.ShardReplication.Node buildPartial() {
com.youtube.vitess.proto.Topodata.ShardReplication.Node result = new com.youtube.vitess.proto.Topodata.ShardReplication.Node(this);
if (tabletAliasBuilder_ == null) {
result.tabletAlias_ = tabletAlias_;
} else {
result.tabletAlias_ = tabletAliasBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.ShardReplication.Node) {
return mergeFrom((com.youtube.vitess.proto.Topodata.ShardReplication.Node)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.ShardReplication.Node other) {
if (other == com.youtube.vitess.proto.Topodata.ShardReplication.Node.getDefaultInstance()) return this;
if (other.hasTabletAlias()) {
mergeTabletAlias(other.getTabletAlias());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.ShardReplication.Node parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.ShardReplication.Node) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.youtube.vitess.proto.Topodata.TabletAlias tabletAlias_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.TabletAlias, com.youtube.vitess.proto.Topodata.TabletAlias.Builder, com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder> tabletAliasBuilder_;
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public boolean hasTabletAlias() {
return tabletAliasBuilder_ != null || tabletAlias_ != null;
}
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAlias getTabletAlias() {
if (tabletAliasBuilder_ == null) {
return tabletAlias_ == null ? com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance() : tabletAlias_;
} else {
return tabletAliasBuilder_.getMessage();
}
}
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public Builder setTabletAlias(com.youtube.vitess.proto.Topodata.TabletAlias value) {
if (tabletAliasBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tabletAlias_ = value;
onChanged();
} else {
tabletAliasBuilder_.setMessage(value);
}
return this;
}
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public Builder setTabletAlias(
com.youtube.vitess.proto.Topodata.TabletAlias.Builder builderForValue) {
if (tabletAliasBuilder_ == null) {
tabletAlias_ = builderForValue.build();
onChanged();
} else {
tabletAliasBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public Builder mergeTabletAlias(com.youtube.vitess.proto.Topodata.TabletAlias value) {
if (tabletAliasBuilder_ == null) {
if (tabletAlias_ != null) {
tabletAlias_ =
com.youtube.vitess.proto.Topodata.TabletAlias.newBuilder(tabletAlias_).mergeFrom(value).buildPartial();
} else {
tabletAlias_ = value;
}
onChanged();
} else {
tabletAliasBuilder_.mergeFrom(value);
}
return this;
}
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public Builder clearTabletAlias() {
if (tabletAliasBuilder_ == null) {
tabletAlias_ = null;
onChanged();
} else {
tabletAlias_ = null;
tabletAliasBuilder_ = null;
}
return this;
}
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAlias.Builder getTabletAliasBuilder() {
onChanged();
return getTabletAliasFieldBuilder().getBuilder();
}
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder getTabletAliasOrBuilder() {
if (tabletAliasBuilder_ != null) {
return tabletAliasBuilder_.getMessageOrBuilder();
} else {
return tabletAlias_ == null ?
com.youtube.vitess.proto.Topodata.TabletAlias.getDefaultInstance() : tabletAlias_;
}
}
/**
* optional .topodata.TabletAlias tablet_alias = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.TabletAlias, com.youtube.vitess.proto.Topodata.TabletAlias.Builder, com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder>
getTabletAliasFieldBuilder() {
if (tabletAliasBuilder_ == null) {
tabletAliasBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.TabletAlias, com.youtube.vitess.proto.Topodata.TabletAlias.Builder, com.youtube.vitess.proto.Topodata.TabletAliasOrBuilder>(
getTabletAlias(),
getParentForChildren(),
isClean());
tabletAlias_ = null;
}
return tabletAliasBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.ShardReplication.Node)
}
// @@protoc_insertion_point(class_scope:topodata.ShardReplication.Node)
private static final com.youtube.vitess.proto.Topodata.ShardReplication.Node DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.ShardReplication.Node();
}
public static com.youtube.vitess.proto.Topodata.ShardReplication.Node getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Node parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Node(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.ShardReplication.Node getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int NODES_FIELD_NUMBER = 1;
private java.util.List nodes_;
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public java.util.List getNodesList() {
return nodes_;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.ShardReplication.NodeOrBuilder>
getNodesOrBuilderList() {
return nodes_;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public int getNodesCount() {
return nodes_.size();
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public com.youtube.vitess.proto.Topodata.ShardReplication.Node getNodes(int index) {
return nodes_.get(index);
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public com.youtube.vitess.proto.Topodata.ShardReplication.NodeOrBuilder getNodesOrBuilder(
int index) {
return nodes_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < nodes_.size(); i++) {
output.writeMessage(1, nodes_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < nodes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, nodes_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.ShardReplication)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.ShardReplication other = (com.youtube.vitess.proto.Topodata.ShardReplication) obj;
boolean result = true;
result = result && getNodesList()
.equals(other.getNodesList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (getNodesCount() > 0) {
hash = (37 * hash) + NODES_FIELD_NUMBER;
hash = (53 * hash) + getNodesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.ShardReplication parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication 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.youtube.vitess.proto.Topodata.ShardReplication parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication 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.youtube.vitess.proto.Topodata.ShardReplication parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.ShardReplication parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.ShardReplication prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* ShardReplication describes the MySQL replication relationships
* whithin a cell.
*
*
* Protobuf type {@code topodata.ShardReplication}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.ShardReplication)
com.youtube.vitess.proto.Topodata.ShardReplicationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReplication_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReplication_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.ShardReplication.class, com.youtube.vitess.proto.Topodata.ShardReplication.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.ShardReplication.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getNodesFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (nodesBuilder_ == null) {
nodes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
nodesBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReplication_descriptor;
}
public com.youtube.vitess.proto.Topodata.ShardReplication getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.ShardReplication.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.ShardReplication build() {
com.youtube.vitess.proto.Topodata.ShardReplication result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.ShardReplication buildPartial() {
com.youtube.vitess.proto.Topodata.ShardReplication result = new com.youtube.vitess.proto.Topodata.ShardReplication(this);
int from_bitField0_ = bitField0_;
if (nodesBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
nodes_ = java.util.Collections.unmodifiableList(nodes_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.nodes_ = nodes_;
} else {
result.nodes_ = nodesBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.ShardReplication) {
return mergeFrom((com.youtube.vitess.proto.Topodata.ShardReplication)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.ShardReplication other) {
if (other == com.youtube.vitess.proto.Topodata.ShardReplication.getDefaultInstance()) return this;
if (nodesBuilder_ == null) {
if (!other.nodes_.isEmpty()) {
if (nodes_.isEmpty()) {
nodes_ = other.nodes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureNodesIsMutable();
nodes_.addAll(other.nodes_);
}
onChanged();
}
} else {
if (!other.nodes_.isEmpty()) {
if (nodesBuilder_.isEmpty()) {
nodesBuilder_.dispose();
nodesBuilder_ = null;
nodes_ = other.nodes_;
bitField0_ = (bitField0_ & ~0x00000001);
nodesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getNodesFieldBuilder() : null;
} else {
nodesBuilder_.addAllMessages(other.nodes_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.ShardReplication parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.ShardReplication) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List nodes_ =
java.util.Collections.emptyList();
private void ensureNodesIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
nodes_ = new java.util.ArrayList(nodes_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.ShardReplication.Node, com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder, com.youtube.vitess.proto.Topodata.ShardReplication.NodeOrBuilder> nodesBuilder_;
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public java.util.List getNodesList() {
if (nodesBuilder_ == null) {
return java.util.Collections.unmodifiableList(nodes_);
} else {
return nodesBuilder_.getMessageList();
}
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public int getNodesCount() {
if (nodesBuilder_ == null) {
return nodes_.size();
} else {
return nodesBuilder_.getCount();
}
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public com.youtube.vitess.proto.Topodata.ShardReplication.Node getNodes(int index) {
if (nodesBuilder_ == null) {
return nodes_.get(index);
} else {
return nodesBuilder_.getMessage(index);
}
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public Builder setNodes(
int index, com.youtube.vitess.proto.Topodata.ShardReplication.Node value) {
if (nodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodesIsMutable();
nodes_.set(index, value);
onChanged();
} else {
nodesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public Builder setNodes(
int index, com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder builderForValue) {
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
nodes_.set(index, builderForValue.build());
onChanged();
} else {
nodesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public Builder addNodes(com.youtube.vitess.proto.Topodata.ShardReplication.Node value) {
if (nodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodesIsMutable();
nodes_.add(value);
onChanged();
} else {
nodesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public Builder addNodes(
int index, com.youtube.vitess.proto.Topodata.ShardReplication.Node value) {
if (nodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodesIsMutable();
nodes_.add(index, value);
onChanged();
} else {
nodesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public Builder addNodes(
com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder builderForValue) {
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
nodes_.add(builderForValue.build());
onChanged();
} else {
nodesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public Builder addNodes(
int index, com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder builderForValue) {
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
nodes_.add(index, builderForValue.build());
onChanged();
} else {
nodesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public Builder addAllNodes(
java.lang.Iterable extends com.youtube.vitess.proto.Topodata.ShardReplication.Node> values) {
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, nodes_);
onChanged();
} else {
nodesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public Builder clearNodes() {
if (nodesBuilder_ == null) {
nodes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
nodesBuilder_.clear();
}
return this;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public Builder removeNodes(int index) {
if (nodesBuilder_ == null) {
ensureNodesIsMutable();
nodes_.remove(index);
onChanged();
} else {
nodesBuilder_.remove(index);
}
return this;
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder getNodesBuilder(
int index) {
return getNodesFieldBuilder().getBuilder(index);
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public com.youtube.vitess.proto.Topodata.ShardReplication.NodeOrBuilder getNodesOrBuilder(
int index) {
if (nodesBuilder_ == null) {
return nodes_.get(index); } else {
return nodesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.ShardReplication.NodeOrBuilder>
getNodesOrBuilderList() {
if (nodesBuilder_ != null) {
return nodesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(nodes_);
}
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder addNodesBuilder() {
return getNodesFieldBuilder().addBuilder(
com.youtube.vitess.proto.Topodata.ShardReplication.Node.getDefaultInstance());
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder addNodesBuilder(
int index) {
return getNodesFieldBuilder().addBuilder(
index, com.youtube.vitess.proto.Topodata.ShardReplication.Node.getDefaultInstance());
}
/**
*
* Note there can be only one Node in this array
* for a given tablet.
*
*
* repeated .topodata.ShardReplication.Node nodes = 1;
*/
public java.util.List
getNodesBuilderList() {
return getNodesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.ShardReplication.Node, com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder, com.youtube.vitess.proto.Topodata.ShardReplication.NodeOrBuilder>
getNodesFieldBuilder() {
if (nodesBuilder_ == null) {
nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.ShardReplication.Node, com.youtube.vitess.proto.Topodata.ShardReplication.Node.Builder, com.youtube.vitess.proto.Topodata.ShardReplication.NodeOrBuilder>(
nodes_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
nodes_ = null;
}
return nodesBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.ShardReplication)
}
// @@protoc_insertion_point(class_scope:topodata.ShardReplication)
private static final com.youtube.vitess.proto.Topodata.ShardReplication DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.ShardReplication();
}
public static com.youtube.vitess.proto.Topodata.ShardReplication getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ShardReplication parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ShardReplication(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.ShardReplication getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ShardReferenceOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.ShardReference)
com.google.protobuf.MessageOrBuilder {
/**
*
* Copied from Shard.
*
*
* optional string name = 1;
*/
java.lang.String getName();
/**
*
* Copied from Shard.
*
*
* optional string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* optional .topodata.KeyRange key_range = 2;
*/
boolean hasKeyRange();
/**
* optional .topodata.KeyRange key_range = 2;
*/
com.youtube.vitess.proto.Topodata.KeyRange getKeyRange();
/**
* optional .topodata.KeyRange key_range = 2;
*/
com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder();
}
/**
*
* ShardReference is used as a pointer from a SrvKeyspace to a Shard
*
*
* Protobuf type {@code topodata.ShardReference}
*/
public static final class ShardReference extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.ShardReference)
ShardReferenceOrBuilder {
// Use ShardReference.newBuilder() to construct.
private ShardReference(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ShardReference() {
name_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ShardReference(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
com.youtube.vitess.proto.Topodata.KeyRange.Builder subBuilder = null;
if (keyRange_ != null) {
subBuilder = keyRange_.toBuilder();
}
keyRange_ = input.readMessage(com.youtube.vitess.proto.Topodata.KeyRange.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(keyRange_);
keyRange_ = subBuilder.buildPartial();
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReference_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReference_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.ShardReference.class, com.youtube.vitess.proto.Topodata.ShardReference.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Copied from Shard.
*
*
* optional string name = 1;
*/
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;
}
}
/**
*
* Copied from Shard.
*
*
* optional string name = 1;
*/
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 KEY_RANGE_FIELD_NUMBER = 2;
private com.youtube.vitess.proto.Topodata.KeyRange keyRange_;
/**
* optional .topodata.KeyRange key_range = 2;
*/
public boolean hasKeyRange() {
return keyRange_ != null;
}
/**
* optional .topodata.KeyRange key_range = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyRange getKeyRange() {
return keyRange_ == null ? com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
}
/**
* optional .topodata.KeyRange key_range = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder() {
return getKeyRange();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (keyRange_ != null) {
output.writeMessage(2, getKeyRange());
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (keyRange_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getKeyRange());
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.ShardReference)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.ShardReference other = (com.youtube.vitess.proto.Topodata.ShardReference) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && (hasKeyRange() == other.hasKeyRange());
if (hasKeyRange()) {
result = result && getKeyRange()
.equals(other.getKeyRange());
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasKeyRange()) {
hash = (37 * hash) + KEY_RANGE_FIELD_NUMBER;
hash = (53 * hash) + getKeyRange().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.ShardReference parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.ShardReference parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.ShardReference parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.ShardReference parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.ShardReference parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.ShardReference 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.youtube.vitess.proto.Topodata.ShardReference parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.ShardReference 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.youtube.vitess.proto.Topodata.ShardReference parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.ShardReference parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.ShardReference prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* ShardReference is used as a pointer from a SrvKeyspace to a Shard
*
*
* Protobuf type {@code topodata.ShardReference}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.ShardReference)
com.youtube.vitess.proto.Topodata.ShardReferenceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReference_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReference_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.ShardReference.class, com.youtube.vitess.proto.Topodata.ShardReference.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.ShardReference.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
name_ = "";
if (keyRangeBuilder_ == null) {
keyRange_ = null;
} else {
keyRange_ = null;
keyRangeBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_ShardReference_descriptor;
}
public com.youtube.vitess.proto.Topodata.ShardReference getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.ShardReference.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.ShardReference build() {
com.youtube.vitess.proto.Topodata.ShardReference result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.ShardReference buildPartial() {
com.youtube.vitess.proto.Topodata.ShardReference result = new com.youtube.vitess.proto.Topodata.ShardReference(this);
result.name_ = name_;
if (keyRangeBuilder_ == null) {
result.keyRange_ = keyRange_;
} else {
result.keyRange_ = keyRangeBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.ShardReference) {
return mergeFrom((com.youtube.vitess.proto.Topodata.ShardReference)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.ShardReference other) {
if (other == com.youtube.vitess.proto.Topodata.ShardReference.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasKeyRange()) {
mergeKeyRange(other.getKeyRange());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.ShardReference parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.ShardReference) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* Copied from Shard.
*
*
* optional string name = 1;
*/
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;
}
}
/**
*
* Copied from Shard.
*
*
* optional string name = 1;
*/
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;
}
}
/**
*
* Copied from Shard.
*
*
* optional string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Copied from Shard.
*
*
* optional string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Copied from Shard.
*
*
* optional string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.youtube.vitess.proto.Topodata.KeyRange keyRange_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder> keyRangeBuilder_;
/**
* optional .topodata.KeyRange key_range = 2;
*/
public boolean hasKeyRange() {
return keyRangeBuilder_ != null || keyRange_ != null;
}
/**
* optional .topodata.KeyRange key_range = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyRange getKeyRange() {
if (keyRangeBuilder_ == null) {
return keyRange_ == null ? com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
} else {
return keyRangeBuilder_.getMessage();
}
}
/**
* optional .topodata.KeyRange key_range = 2;
*/
public Builder setKeyRange(com.youtube.vitess.proto.Topodata.KeyRange value) {
if (keyRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
keyRange_ = value;
onChanged();
} else {
keyRangeBuilder_.setMessage(value);
}
return this;
}
/**
* optional .topodata.KeyRange key_range = 2;
*/
public Builder setKeyRange(
com.youtube.vitess.proto.Topodata.KeyRange.Builder builderForValue) {
if (keyRangeBuilder_ == null) {
keyRange_ = builderForValue.build();
onChanged();
} else {
keyRangeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* optional .topodata.KeyRange key_range = 2;
*/
public Builder mergeKeyRange(com.youtube.vitess.proto.Topodata.KeyRange value) {
if (keyRangeBuilder_ == null) {
if (keyRange_ != null) {
keyRange_ =
com.youtube.vitess.proto.Topodata.KeyRange.newBuilder(keyRange_).mergeFrom(value).buildPartial();
} else {
keyRange_ = value;
}
onChanged();
} else {
keyRangeBuilder_.mergeFrom(value);
}
return this;
}
/**
* optional .topodata.KeyRange key_range = 2;
*/
public Builder clearKeyRange() {
if (keyRangeBuilder_ == null) {
keyRange_ = null;
onChanged();
} else {
keyRange_ = null;
keyRangeBuilder_ = null;
}
return this;
}
/**
* optional .topodata.KeyRange key_range = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyRange.Builder getKeyRangeBuilder() {
onChanged();
return getKeyRangeFieldBuilder().getBuilder();
}
/**
* optional .topodata.KeyRange key_range = 2;
*/
public com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder getKeyRangeOrBuilder() {
if (keyRangeBuilder_ != null) {
return keyRangeBuilder_.getMessageOrBuilder();
} else {
return keyRange_ == null ?
com.youtube.vitess.proto.Topodata.KeyRange.getDefaultInstance() : keyRange_;
}
}
/**
* optional .topodata.KeyRange key_range = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder>
getKeyRangeFieldBuilder() {
if (keyRangeBuilder_ == null) {
keyRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.youtube.vitess.proto.Topodata.KeyRange, com.youtube.vitess.proto.Topodata.KeyRange.Builder, com.youtube.vitess.proto.Topodata.KeyRangeOrBuilder>(
getKeyRange(),
getParentForChildren(),
isClean());
keyRange_ = null;
}
return keyRangeBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.ShardReference)
}
// @@protoc_insertion_point(class_scope:topodata.ShardReference)
private static final com.youtube.vitess.proto.Topodata.ShardReference DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.ShardReference();
}
public static com.youtube.vitess.proto.Topodata.ShardReference getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ShardReference parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ShardReference(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.ShardReference getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SrvKeyspaceOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.SrvKeyspace)
com.google.protobuf.MessageOrBuilder {
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
java.util.List
getPartitionsList();
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition getPartitions(int index);
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
int getPartitionsCount();
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
java.util.List extends com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartitionOrBuilder>
getPartitionsOrBuilderList();
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartitionOrBuilder getPartitionsOrBuilder(
int index);
/**
*
* copied from Keyspace
*
*
* optional string sharding_column_name = 2;
*/
java.lang.String getShardingColumnName();
/**
*
* copied from Keyspace
*
*
* optional string sharding_column_name = 2;
*/
com.google.protobuf.ByteString
getShardingColumnNameBytes();
/**
* optional .topodata.KeyspaceIdType sharding_column_type = 3;
*/
int getShardingColumnTypeValue();
/**
* optional .topodata.KeyspaceIdType sharding_column_type = 3;
*/
com.youtube.vitess.proto.Topodata.KeyspaceIdType getShardingColumnType();
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
java.util.List
getServedFromList();
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom getServedFrom(int index);
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
int getServedFromCount();
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
java.util.List extends com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFromOrBuilder>
getServedFromOrBuilderList();
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFromOrBuilder getServedFromOrBuilder(
int index);
}
/**
*
* SrvKeyspace is a rollup node for the keyspace itself.
*
*
* Protobuf type {@code topodata.SrvKeyspace}
*/
public static final class SrvKeyspace extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.SrvKeyspace)
SrvKeyspaceOrBuilder {
// Use SrvKeyspace.newBuilder() to construct.
private SrvKeyspace(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SrvKeyspace() {
partitions_ = java.util.Collections.emptyList();
shardingColumnName_ = "";
shardingColumnType_ = 0;
servedFrom_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private SrvKeyspace(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
partitions_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
partitions_.add(
input.readMessage(com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.parser(), extensionRegistry));
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
shardingColumnName_ = s;
break;
}
case 24: {
int rawValue = input.readEnum();
shardingColumnType_ = rawValue;
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
servedFrom_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
servedFrom_.add(
input.readMessage(com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
partitions_ = java.util.Collections.unmodifiableList(partitions_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
servedFrom_ = java.util.Collections.unmodifiableList(servedFrom_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.SrvKeyspace.class, com.youtube.vitess.proto.Topodata.SrvKeyspace.Builder.class);
}
public interface KeyspacePartitionOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.SrvKeyspace.KeyspacePartition)
com.google.protobuf.MessageOrBuilder {
/**
*
* The type this partition applies to.
*
*
* optional .topodata.TabletType served_type = 1;
*/
int getServedTypeValue();
/**
*
* The type this partition applies to.
*
*
* optional .topodata.TabletType served_type = 1;
*/
com.youtube.vitess.proto.Topodata.TabletType getServedType();
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
java.util.List
getShardReferencesList();
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
com.youtube.vitess.proto.Topodata.ShardReference getShardReferences(int index);
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
int getShardReferencesCount();
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
java.util.List extends com.youtube.vitess.proto.Topodata.ShardReferenceOrBuilder>
getShardReferencesOrBuilderList();
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
com.youtube.vitess.proto.Topodata.ShardReferenceOrBuilder getShardReferencesOrBuilder(
int index);
}
/**
* Protobuf type {@code topodata.SrvKeyspace.KeyspacePartition}
*/
public static final class KeyspacePartition extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.SrvKeyspace.KeyspacePartition)
KeyspacePartitionOrBuilder {
// Use KeyspacePartition.newBuilder() to construct.
private KeyspacePartition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private KeyspacePartition() {
servedType_ = 0;
shardReferences_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private KeyspacePartition(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
servedType_ = rawValue;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
shardReferences_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
shardReferences_.add(
input.readMessage(com.youtube.vitess.proto.Topodata.ShardReference.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
shardReferences_ = java.util.Collections.unmodifiableList(shardReferences_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_KeyspacePartition_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_KeyspacePartition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.class, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder.class);
}
private int bitField0_;
public static final int SERVED_TYPE_FIELD_NUMBER = 1;
private int servedType_;
/**
*
* The type this partition applies to.
*
*
* optional .topodata.TabletType served_type = 1;
*/
public int getServedTypeValue() {
return servedType_;
}
/**
*
* The type this partition applies to.
*
*
* optional .topodata.TabletType served_type = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletType getServedType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(servedType_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
public static final int SHARD_REFERENCES_FIELD_NUMBER = 2;
private java.util.List shardReferences_;
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public java.util.List getShardReferencesList() {
return shardReferences_;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.ShardReferenceOrBuilder>
getShardReferencesOrBuilderList() {
return shardReferences_;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public int getShardReferencesCount() {
return shardReferences_.size();
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public com.youtube.vitess.proto.Topodata.ShardReference getShardReferences(int index) {
return shardReferences_.get(index);
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public com.youtube.vitess.proto.Topodata.ShardReferenceOrBuilder getShardReferencesOrBuilder(
int index) {
return shardReferences_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (servedType_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
output.writeEnum(1, servedType_);
}
for (int i = 0; i < shardReferences_.size(); i++) {
output.writeMessage(2, shardReferences_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (servedType_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, servedType_);
}
for (int i = 0; i < shardReferences_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, shardReferences_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition other = (com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition) obj;
boolean result = true;
result = result && servedType_ == other.servedType_;
result = result && getShardReferencesList()
.equals(other.getShardReferencesList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + SERVED_TYPE_FIELD_NUMBER;
hash = (53 * hash) + servedType_;
if (getShardReferencesCount() > 0) {
hash = (37 * hash) + SHARD_REFERENCES_FIELD_NUMBER;
hash = (53 * hash) + getShardReferencesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition 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.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition 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.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
* Protobuf type {@code topodata.SrvKeyspace.KeyspacePartition}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.SrvKeyspace.KeyspacePartition)
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartitionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_KeyspacePartition_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_KeyspacePartition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.class, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getShardReferencesFieldBuilder();
}
}
public Builder clear() {
super.clear();
servedType_ = 0;
if (shardReferencesBuilder_ == null) {
shardReferences_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
shardReferencesBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_KeyspacePartition_descriptor;
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition build() {
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition buildPartial() {
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition result = new com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.servedType_ = servedType_;
if (shardReferencesBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
shardReferences_ = java.util.Collections.unmodifiableList(shardReferences_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.shardReferences_ = shardReferences_;
} else {
result.shardReferences_ = shardReferencesBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition) {
return mergeFrom((com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition other) {
if (other == com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.getDefaultInstance()) return this;
if (other.servedType_ != 0) {
setServedTypeValue(other.getServedTypeValue());
}
if (shardReferencesBuilder_ == null) {
if (!other.shardReferences_.isEmpty()) {
if (shardReferences_.isEmpty()) {
shardReferences_ = other.shardReferences_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureShardReferencesIsMutable();
shardReferences_.addAll(other.shardReferences_);
}
onChanged();
}
} else {
if (!other.shardReferences_.isEmpty()) {
if (shardReferencesBuilder_.isEmpty()) {
shardReferencesBuilder_.dispose();
shardReferencesBuilder_ = null;
shardReferences_ = other.shardReferences_;
bitField0_ = (bitField0_ & ~0x00000002);
shardReferencesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getShardReferencesFieldBuilder() : null;
} else {
shardReferencesBuilder_.addAllMessages(other.shardReferences_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int servedType_ = 0;
/**
*
* The type this partition applies to.
*
*
* optional .topodata.TabletType served_type = 1;
*/
public int getServedTypeValue() {
return servedType_;
}
/**
*
* The type this partition applies to.
*
*
* optional .topodata.TabletType served_type = 1;
*/
public Builder setServedTypeValue(int value) {
servedType_ = value;
onChanged();
return this;
}
/**
*
* The type this partition applies to.
*
*
* optional .topodata.TabletType served_type = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletType getServedType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(servedType_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
/**
*
* The type this partition applies to.
*
*
* optional .topodata.TabletType served_type = 1;
*/
public Builder setServedType(com.youtube.vitess.proto.Topodata.TabletType value) {
if (value == null) {
throw new NullPointerException();
}
servedType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The type this partition applies to.
*
*
* optional .topodata.TabletType served_type = 1;
*/
public Builder clearServedType() {
servedType_ = 0;
onChanged();
return this;
}
private java.util.List shardReferences_ =
java.util.Collections.emptyList();
private void ensureShardReferencesIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
shardReferences_ = new java.util.ArrayList(shardReferences_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.ShardReference, com.youtube.vitess.proto.Topodata.ShardReference.Builder, com.youtube.vitess.proto.Topodata.ShardReferenceOrBuilder> shardReferencesBuilder_;
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public java.util.List getShardReferencesList() {
if (shardReferencesBuilder_ == null) {
return java.util.Collections.unmodifiableList(shardReferences_);
} else {
return shardReferencesBuilder_.getMessageList();
}
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public int getShardReferencesCount() {
if (shardReferencesBuilder_ == null) {
return shardReferences_.size();
} else {
return shardReferencesBuilder_.getCount();
}
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public com.youtube.vitess.proto.Topodata.ShardReference getShardReferences(int index) {
if (shardReferencesBuilder_ == null) {
return shardReferences_.get(index);
} else {
return shardReferencesBuilder_.getMessage(index);
}
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public Builder setShardReferences(
int index, com.youtube.vitess.proto.Topodata.ShardReference value) {
if (shardReferencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureShardReferencesIsMutable();
shardReferences_.set(index, value);
onChanged();
} else {
shardReferencesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public Builder setShardReferences(
int index, com.youtube.vitess.proto.Topodata.ShardReference.Builder builderForValue) {
if (shardReferencesBuilder_ == null) {
ensureShardReferencesIsMutable();
shardReferences_.set(index, builderForValue.build());
onChanged();
} else {
shardReferencesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public Builder addShardReferences(com.youtube.vitess.proto.Topodata.ShardReference value) {
if (shardReferencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureShardReferencesIsMutable();
shardReferences_.add(value);
onChanged();
} else {
shardReferencesBuilder_.addMessage(value);
}
return this;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public Builder addShardReferences(
int index, com.youtube.vitess.proto.Topodata.ShardReference value) {
if (shardReferencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureShardReferencesIsMutable();
shardReferences_.add(index, value);
onChanged();
} else {
shardReferencesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public Builder addShardReferences(
com.youtube.vitess.proto.Topodata.ShardReference.Builder builderForValue) {
if (shardReferencesBuilder_ == null) {
ensureShardReferencesIsMutable();
shardReferences_.add(builderForValue.build());
onChanged();
} else {
shardReferencesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public Builder addShardReferences(
int index, com.youtube.vitess.proto.Topodata.ShardReference.Builder builderForValue) {
if (shardReferencesBuilder_ == null) {
ensureShardReferencesIsMutable();
shardReferences_.add(index, builderForValue.build());
onChanged();
} else {
shardReferencesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public Builder addAllShardReferences(
java.lang.Iterable extends com.youtube.vitess.proto.Topodata.ShardReference> values) {
if (shardReferencesBuilder_ == null) {
ensureShardReferencesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, shardReferences_);
onChanged();
} else {
shardReferencesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public Builder clearShardReferences() {
if (shardReferencesBuilder_ == null) {
shardReferences_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
shardReferencesBuilder_.clear();
}
return this;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public Builder removeShardReferences(int index) {
if (shardReferencesBuilder_ == null) {
ensureShardReferencesIsMutable();
shardReferences_.remove(index);
onChanged();
} else {
shardReferencesBuilder_.remove(index);
}
return this;
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public com.youtube.vitess.proto.Topodata.ShardReference.Builder getShardReferencesBuilder(
int index) {
return getShardReferencesFieldBuilder().getBuilder(index);
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public com.youtube.vitess.proto.Topodata.ShardReferenceOrBuilder getShardReferencesOrBuilder(
int index) {
if (shardReferencesBuilder_ == null) {
return shardReferences_.get(index); } else {
return shardReferencesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.ShardReferenceOrBuilder>
getShardReferencesOrBuilderList() {
if (shardReferencesBuilder_ != null) {
return shardReferencesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(shardReferences_);
}
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public com.youtube.vitess.proto.Topodata.ShardReference.Builder addShardReferencesBuilder() {
return getShardReferencesFieldBuilder().addBuilder(
com.youtube.vitess.proto.Topodata.ShardReference.getDefaultInstance());
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public com.youtube.vitess.proto.Topodata.ShardReference.Builder addShardReferencesBuilder(
int index) {
return getShardReferencesFieldBuilder().addBuilder(
index, com.youtube.vitess.proto.Topodata.ShardReference.getDefaultInstance());
}
/**
*
* List of non-overlapping continuous shards sorted by range.
*
*
* repeated .topodata.ShardReference shard_references = 2;
*/
public java.util.List
getShardReferencesBuilderList() {
return getShardReferencesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.ShardReference, com.youtube.vitess.proto.Topodata.ShardReference.Builder, com.youtube.vitess.proto.Topodata.ShardReferenceOrBuilder>
getShardReferencesFieldBuilder() {
if (shardReferencesBuilder_ == null) {
shardReferencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.ShardReference, com.youtube.vitess.proto.Topodata.ShardReference.Builder, com.youtube.vitess.proto.Topodata.ShardReferenceOrBuilder>(
shardReferences_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
shardReferences_ = null;
}
return shardReferencesBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.SrvKeyspace.KeyspacePartition)
}
// @@protoc_insertion_point(class_scope:topodata.SrvKeyspace.KeyspacePartition)
private static final com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition();
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public KeyspacePartition parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new KeyspacePartition(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ServedFromOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.SrvKeyspace.ServedFrom)
com.google.protobuf.MessageOrBuilder {
/**
*
* the tablet type
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
int getTabletTypeValue();
/**
*
* the tablet type
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
com.youtube.vitess.proto.Topodata.TabletType getTabletType();
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 2;
*/
java.lang.String getKeyspace();
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 2;
*/
com.google.protobuf.ByteString
getKeyspaceBytes();
}
/**
*
* ServedFrom indicates a relationship between a TabletType and the
* keyspace name that's serving it.
*
*
* Protobuf type {@code topodata.SrvKeyspace.ServedFrom}
*/
public static final class ServedFrom extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.SrvKeyspace.ServedFrom)
ServedFromOrBuilder {
// Use ServedFrom.newBuilder() to construct.
private ServedFrom(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ServedFrom() {
tabletType_ = 0;
keyspace_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ServedFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
tabletType_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
keyspace_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_ServedFrom_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_ServedFrom_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.class, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder.class);
}
public static final int TABLET_TYPE_FIELD_NUMBER = 1;
private int tabletType_;
/**
*
* the tablet type
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public int getTabletTypeValue() {
return tabletType_;
}
/**
*
* the tablet type
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletType getTabletType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(tabletType_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
public static final int KEYSPACE_FIELD_NUMBER = 2;
private volatile java.lang.Object keyspace_;
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 2;
*/
public java.lang.String getKeyspace() {
java.lang.Object ref = keyspace_;
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();
keyspace_ = s;
return s;
}
}
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 2;
*/
public com.google.protobuf.ByteString
getKeyspaceBytes() {
java.lang.Object ref = keyspace_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyspace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (tabletType_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
output.writeEnum(1, tabletType_);
}
if (!getKeyspaceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyspace_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (tabletType_ != com.youtube.vitess.proto.Topodata.TabletType.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, tabletType_);
}
if (!getKeyspaceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyspace_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom other = (com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom) obj;
boolean result = true;
result = result && tabletType_ == other.tabletType_;
result = result && getKeyspace()
.equals(other.getKeyspace());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + TABLET_TYPE_FIELD_NUMBER;
hash = (53 * hash) + tabletType_;
hash = (37 * hash) + KEYSPACE_FIELD_NUMBER;
hash = (53 * hash) + getKeyspace().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom 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.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom 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.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* ServedFrom indicates a relationship between a TabletType and the
* keyspace name that's serving it.
*
*
* Protobuf type {@code topodata.SrvKeyspace.ServedFrom}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.SrvKeyspace.ServedFrom)
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFromOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_ServedFrom_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_ServedFrom_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.class, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
tabletType_ = 0;
keyspace_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_ServedFrom_descriptor;
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom build() {
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom buildPartial() {
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom result = new com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom(this);
result.tabletType_ = tabletType_;
result.keyspace_ = keyspace_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom) {
return mergeFrom((com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom other) {
if (other == com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.getDefaultInstance()) return this;
if (other.tabletType_ != 0) {
setTabletTypeValue(other.getTabletTypeValue());
}
if (!other.getKeyspace().isEmpty()) {
keyspace_ = other.keyspace_;
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int tabletType_ = 0;
/**
*
* the tablet type
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public int getTabletTypeValue() {
return tabletType_;
}
/**
*
* the tablet type
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder setTabletTypeValue(int value) {
tabletType_ = value;
onChanged();
return this;
}
/**
*
* the tablet type
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public com.youtube.vitess.proto.Topodata.TabletType getTabletType() {
com.youtube.vitess.proto.Topodata.TabletType result = com.youtube.vitess.proto.Topodata.TabletType.valueOf(tabletType_);
return result == null ? com.youtube.vitess.proto.Topodata.TabletType.UNRECOGNIZED : result;
}
/**
*
* the tablet type
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder setTabletType(com.youtube.vitess.proto.Topodata.TabletType value) {
if (value == null) {
throw new NullPointerException();
}
tabletType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* the tablet type
*
*
* optional .topodata.TabletType tablet_type = 1;
*/
public Builder clearTabletType() {
tabletType_ = 0;
onChanged();
return this;
}
private java.lang.Object keyspace_ = "";
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 2;
*/
public java.lang.String getKeyspace() {
java.lang.Object ref = keyspace_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
keyspace_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 2;
*/
public com.google.protobuf.ByteString
getKeyspaceBytes() {
java.lang.Object ref = keyspace_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyspace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 2;
*/
public Builder setKeyspace(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
keyspace_ = value;
onChanged();
return this;
}
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 2;
*/
public Builder clearKeyspace() {
keyspace_ = getDefaultInstance().getKeyspace();
onChanged();
return this;
}
/**
*
* the keyspace name that's serving it
*
*
* optional string keyspace = 2;
*/
public Builder setKeyspaceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
keyspace_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.SrvKeyspace.ServedFrom)
}
// @@protoc_insertion_point(class_scope:topodata.SrvKeyspace.ServedFrom)
private static final com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom();
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ServedFrom parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ServedFrom(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int PARTITIONS_FIELD_NUMBER = 1;
private java.util.List partitions_;
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public java.util.List getPartitionsList() {
return partitions_;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartitionOrBuilder>
getPartitionsOrBuilderList() {
return partitions_;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public int getPartitionsCount() {
return partitions_.size();
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition getPartitions(int index) {
return partitions_.get(index);
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartitionOrBuilder getPartitionsOrBuilder(
int index) {
return partitions_.get(index);
}
public static final int SHARDING_COLUMN_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object shardingColumnName_;
/**
*
* copied from Keyspace
*
*
* optional string sharding_column_name = 2;
*/
public java.lang.String getShardingColumnName() {
java.lang.Object ref = shardingColumnName_;
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();
shardingColumnName_ = s;
return s;
}
}
/**
*
* copied from Keyspace
*
*
* optional string sharding_column_name = 2;
*/
public com.google.protobuf.ByteString
getShardingColumnNameBytes() {
java.lang.Object ref = shardingColumnName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shardingColumnName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHARDING_COLUMN_TYPE_FIELD_NUMBER = 3;
private int shardingColumnType_;
/**
* optional .topodata.KeyspaceIdType sharding_column_type = 3;
*/
public int getShardingColumnTypeValue() {
return shardingColumnType_;
}
/**
* optional .topodata.KeyspaceIdType sharding_column_type = 3;
*/
public com.youtube.vitess.proto.Topodata.KeyspaceIdType getShardingColumnType() {
com.youtube.vitess.proto.Topodata.KeyspaceIdType result = com.youtube.vitess.proto.Topodata.KeyspaceIdType.valueOf(shardingColumnType_);
return result == null ? com.youtube.vitess.proto.Topodata.KeyspaceIdType.UNRECOGNIZED : result;
}
public static final int SERVED_FROM_FIELD_NUMBER = 4;
private java.util.List servedFrom_;
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public java.util.List getServedFromList() {
return servedFrom_;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFromOrBuilder>
getServedFromOrBuilderList() {
return servedFrom_;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public int getServedFromCount() {
return servedFrom_.size();
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom getServedFrom(int index) {
return servedFrom_.get(index);
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFromOrBuilder getServedFromOrBuilder(
int index) {
return servedFrom_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < partitions_.size(); i++) {
output.writeMessage(1, partitions_.get(i));
}
if (!getShardingColumnNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shardingColumnName_);
}
if (shardingColumnType_ != com.youtube.vitess.proto.Topodata.KeyspaceIdType.UNSET.getNumber()) {
output.writeEnum(3, shardingColumnType_);
}
for (int i = 0; i < servedFrom_.size(); i++) {
output.writeMessage(4, servedFrom_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < partitions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, partitions_.get(i));
}
if (!getShardingColumnNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shardingColumnName_);
}
if (shardingColumnType_ != com.youtube.vitess.proto.Topodata.KeyspaceIdType.UNSET.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, shardingColumnType_);
}
for (int i = 0; i < servedFrom_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, servedFrom_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.SrvKeyspace)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.SrvKeyspace other = (com.youtube.vitess.proto.Topodata.SrvKeyspace) obj;
boolean result = true;
result = result && getPartitionsList()
.equals(other.getPartitionsList());
result = result && getShardingColumnName()
.equals(other.getShardingColumnName());
result = result && shardingColumnType_ == other.shardingColumnType_;
result = result && getServedFromList()
.equals(other.getServedFromList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (getPartitionsCount() > 0) {
hash = (37 * hash) + PARTITIONS_FIELD_NUMBER;
hash = (53 * hash) + getPartitionsList().hashCode();
}
hash = (37 * hash) + SHARDING_COLUMN_NAME_FIELD_NUMBER;
hash = (53 * hash) + getShardingColumnName().hashCode();
hash = (37 * hash) + SHARDING_COLUMN_TYPE_FIELD_NUMBER;
hash = (53 * hash) + shardingColumnType_;
if (getServedFromCount() > 0) {
hash = (37 * hash) + SERVED_FROM_FIELD_NUMBER;
hash = (53 * hash) + getServedFromList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace 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.youtube.vitess.proto.Topodata.SrvKeyspace parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace 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.youtube.vitess.proto.Topodata.SrvKeyspace parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.SrvKeyspace prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* SrvKeyspace is a rollup node for the keyspace itself.
*
*
* Protobuf type {@code topodata.SrvKeyspace}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.SrvKeyspace)
com.youtube.vitess.proto.Topodata.SrvKeyspaceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.SrvKeyspace.class, com.youtube.vitess.proto.Topodata.SrvKeyspace.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.SrvKeyspace.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPartitionsFieldBuilder();
getServedFromFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (partitionsBuilder_ == null) {
partitions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
partitionsBuilder_.clear();
}
shardingColumnName_ = "";
shardingColumnType_ = 0;
if (servedFromBuilder_ == null) {
servedFrom_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
servedFromBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_SrvKeyspace_descriptor;
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.SrvKeyspace.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace build() {
com.youtube.vitess.proto.Topodata.SrvKeyspace result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace buildPartial() {
com.youtube.vitess.proto.Topodata.SrvKeyspace result = new com.youtube.vitess.proto.Topodata.SrvKeyspace(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (partitionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
partitions_ = java.util.Collections.unmodifiableList(partitions_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.partitions_ = partitions_;
} else {
result.partitions_ = partitionsBuilder_.build();
}
result.shardingColumnName_ = shardingColumnName_;
result.shardingColumnType_ = shardingColumnType_;
if (servedFromBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
servedFrom_ = java.util.Collections.unmodifiableList(servedFrom_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.servedFrom_ = servedFrom_;
} else {
result.servedFrom_ = servedFromBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.SrvKeyspace) {
return mergeFrom((com.youtube.vitess.proto.Topodata.SrvKeyspace)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.SrvKeyspace other) {
if (other == com.youtube.vitess.proto.Topodata.SrvKeyspace.getDefaultInstance()) return this;
if (partitionsBuilder_ == null) {
if (!other.partitions_.isEmpty()) {
if (partitions_.isEmpty()) {
partitions_ = other.partitions_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensurePartitionsIsMutable();
partitions_.addAll(other.partitions_);
}
onChanged();
}
} else {
if (!other.partitions_.isEmpty()) {
if (partitionsBuilder_.isEmpty()) {
partitionsBuilder_.dispose();
partitionsBuilder_ = null;
partitions_ = other.partitions_;
bitField0_ = (bitField0_ & ~0x00000001);
partitionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPartitionsFieldBuilder() : null;
} else {
partitionsBuilder_.addAllMessages(other.partitions_);
}
}
}
if (!other.getShardingColumnName().isEmpty()) {
shardingColumnName_ = other.shardingColumnName_;
onChanged();
}
if (other.shardingColumnType_ != 0) {
setShardingColumnTypeValue(other.getShardingColumnTypeValue());
}
if (servedFromBuilder_ == null) {
if (!other.servedFrom_.isEmpty()) {
if (servedFrom_.isEmpty()) {
servedFrom_ = other.servedFrom_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureServedFromIsMutable();
servedFrom_.addAll(other.servedFrom_);
}
onChanged();
}
} else {
if (!other.servedFrom_.isEmpty()) {
if (servedFromBuilder_.isEmpty()) {
servedFromBuilder_.dispose();
servedFromBuilder_ = null;
servedFrom_ = other.servedFrom_;
bitField0_ = (bitField0_ & ~0x00000008);
servedFromBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getServedFromFieldBuilder() : null;
} else {
servedFromBuilder_.addAllMessages(other.servedFrom_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.SrvKeyspace parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.SrvKeyspace) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List partitions_ =
java.util.Collections.emptyList();
private void ensurePartitionsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
partitions_ = new java.util.ArrayList(partitions_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartitionOrBuilder> partitionsBuilder_;
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public java.util.List getPartitionsList() {
if (partitionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(partitions_);
} else {
return partitionsBuilder_.getMessageList();
}
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public int getPartitionsCount() {
if (partitionsBuilder_ == null) {
return partitions_.size();
} else {
return partitionsBuilder_.getCount();
}
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition getPartitions(int index) {
if (partitionsBuilder_ == null) {
return partitions_.get(index);
} else {
return partitionsBuilder_.getMessage(index);
}
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public Builder setPartitions(
int index, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition value) {
if (partitionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePartitionsIsMutable();
partitions_.set(index, value);
onChanged();
} else {
partitionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public Builder setPartitions(
int index, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder builderForValue) {
if (partitionsBuilder_ == null) {
ensurePartitionsIsMutable();
partitions_.set(index, builderForValue.build());
onChanged();
} else {
partitionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public Builder addPartitions(com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition value) {
if (partitionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePartitionsIsMutable();
partitions_.add(value);
onChanged();
} else {
partitionsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public Builder addPartitions(
int index, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition value) {
if (partitionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePartitionsIsMutable();
partitions_.add(index, value);
onChanged();
} else {
partitionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public Builder addPartitions(
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder builderForValue) {
if (partitionsBuilder_ == null) {
ensurePartitionsIsMutable();
partitions_.add(builderForValue.build());
onChanged();
} else {
partitionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public Builder addPartitions(
int index, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder builderForValue) {
if (partitionsBuilder_ == null) {
ensurePartitionsIsMutable();
partitions_.add(index, builderForValue.build());
onChanged();
} else {
partitionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public Builder addAllPartitions(
java.lang.Iterable extends com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition> values) {
if (partitionsBuilder_ == null) {
ensurePartitionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, partitions_);
onChanged();
} else {
partitionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public Builder clearPartitions() {
if (partitionsBuilder_ == null) {
partitions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
partitionsBuilder_.clear();
}
return this;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public Builder removePartitions(int index) {
if (partitionsBuilder_ == null) {
ensurePartitionsIsMutable();
partitions_.remove(index);
onChanged();
} else {
partitionsBuilder_.remove(index);
}
return this;
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder getPartitionsBuilder(
int index) {
return getPartitionsFieldBuilder().getBuilder(index);
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartitionOrBuilder getPartitionsOrBuilder(
int index) {
if (partitionsBuilder_ == null) {
return partitions_.get(index); } else {
return partitionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartitionOrBuilder>
getPartitionsOrBuilderList() {
if (partitionsBuilder_ != null) {
return partitionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(partitions_);
}
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder addPartitionsBuilder() {
return getPartitionsFieldBuilder().addBuilder(
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.getDefaultInstance());
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder addPartitionsBuilder(
int index) {
return getPartitionsFieldBuilder().addBuilder(
index, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.getDefaultInstance());
}
/**
*
* The partitions this keyspace is serving, per tablet type.
*
*
* repeated .topodata.SrvKeyspace.KeyspacePartition partitions = 1;
*/
public java.util.List
getPartitionsBuilderList() {
return getPartitionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartitionOrBuilder>
getPartitionsFieldBuilder() {
if (partitionsBuilder_ == null) {
partitionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartition.Builder, com.youtube.vitess.proto.Topodata.SrvKeyspace.KeyspacePartitionOrBuilder>(
partitions_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
partitions_ = null;
}
return partitionsBuilder_;
}
private java.lang.Object shardingColumnName_ = "";
/**
*
* copied from Keyspace
*
*
* optional string sharding_column_name = 2;
*/
public java.lang.String getShardingColumnName() {
java.lang.Object ref = shardingColumnName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shardingColumnName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* copied from Keyspace
*
*
* optional string sharding_column_name = 2;
*/
public com.google.protobuf.ByteString
getShardingColumnNameBytes() {
java.lang.Object ref = shardingColumnName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
shardingColumnName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* copied from Keyspace
*
*
* optional string sharding_column_name = 2;
*/
public Builder setShardingColumnName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
shardingColumnName_ = value;
onChanged();
return this;
}
/**
*
* copied from Keyspace
*
*
* optional string sharding_column_name = 2;
*/
public Builder clearShardingColumnName() {
shardingColumnName_ = getDefaultInstance().getShardingColumnName();
onChanged();
return this;
}
/**
*
* copied from Keyspace
*
*
* optional string sharding_column_name = 2;
*/
public Builder setShardingColumnNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
shardingColumnName_ = value;
onChanged();
return this;
}
private int shardingColumnType_ = 0;
/**
* optional .topodata.KeyspaceIdType sharding_column_type = 3;
*/
public int getShardingColumnTypeValue() {
return shardingColumnType_;
}
/**
* optional .topodata.KeyspaceIdType sharding_column_type = 3;
*/
public Builder setShardingColumnTypeValue(int value) {
shardingColumnType_ = value;
onChanged();
return this;
}
/**
* optional .topodata.KeyspaceIdType sharding_column_type = 3;
*/
public com.youtube.vitess.proto.Topodata.KeyspaceIdType getShardingColumnType() {
com.youtube.vitess.proto.Topodata.KeyspaceIdType result = com.youtube.vitess.proto.Topodata.KeyspaceIdType.valueOf(shardingColumnType_);
return result == null ? com.youtube.vitess.proto.Topodata.KeyspaceIdType.UNRECOGNIZED : result;
}
/**
* optional .topodata.KeyspaceIdType sharding_column_type = 3;
*/
public Builder setShardingColumnType(com.youtube.vitess.proto.Topodata.KeyspaceIdType value) {
if (value == null) {
throw new NullPointerException();
}
shardingColumnType_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .topodata.KeyspaceIdType sharding_column_type = 3;
*/
public Builder clearShardingColumnType() {
shardingColumnType_ = 0;
onChanged();
return this;
}
private java.util.List servedFrom_ =
java.util.Collections.emptyList();
private void ensureServedFromIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
servedFrom_ = new java.util.ArrayList(servedFrom_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFromOrBuilder> servedFromBuilder_;
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public java.util.List getServedFromList() {
if (servedFromBuilder_ == null) {
return java.util.Collections.unmodifiableList(servedFrom_);
} else {
return servedFromBuilder_.getMessageList();
}
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public int getServedFromCount() {
if (servedFromBuilder_ == null) {
return servedFrom_.size();
} else {
return servedFromBuilder_.getCount();
}
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom getServedFrom(int index) {
if (servedFromBuilder_ == null) {
return servedFrom_.get(index);
} else {
return servedFromBuilder_.getMessage(index);
}
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public Builder setServedFrom(
int index, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom value) {
if (servedFromBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServedFromIsMutable();
servedFrom_.set(index, value);
onChanged();
} else {
servedFromBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public Builder setServedFrom(
int index, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder builderForValue) {
if (servedFromBuilder_ == null) {
ensureServedFromIsMutable();
servedFrom_.set(index, builderForValue.build());
onChanged();
} else {
servedFromBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public Builder addServedFrom(com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom value) {
if (servedFromBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServedFromIsMutable();
servedFrom_.add(value);
onChanged();
} else {
servedFromBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public Builder addServedFrom(
int index, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom value) {
if (servedFromBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServedFromIsMutable();
servedFrom_.add(index, value);
onChanged();
} else {
servedFromBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public Builder addServedFrom(
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder builderForValue) {
if (servedFromBuilder_ == null) {
ensureServedFromIsMutable();
servedFrom_.add(builderForValue.build());
onChanged();
} else {
servedFromBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public Builder addServedFrom(
int index, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder builderForValue) {
if (servedFromBuilder_ == null) {
ensureServedFromIsMutable();
servedFrom_.add(index, builderForValue.build());
onChanged();
} else {
servedFromBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public Builder addAllServedFrom(
java.lang.Iterable extends com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom> values) {
if (servedFromBuilder_ == null) {
ensureServedFromIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, servedFrom_);
onChanged();
} else {
servedFromBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public Builder clearServedFrom() {
if (servedFromBuilder_ == null) {
servedFrom_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
servedFromBuilder_.clear();
}
return this;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public Builder removeServedFrom(int index) {
if (servedFromBuilder_ == null) {
ensureServedFromIsMutable();
servedFrom_.remove(index);
onChanged();
} else {
servedFromBuilder_.remove(index);
}
return this;
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder getServedFromBuilder(
int index) {
return getServedFromFieldBuilder().getBuilder(index);
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFromOrBuilder getServedFromOrBuilder(
int index) {
if (servedFromBuilder_ == null) {
return servedFrom_.get(index); } else {
return servedFromBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public java.util.List extends com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFromOrBuilder>
getServedFromOrBuilderList() {
if (servedFromBuilder_ != null) {
return servedFromBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(servedFrom_);
}
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder addServedFromBuilder() {
return getServedFromFieldBuilder().addBuilder(
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.getDefaultInstance());
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder addServedFromBuilder(
int index) {
return getServedFromFieldBuilder().addBuilder(
index, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.getDefaultInstance());
}
/**
* repeated .topodata.SrvKeyspace.ServedFrom served_from = 4;
*/
public java.util.List
getServedFromBuilderList() {
return getServedFromFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFromOrBuilder>
getServedFromFieldBuilder() {
if (servedFromBuilder_ == null) {
servedFromBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFrom.Builder, com.youtube.vitess.proto.Topodata.SrvKeyspace.ServedFromOrBuilder>(
servedFrom_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
servedFrom_ = null;
}
return servedFromBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.SrvKeyspace)
}
// @@protoc_insertion_point(class_scope:topodata.SrvKeyspace)
private static final com.youtube.vitess.proto.Topodata.SrvKeyspace DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.SrvKeyspace();
}
public static com.youtube.vitess.proto.Topodata.SrvKeyspace getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public SrvKeyspace parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SrvKeyspace(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.SrvKeyspace getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CellInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:topodata.CellInfo)
com.google.protobuf.MessageOrBuilder {
/**
*
* ServerAddress contains the address of the server for the cell.
* The syntax of this field is topology implementation specific.
* For instance, for Zookeeper, it is a comma-separated list of
* server addresses.
*
*
* optional string server_address = 1;
*/
java.lang.String getServerAddress();
/**
*
* ServerAddress contains the address of the server for the cell.
* The syntax of this field is topology implementation specific.
* For instance, for Zookeeper, it is a comma-separated list of
* server addresses.
*
*
* optional string server_address = 1;
*/
com.google.protobuf.ByteString
getServerAddressBytes();
/**
*
* Root is the path to store data in. It is only used when talking
* to server_address.
*
*
* optional string root = 2;
*/
java.lang.String getRoot();
/**
*
* Root is the path to store data in. It is only used when talking
* to server_address.
*
*
* optional string root = 2;
*/
com.google.protobuf.ByteString
getRootBytes();
}
/**
*
* CellInfo contains information about a cell. CellInfo objects are
* stored in the global topology server, and describe how to reach
* local topology servers.
*
*
* Protobuf type {@code topodata.CellInfo}
*/
public static final class CellInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:topodata.CellInfo)
CellInfoOrBuilder {
// Use CellInfo.newBuilder() to construct.
private CellInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CellInfo() {
serverAddress_ = "";
root_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private CellInfo(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
serverAddress_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
root_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_CellInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_CellInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.CellInfo.class, com.youtube.vitess.proto.Topodata.CellInfo.Builder.class);
}
public static final int SERVER_ADDRESS_FIELD_NUMBER = 1;
private volatile java.lang.Object serverAddress_;
/**
*
* ServerAddress contains the address of the server for the cell.
* The syntax of this field is topology implementation specific.
* For instance, for Zookeeper, it is a comma-separated list of
* server addresses.
*
*
* optional string server_address = 1;
*/
public java.lang.String getServerAddress() {
java.lang.Object ref = serverAddress_;
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();
serverAddress_ = s;
return s;
}
}
/**
*
* ServerAddress contains the address of the server for the cell.
* The syntax of this field is topology implementation specific.
* For instance, for Zookeeper, it is a comma-separated list of
* server addresses.
*
*
* optional string server_address = 1;
*/
public com.google.protobuf.ByteString
getServerAddressBytes() {
java.lang.Object ref = serverAddress_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
serverAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROOT_FIELD_NUMBER = 2;
private volatile java.lang.Object root_;
/**
*
* Root is the path to store data in. It is only used when talking
* to server_address.
*
*
* optional string root = 2;
*/
public java.lang.String getRoot() {
java.lang.Object ref = root_;
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();
root_ = s;
return s;
}
}
/**
*
* Root is the path to store data in. It is only used when talking
* to server_address.
*
*
* optional string root = 2;
*/
public com.google.protobuf.ByteString
getRootBytes() {
java.lang.Object ref = root_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
root_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getServerAddressBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serverAddress_);
}
if (!getRootBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, root_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getServerAddressBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serverAddress_);
}
if (!getRootBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, root_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.youtube.vitess.proto.Topodata.CellInfo)) {
return super.equals(obj);
}
com.youtube.vitess.proto.Topodata.CellInfo other = (com.youtube.vitess.proto.Topodata.CellInfo) obj;
boolean result = true;
result = result && getServerAddress()
.equals(other.getServerAddress());
result = result && getRoot()
.equals(other.getRoot());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + SERVER_ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getServerAddress().hashCode();
hash = (37 * hash) + ROOT_FIELD_NUMBER;
hash = (53 * hash) + getRoot().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.youtube.vitess.proto.Topodata.CellInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.CellInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.CellInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.youtube.vitess.proto.Topodata.CellInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.youtube.vitess.proto.Topodata.CellInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.CellInfo 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.youtube.vitess.proto.Topodata.CellInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.CellInfo 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.youtube.vitess.proto.Topodata.CellInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.youtube.vitess.proto.Topodata.CellInfo parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.youtube.vitess.proto.Topodata.CellInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* CellInfo contains information about a cell. CellInfo objects are
* stored in the global topology server, and describe how to reach
* local topology servers.
*
*
* Protobuf type {@code topodata.CellInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:topodata.CellInfo)
com.youtube.vitess.proto.Topodata.CellInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_CellInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_CellInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.youtube.vitess.proto.Topodata.CellInfo.class, com.youtube.vitess.proto.Topodata.CellInfo.Builder.class);
}
// Construct using com.youtube.vitess.proto.Topodata.CellInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
serverAddress_ = "";
root_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.youtube.vitess.proto.Topodata.internal_static_topodata_CellInfo_descriptor;
}
public com.youtube.vitess.proto.Topodata.CellInfo getDefaultInstanceForType() {
return com.youtube.vitess.proto.Topodata.CellInfo.getDefaultInstance();
}
public com.youtube.vitess.proto.Topodata.CellInfo build() {
com.youtube.vitess.proto.Topodata.CellInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.youtube.vitess.proto.Topodata.CellInfo buildPartial() {
com.youtube.vitess.proto.Topodata.CellInfo result = new com.youtube.vitess.proto.Topodata.CellInfo(this);
result.serverAddress_ = serverAddress_;
result.root_ = root_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.youtube.vitess.proto.Topodata.CellInfo) {
return mergeFrom((com.youtube.vitess.proto.Topodata.CellInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.youtube.vitess.proto.Topodata.CellInfo other) {
if (other == com.youtube.vitess.proto.Topodata.CellInfo.getDefaultInstance()) return this;
if (!other.getServerAddress().isEmpty()) {
serverAddress_ = other.serverAddress_;
onChanged();
}
if (!other.getRoot().isEmpty()) {
root_ = other.root_;
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.youtube.vitess.proto.Topodata.CellInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.youtube.vitess.proto.Topodata.CellInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object serverAddress_ = "";
/**
*
* ServerAddress contains the address of the server for the cell.
* The syntax of this field is topology implementation specific.
* For instance, for Zookeeper, it is a comma-separated list of
* server addresses.
*
*
* optional string server_address = 1;
*/
public java.lang.String getServerAddress() {
java.lang.Object ref = serverAddress_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
serverAddress_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ServerAddress contains the address of the server for the cell.
* The syntax of this field is topology implementation specific.
* For instance, for Zookeeper, it is a comma-separated list of
* server addresses.
*
*
* optional string server_address = 1;
*/
public com.google.protobuf.ByteString
getServerAddressBytes() {
java.lang.Object ref = serverAddress_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
serverAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ServerAddress contains the address of the server for the cell.
* The syntax of this field is topology implementation specific.
* For instance, for Zookeeper, it is a comma-separated list of
* server addresses.
*
*
* optional string server_address = 1;
*/
public Builder setServerAddress(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
serverAddress_ = value;
onChanged();
return this;
}
/**
*
* ServerAddress contains the address of the server for the cell.
* The syntax of this field is topology implementation specific.
* For instance, for Zookeeper, it is a comma-separated list of
* server addresses.
*
*
* optional string server_address = 1;
*/
public Builder clearServerAddress() {
serverAddress_ = getDefaultInstance().getServerAddress();
onChanged();
return this;
}
/**
*
* ServerAddress contains the address of the server for the cell.
* The syntax of this field is topology implementation specific.
* For instance, for Zookeeper, it is a comma-separated list of
* server addresses.
*
*
* optional string server_address = 1;
*/
public Builder setServerAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
serverAddress_ = value;
onChanged();
return this;
}
private java.lang.Object root_ = "";
/**
*
* Root is the path to store data in. It is only used when talking
* to server_address.
*
*
* optional string root = 2;
*/
public java.lang.String getRoot() {
java.lang.Object ref = root_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
root_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Root is the path to store data in. It is only used when talking
* to server_address.
*
*
* optional string root = 2;
*/
public com.google.protobuf.ByteString
getRootBytes() {
java.lang.Object ref = root_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
root_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Root is the path to store data in. It is only used when talking
* to server_address.
*
*
* optional string root = 2;
*/
public Builder setRoot(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
root_ = value;
onChanged();
return this;
}
/**
*
* Root is the path to store data in. It is only used when talking
* to server_address.
*
*
* optional string root = 2;
*/
public Builder clearRoot() {
root_ = getDefaultInstance().getRoot();
onChanged();
return this;
}
/**
*
* Root is the path to store data in. It is only used when talking
* to server_address.
*
*
* optional string root = 2;
*/
public Builder setRootBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
root_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:topodata.CellInfo)
}
// @@protoc_insertion_point(class_scope:topodata.CellInfo)
private static final com.youtube.vitess.proto.Topodata.CellInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.youtube.vitess.proto.Topodata.CellInfo();
}
public static com.youtube.vitess.proto.Topodata.CellInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CellInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CellInfo(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.youtube.vitess.proto.Topodata.CellInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_KeyRange_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_KeyRange_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_TabletAlias_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_TabletAlias_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_Tablet_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_Tablet_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_Tablet_PortMapEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_Tablet_PortMapEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_Tablet_TagsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_Tablet_TagsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_Shard_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_Shard_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_Shard_ServedType_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_Shard_ServedType_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_Shard_SourceShard_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_Shard_SourceShard_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_Shard_TabletControl_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_Shard_TabletControl_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_Keyspace_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_Keyspace_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_Keyspace_ServedFrom_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_Keyspace_ServedFrom_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_ShardReplication_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_ShardReplication_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_ShardReplication_Node_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_ShardReplication_Node_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_ShardReference_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_ShardReference_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_SrvKeyspace_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_SrvKeyspace_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_SrvKeyspace_KeyspacePartition_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_SrvKeyspace_KeyspacePartition_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_SrvKeyspace_ServedFrom_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_SrvKeyspace_ServedFrom_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_topodata_CellInfo_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_topodata_CellInfo_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\016topodata.proto\022\010topodata\"&\n\010KeyRange\022\r" +
"\n\005start\030\001 \001(\014\022\013\n\003end\030\002 \001(\014\"(\n\013TabletAlia" +
"s\022\014\n\004cell\030\001 \001(\t\022\013\n\003uid\030\002 \001(\r\"\220\003\n\006Tablet\022" +
"$\n\005alias\030\001 \001(\0132\025.topodata.TabletAlias\022\020\n" +
"\010hostname\030\002 \001(\t\022\n\n\002ip\030\003 \001(\t\022/\n\010port_map\030" +
"\004 \003(\0132\035.topodata.Tablet.PortMapEntry\022\020\n\010" +
"keyspace\030\005 \001(\t\022\r\n\005shard\030\006 \001(\t\022%\n\tkey_ran" +
"ge\030\007 \001(\0132\022.topodata.KeyRange\022\"\n\004type\030\010 \001" +
"(\0162\024.topodata.TabletType\022\030\n\020db_name_over" +
"ride\030\t \001(\t\022(\n\004tags\030\n \003(\0132\032.topodata.Tabl",
"et.TagsEntry\032.\n\014PortMapEntry\022\013\n\003key\030\001 \001(" +
"\t\022\r\n\005value\030\002 \001(\005:\0028\001\032+\n\tTagsEntry\022\013\n\003key" +
"\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001J\004\010\013\020\014\"\313\004\n\005Shar" +
"d\022+\n\014master_alias\030\001 \001(\0132\025.topodata.Table" +
"tAlias\022%\n\tkey_range\030\002 \001(\0132\022.topodata.Key" +
"Range\0220\n\014served_types\030\003 \003(\0132\032.topodata.S" +
"hard.ServedType\0222\n\rsource_shards\030\004 \003(\0132\033" +
".topodata.Shard.SourceShard\022\r\n\005cells\030\005 \003" +
"(\t\0226\n\017tablet_controls\030\006 \003(\0132\035.topodata.S" +
"hard.TabletControl\032F\n\nServedType\022)\n\013tabl",
"et_type\030\001 \001(\0162\024.topodata.TabletType\022\r\n\005c" +
"ells\030\002 \003(\t\032r\n\013SourceShard\022\013\n\003uid\030\001 \001(\r\022\020" +
"\n\010keyspace\030\002 \001(\t\022\r\n\005shard\030\003 \001(\t\022%\n\tkey_r" +
"ange\030\004 \001(\0132\022.topodata.KeyRange\022\016\n\006tables" +
"\030\005 \003(\t\032\204\001\n\rTabletControl\022)\n\013tablet_type\030" +
"\001 \001(\0162\024.topodata.TabletType\022\r\n\005cells\030\002 \003" +
"(\t\022\035\n\025disable_query_service\030\003 \001(\010\022\032\n\022bla" +
"cklisted_tables\030\004 \003(\t\"\365\001\n\010Keyspace\022\034\n\024sh" +
"arding_column_name\030\001 \001(\t\0226\n\024sharding_col" +
"umn_type\030\002 \001(\0162\030.topodata.KeyspaceIdType",
"\0223\n\014served_froms\030\004 \003(\0132\035.topodata.Keyspa" +
"ce.ServedFrom\032X\n\nServedFrom\022)\n\013tablet_ty" +
"pe\030\001 \001(\0162\024.topodata.TabletType\022\r\n\005cells\030" +
"\002 \003(\t\022\020\n\010keyspace\030\003 \001(\tJ\004\010\003\020\004\"w\n\020ShardRe" +
"plication\022.\n\005nodes\030\001 \003(\0132\037.topodata.Shar" +
"dReplication.Node\0323\n\004Node\022+\n\014tablet_alia" +
"s\030\001 \001(\0132\025.topodata.TabletAlias\"E\n\016ShardR" +
"eference\022\014\n\004name\030\001 \001(\t\022%\n\tkey_range\030\002 \001(" +
"\0132\022.topodata.KeyRange\"\234\003\n\013SrvKeyspace\022;\n" +
"\npartitions\030\001 \003(\0132\'.topodata.SrvKeyspace",
".KeyspacePartition\022\034\n\024sharding_column_na" +
"me\030\002 \001(\t\0226\n\024sharding_column_type\030\003 \001(\0162\030" +
".topodata.KeyspaceIdType\0225\n\013served_from\030" +
"\004 \003(\0132 .topodata.SrvKeyspace.ServedFrom\032" +
"r\n\021KeyspacePartition\022)\n\013served_type\030\001 \001(" +
"\0162\024.topodata.TabletType\0222\n\020shard_referen" +
"ces\030\002 \003(\0132\030.topodata.ShardReference\032I\n\nS" +
"ervedFrom\022)\n\013tablet_type\030\001 \001(\0162\024.topodat" +
"a.TabletType\022\020\n\010keyspace\030\002 \001(\tJ\004\010\005\020\006\"0\n\010" +
"CellInfo\022\026\n\016server_address\030\001 \001(\t\022\014\n\004root",
"\030\002 \001(\t*2\n\016KeyspaceIdType\022\t\n\005UNSET\020\000\022\n\n\006U" +
"INT64\020\001\022\t\n\005BYTES\020\002*\220\001\n\nTabletType\022\013\n\007UNK" +
"NOWN\020\000\022\n\n\006MASTER\020\001\022\013\n\007REPLICA\020\002\022\n\n\006RDONL" +
"Y\020\003\022\t\n\005BATCH\020\003\022\t\n\005SPARE\020\004\022\020\n\014EXPERIMENTA" +
"L\020\005\022\n\n\006BACKUP\020\006\022\013\n\007RESTORE\020\007\022\013\n\007DRAINED\020" +
"\010\032\002\020\001B\032\n\030com.youtube.vitess.protob\006proto" +
"3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_topodata_KeyRange_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_topodata_KeyRange_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_KeyRange_descriptor,
new java.lang.String[] { "Start", "End", });
internal_static_topodata_TabletAlias_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_topodata_TabletAlias_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_TabletAlias_descriptor,
new java.lang.String[] { "Cell", "Uid", });
internal_static_topodata_Tablet_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_topodata_Tablet_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_Tablet_descriptor,
new java.lang.String[] { "Alias", "Hostname", "Ip", "PortMap", "Keyspace", "Shard", "KeyRange", "Type", "DbNameOverride", "Tags", });
internal_static_topodata_Tablet_PortMapEntry_descriptor =
internal_static_topodata_Tablet_descriptor.getNestedTypes().get(0);
internal_static_topodata_Tablet_PortMapEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_Tablet_PortMapEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_topodata_Tablet_TagsEntry_descriptor =
internal_static_topodata_Tablet_descriptor.getNestedTypes().get(1);
internal_static_topodata_Tablet_TagsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_Tablet_TagsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_topodata_Shard_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_topodata_Shard_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_Shard_descriptor,
new java.lang.String[] { "MasterAlias", "KeyRange", "ServedTypes", "SourceShards", "Cells", "TabletControls", });
internal_static_topodata_Shard_ServedType_descriptor =
internal_static_topodata_Shard_descriptor.getNestedTypes().get(0);
internal_static_topodata_Shard_ServedType_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_Shard_ServedType_descriptor,
new java.lang.String[] { "TabletType", "Cells", });
internal_static_topodata_Shard_SourceShard_descriptor =
internal_static_topodata_Shard_descriptor.getNestedTypes().get(1);
internal_static_topodata_Shard_SourceShard_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_Shard_SourceShard_descriptor,
new java.lang.String[] { "Uid", "Keyspace", "Shard", "KeyRange", "Tables", });
internal_static_topodata_Shard_TabletControl_descriptor =
internal_static_topodata_Shard_descriptor.getNestedTypes().get(2);
internal_static_topodata_Shard_TabletControl_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_Shard_TabletControl_descriptor,
new java.lang.String[] { "TabletType", "Cells", "DisableQueryService", "BlacklistedTables", });
internal_static_topodata_Keyspace_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_topodata_Keyspace_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_Keyspace_descriptor,
new java.lang.String[] { "ShardingColumnName", "ShardingColumnType", "ServedFroms", });
internal_static_topodata_Keyspace_ServedFrom_descriptor =
internal_static_topodata_Keyspace_descriptor.getNestedTypes().get(0);
internal_static_topodata_Keyspace_ServedFrom_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_Keyspace_ServedFrom_descriptor,
new java.lang.String[] { "TabletType", "Cells", "Keyspace", });
internal_static_topodata_ShardReplication_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_topodata_ShardReplication_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_ShardReplication_descriptor,
new java.lang.String[] { "Nodes", });
internal_static_topodata_ShardReplication_Node_descriptor =
internal_static_topodata_ShardReplication_descriptor.getNestedTypes().get(0);
internal_static_topodata_ShardReplication_Node_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_ShardReplication_Node_descriptor,
new java.lang.String[] { "TabletAlias", });
internal_static_topodata_ShardReference_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_topodata_ShardReference_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_ShardReference_descriptor,
new java.lang.String[] { "Name", "KeyRange", });
internal_static_topodata_SrvKeyspace_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_topodata_SrvKeyspace_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_SrvKeyspace_descriptor,
new java.lang.String[] { "Partitions", "ShardingColumnName", "ShardingColumnType", "ServedFrom", });
internal_static_topodata_SrvKeyspace_KeyspacePartition_descriptor =
internal_static_topodata_SrvKeyspace_descriptor.getNestedTypes().get(0);
internal_static_topodata_SrvKeyspace_KeyspacePartition_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_SrvKeyspace_KeyspacePartition_descriptor,
new java.lang.String[] { "ServedType", "ShardReferences", });
internal_static_topodata_SrvKeyspace_ServedFrom_descriptor =
internal_static_topodata_SrvKeyspace_descriptor.getNestedTypes().get(1);
internal_static_topodata_SrvKeyspace_ServedFrom_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_SrvKeyspace_ServedFrom_descriptor,
new java.lang.String[] { "TabletType", "Keyspace", });
internal_static_topodata_CellInfo_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_topodata_CellInfo_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_topodata_CellInfo_descriptor,
new java.lang.String[] { "ServerAddress", "Root", });
}
// @@protoc_insertion_point(outer_class_scope)
}