Back to project page dissertation-project.
The source code is released under:
MIT License
If you think the Android project dissertation-project listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.fyp.resilience.proto; //from w w w . j av a2 s . co m // Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto_buff_specification.proto public final class ProtoBuffSpecification { private ProtoBuffSpecification() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } public interface PieceUploadRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { // required .DataWholeMessage dataWholeMessage = 1; /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ boolean hasDataWholeMessage(); /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ ProtoBuffSpecification.DataWholeMessage getDataWholeMessage(); /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ ProtoBuffSpecification.DataWholeMessageOrBuilder getDataWholeMessageOrBuilder(); // required .DataPieceMessage dataPieceMessage = 2; /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ boolean hasDataPieceMessage(); /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ ProtoBuffSpecification.DataPieceMessage getDataPieceMessage(); /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ ProtoBuffSpecification.DataPieceMessageOrBuilder getDataPieceMessageOrBuilder(); } /** * Protobuf type {@code PieceUploadRequest} * * <pre> * Proto Buff Specification * </pre> */ public static final class PieceUploadRequest extends com.google.protobuf.GeneratedMessage implements PieceUploadRequestOrBuilder { // Use PieceUploadRequest.newBuilder() to construct. private PieceUploadRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private PieceUploadRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final PieceUploadRequest defaultInstance; public static PieceUploadRequest getDefaultInstance() { return defaultInstance; } public PieceUploadRequest getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PieceUploadRequest( 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: { ProtoBuffSpecification.DataWholeMessage.Builder subBuilder = null; if (((bitField0_ & 0x00000001) == 0x00000001)) { subBuilder = dataWholeMessage_.toBuilder(); } dataWholeMessage_ = input.readMessage(ProtoBuffSpecification.DataWholeMessage.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(dataWholeMessage_); dataWholeMessage_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000001; break; } case 18: { ProtoBuffSpecification.DataPieceMessage.Builder subBuilder = null; if (((bitField0_ & 0x00000002) == 0x00000002)) { subBuilder = dataPieceMessage_.toBuilder(); } dataPieceMessage_ = input.readMessage(ProtoBuffSpecification.DataPieceMessage.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(dataPieceMessage_); dataPieceMessage_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000002; 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 ProtoBuffSpecification.internal_static_PieceUploadRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ProtoBuffSpecification.internal_static_PieceUploadRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ProtoBuffSpecification.PieceUploadRequest.class, ProtoBuffSpecification.PieceUploadRequest.Builder.class); } public static com.google.protobuf.Parser<PieceUploadRequest> PARSER = new com.google.protobuf.AbstractParser<PieceUploadRequest>() { public PieceUploadRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PieceUploadRequest(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<PieceUploadRequest> getParserForType() { return PARSER; } private int bitField0_; // required .DataWholeMessage dataWholeMessage = 1; public static final int DATAWHOLEMESSAGE_FIELD_NUMBER = 1; private ProtoBuffSpecification.DataWholeMessage dataWholeMessage_; /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public boolean hasDataWholeMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public ProtoBuffSpecification.DataWholeMessage getDataWholeMessage() { return dataWholeMessage_; } /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public ProtoBuffSpecification.DataWholeMessageOrBuilder getDataWholeMessageOrBuilder() { return dataWholeMessage_; } // required .DataPieceMessage dataPieceMessage = 2; public static final int DATAPIECEMESSAGE_FIELD_NUMBER = 2; private ProtoBuffSpecification.DataPieceMessage dataPieceMessage_; /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public boolean hasDataPieceMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public ProtoBuffSpecification.DataPieceMessage getDataPieceMessage() { return dataPieceMessage_; } /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public ProtoBuffSpecification.DataPieceMessageOrBuilder getDataPieceMessageOrBuilder() { return dataPieceMessage_; } private void initFields() { dataWholeMessage_ = ProtoBuffSpecification.DataWholeMessage.getDefaultInstance(); dataPieceMessage_ = ProtoBuffSpecification.DataPieceMessage.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasDataWholeMessage()) { memoizedIsInitialized = 0; return false; } if (!hasDataPieceMessage()) { memoizedIsInitialized = 0; return false; } if (!getDataWholeMessage().isInitialized()) { memoizedIsInitialized = 0; return false; } if (!getDataPieceMessage().isInitialized()) { 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.writeMessage(1, dataWholeMessage_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, dataPieceMessage_); } 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 .computeMessageSize(1, dataWholeMessage_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, dataPieceMessage_); } 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 ProtoBuffSpecification.PieceUploadRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ProtoBuffSpecification.PieceUploadRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ProtoBuffSpecification.PieceUploadRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ProtoBuffSpecification.PieceUploadRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ProtoBuffSpecification.PieceUploadRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static ProtoBuffSpecification.PieceUploadRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static ProtoBuffSpecification.PieceUploadRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static ProtoBuffSpecification.PieceUploadRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static ProtoBuffSpecification.PieceUploadRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static ProtoBuffSpecification.PieceUploadRequest 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(ProtoBuffSpecification.PieceUploadRequest 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 PieceUploadRequest} * * <pre> * Proto Buff Specification * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements ProtoBuffSpecification.PieceUploadRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ProtoBuffSpecification.internal_static_PieceUploadRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ProtoBuffSpecification.internal_static_PieceUploadRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ProtoBuffSpecification.PieceUploadRequest.class, ProtoBuffSpecification.PieceUploadRequest.Builder.class); } // Construct using ProtoBuffSpecification.PieceUploadRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getDataWholeMessageFieldBuilder(); getDataPieceMessageFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); if (dataWholeMessageBuilder_ == null) { dataWholeMessage_ = ProtoBuffSpecification.DataWholeMessage.getDefaultInstance(); } else { dataWholeMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); if (dataPieceMessageBuilder_ == null) { dataPieceMessage_ = ProtoBuffSpecification.DataPieceMessage.getDefaultInstance(); } else { dataPieceMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ProtoBuffSpecification.internal_static_PieceUploadRequest_descriptor; } public ProtoBuffSpecification.PieceUploadRequest getDefaultInstanceForType() { return ProtoBuffSpecification.PieceUploadRequest.getDefaultInstance(); } public ProtoBuffSpecification.PieceUploadRequest build() { ProtoBuffSpecification.PieceUploadRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public ProtoBuffSpecification.PieceUploadRequest buildPartial() { ProtoBuffSpecification.PieceUploadRequest result = new ProtoBuffSpecification.PieceUploadRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (dataWholeMessageBuilder_ == null) { result.dataWholeMessage_ = dataWholeMessage_; } else { result.dataWholeMessage_ = dataWholeMessageBuilder_.build(); } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } if (dataPieceMessageBuilder_ == null) { result.dataPieceMessage_ = dataPieceMessage_; } else { result.dataPieceMessage_ = dataPieceMessageBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ProtoBuffSpecification.PieceUploadRequest) { return mergeFrom((ProtoBuffSpecification.PieceUploadRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ProtoBuffSpecification.PieceUploadRequest other) { if (other == ProtoBuffSpecification.PieceUploadRequest.getDefaultInstance()) return this; if (other.hasDataWholeMessage()) { mergeDataWholeMessage(other.getDataWholeMessage()); } if (other.hasDataPieceMessage()) { mergeDataPieceMessage(other.getDataPieceMessage()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasDataWholeMessage()) { return false; } if (!hasDataPieceMessage()) { return false; } if (!getDataWholeMessage().isInitialized()) { return false; } if (!getDataPieceMessage().isInitialized()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { ProtoBuffSpecification.PieceUploadRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (ProtoBuffSpecification.PieceUploadRequest) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // required .DataWholeMessage dataWholeMessage = 1; private ProtoBuffSpecification.DataWholeMessage dataWholeMessage_ = ProtoBuffSpecification.DataWholeMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< ProtoBuffSpecification.DataWholeMessage, ProtoBuffSpecification.DataWholeMessage.Builder, ProtoBuffSpecification.DataWholeMessageOrBuilder> dataWholeMessageBuilder_; /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public boolean hasDataWholeMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public ProtoBuffSpecification.DataWholeMessage getDataWholeMessage() { if (dataWholeMessageBuilder_ == null) { return dataWholeMessage_; } else { return dataWholeMessageBuilder_.getMessage(); } } /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public Builder setDataWholeMessage(ProtoBuffSpecification.DataWholeMessage value) { if (dataWholeMessageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } dataWholeMessage_ = value; onChanged(); } else { dataWholeMessageBuilder_.setMessage(value); } bitField0_ |= 0x00000001; return this; } /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public Builder setDataWholeMessage( ProtoBuffSpecification.DataWholeMessage.Builder builderForValue) { if (dataWholeMessageBuilder_ == null) { dataWholeMessage_ = builderForValue.build(); onChanged(); } else { dataWholeMessageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public Builder mergeDataWholeMessage(ProtoBuffSpecification.DataWholeMessage value) { if (dataWholeMessageBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && dataWholeMessage_ != ProtoBuffSpecification.DataWholeMessage.getDefaultInstance()) { dataWholeMessage_ = ProtoBuffSpecification.DataWholeMessage.newBuilder(dataWholeMessage_).mergeFrom(value).buildPartial(); } else { dataWholeMessage_ = value; } onChanged(); } else { dataWholeMessageBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public Builder clearDataWholeMessage() { if (dataWholeMessageBuilder_ == null) { dataWholeMessage_ = ProtoBuffSpecification.DataWholeMessage.getDefaultInstance(); onChanged(); } else { dataWholeMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public ProtoBuffSpecification.DataWholeMessage.Builder getDataWholeMessageBuilder() { bitField0_ |= 0x00000001; onChanged(); return getDataWholeMessageFieldBuilder().getBuilder(); } /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ public ProtoBuffSpecification.DataWholeMessageOrBuilder getDataWholeMessageOrBuilder() { if (dataWholeMessageBuilder_ != null) { return dataWholeMessageBuilder_.getMessageOrBuilder(); } else { return dataWholeMessage_; } } /** * <code>required .DataWholeMessage dataWholeMessage = 1;</code> */ private com.google.protobuf.SingleFieldBuilder< ProtoBuffSpecification.DataWholeMessage, ProtoBuffSpecification.DataWholeMessage.Builder, ProtoBuffSpecification.DataWholeMessageOrBuilder> getDataWholeMessageFieldBuilder() { if (dataWholeMessageBuilder_ == null) { dataWholeMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< ProtoBuffSpecification.DataWholeMessage, ProtoBuffSpecification.DataWholeMessage.Builder, ProtoBuffSpecification.DataWholeMessageOrBuilder>( dataWholeMessage_, getParentForChildren(), isClean()); dataWholeMessage_ = null; } return dataWholeMessageBuilder_; } // required .DataPieceMessage dataPieceMessage = 2; private ProtoBuffSpecification.DataPieceMessage dataPieceMessage_ = ProtoBuffSpecification.DataPieceMessage.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< ProtoBuffSpecification.DataPieceMessage, ProtoBuffSpecification.DataPieceMessage.Builder, ProtoBuffSpecification.DataPieceMessageOrBuilder> dataPieceMessageBuilder_; /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public boolean hasDataPieceMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public ProtoBuffSpecification.DataPieceMessage getDataPieceMessage() { if (dataPieceMessageBuilder_ == null) { return dataPieceMessage_; } else { return dataPieceMessageBuilder_.getMessage(); } } /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public Builder setDataPieceMessage(ProtoBuffSpecification.DataPieceMessage value) { if (dataPieceMessageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } dataPieceMessage_ = value; onChanged(); } else { dataPieceMessageBuilder_.setMessage(value); } bitField0_ |= 0x00000002; return this; } /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public Builder setDataPieceMessage( ProtoBuffSpecification.DataPieceMessage.Builder builderForValue) { if (dataPieceMessageBuilder_ == null) { dataPieceMessage_ = builderForValue.build(); onChanged(); } else { dataPieceMessageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public Builder mergeDataPieceMessage(ProtoBuffSpecification.DataPieceMessage value) { if (dataPieceMessageBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && dataPieceMessage_ != ProtoBuffSpecification.DataPieceMessage.getDefaultInstance()) { dataPieceMessage_ = ProtoBuffSpecification.DataPieceMessage.newBuilder(dataPieceMessage_).mergeFrom(value).buildPartial(); } else { dataPieceMessage_ = value; } onChanged(); } else { dataPieceMessageBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public Builder clearDataPieceMessage() { if (dataPieceMessageBuilder_ == null) { dataPieceMessage_ = ProtoBuffSpecification.DataPieceMessage.getDefaultInstance(); onChanged(); } else { dataPieceMessageBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public ProtoBuffSpecification.DataPieceMessage.Builder getDataPieceMessageBuilder() { bitField0_ |= 0x00000002; onChanged(); return getDataPieceMessageFieldBuilder().getBuilder(); } /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ public ProtoBuffSpecification.DataPieceMessageOrBuilder getDataPieceMessageOrBuilder() { if (dataPieceMessageBuilder_ != null) { return dataPieceMessageBuilder_.getMessageOrBuilder(); } else { return dataPieceMessage_; } } /** * <code>required .DataPieceMessage dataPieceMessage = 2;</code> */ private com.google.protobuf.SingleFieldBuilder< ProtoBuffSpecification.DataPieceMessage, ProtoBuffSpecification.DataPieceMessage.Builder, ProtoBuffSpecification.DataPieceMessageOrBuilder> getDataPieceMessageFieldBuilder() { if (dataPieceMessageBuilder_ == null) { dataPieceMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< ProtoBuffSpecification.DataPieceMessage, ProtoBuffSpecification.DataPieceMessage.Builder, ProtoBuffSpecification.DataPieceMessageOrBuilder>( dataPieceMessage_, getParentForChildren(), isClean()); dataPieceMessage_ = null; } return dataPieceMessageBuilder_; } // @@protoc_insertion_point(builder_scope:PieceUploadRequest) } static { defaultInstance = new PieceUploadRequest(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:PieceUploadRequest) } public interface DataWholeMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { // required string key = 1; /** * <code>required string key = 1;</code> */ boolean hasKey(); /** * <code>required string key = 1;</code> */ java.lang.String getKey(); /** * <code>required string key = 1;</code> */ com.google.protobuf.ByteString getKeyBytes(); // required int32 no_pieces = 2; /** * <code>required int32 no_pieces = 2;</code> */ boolean hasNoPieces(); /** * <code>required int32 no_pieces = 2;</code> */ int getNoPieces(); // required string file_name = 3; /** * <code>required string file_name = 3;</code> */ boolean hasFileName(); /** * <code>required string file_name = 3;</code> */ java.lang.String getFileName(); /** * <code>required string file_name = 3;</code> */ com.google.protobuf.ByteString getFileNameBytes(); } /** * Protobuf type {@code DataWholeMessage} */ public static final class DataWholeMessage extends com.google.protobuf.GeneratedMessage implements DataWholeMessageOrBuilder { // Use DataWholeMessage.newBuilder() to construct. private DataWholeMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private DataWholeMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final DataWholeMessage defaultInstance; public static DataWholeMessage getDefaultInstance() { return defaultInstance; } public DataWholeMessage getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DataWholeMessage( 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: { bitField0_ |= 0x00000001; key_ = input.readBytes(); break; } case 16: { bitField0_ |= 0x00000002; noPieces_ = input.readInt32(); break; } case 26: { bitField0_ |= 0x00000004; fileName_ = 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 { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ProtoBuffSpecification.internal_static_DataWholeMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ProtoBuffSpecification.internal_static_DataWholeMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( ProtoBuffSpecification.DataWholeMessage.class, ProtoBuffSpecification.DataWholeMessage.Builder.class); } public static com.google.protobuf.Parser<DataWholeMessage> PARSER = new com.google.protobuf.AbstractParser<DataWholeMessage>() { public DataWholeMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DataWholeMessage(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<DataWholeMessage> getParserForType() { return PARSER; } private int bitField0_; // required string key = 1; public static final int KEY_FIELD_NUMBER = 1; private java.lang.Object key_; /** * <code>required string key = 1;</code> */ public boolean hasKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required string key = 1;</code> */ public java.lang.String getKey() { java.lang.Object ref = key_; 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()) { key_ = s; } return s; } } /** * <code>required string key = 1;</code> */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // required int32 no_pieces = 2; public static final int NO_PIECES_FIELD_NUMBER = 2; private int noPieces_; /** * <code>required int32 no_pieces = 2;</code> */ public boolean hasNoPieces() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required int32 no_pieces = 2;</code> */ public int getNoPieces() { return noPieces_; } // required string file_name = 3; public static final int FILE_NAME_FIELD_NUMBER = 3; private java.lang.Object fileName_; /** * <code>required string file_name = 3;</code> */ public boolean hasFileName() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required string file_name = 3;</code> */ public java.lang.String getFileName() { java.lang.Object ref = fileName_; 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()) { fileName_ = s; } return s; } } /** * <code>required string file_name = 3;</code> */ public com.google.protobuf.ByteString getFileNameBytes() { java.lang.Object ref = fileName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); fileName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { key_ = ""; noPieces_ = 0; fileName_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasKey()) { memoizedIsInitialized = 0; return false; } if (!hasNoPieces()) { memoizedIsInitialized = 0; return false; } if (!hasFileName()) { 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, getKeyBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(2, noPieces_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getFileNameBytes()); } 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, getKeyBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, noPieces_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getFileNameBytes()); } 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 ProtoBuffSpecification.DataWholeMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ProtoBuffSpecification.DataWholeMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ProtoBuffSpecification.DataWholeMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ProtoBuffSpecification.DataWholeMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ProtoBuffSpecification.DataWholeMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static ProtoBuffSpecification.DataWholeMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static ProtoBuffSpecification.DataWholeMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static ProtoBuffSpecification.DataWholeMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static ProtoBuffSpecification.DataWholeMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static ProtoBuffSpecification.DataWholeMessage 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(ProtoBuffSpecification.DataWholeMessage 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 DataWholeMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements ProtoBuffSpecification.DataWholeMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ProtoBuffSpecification.internal_static_DataWholeMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ProtoBuffSpecification.internal_static_DataWholeMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( ProtoBuffSpecification.DataWholeMessage.class, ProtoBuffSpecification.DataWholeMessage.Builder.class); } // Construct using ProtoBuffSpecification.DataWholeMessage.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(); key_ = ""; bitField0_ = (bitField0_ & ~0x00000001); noPieces_ = 0; bitField0_ = (bitField0_ & ~0x00000002); fileName_ = ""; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ProtoBuffSpecification.internal_static_DataWholeMessage_descriptor; } public ProtoBuffSpecification.DataWholeMessage getDefaultInstanceForType() { return ProtoBuffSpecification.DataWholeMessage.getDefaultInstance(); } public ProtoBuffSpecification.DataWholeMessage build() { ProtoBuffSpecification.DataWholeMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public ProtoBuffSpecification.DataWholeMessage buildPartial() { ProtoBuffSpecification.DataWholeMessage result = new ProtoBuffSpecification.DataWholeMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.key_ = key_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.noPieces_ = noPieces_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.fileName_ = fileName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ProtoBuffSpecification.DataWholeMessage) { return mergeFrom((ProtoBuffSpecification.DataWholeMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ProtoBuffSpecification.DataWholeMessage other) { if (other == ProtoBuffSpecification.DataWholeMessage.getDefaultInstance()) return this; if (other.hasKey()) { bitField0_ |= 0x00000001; key_ = other.key_; onChanged(); } if (other.hasNoPieces()) { setNoPieces(other.getNoPieces()); } if (other.hasFileName()) { bitField0_ |= 0x00000004; fileName_ = other.fileName_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasKey()) { return false; } if (!hasNoPieces()) { return false; } if (!hasFileName()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { ProtoBuffSpecification.DataWholeMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (ProtoBuffSpecification.DataWholeMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // required string key = 1; private java.lang.Object key_ = ""; /** * <code>required string key = 1;</code> */ public boolean hasKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required string key = 1;</code> */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); key_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>required string key = 1;</code> */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>required string key = 1;</code> */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; key_ = value; onChanged(); return this; } /** * <code>required string key = 1;</code> */ public Builder clearKey() { bitField0_ = (bitField0_ & ~0x00000001); key_ = getDefaultInstance().getKey(); onChanged(); return this; } /** * <code>required string key = 1;</code> */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; key_ = value; onChanged(); return this; } // required int32 no_pieces = 2; private int noPieces_ ; /** * <code>required int32 no_pieces = 2;</code> */ public boolean hasNoPieces() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required int32 no_pieces = 2;</code> */ public int getNoPieces() { return noPieces_; } /** * <code>required int32 no_pieces = 2;</code> */ public Builder setNoPieces(int value) { bitField0_ |= 0x00000002; noPieces_ = value; onChanged(); return this; } /** * <code>required int32 no_pieces = 2;</code> */ public Builder clearNoPieces() { bitField0_ = (bitField0_ & ~0x00000002); noPieces_ = 0; onChanged(); return this; } // required string file_name = 3; private java.lang.Object fileName_ = ""; /** * <code>required string file_name = 3;</code> */ public boolean hasFileName() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required string file_name = 3;</code> */ public java.lang.String getFileName() { java.lang.Object ref = fileName_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); fileName_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>required string file_name = 3;</code> */ public com.google.protobuf.ByteString getFileNameBytes() { java.lang.Object ref = fileName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); fileName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>required string file_name = 3;</code> */ public Builder setFileName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; fileName_ = value; onChanged(); return this; } /** * <code>required string file_name = 3;</code> */ public Builder clearFileName() { bitField0_ = (bitField0_ & ~0x00000004); fileName_ = getDefaultInstance().getFileName(); onChanged(); return this; } /** * <code>required string file_name = 3;</code> */ public Builder setFileNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; fileName_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:DataWholeMessage) } static { defaultInstance = new DataWholeMessage(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:DataWholeMessage) } public interface DataPieceMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { // required int32 piece_no = 1; /** * <code>required int32 piece_no = 1;</code> */ boolean hasPieceNo(); /** * <code>required int32 piece_no = 1;</code> */ int getPieceNo(); // required string md5_hash = 2; /** * <code>required string md5_hash = 2;</code> */ boolean hasMd5Hash(); /** * <code>required string md5_hash = 2;</code> */ java.lang.String getMd5Hash(); /** * <code>required string md5_hash = 2;</code> */ com.google.protobuf.ByteString getMd5HashBytes(); // required int64 piece_size = 3; /** * <code>required int64 piece_size = 3;</code> */ boolean hasPieceSize(); /** * <code>required int64 piece_size = 3;</code> */ long getPieceSize(); } /** * Protobuf type {@code DataPieceMessage} */ public static final class DataPieceMessage extends com.google.protobuf.GeneratedMessage implements DataPieceMessageOrBuilder { // Use DataPieceMessage.newBuilder() to construct. private DataPieceMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private DataPieceMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final DataPieceMessage defaultInstance; public static DataPieceMessage getDefaultInstance() { return defaultInstance; } public DataPieceMessage getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DataPieceMessage( 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; pieceNo_ = input.readInt32(); break; } case 18: { bitField0_ |= 0x00000002; md5Hash_ = input.readBytes(); break; } case 24: { bitField0_ |= 0x00000004; pieceSize_ = 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 ProtoBuffSpecification.internal_static_DataPieceMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ProtoBuffSpecification.internal_static_DataPieceMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( ProtoBuffSpecification.DataPieceMessage.class, ProtoBuffSpecification.DataPieceMessage.Builder.class); } public static com.google.protobuf.Parser<DataPieceMessage> PARSER = new com.google.protobuf.AbstractParser<DataPieceMessage>() { public DataPieceMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DataPieceMessage(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<DataPieceMessage> getParserForType() { return PARSER; } private int bitField0_; // required int32 piece_no = 1; public static final int PIECE_NO_FIELD_NUMBER = 1; private int pieceNo_; /** * <code>required int32 piece_no = 1;</code> */ public boolean hasPieceNo() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required int32 piece_no = 1;</code> */ public int getPieceNo() { return pieceNo_; } // required string md5_hash = 2; public static final int MD5_HASH_FIELD_NUMBER = 2; private java.lang.Object md5Hash_; /** * <code>required string md5_hash = 2;</code> */ public boolean hasMd5Hash() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required string md5_hash = 2;</code> */ public java.lang.String getMd5Hash() { java.lang.Object ref = md5Hash_; 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()) { md5Hash_ = s; } return s; } } /** * <code>required string md5_hash = 2;</code> */ public com.google.protobuf.ByteString getMd5HashBytes() { java.lang.Object ref = md5Hash_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); md5Hash_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // required int64 piece_size = 3; public static final int PIECE_SIZE_FIELD_NUMBER = 3; private long pieceSize_; /** * <code>required int64 piece_size = 3;</code> */ public boolean hasPieceSize() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required int64 piece_size = 3;</code> */ public long getPieceSize() { return pieceSize_; } private void initFields() { pieceNo_ = 0; md5Hash_ = ""; pieceSize_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasPieceNo()) { memoizedIsInitialized = 0; return false; } if (!hasMd5Hash()) { memoizedIsInitialized = 0; return false; } if (!hasPieceSize()) { 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.writeInt32(1, pieceNo_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getMd5HashBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt64(3, pieceSize_); } 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 .computeInt32Size(1, pieceNo_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getMd5HashBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, pieceSize_); } 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 ProtoBuffSpecification.DataPieceMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ProtoBuffSpecification.DataPieceMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ProtoBuffSpecification.DataPieceMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ProtoBuffSpecification.DataPieceMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ProtoBuffSpecification.DataPieceMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static ProtoBuffSpecification.DataPieceMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static ProtoBuffSpecification.DataPieceMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static ProtoBuffSpecification.DataPieceMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static ProtoBuffSpecification.DataPieceMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static ProtoBuffSpecification.DataPieceMessage 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(ProtoBuffSpecification.DataPieceMessage 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 DataPieceMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements ProtoBuffSpecification.DataPieceMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ProtoBuffSpecification.internal_static_DataPieceMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ProtoBuffSpecification.internal_static_DataPieceMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( ProtoBuffSpecification.DataPieceMessage.class, ProtoBuffSpecification.DataPieceMessage.Builder.class); } // Construct using ProtoBuffSpecification.DataPieceMessage.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(); pieceNo_ = 0; bitField0_ = (bitField0_ & ~0x00000001); md5Hash_ = ""; bitField0_ = (bitField0_ & ~0x00000002); pieceSize_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ProtoBuffSpecification.internal_static_DataPieceMessage_descriptor; } public ProtoBuffSpecification.DataPieceMessage getDefaultInstanceForType() { return ProtoBuffSpecification.DataPieceMessage.getDefaultInstance(); } public ProtoBuffSpecification.DataPieceMessage build() { ProtoBuffSpecification.DataPieceMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public ProtoBuffSpecification.DataPieceMessage buildPartial() { ProtoBuffSpecification.DataPieceMessage result = new ProtoBuffSpecification.DataPieceMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.pieceNo_ = pieceNo_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.md5Hash_ = md5Hash_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.pieceSize_ = pieceSize_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ProtoBuffSpecification.DataPieceMessage) { return mergeFrom((ProtoBuffSpecification.DataPieceMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ProtoBuffSpecification.DataPieceMessage other) { if (other == ProtoBuffSpecification.DataPieceMessage.getDefaultInstance()) return this; if (other.hasPieceNo()) { setPieceNo(other.getPieceNo()); } if (other.hasMd5Hash()) { bitField0_ |= 0x00000002; md5Hash_ = other.md5Hash_; onChanged(); } if (other.hasPieceSize()) { setPieceSize(other.getPieceSize()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasPieceNo()) { return false; } if (!hasMd5Hash()) { return false; } if (!hasPieceSize()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { ProtoBuffSpecification.DataPieceMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (ProtoBuffSpecification.DataPieceMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // required int32 piece_no = 1; private int pieceNo_ ; /** * <code>required int32 piece_no = 1;</code> */ public boolean hasPieceNo() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required int32 piece_no = 1;</code> */ public int getPieceNo() { return pieceNo_; } /** * <code>required int32 piece_no = 1;</code> */ public Builder setPieceNo(int value) { bitField0_ |= 0x00000001; pieceNo_ = value; onChanged(); return this; } /** * <code>required int32 piece_no = 1;</code> */ public Builder clearPieceNo() { bitField0_ = (bitField0_ & ~0x00000001); pieceNo_ = 0; onChanged(); return this; } // required string md5_hash = 2; private java.lang.Object md5Hash_ = ""; /** * <code>required string md5_hash = 2;</code> */ public boolean hasMd5Hash() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required string md5_hash = 2;</code> */ public java.lang.String getMd5Hash() { java.lang.Object ref = md5Hash_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); md5Hash_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>required string md5_hash = 2;</code> */ public com.google.protobuf.ByteString getMd5HashBytes() { java.lang.Object ref = md5Hash_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); md5Hash_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>required string md5_hash = 2;</code> */ public Builder setMd5Hash( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; md5Hash_ = value; onChanged(); return this; } /** * <code>required string md5_hash = 2;</code> */ public Builder clearMd5Hash() { bitField0_ = (bitField0_ & ~0x00000002); md5Hash_ = getDefaultInstance().getMd5Hash(); onChanged(); return this; } /** * <code>required string md5_hash = 2;</code> */ public Builder setMd5HashBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; md5Hash_ = value; onChanged(); return this; } // required int64 piece_size = 3; private long pieceSize_ ; /** * <code>required int64 piece_size = 3;</code> */ public boolean hasPieceSize() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required int64 piece_size = 3;</code> */ public long getPieceSize() { return pieceSize_; } /** * <code>required int64 piece_size = 3;</code> */ public Builder setPieceSize(long value) { bitField0_ |= 0x00000004; pieceSize_ = value; onChanged(); return this; } /** * <code>required int64 piece_size = 3;</code> */ public Builder clearPieceSize() { bitField0_ = (bitField0_ & ~0x00000004); pieceSize_ = 0L; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:DataPieceMessage) } static { defaultInstance = new DataPieceMessage(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:DataPieceMessage) } public interface PieceUploadReplyOrBuilder extends com.google.protobuf.MessageOrBuilder { // required .PieceUploadReply.Result result = 1 [default = ERROR]; /** * <code>required .PieceUploadReply.Result result = 1 [default = ERROR];</code> */ boolean hasResult(); /** * <code>required .PieceUploadReply.Result result = 1 [default = ERROR];</code> */ ProtoBuffSpecification.PieceUploadReply.Result getResult(); } /** * Protobuf type {@code PieceUploadReply} */ public static final class PieceUploadReply extends com.google.protobuf.GeneratedMessage implements PieceUploadReplyOrBuilder { // Use PieceUploadReply.newBuilder() to construct. private PieceUploadReply(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private PieceUploadReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final PieceUploadReply defaultInstance; public static PieceUploadReply getDefaultInstance() { return defaultInstance; } public PieceUploadReply getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PieceUploadReply( 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: { int rawValue = input.readEnum(); ProtoBuffSpecification.PieceUploadReply.Result value = ProtoBuffSpecification.PieceUploadReply.Result.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; result_ = value; } 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 ProtoBuffSpecification.internal_static_PieceUploadReply_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ProtoBuffSpecification.internal_static_PieceUploadReply_fieldAccessorTable .ensureFieldAccessorsInitialized( ProtoBuffSpecification.PieceUploadReply.class, ProtoBuffSpecification.PieceUploadReply.Builder.class); } public static com.google.protobuf.Parser<PieceUploadReply> PARSER = new com.google.protobuf.AbstractParser<PieceUploadReply>() { public PieceUploadReply parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PieceUploadReply(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<PieceUploadReply> getParserForType() { return PARSER; } /** * Protobuf enum {@code PieceUploadReply.Result} */ public enum Result implements com.google.protobuf.ProtocolMessageEnum { /** * <code>SUCCESS = 0;</code> */ SUCCESS(0, 0), /** * <code>NOT_REQUIRED = 1;</code> */ NOT_REQUIRED(1, 1), /** * <code>NONE_REQUIRED = 2;</code> */ NONE_REQUIRED(2, 2), /** * <code>ERROR = 3;</code> */ ERROR(3, 3), ; /** * <code>SUCCESS = 0;</code> */ public static final int SUCCESS_VALUE = 0; /** * <code>NOT_REQUIRED = 1;</code> */ public static final int NOT_REQUIRED_VALUE = 1; /** * <code>NONE_REQUIRED = 2;</code> */ public static final int NONE_REQUIRED_VALUE = 2; /** * <code>ERROR = 3;</code> */ public static final int ERROR_VALUE = 3; public final int getNumber() { return value; } public static Result valueOf(int value) { switch (value) { case 0: return SUCCESS; case 1: return NOT_REQUIRED; case 2: return NONE_REQUIRED; case 3: return ERROR; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<Result> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<Result> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<Result>() { public Result findValueByNumber(int number) { return Result.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return ProtoBuffSpecification.PieceUploadReply.getDescriptor().getEnumTypes().get(0); } private static final Result[] VALUES = values(); public static Result valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; private Result(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:PieceUploadReply.Result) } private int bitField0_; // required .PieceUploadReply.Result result = 1 [default = ERROR]; public static final int RESULT_FIELD_NUMBER = 1; private ProtoBuffSpecification.PieceUploadReply.Result result_; /** * <code>required .PieceUploadReply.Result result = 1 [default = ERROR];</code> */ public boolean hasResult() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required .PieceUploadReply.Result result = 1 [default = ERROR];</code> */ public ProtoBuffSpecification.PieceUploadReply.Result getResult() { return result_; } private void initFields() { result_ = ProtoBuffSpecification.PieceUploadReply.Result.ERROR; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasResult()) { 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.writeEnum(1, result_.getNumber()); } 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 .computeEnumSize(1, result_.getNumber()); } 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 ProtoBuffSpecification.PieceUploadReply parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ProtoBuffSpecification.PieceUploadReply parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ProtoBuffSpecification.PieceUploadReply parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ProtoBuffSpecification.PieceUploadReply parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ProtoBuffSpecification.PieceUploadReply parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static ProtoBuffSpecification.PieceUploadReply parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static ProtoBuffSpecification.PieceUploadReply parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static ProtoBuffSpecification.PieceUploadReply parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static ProtoBuffSpecification.PieceUploadReply parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static ProtoBuffSpecification.PieceUploadReply 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(ProtoBuffSpecification.PieceUploadReply 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 PieceUploadReply} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements ProtoBuffSpecification.PieceUploadReplyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ProtoBuffSpecification.internal_static_PieceUploadReply_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ProtoBuffSpecification.internal_static_PieceUploadReply_fieldAccessorTable .ensureFieldAccessorsInitialized( ProtoBuffSpecification.PieceUploadReply.class, ProtoBuffSpecification.PieceUploadReply.Builder.class); } // Construct using ProtoBuffSpecification.PieceUploadReply.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(); result_ = ProtoBuffSpecification.PieceUploadReply.Result.ERROR; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ProtoBuffSpecification.internal_static_PieceUploadReply_descriptor; } public ProtoBuffSpecification.PieceUploadReply getDefaultInstanceForType() { return ProtoBuffSpecification.PieceUploadReply.getDefaultInstance(); } public ProtoBuffSpecification.PieceUploadReply build() { ProtoBuffSpecification.PieceUploadReply result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public ProtoBuffSpecification.PieceUploadReply buildPartial() { ProtoBuffSpecification.PieceUploadReply result = new ProtoBuffSpecification.PieceUploadReply(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.result_ = result_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ProtoBuffSpecification.PieceUploadReply) { return mergeFrom((ProtoBuffSpecification.PieceUploadReply)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ProtoBuffSpecification.PieceUploadReply other) { if (other == ProtoBuffSpecification.PieceUploadReply.getDefaultInstance()) return this; if (other.hasResult()) { setResult(other.getResult()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasResult()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { ProtoBuffSpecification.PieceUploadReply parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (ProtoBuffSpecification.PieceUploadReply) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // required .PieceUploadReply.Result result = 1 [default = ERROR]; private ProtoBuffSpecification.PieceUploadReply.Result result_ = ProtoBuffSpecification.PieceUploadReply.Result.ERROR; /** * <code>required .PieceUploadReply.Result result = 1 [default = ERROR];</code> */ public boolean hasResult() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required .PieceUploadReply.Result result = 1 [default = ERROR];</code> */ public ProtoBuffSpecification.PieceUploadReply.Result getResult() { return result_; } /** * <code>required .PieceUploadReply.Result result = 1 [default = ERROR];</code> */ public Builder setResult(ProtoBuffSpecification.PieceUploadReply.Result value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; result_ = value; onChanged(); return this; } /** * <code>required .PieceUploadReply.Result result = 1 [default = ERROR];</code> */ public Builder clearResult() { bitField0_ = (bitField0_ & ~0x00000001); result_ = ProtoBuffSpecification.PieceUploadReply.Result.ERROR; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:PieceUploadReply) } static { defaultInstance = new PieceUploadReply(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:PieceUploadReply) } private static com.google.protobuf.Descriptors.Descriptor internal_static_PieceUploadRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_PieceUploadRequest_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_DataWholeMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DataWholeMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_DataPieceMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DataPieceMessage_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_PieceUploadReply_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_PieceUploadReply_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\036proto_buff_specification.proto\"n\n\022Piec" + "eUploadRequest\022+\n\020dataWholeMessage\030\001 \002(\013" + "2\021.DataWholeMessage\022+\n\020dataPieceMessage\030" + "\002 \002(\0132\021.DataPieceMessage\"E\n\020DataWholeMes" + "sage\022\013\n\003key\030\001 \002(\t\022\021\n\tno_pieces\030\002 \002(\005\022\021\n\t" + "file_name\030\003 \002(\t\"J\n\020DataPieceMessage\022\020\n\010p" + "iece_no\030\001 \002(\005\022\020\n\010md5_hash\030\002 \002(\t\022\022\n\npiece" + "_size\030\003 \002(\003\"\212\001\n\020PieceUploadReply\022/\n\006resu" + "lt\030\001 \002(\0162\030.PieceUploadReply.Result:\005ERRO" + "R\"E\n\006Result\022\013\n\007SUCCESS\020\000\022\020\n\014NOT_REQUIRED", "\020\001\022\021\n\rNONE_REQUIRED\020\002\022\t\n\005ERROR\020\003" }; 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_PieceUploadRequest_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_PieceUploadRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_PieceUploadRequest_descriptor, new java.lang.String[] { "DataWholeMessage", "DataPieceMessage", }); internal_static_DataWholeMessage_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_DataWholeMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DataWholeMessage_descriptor, new java.lang.String[] { "Key", "NoPieces", "FileName", }); internal_static_DataPieceMessage_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_DataPieceMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DataPieceMessage_descriptor, new java.lang.String[] { "PieceNo", "Md5Hash", "PieceSize", }); internal_static_PieceUploadReply_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_PieceUploadReply_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_PieceUploadReply_descriptor, new java.lang.String[] { "Result", }); return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } // @@protoc_insertion_point(outer_class_scope) }