// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: Dedup.proto

package eu.dnetlib.data.proto;

public final class DedupProtos {
  private DedupProtos() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface DedupOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
    
    // required .eu.dnetlib.data.proto.RelMetadata relMetadata = 1;
    boolean hasRelMetadata();
    eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata getRelMetadata();
    eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder getRelMetadataOrBuilder();
  }
  public static final class Dedup extends
      com.google.protobuf.GeneratedMessage
      implements DedupOrBuilder {
    // Use Dedup.newBuilder() to construct.
    private Dedup(Builder builder) {
      super(builder);
    }
    private Dedup(boolean noInit) {}
    
    private static final Dedup defaultInstance;
    public static Dedup getDefaultInstance() {
      return defaultInstance;
    }
    
    public Dedup getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return eu.dnetlib.data.proto.DedupProtos.internal_static_eu_dnetlib_data_proto_Dedup_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return eu.dnetlib.data.proto.DedupProtos.internal_static_eu_dnetlib_data_proto_Dedup_fieldAccessorTable;
    }
    
    public enum RelName
        implements com.google.protobuf.ProtocolMessageEnum {
      isMergedIn(0, 1),
      merges(1, 2),
      ;
      
      public static final int isMergedIn_VALUE = 1;
      public static final int merges_VALUE = 2;
      
      
      public final int getNumber() { return value; }
      
      public static RelName valueOf(int value) {
        switch (value) {
          case 1: return isMergedIn;
          case 2: return merges;
          default: return null;
        }
      }
      
      public static com.google.protobuf.Internal.EnumLiteMap<RelName>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static com.google.protobuf.Internal.EnumLiteMap<RelName>
          internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<RelName>() {
              public RelName findValueByNumber(int number) {
                return RelName.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 eu.dnetlib.data.proto.DedupProtos.Dedup.getDescriptor().getEnumTypes().get(0);
      }
      
      private static final RelName[] VALUES = {
        isMergedIn, merges, 
      };
      
      public static RelName 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 RelName(int index, int value) {
        this.index = index;
        this.value = value;
      }
      
      // @@protoc_insertion_point(enum_scope:eu.dnetlib.data.proto.Dedup.RelName)
    }
    
    private int bitField0_;
    // required .eu.dnetlib.data.proto.RelMetadata relMetadata = 1;
    public static final int RELMETADATA_FIELD_NUMBER = 1;
    private eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata relMetadata_;
    public boolean hasRelMetadata() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata getRelMetadata() {
      return relMetadata_;
    }
    public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder getRelMetadataOrBuilder() {
      return relMetadata_;
    }
    
    private void initFields() {
      relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasRelMetadata()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!getRelMetadata().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, relMetadata_);
      }
      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, relMetadata_);
      }
      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 eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static eu.dnetlib.data.proto.DedupProtos.Dedup parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static eu.dnetlib.data.proto.DedupProtos.Dedup parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static eu.dnetlib.data.proto.DedupProtos.Dedup parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(eu.dnetlib.data.proto.DedupProtos.Dedup 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;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements eu.dnetlib.data.proto.DedupProtos.DedupOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return eu.dnetlib.data.proto.DedupProtos.internal_static_eu_dnetlib_data_proto_Dedup_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return eu.dnetlib.data.proto.DedupProtos.internal_static_eu_dnetlib_data_proto_Dedup_fieldAccessorTable;
      }
      
      // Construct using eu.dnetlib.data.proto.DedupProtos.Dedup.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getRelMetadataFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        if (relMetadataBuilder_ == null) {
          relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
        } else {
          relMetadataBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return eu.dnetlib.data.proto.DedupProtos.Dedup.getDescriptor();
      }
      
      public eu.dnetlib.data.proto.DedupProtos.Dedup getDefaultInstanceForType() {
        return eu.dnetlib.data.proto.DedupProtos.Dedup.getDefaultInstance();
      }
      
      public eu.dnetlib.data.proto.DedupProtos.Dedup build() {
        eu.dnetlib.data.proto.DedupProtos.Dedup result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private eu.dnetlib.data.proto.DedupProtos.Dedup buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        eu.dnetlib.data.proto.DedupProtos.Dedup result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public eu.dnetlib.data.proto.DedupProtos.Dedup buildPartial() {
        eu.dnetlib.data.proto.DedupProtos.Dedup result = new eu.dnetlib.data.proto.DedupProtos.Dedup(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        if (relMetadataBuilder_ == null) {
          result.relMetadata_ = relMetadata_;
        } else {
          result.relMetadata_ = relMetadataBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof eu.dnetlib.data.proto.DedupProtos.Dedup) {
          return mergeFrom((eu.dnetlib.data.proto.DedupProtos.Dedup)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(eu.dnetlib.data.proto.DedupProtos.Dedup other) {
        if (other == eu.dnetlib.data.proto.DedupProtos.Dedup.getDefaultInstance()) return this;
        if (other.hasRelMetadata()) {
          mergeRelMetadata(other.getRelMetadata());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasRelMetadata()) {
          
          return false;
        }
        if (!getRelMetadata().isInitialized()) {
          
          return false;
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 10: {
              eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder subBuilder = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.newBuilder();
              if (hasRelMetadata()) {
                subBuilder.mergeFrom(getRelMetadata());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setRelMetadata(subBuilder.buildPartial());
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // required .eu.dnetlib.data.proto.RelMetadata relMetadata = 1;
      private eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder> relMetadataBuilder_;
      public boolean hasRelMetadata() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata getRelMetadata() {
        if (relMetadataBuilder_ == null) {
          return relMetadata_;
        } else {
          return relMetadataBuilder_.getMessage();
        }
      }
      public Builder setRelMetadata(eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata value) {
        if (relMetadataBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          relMetadata_ = value;
          onChanged();
        } else {
          relMetadataBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder setRelMetadata(
          eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder builderForValue) {
        if (relMetadataBuilder_ == null) {
          relMetadata_ = builderForValue.build();
          onChanged();
        } else {
          relMetadataBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder mergeRelMetadata(eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata value) {
        if (relMetadataBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001) &&
              relMetadata_ != eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance()) {
            relMetadata_ =
              eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.newBuilder(relMetadata_).mergeFrom(value).buildPartial();
          } else {
            relMetadata_ = value;
          }
          onChanged();
        } else {
          relMetadataBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder clearRelMetadata() {
        if (relMetadataBuilder_ == null) {
          relMetadata_ = eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.getDefaultInstance();
          onChanged();
        } else {
          relMetadataBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder getRelMetadataBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getRelMetadataFieldBuilder().getBuilder();
      }
      public eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder getRelMetadataOrBuilder() {
        if (relMetadataBuilder_ != null) {
          return relMetadataBuilder_.getMessageOrBuilder();
        } else {
          return relMetadata_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder> 
          getRelMetadataFieldBuilder() {
        if (relMetadataBuilder_ == null) {
          relMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata.Builder, eu.dnetlib.data.proto.RelMetadataProtos.RelMetadataOrBuilder>(
                  relMetadata_,
                  getParentForChildren(),
                  isClean());
          relMetadata_ = null;
        }
        return relMetadataBuilder_;
      }
      
      // @@protoc_insertion_point(builder_scope:eu.dnetlib.data.proto.Dedup)
    }
    
    static {
      defaultInstance = new Dedup(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:eu.dnetlib.data.proto.Dedup)
  }
  
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_eu_dnetlib_data_proto_Dedup_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_eu_dnetlib_data_proto_Dedup_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\013Dedup.proto\022\025eu.dnetlib.data.proto\032\021Re" +
      "lMetadata.proto\"g\n\005Dedup\0227\n\013relMetadata\030" +
      "\001 \002(\0132\".eu.dnetlib.data.proto.RelMetadat" +
      "a\"%\n\007RelName\022\016\n\nisMergedIn\020\001\022\n\n\006merges\020\002" +
      "B$\n\025eu.dnetlib.data.protoB\013DedupProtos"
    };
    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_eu_dnetlib_data_proto_Dedup_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_eu_dnetlib_data_proto_Dedup_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_eu_dnetlib_data_proto_Dedup_descriptor,
              new java.lang.String[] { "RelMetadata", },
              eu.dnetlib.data.proto.DedupProtos.Dedup.class,
              eu.dnetlib.data.proto.DedupProtos.Dedup.Builder.class);
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          eu.dnetlib.data.proto.RelMetadataProtos.getDescriptor(),
        }, assigner);
  }
  
  // @@protoc_insertion_point(outer_class_scope)
}
