diff --git a/voter-registry/.gitignore b/voter-registry/.gitignore index ae3c172..b4b41cf 100644 --- a/voter-registry/.gitignore +++ b/voter-registry/.gitignore @@ -1 +1,3 @@ /bin/ +/protoc.exe +/comment-info.txt \ No newline at end of file diff --git a/voter-registry/src/protobuf/ProtobufsMessages.java b/voter-registry/src/protobuf/ProtobufsMessages.java new file mode 100644 index 0000000..ab43b20 --- /dev/null +++ b/voter-registry/src/protobuf/ProtobufsMessages.java @@ -0,0 +1,2305 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ProtobufsMessages.proto + +public final class ProtobufsMessages { + private ProtobufsMessages() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface TagOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tag) + com.google.protobuf.MessageOrBuilder { + + /** + * required string content = 1; + */ + boolean hasContent(); + /** + * required string content = 1; + */ + java.lang.String getContent(); + /** + * required string content = 1; + */ + com.google.protobuf.ByteString + getContentBytes(); + } + /** + * Protobuf type {@code Tag} + */ + public static final class Tag extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Tag) + TagOrBuilder { + // Use Tag.newBuilder() to construct. + private Tag(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Tag(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Tag defaultInstance; + public static Tag getDefaultInstance() { + return defaultInstance; + } + + public Tag getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Tag( + 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 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + content_ = bs; + 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 ProtobufsMessages.internal_static_Tag_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return ProtobufsMessages.internal_static_Tag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + ProtobufsMessages.Tag.class, ProtobufsMessages.Tag.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Tag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Tag(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int CONTENT_FIELD_NUMBER = 1; + private java.lang.Object content_; + /** + * required string content = 1; + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string content = 1; + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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()) { + content_ = s; + } + return s; + } + } + /** + * required string content = 1; + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + content_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasContent()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getContentBytes()); + } + 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 + .computeBytesSize(1, getContentBytes()); + } + 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 ProtobufsMessages.Tag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static ProtobufsMessages.Tag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static ProtobufsMessages.Tag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static ProtobufsMessages.Tag parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static ProtobufsMessages.Tag parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static ProtobufsMessages.Tag parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static ProtobufsMessages.Tag parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static ProtobufsMessages.Tag parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static ProtobufsMessages.Tag parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static ProtobufsMessages.Tag 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(ProtobufsMessages.Tag 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 Tag} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Tag) + ProtobufsMessages.TagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return ProtobufsMessages.internal_static_Tag_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return ProtobufsMessages.internal_static_Tag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + ProtobufsMessages.Tag.class, ProtobufsMessages.Tag.Builder.class); + } + + // Construct using ProtobufsMessages.Tag.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(); + content_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return ProtobufsMessages.internal_static_Tag_descriptor; + } + + public ProtobufsMessages.Tag getDefaultInstanceForType() { + return ProtobufsMessages.Tag.getDefaultInstance(); + } + + public ProtobufsMessages.Tag build() { + ProtobufsMessages.Tag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public ProtobufsMessages.Tag buildPartial() { + ProtobufsMessages.Tag result = new ProtobufsMessages.Tag(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.content_ = content_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ProtobufsMessages.Tag) { + return mergeFrom((ProtobufsMessages.Tag)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ProtobufsMessages.Tag other) { + if (other == ProtobufsMessages.Tag.getDefaultInstance()) return this; + if (other.hasContent()) { + bitField0_ |= 0x00000001; + content_ = other.content_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasContent()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + ProtobufsMessages.Tag parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ProtobufsMessages.Tag) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object content_ = ""; + /** + * required string content = 1; + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string content = 1; + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + content_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string content = 1; + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string content = 1; + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + content_ = value; + onChanged(); + return this; + } + /** + * required string content = 1; + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000001); + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * required string content = 1; + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + content_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:Tag) + } + + static { + defaultInstance = new Tag(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:Tag) + } + + public interface BasicMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:BasicMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .Tag tag = 1; + */ + java.util.List + getTagList(); + /** + * repeated .Tag tag = 1; + */ + ProtobufsMessages.Tag getTag(int index); + /** + * repeated .Tag tag = 1; + */ + int getTagCount(); + /** + * repeated .Tag tag = 1; + */ + java.util.List + getTagOrBuilderList(); + /** + * repeated .Tag tag = 1; + */ + ProtobufsMessages.TagOrBuilder getTagOrBuilder( + int index); + + /** + * optional bytes data = 2; + */ + boolean hasData(); + /** + * optional bytes data = 2; + */ + com.google.protobuf.ByteString getData(); + } + /** + * Protobuf type {@code BasicMessage} + */ + public static final class BasicMessage extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:BasicMessage) + BasicMessageOrBuilder { + // Use BasicMessage.newBuilder() to construct. + private BasicMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private BasicMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final BasicMessage defaultInstance; + public static BasicMessage getDefaultInstance() { + return defaultInstance; + } + + public BasicMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BasicMessage( + 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 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + tag_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tag_.add(input.readMessage(ProtobufsMessages.Tag.PARSER, extensionRegistry)); + break; + } + case 18: { + bitField0_ |= 0x00000001; + data_ = 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.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + tag_ = java.util.Collections.unmodifiableList(tag_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return ProtobufsMessages.internal_static_BasicMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return ProtobufsMessages.internal_static_BasicMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + ProtobufsMessages.BasicMessage.class, ProtobufsMessages.BasicMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public BasicMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BasicMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int TAG_FIELD_NUMBER = 1; + private java.util.List tag_; + /** + * repeated .Tag tag = 1; + */ + public java.util.List getTagList() { + return tag_; + } + /** + * repeated .Tag tag = 1; + */ + public java.util.List + getTagOrBuilderList() { + return tag_; + } + /** + * repeated .Tag tag = 1; + */ + public int getTagCount() { + return tag_.size(); + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.Tag getTag(int index) { + return tag_.get(index); + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.TagOrBuilder getTagOrBuilder( + int index) { + return tag_.get(index); + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_; + /** + * optional bytes data = 2; + */ + public boolean hasData() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bytes data = 2; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + + private void initFields() { + tag_ = java.util.Collections.emptyList(); + data_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + for (int i = 0; i < getTagCount(); i++) { + if (!getTag(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < tag_.size(); i++) { + output.writeMessage(1, tag_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(2, data_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tag_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tag_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, data_); + } + 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 ProtobufsMessages.BasicMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static ProtobufsMessages.BasicMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static ProtobufsMessages.BasicMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static ProtobufsMessages.BasicMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static ProtobufsMessages.BasicMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static ProtobufsMessages.BasicMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static ProtobufsMessages.BasicMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static ProtobufsMessages.BasicMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static ProtobufsMessages.BasicMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static ProtobufsMessages.BasicMessage 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(ProtobufsMessages.BasicMessage 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 BasicMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:BasicMessage) + ProtobufsMessages.BasicMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return ProtobufsMessages.internal_static_BasicMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return ProtobufsMessages.internal_static_BasicMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + ProtobufsMessages.BasicMessage.class, ProtobufsMessages.BasicMessage.Builder.class); + } + + // Construct using ProtobufsMessages.BasicMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTagFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (tagBuilder_ == null) { + tag_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tagBuilder_.clear(); + } + data_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return ProtobufsMessages.internal_static_BasicMessage_descriptor; + } + + public ProtobufsMessages.BasicMessage getDefaultInstanceForType() { + return ProtobufsMessages.BasicMessage.getDefaultInstance(); + } + + public ProtobufsMessages.BasicMessage build() { + ProtobufsMessages.BasicMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public ProtobufsMessages.BasicMessage buildPartial() { + ProtobufsMessages.BasicMessage result = new ProtobufsMessages.BasicMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (tagBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tag_ = java.util.Collections.unmodifiableList(tag_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tag_ = tag_; + } else { + result.tag_ = tagBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + result.data_ = data_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ProtobufsMessages.BasicMessage) { + return mergeFrom((ProtobufsMessages.BasicMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ProtobufsMessages.BasicMessage other) { + if (other == ProtobufsMessages.BasicMessage.getDefaultInstance()) return this; + if (tagBuilder_ == null) { + if (!other.tag_.isEmpty()) { + if (tag_.isEmpty()) { + tag_ = other.tag_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTagIsMutable(); + tag_.addAll(other.tag_); + } + onChanged(); + } + } else { + if (!other.tag_.isEmpty()) { + if (tagBuilder_.isEmpty()) { + tagBuilder_.dispose(); + tagBuilder_ = null; + tag_ = other.tag_; + bitField0_ = (bitField0_ & ~0x00000001); + tagBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTagFieldBuilder() : null; + } else { + tagBuilder_.addAllMessages(other.tag_); + } + } + } + if (other.hasData()) { + setData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getTagCount(); i++) { + if (!getTag(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + ProtobufsMessages.BasicMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ProtobufsMessages.BasicMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List tag_ = + java.util.Collections.emptyList(); + private void ensureTagIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tag_ = new java.util.ArrayList(tag_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + ProtobufsMessages.Tag, ProtobufsMessages.Tag.Builder, ProtobufsMessages.TagOrBuilder> tagBuilder_; + + /** + * repeated .Tag tag = 1; + */ + public java.util.List getTagList() { + if (tagBuilder_ == null) { + return java.util.Collections.unmodifiableList(tag_); + } else { + return tagBuilder_.getMessageList(); + } + } + /** + * repeated .Tag tag = 1; + */ + public int getTagCount() { + if (tagBuilder_ == null) { + return tag_.size(); + } else { + return tagBuilder_.getCount(); + } + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.Tag getTag(int index) { + if (tagBuilder_ == null) { + return tag_.get(index); + } else { + return tagBuilder_.getMessage(index); + } + } + /** + * repeated .Tag tag = 1; + */ + public Builder setTag( + int index, ProtobufsMessages.Tag value) { + if (tagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIsMutable(); + tag_.set(index, value); + onChanged(); + } else { + tagBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder setTag( + int index, ProtobufsMessages.Tag.Builder builderForValue) { + if (tagBuilder_ == null) { + ensureTagIsMutable(); + tag_.set(index, builderForValue.build()); + onChanged(); + } else { + tagBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder addTag(ProtobufsMessages.Tag value) { + if (tagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIsMutable(); + tag_.add(value); + onChanged(); + } else { + tagBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder addTag( + int index, ProtobufsMessages.Tag value) { + if (tagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIsMutable(); + tag_.add(index, value); + onChanged(); + } else { + tagBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder addTag( + ProtobufsMessages.Tag.Builder builderForValue) { + if (tagBuilder_ == null) { + ensureTagIsMutable(); + tag_.add(builderForValue.build()); + onChanged(); + } else { + tagBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder addTag( + int index, ProtobufsMessages.Tag.Builder builderForValue) { + if (tagBuilder_ == null) { + ensureTagIsMutable(); + tag_.add(index, builderForValue.build()); + onChanged(); + } else { + tagBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder addAllTag( + java.lang.Iterable values) { + if (tagBuilder_ == null) { + ensureTagIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tag_); + onChanged(); + } else { + tagBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder clearTag() { + if (tagBuilder_ == null) { + tag_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tagBuilder_.clear(); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder removeTag(int index) { + if (tagBuilder_ == null) { + ensureTagIsMutable(); + tag_.remove(index); + onChanged(); + } else { + tagBuilder_.remove(index); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.Tag.Builder getTagBuilder( + int index) { + return getTagFieldBuilder().getBuilder(index); + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.TagOrBuilder getTagOrBuilder( + int index) { + if (tagBuilder_ == null) { + return tag_.get(index); } else { + return tagBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Tag tag = 1; + */ + public java.util.List + getTagOrBuilderList() { + if (tagBuilder_ != null) { + return tagBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tag_); + } + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.Tag.Builder addTagBuilder() { + return getTagFieldBuilder().addBuilder( + ProtobufsMessages.Tag.getDefaultInstance()); + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.Tag.Builder addTagBuilder( + int index) { + return getTagFieldBuilder().addBuilder( + index, ProtobufsMessages.Tag.getDefaultInstance()); + } + /** + * repeated .Tag tag = 1; + */ + public java.util.List + getTagBuilderList() { + return getTagFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + ProtobufsMessages.Tag, ProtobufsMessages.Tag.Builder, ProtobufsMessages.TagOrBuilder> + getTagFieldBuilder() { + if (tagBuilder_ == null) { + tagBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + ProtobufsMessages.Tag, ProtobufsMessages.Tag.Builder, ProtobufsMessages.TagOrBuilder>( + tag_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + tag_ = null; + } + return tagBuilder_; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes data = 2; + */ + public boolean hasData() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bytes data = 2; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + * optional bytes data = 2; + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + data_ = value; + onChanged(); + return this; + } + /** + * optional bytes data = 2; + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000002); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:BasicMessage) + } + + static { + defaultInstance = new BasicMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:BasicMessage) + } + + public interface BulletinBoardMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:BulletinBoardMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .Tag tag = 1; + */ + java.util.List + getTagList(); + /** + * repeated .Tag tag = 1; + */ + ProtobufsMessages.Tag getTag(int index); + /** + * repeated .Tag tag = 1; + */ + int getTagCount(); + /** + * repeated .Tag tag = 1; + */ + java.util.List + getTagOrBuilderList(); + /** + * repeated .Tag tag = 1; + */ + ProtobufsMessages.TagOrBuilder getTagOrBuilder( + int index); + + /** + * required .BasicMessage basicMessage = 2; + */ + boolean hasBasicMessage(); + /** + * required .BasicMessage basicMessage = 2; + */ + ProtobufsMessages.BasicMessage getBasicMessage(); + /** + * required .BasicMessage basicMessage = 2; + */ + ProtobufsMessages.BasicMessageOrBuilder getBasicMessageOrBuilder(); + + /** + * optional bytes signatures = 3; + */ + boolean hasSignatures(); + /** + * optional bytes signatures = 3; + */ + com.google.protobuf.ByteString getSignatures(); + } + /** + * Protobuf type {@code BulletinBoardMessage} + */ + public static final class BulletinBoardMessage extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:BulletinBoardMessage) + BulletinBoardMessageOrBuilder { + // Use BulletinBoardMessage.newBuilder() to construct. + private BulletinBoardMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private BulletinBoardMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final BulletinBoardMessage defaultInstance; + public static BulletinBoardMessage getDefaultInstance() { + return defaultInstance; + } + + public BulletinBoardMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BulletinBoardMessage( + 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 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + tag_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tag_.add(input.readMessage(ProtobufsMessages.Tag.PARSER, extensionRegistry)); + break; + } + case 18: { + ProtobufsMessages.BasicMessage.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = basicMessage_.toBuilder(); + } + basicMessage_ = input.readMessage(ProtobufsMessages.BasicMessage.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicMessage_); + basicMessage_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 26: { + bitField0_ |= 0x00000002; + signatures_ = 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.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + tag_ = java.util.Collections.unmodifiableList(tag_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return ProtobufsMessages.internal_static_BulletinBoardMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return ProtobufsMessages.internal_static_BulletinBoardMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + ProtobufsMessages.BulletinBoardMessage.class, ProtobufsMessages.BulletinBoardMessage.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public BulletinBoardMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BulletinBoardMessage(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int TAG_FIELD_NUMBER = 1; + private java.util.List tag_; + /** + * repeated .Tag tag = 1; + */ + public java.util.List getTagList() { + return tag_; + } + /** + * repeated .Tag tag = 1; + */ + public java.util.List + getTagOrBuilderList() { + return tag_; + } + /** + * repeated .Tag tag = 1; + */ + public int getTagCount() { + return tag_.size(); + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.Tag getTag(int index) { + return tag_.get(index); + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.TagOrBuilder getTagOrBuilder( + int index) { + return tag_.get(index); + } + + public static final int BASICMESSAGE_FIELD_NUMBER = 2; + private ProtobufsMessages.BasicMessage basicMessage_; + /** + * required .BasicMessage basicMessage = 2; + */ + public boolean hasBasicMessage() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .BasicMessage basicMessage = 2; + */ + public ProtobufsMessages.BasicMessage getBasicMessage() { + return basicMessage_; + } + /** + * required .BasicMessage basicMessage = 2; + */ + public ProtobufsMessages.BasicMessageOrBuilder getBasicMessageOrBuilder() { + return basicMessage_; + } + + public static final int SIGNATURES_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString signatures_; + /** + * optional bytes signatures = 3; + */ + public boolean hasSignatures() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bytes signatures = 3; + */ + public com.google.protobuf.ByteString getSignatures() { + return signatures_; + } + + private void initFields() { + tag_ = java.util.Collections.emptyList(); + basicMessage_ = ProtobufsMessages.BasicMessage.getDefaultInstance(); + signatures_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasBasicMessage()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getTagCount(); i++) { + if (!getTag(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (!getBasicMessage().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < tag_.size(); i++) { + output.writeMessage(1, tag_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(2, basicMessage_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(3, signatures_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tag_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tag_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, basicMessage_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, signatures_); + } + 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 ProtobufsMessages.BulletinBoardMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static ProtobufsMessages.BulletinBoardMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static ProtobufsMessages.BulletinBoardMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static ProtobufsMessages.BulletinBoardMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static ProtobufsMessages.BulletinBoardMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static ProtobufsMessages.BulletinBoardMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static ProtobufsMessages.BulletinBoardMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static ProtobufsMessages.BulletinBoardMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static ProtobufsMessages.BulletinBoardMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static ProtobufsMessages.BulletinBoardMessage 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(ProtobufsMessages.BulletinBoardMessage 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 BulletinBoardMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:BulletinBoardMessage) + ProtobufsMessages.BulletinBoardMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return ProtobufsMessages.internal_static_BulletinBoardMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return ProtobufsMessages.internal_static_BulletinBoardMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + ProtobufsMessages.BulletinBoardMessage.class, ProtobufsMessages.BulletinBoardMessage.Builder.class); + } + + // Construct using ProtobufsMessages.BulletinBoardMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTagFieldBuilder(); + getBasicMessageFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (tagBuilder_ == null) { + tag_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tagBuilder_.clear(); + } + if (basicMessageBuilder_ == null) { + basicMessage_ = ProtobufsMessages.BasicMessage.getDefaultInstance(); + } else { + basicMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + signatures_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return ProtobufsMessages.internal_static_BulletinBoardMessage_descriptor; + } + + public ProtobufsMessages.BulletinBoardMessage getDefaultInstanceForType() { + return ProtobufsMessages.BulletinBoardMessage.getDefaultInstance(); + } + + public ProtobufsMessages.BulletinBoardMessage build() { + ProtobufsMessages.BulletinBoardMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public ProtobufsMessages.BulletinBoardMessage buildPartial() { + ProtobufsMessages.BulletinBoardMessage result = new ProtobufsMessages.BulletinBoardMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (tagBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tag_ = java.util.Collections.unmodifiableList(tag_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tag_ = tag_; + } else { + result.tag_ = tagBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + if (basicMessageBuilder_ == null) { + result.basicMessage_ = basicMessage_; + } else { + result.basicMessage_ = basicMessageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.signatures_ = signatures_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ProtobufsMessages.BulletinBoardMessage) { + return mergeFrom((ProtobufsMessages.BulletinBoardMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ProtobufsMessages.BulletinBoardMessage other) { + if (other == ProtobufsMessages.BulletinBoardMessage.getDefaultInstance()) return this; + if (tagBuilder_ == null) { + if (!other.tag_.isEmpty()) { + if (tag_.isEmpty()) { + tag_ = other.tag_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTagIsMutable(); + tag_.addAll(other.tag_); + } + onChanged(); + } + } else { + if (!other.tag_.isEmpty()) { + if (tagBuilder_.isEmpty()) { + tagBuilder_.dispose(); + tagBuilder_ = null; + tag_ = other.tag_; + bitField0_ = (bitField0_ & ~0x00000001); + tagBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTagFieldBuilder() : null; + } else { + tagBuilder_.addAllMessages(other.tag_); + } + } + } + if (other.hasBasicMessage()) { + mergeBasicMessage(other.getBasicMessage()); + } + if (other.hasSignatures()) { + setSignatures(other.getSignatures()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasBasicMessage()) { + + return false; + } + for (int i = 0; i < getTagCount(); i++) { + if (!getTag(i).isInitialized()) { + + return false; + } + } + if (!getBasicMessage().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + ProtobufsMessages.BulletinBoardMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ProtobufsMessages.BulletinBoardMessage) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List tag_ = + java.util.Collections.emptyList(); + private void ensureTagIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tag_ = new java.util.ArrayList(tag_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + ProtobufsMessages.Tag, ProtobufsMessages.Tag.Builder, ProtobufsMessages.TagOrBuilder> tagBuilder_; + + /** + * repeated .Tag tag = 1; + */ + public java.util.List getTagList() { + if (tagBuilder_ == null) { + return java.util.Collections.unmodifiableList(tag_); + } else { + return tagBuilder_.getMessageList(); + } + } + /** + * repeated .Tag tag = 1; + */ + public int getTagCount() { + if (tagBuilder_ == null) { + return tag_.size(); + } else { + return tagBuilder_.getCount(); + } + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.Tag getTag(int index) { + if (tagBuilder_ == null) { + return tag_.get(index); + } else { + return tagBuilder_.getMessage(index); + } + } + /** + * repeated .Tag tag = 1; + */ + public Builder setTag( + int index, ProtobufsMessages.Tag value) { + if (tagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIsMutable(); + tag_.set(index, value); + onChanged(); + } else { + tagBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder setTag( + int index, ProtobufsMessages.Tag.Builder builderForValue) { + if (tagBuilder_ == null) { + ensureTagIsMutable(); + tag_.set(index, builderForValue.build()); + onChanged(); + } else { + tagBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder addTag(ProtobufsMessages.Tag value) { + if (tagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIsMutable(); + tag_.add(value); + onChanged(); + } else { + tagBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder addTag( + int index, ProtobufsMessages.Tag value) { + if (tagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIsMutable(); + tag_.add(index, value); + onChanged(); + } else { + tagBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder addTag( + ProtobufsMessages.Tag.Builder builderForValue) { + if (tagBuilder_ == null) { + ensureTagIsMutable(); + tag_.add(builderForValue.build()); + onChanged(); + } else { + tagBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder addTag( + int index, ProtobufsMessages.Tag.Builder builderForValue) { + if (tagBuilder_ == null) { + ensureTagIsMutable(); + tag_.add(index, builderForValue.build()); + onChanged(); + } else { + tagBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder addAllTag( + java.lang.Iterable values) { + if (tagBuilder_ == null) { + ensureTagIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tag_); + onChanged(); + } else { + tagBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder clearTag() { + if (tagBuilder_ == null) { + tag_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tagBuilder_.clear(); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public Builder removeTag(int index) { + if (tagBuilder_ == null) { + ensureTagIsMutable(); + tag_.remove(index); + onChanged(); + } else { + tagBuilder_.remove(index); + } + return this; + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.Tag.Builder getTagBuilder( + int index) { + return getTagFieldBuilder().getBuilder(index); + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.TagOrBuilder getTagOrBuilder( + int index) { + if (tagBuilder_ == null) { + return tag_.get(index); } else { + return tagBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Tag tag = 1; + */ + public java.util.List + getTagOrBuilderList() { + if (tagBuilder_ != null) { + return tagBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tag_); + } + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.Tag.Builder addTagBuilder() { + return getTagFieldBuilder().addBuilder( + ProtobufsMessages.Tag.getDefaultInstance()); + } + /** + * repeated .Tag tag = 1; + */ + public ProtobufsMessages.Tag.Builder addTagBuilder( + int index) { + return getTagFieldBuilder().addBuilder( + index, ProtobufsMessages.Tag.getDefaultInstance()); + } + /** + * repeated .Tag tag = 1; + */ + public java.util.List + getTagBuilderList() { + return getTagFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + ProtobufsMessages.Tag, ProtobufsMessages.Tag.Builder, ProtobufsMessages.TagOrBuilder> + getTagFieldBuilder() { + if (tagBuilder_ == null) { + tagBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + ProtobufsMessages.Tag, ProtobufsMessages.Tag.Builder, ProtobufsMessages.TagOrBuilder>( + tag_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + tag_ = null; + } + return tagBuilder_; + } + + private ProtobufsMessages.BasicMessage basicMessage_ = ProtobufsMessages.BasicMessage.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + ProtobufsMessages.BasicMessage, ProtobufsMessages.BasicMessage.Builder, ProtobufsMessages.BasicMessageOrBuilder> basicMessageBuilder_; + /** + * required .BasicMessage basicMessage = 2; + */ + public boolean hasBasicMessage() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required .BasicMessage basicMessage = 2; + */ + public ProtobufsMessages.BasicMessage getBasicMessage() { + if (basicMessageBuilder_ == null) { + return basicMessage_; + } else { + return basicMessageBuilder_.getMessage(); + } + } + /** + * required .BasicMessage basicMessage = 2; + */ + public Builder setBasicMessage(ProtobufsMessages.BasicMessage value) { + if (basicMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicMessage_ = value; + onChanged(); + } else { + basicMessageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * required .BasicMessage basicMessage = 2; + */ + public Builder setBasicMessage( + ProtobufsMessages.BasicMessage.Builder builderForValue) { + if (basicMessageBuilder_ == null) { + basicMessage_ = builderForValue.build(); + onChanged(); + } else { + basicMessageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * required .BasicMessage basicMessage = 2; + */ + public Builder mergeBasicMessage(ProtobufsMessages.BasicMessage value) { + if (basicMessageBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + basicMessage_ != ProtobufsMessages.BasicMessage.getDefaultInstance()) { + basicMessage_ = + ProtobufsMessages.BasicMessage.newBuilder(basicMessage_).mergeFrom(value).buildPartial(); + } else { + basicMessage_ = value; + } + onChanged(); + } else { + basicMessageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * required .BasicMessage basicMessage = 2; + */ + public Builder clearBasicMessage() { + if (basicMessageBuilder_ == null) { + basicMessage_ = ProtobufsMessages.BasicMessage.getDefaultInstance(); + onChanged(); + } else { + basicMessageBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + /** + * required .BasicMessage basicMessage = 2; + */ + public ProtobufsMessages.BasicMessage.Builder getBasicMessageBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBasicMessageFieldBuilder().getBuilder(); + } + /** + * required .BasicMessage basicMessage = 2; + */ + public ProtobufsMessages.BasicMessageOrBuilder getBasicMessageOrBuilder() { + if (basicMessageBuilder_ != null) { + return basicMessageBuilder_.getMessageOrBuilder(); + } else { + return basicMessage_; + } + } + /** + * required .BasicMessage basicMessage = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + ProtobufsMessages.BasicMessage, ProtobufsMessages.BasicMessage.Builder, ProtobufsMessages.BasicMessageOrBuilder> + getBasicMessageFieldBuilder() { + if (basicMessageBuilder_ == null) { + basicMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + ProtobufsMessages.BasicMessage, ProtobufsMessages.BasicMessage.Builder, ProtobufsMessages.BasicMessageOrBuilder>( + getBasicMessage(), + getParentForChildren(), + isClean()); + basicMessage_ = null; + } + return basicMessageBuilder_; + } + + private com.google.protobuf.ByteString signatures_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes signatures = 3; + */ + public boolean hasSignatures() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bytes signatures = 3; + */ + public com.google.protobuf.ByteString getSignatures() { + return signatures_; + } + /** + * optional bytes signatures = 3; + */ + public Builder setSignatures(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + signatures_ = value; + onChanged(); + return this; + } + /** + * optional bytes signatures = 3; + */ + public Builder clearSignatures() { + bitField0_ = (bitField0_ & ~0x00000004); + signatures_ = getDefaultInstance().getSignatures(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:BulletinBoardMessage) + } + + static { + defaultInstance = new BulletinBoardMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:BulletinBoardMessage) + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tag_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Tag_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_BasicMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BasicMessage_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_BulletinBoardMessage_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BulletinBoardMessage_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\027ProtobufsMessages.proto\"\026\n\003Tag\022\017\n\007cont" + + "ent\030\001 \002(\t\"/\n\014BasicMessage\022\021\n\003tag\030\001 \003(\0132\004" + + ".Tag\022\014\n\004data\030\002 \001(\014\"b\n\024BulletinBoardMessa" + + "ge\022\021\n\003tag\030\001 \003(\0132\004.Tag\022#\n\014basicMessage\030\002 " + + "\002(\0132\r.BasicMessage\022\022\n\nsignatures\030\003 \001(\014" + }; + 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_Tag_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tag_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Tag_descriptor, + new java.lang.String[] { "Content", }); + internal_static_BasicMessage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_BasicMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BasicMessage_descriptor, + new java.lang.String[] { "Tag", "Data", }); + internal_static_BulletinBoardMessage_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_BulletinBoardMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BulletinBoardMessage_descriptor, + new java.lang.String[] { "Tag", "BasicMessage", "Signatures", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/voter-registry/src/protobuf/ProtobufsMessages.proto b/voter-registry/src/protobuf/ProtobufsMessages.proto new file mode 100644 index 0000000..c91982c --- /dev/null +++ b/voter-registry/src/protobuf/ProtobufsMessages.proto @@ -0,0 +1,16 @@ + + +message Tag { + required string content = 1; +} + +message BasicMessage { + repeated Tag tag = 1; + optional bytes data = 2; +} + +message BulletinBoardMessage { + repeated Tag tag = 1; + required BasicMessage basicMessage = 2; + optional bytes signatures = 3; +} \ No newline at end of file