com.yelp.nrtsearch.server.grpc.StartIndexRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clientlib Show documentation
Show all versions of clientlib Show documentation
GRPC Clientlib for nrtSearch
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yelp/nrtsearch/luceneserver.proto
// Protobuf Java Version: 3.25.3
package com.yelp.nrtsearch.server.grpc;
/**
*
* Start the index
*
*
* Protobuf type {@code luceneserver.StartIndexRequest}
*/
public final class StartIndexRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.StartIndexRequest)
StartIndexRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use StartIndexRequest.newBuilder() to construct.
private StartIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StartIndexRequest() {
indexName_ = "";
mode_ = 0;
primaryAddress_ = "";
primaryDiscoveryFile_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StartIndexRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.LuceneServerProto.internal_static_luceneserver_StartIndexRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.LuceneServerProto.internal_static_luceneserver_StartIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.StartIndexRequest.class, com.yelp.nrtsearch.server.grpc.StartIndexRequest.Builder.class);
}
private int bitField0_;
public static final int INDEXNAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object indexName_ = "";
/**
*
*index name
*
*
* string indexName = 1;
* @return The indexName.
*/
@java.lang.Override
public java.lang.String getIndexName() {
java.lang.Object ref = indexName_;
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();
indexName_ = s;
return s;
}
}
/**
*
*index name
*
*
* string indexName = 1;
* @return The bytes for indexName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIndexNameBytes() {
java.lang.Object ref = indexName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
indexName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MODE_FIELD_NUMBER = 2;
private int mode_ = 0;
/**
*
*Standalone, NRT primary or replica mode to start this index.
*
*
* .luceneserver.Mode mode = 2;
* @return The enum numeric value on the wire for mode.
*/
@java.lang.Override public int getModeValue() {
return mode_;
}
/**
*
*Standalone, NRT primary or replica mode to start this index.
*
*
* .luceneserver.Mode mode = 2;
* @return The mode.
*/
@java.lang.Override public com.yelp.nrtsearch.server.grpc.Mode getMode() {
com.yelp.nrtsearch.server.grpc.Mode result = com.yelp.nrtsearch.server.grpc.Mode.forNumber(mode_);
return result == null ? com.yelp.nrtsearch.server.grpc.Mode.UNRECOGNIZED : result;
}
public static final int PRIMARYGEN_FIELD_NUMBER = 3;
private long primaryGen_ = 0L;
/**
*
*primary, the generation of this primary (should increment each time a new primary starts for this index)
*
*
* int64 primaryGen = 3;
* @return The primaryGen.
*/
@java.lang.Override
public long getPrimaryGen() {
return primaryGen_;
}
public static final int PRIMARYADDRESS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object primaryAddress_ = "";
/**
*
*replica, the IP address or host name of the remote primary
*
*
* string primaryAddress = 4;
* @return The primaryAddress.
*/
@java.lang.Override
public java.lang.String getPrimaryAddress() {
java.lang.Object ref = primaryAddress_;
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();
primaryAddress_ = s;
return s;
}
}
/**
*
*replica, the IP address or host name of the remote primary
*
*
* string primaryAddress = 4;
* @return The bytes for primaryAddress.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPrimaryAddressBytes() {
java.lang.Object ref = primaryAddress_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
primaryAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PORT_FIELD_NUMBER = 5;
private int port_ = 0;
/**
*
*replica, the TCP port of the remote primary
*
*
* int32 port = 5;
* @return The port.
*/
@java.lang.Override
public int getPort() {
return port_;
}
public static final int RESTORE_FIELD_NUMBER = 6;
private com.yelp.nrtsearch.server.grpc.RestoreIndex restore_;
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
* @return Whether the restore field is set.
*/
@java.lang.Override
public boolean hasRestore() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
* @return The restore.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.RestoreIndex getRestore() {
return restore_ == null ? com.yelp.nrtsearch.server.grpc.RestoreIndex.getDefaultInstance() : restore_;
}
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.RestoreIndexOrBuilder getRestoreOrBuilder() {
return restore_ == null ? com.yelp.nrtsearch.server.grpc.RestoreIndex.getDefaultInstance() : restore_;
}
public static final int PRIMARYDISCOVERYFILE_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object primaryDiscoveryFile_ = "";
/**
*
* replica, location of discovery file containing primary host/port. Used if primaryAddress is empty. If port is specified in this request, it overrides the value in the file
*
*
* string primaryDiscoveryFile = 7;
* @return The primaryDiscoveryFile.
*/
@java.lang.Override
public java.lang.String getPrimaryDiscoveryFile() {
java.lang.Object ref = primaryDiscoveryFile_;
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();
primaryDiscoveryFile_ = s;
return s;
}
}
/**
*
* replica, location of discovery file containing primary host/port. Used if primaryAddress is empty. If port is specified in this request, it overrides the value in the file
*
*
* string primaryDiscoveryFile = 7;
* @return The bytes for primaryDiscoveryFile.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPrimaryDiscoveryFileBytes() {
java.lang.Object ref = primaryDiscoveryFile_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
primaryDiscoveryFile_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, indexName_);
}
if (mode_ != com.yelp.nrtsearch.server.grpc.Mode.STANDALONE.getNumber()) {
output.writeEnum(2, mode_);
}
if (primaryGen_ != 0L) {
output.writeInt64(3, primaryGen_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryAddress_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, primaryAddress_);
}
if (port_ != 0) {
output.writeInt32(5, port_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(6, getRestore());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryDiscoveryFile_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, primaryDiscoveryFile_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, indexName_);
}
if (mode_ != com.yelp.nrtsearch.server.grpc.Mode.STANDALONE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, mode_);
}
if (primaryGen_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, primaryGen_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryAddress_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, primaryAddress_);
}
if (port_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, port_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getRestore());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryDiscoveryFile_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, primaryDiscoveryFile_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.yelp.nrtsearch.server.grpc.StartIndexRequest)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.StartIndexRequest other = (com.yelp.nrtsearch.server.grpc.StartIndexRequest) obj;
if (!getIndexName()
.equals(other.getIndexName())) return false;
if (mode_ != other.mode_) return false;
if (getPrimaryGen()
!= other.getPrimaryGen()) return false;
if (!getPrimaryAddress()
.equals(other.getPrimaryAddress())) return false;
if (getPort()
!= other.getPort()) return false;
if (hasRestore() != other.hasRestore()) return false;
if (hasRestore()) {
if (!getRestore()
.equals(other.getRestore())) return false;
}
if (!getPrimaryDiscoveryFile()
.equals(other.getPrimaryDiscoveryFile())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + INDEXNAME_FIELD_NUMBER;
hash = (53 * hash) + getIndexName().hashCode();
hash = (37 * hash) + MODE_FIELD_NUMBER;
hash = (53 * hash) + mode_;
hash = (37 * hash) + PRIMARYGEN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getPrimaryGen());
hash = (37 * hash) + PRIMARYADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getPrimaryAddress().hashCode();
hash = (37 * hash) + PORT_FIELD_NUMBER;
hash = (53 * hash) + getPort();
if (hasRestore()) {
hash = (37 * hash) + RESTORE_FIELD_NUMBER;
hash = (53 * hash) + getRestore().hashCode();
}
hash = (37 * hash) + PRIMARYDISCOVERYFILE_FIELD_NUMBER;
hash = (53 * hash) + getPrimaryDiscoveryFile().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest 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.yelp.nrtsearch.server.grpc.StartIndexRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest 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.yelp.nrtsearch.server.grpc.StartIndexRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.yelp.nrtsearch.server.grpc.StartIndexRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Start the index
*
*
* Protobuf type {@code luceneserver.StartIndexRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.StartIndexRequest)
com.yelp.nrtsearch.server.grpc.StartIndexRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.LuceneServerProto.internal_static_luceneserver_StartIndexRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.LuceneServerProto.internal_static_luceneserver_StartIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.StartIndexRequest.class, com.yelp.nrtsearch.server.grpc.StartIndexRequest.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.StartIndexRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getRestoreFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
indexName_ = "";
mode_ = 0;
primaryGen_ = 0L;
primaryAddress_ = "";
port_ = 0;
restore_ = null;
if (restoreBuilder_ != null) {
restoreBuilder_.dispose();
restoreBuilder_ = null;
}
primaryDiscoveryFile_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.LuceneServerProto.internal_static_luceneserver_StartIndexRequest_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.StartIndexRequest getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.StartIndexRequest.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.StartIndexRequest build() {
com.yelp.nrtsearch.server.grpc.StartIndexRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.StartIndexRequest buildPartial() {
com.yelp.nrtsearch.server.grpc.StartIndexRequest result = new com.yelp.nrtsearch.server.grpc.StartIndexRequest(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.StartIndexRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.indexName_ = indexName_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.mode_ = mode_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.primaryGen_ = primaryGen_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.primaryAddress_ = primaryAddress_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.port_ = port_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.restore_ = restoreBuilder_ == null
? restore_
: restoreBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.primaryDiscoveryFile_ = primaryDiscoveryFile_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.yelp.nrtsearch.server.grpc.StartIndexRequest) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.StartIndexRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.StartIndexRequest other) {
if (other == com.yelp.nrtsearch.server.grpc.StartIndexRequest.getDefaultInstance()) return this;
if (!other.getIndexName().isEmpty()) {
indexName_ = other.indexName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.mode_ != 0) {
setModeValue(other.getModeValue());
}
if (other.getPrimaryGen() != 0L) {
setPrimaryGen(other.getPrimaryGen());
}
if (!other.getPrimaryAddress().isEmpty()) {
primaryAddress_ = other.primaryAddress_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.getPort() != 0) {
setPort(other.getPort());
}
if (other.hasRestore()) {
mergeRestore(other.getRestore());
}
if (!other.getPrimaryDiscoveryFile().isEmpty()) {
primaryDiscoveryFile_ = other.primaryDiscoveryFile_;
bitField0_ |= 0x00000040;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
indexName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
mode_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
primaryGen_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34: {
primaryAddress_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 40: {
port_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
case 50: {
input.readMessage(
getRestoreFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58: {
primaryDiscoveryFile_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 58
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object indexName_ = "";
/**
*
*index name
*
*
* string indexName = 1;
* @return The indexName.
*/
public java.lang.String getIndexName() {
java.lang.Object ref = indexName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
indexName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*index name
*
*
* string indexName = 1;
* @return The bytes for indexName.
*/
public com.google.protobuf.ByteString
getIndexNameBytes() {
java.lang.Object ref = indexName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
indexName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*index name
*
*
* string indexName = 1;
* @param value The indexName to set.
* @return This builder for chaining.
*/
public Builder setIndexName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
indexName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*index name
*
*
* string indexName = 1;
* @return This builder for chaining.
*/
public Builder clearIndexName() {
indexName_ = getDefaultInstance().getIndexName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*index name
*
*
* string indexName = 1;
* @param value The bytes for indexName to set.
* @return This builder for chaining.
*/
public Builder setIndexNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
indexName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int mode_ = 0;
/**
*
*Standalone, NRT primary or replica mode to start this index.
*
*
* .luceneserver.Mode mode = 2;
* @return The enum numeric value on the wire for mode.
*/
@java.lang.Override public int getModeValue() {
return mode_;
}
/**
*
*Standalone, NRT primary or replica mode to start this index.
*
*
* .luceneserver.Mode mode = 2;
* @param value The enum numeric value on the wire for mode to set.
* @return This builder for chaining.
*/
public Builder setModeValue(int value) {
mode_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*Standalone, NRT primary or replica mode to start this index.
*
*
* .luceneserver.Mode mode = 2;
* @return The mode.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Mode getMode() {
com.yelp.nrtsearch.server.grpc.Mode result = com.yelp.nrtsearch.server.grpc.Mode.forNumber(mode_);
return result == null ? com.yelp.nrtsearch.server.grpc.Mode.UNRECOGNIZED : result;
}
/**
*
*Standalone, NRT primary or replica mode to start this index.
*
*
* .luceneserver.Mode mode = 2;
* @param value The mode to set.
* @return This builder for chaining.
*/
public Builder setMode(com.yelp.nrtsearch.server.grpc.Mode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
mode_ = value.getNumber();
onChanged();
return this;
}
/**
*
*Standalone, NRT primary or replica mode to start this index.
*
*
* .luceneserver.Mode mode = 2;
* @return This builder for chaining.
*/
public Builder clearMode() {
bitField0_ = (bitField0_ & ~0x00000002);
mode_ = 0;
onChanged();
return this;
}
private long primaryGen_ ;
/**
*
*primary, the generation of this primary (should increment each time a new primary starts for this index)
*
*
* int64 primaryGen = 3;
* @return The primaryGen.
*/
@java.lang.Override
public long getPrimaryGen() {
return primaryGen_;
}
/**
*
*primary, the generation of this primary (should increment each time a new primary starts for this index)
*
*
* int64 primaryGen = 3;
* @param value The primaryGen to set.
* @return This builder for chaining.
*/
public Builder setPrimaryGen(long value) {
primaryGen_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*primary, the generation of this primary (should increment each time a new primary starts for this index)
*
*
* int64 primaryGen = 3;
* @return This builder for chaining.
*/
public Builder clearPrimaryGen() {
bitField0_ = (bitField0_ & ~0x00000004);
primaryGen_ = 0L;
onChanged();
return this;
}
private java.lang.Object primaryAddress_ = "";
/**
*
*replica, the IP address or host name of the remote primary
*
*
* string primaryAddress = 4;
* @return The primaryAddress.
*/
public java.lang.String getPrimaryAddress() {
java.lang.Object ref = primaryAddress_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
primaryAddress_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*replica, the IP address or host name of the remote primary
*
*
* string primaryAddress = 4;
* @return The bytes for primaryAddress.
*/
public com.google.protobuf.ByteString
getPrimaryAddressBytes() {
java.lang.Object ref = primaryAddress_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
primaryAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*replica, the IP address or host name of the remote primary
*
*
* string primaryAddress = 4;
* @param value The primaryAddress to set.
* @return This builder for chaining.
*/
public Builder setPrimaryAddress(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
primaryAddress_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*replica, the IP address or host name of the remote primary
*
*
* string primaryAddress = 4;
* @return This builder for chaining.
*/
public Builder clearPrimaryAddress() {
primaryAddress_ = getDefaultInstance().getPrimaryAddress();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*replica, the IP address or host name of the remote primary
*
*
* string primaryAddress = 4;
* @param value The bytes for primaryAddress to set.
* @return This builder for chaining.
*/
public Builder setPrimaryAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
primaryAddress_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private int port_ ;
/**
*
*replica, the TCP port of the remote primary
*
*
* int32 port = 5;
* @return The port.
*/
@java.lang.Override
public int getPort() {
return port_;
}
/**
*
*replica, the TCP port of the remote primary
*
*
* int32 port = 5;
* @param value The port to set.
* @return This builder for chaining.
*/
public Builder setPort(int value) {
port_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*replica, the TCP port of the remote primary
*
*
* int32 port = 5;
* @return This builder for chaining.
*/
public Builder clearPort() {
bitField0_ = (bitField0_ & ~0x00000010);
port_ = 0;
onChanged();
return this;
}
private com.yelp.nrtsearch.server.grpc.RestoreIndex restore_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.RestoreIndex, com.yelp.nrtsearch.server.grpc.RestoreIndex.Builder, com.yelp.nrtsearch.server.grpc.RestoreIndexOrBuilder> restoreBuilder_;
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
* @return Whether the restore field is set.
*/
public boolean hasRestore() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
* @return The restore.
*/
public com.yelp.nrtsearch.server.grpc.RestoreIndex getRestore() {
if (restoreBuilder_ == null) {
return restore_ == null ? com.yelp.nrtsearch.server.grpc.RestoreIndex.getDefaultInstance() : restore_;
} else {
return restoreBuilder_.getMessage();
}
}
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
*/
public Builder setRestore(com.yelp.nrtsearch.server.grpc.RestoreIndex value) {
if (restoreBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
restore_ = value;
} else {
restoreBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
*/
public Builder setRestore(
com.yelp.nrtsearch.server.grpc.RestoreIndex.Builder builderForValue) {
if (restoreBuilder_ == null) {
restore_ = builderForValue.build();
} else {
restoreBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
*/
public Builder mergeRestore(com.yelp.nrtsearch.server.grpc.RestoreIndex value) {
if (restoreBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
restore_ != null &&
restore_ != com.yelp.nrtsearch.server.grpc.RestoreIndex.getDefaultInstance()) {
getRestoreBuilder().mergeFrom(value);
} else {
restore_ = value;
}
} else {
restoreBuilder_.mergeFrom(value);
}
if (restore_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
*/
public Builder clearRestore() {
bitField0_ = (bitField0_ & ~0x00000020);
restore_ = null;
if (restoreBuilder_ != null) {
restoreBuilder_.dispose();
restoreBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
*/
public com.yelp.nrtsearch.server.grpc.RestoreIndex.Builder getRestoreBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getRestoreFieldBuilder().getBuilder();
}
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
*/
public com.yelp.nrtsearch.server.grpc.RestoreIndexOrBuilder getRestoreOrBuilder() {
if (restoreBuilder_ != null) {
return restoreBuilder_.getMessageOrBuilder();
} else {
return restore_ == null ?
com.yelp.nrtsearch.server.grpc.RestoreIndex.getDefaultInstance() : restore_;
}
}
/**
*
* restore index from backup
*
*
* .luceneserver.RestoreIndex restore = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.RestoreIndex, com.yelp.nrtsearch.server.grpc.RestoreIndex.Builder, com.yelp.nrtsearch.server.grpc.RestoreIndexOrBuilder>
getRestoreFieldBuilder() {
if (restoreBuilder_ == null) {
restoreBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.RestoreIndex, com.yelp.nrtsearch.server.grpc.RestoreIndex.Builder, com.yelp.nrtsearch.server.grpc.RestoreIndexOrBuilder>(
getRestore(),
getParentForChildren(),
isClean());
restore_ = null;
}
return restoreBuilder_;
}
private java.lang.Object primaryDiscoveryFile_ = "";
/**
*
* replica, location of discovery file containing primary host/port. Used if primaryAddress is empty. If port is specified in this request, it overrides the value in the file
*
*
* string primaryDiscoveryFile = 7;
* @return The primaryDiscoveryFile.
*/
public java.lang.String getPrimaryDiscoveryFile() {
java.lang.Object ref = primaryDiscoveryFile_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
primaryDiscoveryFile_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* replica, location of discovery file containing primary host/port. Used if primaryAddress is empty. If port is specified in this request, it overrides the value in the file
*
*
* string primaryDiscoveryFile = 7;
* @return The bytes for primaryDiscoveryFile.
*/
public com.google.protobuf.ByteString
getPrimaryDiscoveryFileBytes() {
java.lang.Object ref = primaryDiscoveryFile_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
primaryDiscoveryFile_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* replica, location of discovery file containing primary host/port. Used if primaryAddress is empty. If port is specified in this request, it overrides the value in the file
*
*
* string primaryDiscoveryFile = 7;
* @param value The primaryDiscoveryFile to set.
* @return This builder for chaining.
*/
public Builder setPrimaryDiscoveryFile(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
primaryDiscoveryFile_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* replica, location of discovery file containing primary host/port. Used if primaryAddress is empty. If port is specified in this request, it overrides the value in the file
*
*
* string primaryDiscoveryFile = 7;
* @return This builder for chaining.
*/
public Builder clearPrimaryDiscoveryFile() {
primaryDiscoveryFile_ = getDefaultInstance().getPrimaryDiscoveryFile();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
* replica, location of discovery file containing primary host/port. Used if primaryAddress is empty. If port is specified in this request, it overrides the value in the file
*
*
* string primaryDiscoveryFile = 7;
* @param value The bytes for primaryDiscoveryFile to set.
* @return This builder for chaining.
*/
public Builder setPrimaryDiscoveryFileBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
primaryDiscoveryFile_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:luceneserver.StartIndexRequest)
}
// @@protoc_insertion_point(class_scope:luceneserver.StartIndexRequest)
private static final com.yelp.nrtsearch.server.grpc.StartIndexRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.StartIndexRequest();
}
public static com.yelp.nrtsearch.server.grpc.StartIndexRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StartIndexRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.StartIndexRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}