// Generated by the protocol buffer compiler. DO NOT EDIT! // source: VotingMessages.proto package org.opendaylight.controller.cluster.raft.protobuff.messages; public final class VotingMessages { private VotingMessages() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } public interface RequestVoteOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional int64 term = 1; /** * optional int64 term = 1; */ boolean hasTerm(); /** * optional int64 term = 1; */ long getTerm(); // optional string candidateId = 2; /** * optional string candidateId = 2; */ boolean hasCandidateId(); /** * optional string candidateId = 2; */ java.lang.String getCandidateId(); /** * optional string candidateId = 2; */ com.google.protobuf.ByteString getCandidateIdBytes(); // optional int64 lastLongIndex = 3; /** * optional int64 lastLongIndex = 3; */ boolean hasLastLongIndex(); /** * optional int64 lastLongIndex = 3; */ long getLastLongIndex(); // optional int64 lastLongTerm = 4; /** * optional int64 lastLongTerm = 4; */ boolean hasLastLongTerm(); /** * optional int64 lastLongTerm = 4; */ long getLastLongTerm(); } /** * Protobuf type {@code org.opendaylight.controller.cluster.raft.RequestVote} */ public static final class RequestVote extends com.google.protobuf.GeneratedMessage implements RequestVoteOrBuilder { // Use RequestVote.newBuilder() to construct. private RequestVote(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private RequestVote(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final RequestVote defaultInstance; public static RequestVote getDefaultInstance() { return defaultInstance; } public RequestVote getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RequestVote( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; term_ = input.readInt64(); break; } case 18: { bitField0_ |= 0x00000002; candidateId_ = input.readBytes(); break; } case 24: { bitField0_ |= 0x00000004; lastLongIndex_ = input.readInt64(); break; } case 32: { bitField0_ |= 0x00000008; lastLongTerm_ = input.readInt64(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.internal_static_org_opendaylight_controller_cluster_raft_RequestVote_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.internal_static_org_opendaylight_controller_cluster_raft_RequestVote_fieldAccessorTable .ensureFieldAccessorsInitialized( org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote.class, org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public RequestVote parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RequestVote(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; // optional int64 term = 1; public static final int TERM_FIELD_NUMBER = 1; private long term_; /** * optional int64 term = 1; */ public boolean hasTerm() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional int64 term = 1; */ public long getTerm() { return term_; } // optional string candidateId = 2; public static final int CANDIDATEID_FIELD_NUMBER = 2; private java.lang.Object candidateId_; /** * optional string candidateId = 2; */ public boolean hasCandidateId() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional string candidateId = 2; */ public java.lang.String getCandidateId() { java.lang.Object ref = candidateId_; 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(); if (bs.isValidUtf8()) { candidateId_ = s; } return s; } } /** * optional string candidateId = 2; */ public com.google.protobuf.ByteString getCandidateIdBytes() { java.lang.Object ref = candidateId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); candidateId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // optional int64 lastLongIndex = 3; public static final int LASTLONGINDEX_FIELD_NUMBER = 3; private long lastLongIndex_; /** * optional int64 lastLongIndex = 3; */ public boolean hasLastLongIndex() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional int64 lastLongIndex = 3; */ public long getLastLongIndex() { return lastLongIndex_; } // optional int64 lastLongTerm = 4; public static final int LASTLONGTERM_FIELD_NUMBER = 4; private long lastLongTerm_; /** * optional int64 lastLongTerm = 4; */ public boolean hasLastLongTerm() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional int64 lastLongTerm = 4; */ public long getLastLongTerm() { return lastLongTerm_; } private void initFields() { term_ = 0L; candidateId_ = ""; lastLongIndex_ = 0L; lastLongTerm_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, term_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getCandidateIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt64(3, lastLongIndex_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeInt64(4, lastLongTerm_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, term_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getCandidateIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, lastLongIndex_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, lastLongTerm_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code org.opendaylight.controller.cluster.raft.RequestVote} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVoteOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.internal_static_org_opendaylight_controller_cluster_raft_RequestVote_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.internal_static_org_opendaylight_controller_cluster_raft_RequestVote_fieldAccessorTable .ensureFieldAccessorsInitialized( org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote.class, org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote.Builder.class); } // Construct using org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); term_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); candidateId_ = ""; bitField0_ = (bitField0_ & ~0x00000002); lastLongIndex_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); lastLongTerm_ = 0L; bitField0_ = (bitField0_ & ~0x00000008); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.internal_static_org_opendaylight_controller_cluster_raft_RequestVote_descriptor; } public org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote getDefaultInstanceForType() { return org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote.getDefaultInstance(); } public org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote build() { org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote buildPartial() { org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote result = new org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.term_ = term_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.candidateId_ = candidateId_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.lastLongIndex_ = lastLongIndex_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.lastLongTerm_ = lastLongTerm_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote) { return mergeFrom((org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote other) { if (other == org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote.getDefaultInstance()) return this; if (other.hasTerm()) { setTerm(other.getTerm()); } if (other.hasCandidateId()) { bitField0_ |= 0x00000002; candidateId_ = other.candidateId_; onChanged(); } if (other.hasLastLongIndex()) { setLastLongIndex(other.getLastLongIndex()); } if (other.hasLastLongTerm()) { setLastLongTerm(other.getLastLongTerm()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.opendaylight.controller.cluster.raft.protobuff.messages.VotingMessages.RequestVote) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // optional int64 term = 1; private long term_ ; /** * optional int64 term = 1; */ public boolean hasTerm() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional int64 term = 1; */ public long getTerm() { return term_; } /** * optional int64 term = 1; */ public Builder setTerm(long value) { bitField0_ |= 0x00000001; term_ = value; onChanged(); return this; } /** * optional int64 term = 1; */ public Builder clearTerm() { bitField0_ = (bitField0_ & ~0x00000001); term_ = 0L; onChanged(); return this; } // optional string candidateId = 2; private java.lang.Object candidateId_ = ""; /** * optional string candidateId = 2; */ public boolean hasCandidateId() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional string candidateId = 2; */ public java.lang.String getCandidateId() { java.lang.Object ref = candidateId_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); candidateId_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string candidateId = 2; */ public com.google.protobuf.ByteString getCandidateIdBytes() { java.lang.Object ref = candidateId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); candidateId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string candidateId = 2; */ public Builder setCandidateId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; candidateId_ = value; onChanged(); return this; } /** * optional string candidateId = 2; */ public Builder clearCandidateId() { bitField0_ = (bitField0_ & ~0x00000002); candidateId_ = getDefaultInstance().getCandidateId(); onChanged(); return this; } /** * optional string candidateId = 2; */ public Builder setCandidateIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; candidateId_ = value; onChanged(); return this; } // optional int64 lastLongIndex = 3; private long lastLongIndex_ ; /** * optional int64 lastLongIndex = 3; */ public boolean hasLastLongIndex() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional int64 lastLongIndex = 3; */ public long getLastLongIndex() { return lastLongIndex_; } /** * optional int64 lastLongIndex = 3; */ public Builder setLastLongIndex(long value) { bitField0_ |= 0x00000004; lastLongIndex_ = value; onChanged(); return this; } /** * optional int64 lastLongIndex = 3; */ public Builder clearLastLongIndex() { bitField0_ = (bitField0_ & ~0x00000004); lastLongIndex_ = 0L; onChanged(); return this; } // optional int64 lastLongTerm = 4; private long lastLongTerm_ ; /** * optional int64 lastLongTerm = 4; */ public boolean hasLastLongTerm() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional int64 lastLongTerm = 4; */ public long getLastLongTerm() { return lastLongTerm_; } /** * optional int64 lastLongTerm = 4; */ public Builder setLastLongTerm(long value) { bitField0_ |= 0x00000008; lastLongTerm_ = value; onChanged(); return this; } /** * optional int64 lastLongTerm = 4; */ public Builder clearLastLongTerm() { bitField0_ = (bitField0_ & ~0x00000008); lastLongTerm_ = 0L; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.cluster.raft.RequestVote) } static { defaultInstance = new RequestVote(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:org.opendaylight.controller.cluster.raft.RequestVote) } private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_cluster_raft_RequestVote_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_cluster_raft_RequestVote_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\024VotingMessages.proto\022(org.opendaylight" + ".controller.cluster.raft\"]\n\013RequestVote\022" + "\014\n\004term\030\001 \001(\003\022\023\n\013candidateId\030\002 \001(\t\022\025\n\rla" + "stLongIndex\030\003 \001(\003\022\024\n\014lastLongTerm\030\004 \001(\003B" + "O\n;org.opendaylight.controller.cluster.r" + "aft.protobuff.messagesB\016VotingMessagesH\001" }; 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; internal_static_org_opendaylight_controller_cluster_raft_RequestVote_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_org_opendaylight_controller_cluster_raft_RequestVote_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_opendaylight_controller_cluster_raft_RequestVote_descriptor, new java.lang.String[] { "Term", "CandidateId", "LastLongIndex", "LastLongTerm", }); return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } // @@protoc_insertion_point(outer_class_scope) }