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

package eu.dnetlib.data.proto;

public final class ResultOrganizationProtos {
  private ResultOrganizationProtos() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface ResultOrganizationOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
    
    // optional .eu.dnetlib.data.proto.ResultOrganization.Affiliation affiliation = 1;
    boolean hasAffiliation();
    eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation getAffiliation();
    eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.AffiliationOrBuilder getAffiliationOrBuilder();
  }
  public static final class ResultOrganization extends
      com.google.protobuf.GeneratedMessage
      implements ResultOrganizationOrBuilder {
    // Use ResultOrganization.newBuilder() to construct.
    private ResultOrganization(Builder builder) {
      super(builder);
    }
    private ResultOrganization(boolean noInit) {}
    
    private static final ResultOrganization defaultInstance;
    public static ResultOrganization getDefaultInstance() {
      return defaultInstance;
    }
    
    public ResultOrganization getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return eu.dnetlib.data.proto.ResultOrganizationProtos.internal_static_eu_dnetlib_data_proto_ResultOrganization_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return eu.dnetlib.data.proto.ResultOrganizationProtos.internal_static_eu_dnetlib_data_proto_ResultOrganization_fieldAccessorTable;
    }
    
    public interface AffiliationOrBuilder
        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 Affiliation extends
        com.google.protobuf.GeneratedMessage
        implements AffiliationOrBuilder {
      // Use Affiliation.newBuilder() to construct.
      private Affiliation(Builder builder) {
        super(builder);
      }
      private Affiliation(boolean noInit) {}
      
      private static final Affiliation defaultInstance;
      public static Affiliation getDefaultInstance() {
        return defaultInstance;
      }
      
      public Affiliation getDefaultInstanceForType() {
        return defaultInstance;
      }
      
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return eu.dnetlib.data.proto.ResultOrganizationProtos.internal_static_eu_dnetlib_data_proto_ResultOrganization_Affiliation_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return eu.dnetlib.data.proto.ResultOrganizationProtos.internal_static_eu_dnetlib_data_proto_ResultOrganization_Affiliation_fieldAccessorTable;
      }
      
      public enum RelName
          implements com.google.protobuf.ProtocolMessageEnum {
        isAuthorInstitutionOf(0, 1),
        hasAuthorInstitution(1, 2),
        ;
        
        public static final int isAuthorInstitutionOf_VALUE = 1;
        public static final int hasAuthorInstitution_VALUE = 2;
        
        
        public final int getNumber() { return value; }
        
        public static RelName valueOf(int value) {
          switch (value) {
            case 1: return isAuthorInstitutionOf;
            case 2: return hasAuthorInstitution;
            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.ResultOrganizationProtos.ResultOrganization.Affiliation.getDescriptor().getEnumTypes().get(0);
        }
        
        private static final RelName[] VALUES = {
          isAuthorInstitutionOf, hasAuthorInstitution, 
        };
        
        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.ResultOrganization.Affiliation.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.ResultOrganizationProtos.ResultOrganization.Affiliation parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return newBuilder().mergeFrom(data).buildParsed();
      }
      public static eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation 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.ResultOrganizationProtos.ResultOrganization.Affiliation parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return newBuilder().mergeFrom(data).buildParsed();
      }
      public static eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation 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.ResultOrganizationProtos.ResultOrganization.Affiliation parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return newBuilder().mergeFrom(input).buildParsed();
      }
      public static eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation 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.ResultOrganizationProtos.ResultOrganization.Affiliation 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.ResultOrganizationProtos.ResultOrganization.Affiliation 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.ResultOrganizationProtos.ResultOrganization.Affiliation parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return newBuilder().mergeFrom(input).buildParsed();
      }
      public static eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation 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.ResultOrganizationProtos.ResultOrganization.Affiliation 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.ResultOrganizationProtos.ResultOrganization.AffiliationOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return eu.dnetlib.data.proto.ResultOrganizationProtos.internal_static_eu_dnetlib_data_proto_ResultOrganization_Affiliation_descriptor;
        }
        
        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return eu.dnetlib.data.proto.ResultOrganizationProtos.internal_static_eu_dnetlib_data_proto_ResultOrganization_Affiliation_fieldAccessorTable;
        }
        
        // Construct using eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.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.ResultOrganizationProtos.ResultOrganization.Affiliation.getDescriptor();
        }
        
        public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation getDefaultInstanceForType() {
          return eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.getDefaultInstance();
        }
        
        public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation build() {
          eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }
        
        private eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation buildParsed()
            throws com.google.protobuf.InvalidProtocolBufferException {
          eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(
              result).asInvalidProtocolBufferException();
          }
          return result;
        }
        
        public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation buildPartial() {
          eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation result = new eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation(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.ResultOrganizationProtos.ResultOrganization.Affiliation) {
            return mergeFrom((eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }
        
        public Builder mergeFrom(eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation other) {
          if (other == eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.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.ResultOrganization.Affiliation)
      }
      
      static {
        defaultInstance = new Affiliation(true);
        defaultInstance.initFields();
      }
      
      // @@protoc_insertion_point(class_scope:eu.dnetlib.data.proto.ResultOrganization.Affiliation)
    }
    
    private int bitField0_;
    // optional .eu.dnetlib.data.proto.ResultOrganization.Affiliation affiliation = 1;
    public static final int AFFILIATION_FIELD_NUMBER = 1;
    private eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation affiliation_;
    public boolean hasAffiliation() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation getAffiliation() {
      return affiliation_;
    }
    public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.AffiliationOrBuilder getAffiliationOrBuilder() {
      return affiliation_;
    }
    
    private void initFields() {
      affiliation_ = eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (hasAffiliation()) {
        if (!getAffiliation().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, affiliation_);
      }
      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, affiliation_);
      }
      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.ResultOrganizationProtos.ResultOrganization parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization 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.ResultOrganizationProtos.ResultOrganization parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization 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.ResultOrganizationProtos.ResultOrganization parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization 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.ResultOrganizationProtos.ResultOrganization 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.ResultOrganizationProtos.ResultOrganization 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.ResultOrganizationProtos.ResultOrganization parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization 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.ResultOrganizationProtos.ResultOrganization 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.ResultOrganizationProtos.ResultOrganizationOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return eu.dnetlib.data.proto.ResultOrganizationProtos.internal_static_eu_dnetlib_data_proto_ResultOrganization_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return eu.dnetlib.data.proto.ResultOrganizationProtos.internal_static_eu_dnetlib_data_proto_ResultOrganization_fieldAccessorTable;
      }
      
      // Construct using eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getAffiliationFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        if (affiliationBuilder_ == null) {
          affiliation_ = eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.getDefaultInstance();
        } else {
          affiliationBuilder_.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.ResultOrganizationProtos.ResultOrganization.getDescriptor();
      }
      
      public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization getDefaultInstanceForType() {
        return eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.getDefaultInstance();
      }
      
      public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization build() {
        eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization buildPartial() {
        eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization result = new eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        if (affiliationBuilder_ == null) {
          result.affiliation_ = affiliation_;
        } else {
          result.affiliation_ = affiliationBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization) {
          return mergeFrom((eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization other) {
        if (other == eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.getDefaultInstance()) return this;
        if (other.hasAffiliation()) {
          mergeAffiliation(other.getAffiliation());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        if (hasAffiliation()) {
          if (!getAffiliation().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.ResultOrganizationProtos.ResultOrganization.Affiliation.Builder subBuilder = eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.newBuilder();
              if (hasAffiliation()) {
                subBuilder.mergeFrom(getAffiliation());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setAffiliation(subBuilder.buildPartial());
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // optional .eu.dnetlib.data.proto.ResultOrganization.Affiliation affiliation = 1;
      private eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation affiliation_ = eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation, eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.Builder, eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.AffiliationOrBuilder> affiliationBuilder_;
      public boolean hasAffiliation() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation getAffiliation() {
        if (affiliationBuilder_ == null) {
          return affiliation_;
        } else {
          return affiliationBuilder_.getMessage();
        }
      }
      public Builder setAffiliation(eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation value) {
        if (affiliationBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          affiliation_ = value;
          onChanged();
        } else {
          affiliationBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder setAffiliation(
          eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.Builder builderForValue) {
        if (affiliationBuilder_ == null) {
          affiliation_ = builderForValue.build();
          onChanged();
        } else {
          affiliationBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder mergeAffiliation(eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation value) {
        if (affiliationBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001) &&
              affiliation_ != eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.getDefaultInstance()) {
            affiliation_ =
              eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.newBuilder(affiliation_).mergeFrom(value).buildPartial();
          } else {
            affiliation_ = value;
          }
          onChanged();
        } else {
          affiliationBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder clearAffiliation() {
        if (affiliationBuilder_ == null) {
          affiliation_ = eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.getDefaultInstance();
          onChanged();
        } else {
          affiliationBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.Builder getAffiliationBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getAffiliationFieldBuilder().getBuilder();
      }
      public eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.AffiliationOrBuilder getAffiliationOrBuilder() {
        if (affiliationBuilder_ != null) {
          return affiliationBuilder_.getMessageOrBuilder();
        } else {
          return affiliation_;
        }
      }
      private com.google.protobuf.SingleFieldBuilder<
          eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation, eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.Builder, eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.AffiliationOrBuilder> 
          getAffiliationFieldBuilder() {
        if (affiliationBuilder_ == null) {
          affiliationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation, eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.Builder, eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.AffiliationOrBuilder>(
                  affiliation_,
                  getParentForChildren(),
                  isClean());
          affiliation_ = null;
        }
        return affiliationBuilder_;
      }
      
      // @@protoc_insertion_point(builder_scope:eu.dnetlib.data.proto.ResultOrganization)
    }
    
    static {
      defaultInstance = new ResultOrganization(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:eu.dnetlib.data.proto.ResultOrganization)
  }
  
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_eu_dnetlib_data_proto_ResultOrganization_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_eu_dnetlib_data_proto_ResultOrganization_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_eu_dnetlib_data_proto_ResultOrganization_Affiliation_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_eu_dnetlib_data_proto_ResultOrganization_Affiliation_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\031Result_Organization.proto\022\025eu.dnetlib." +
      "data.proto\032\021RelMetadata.proto\"\351\001\n\022Result" +
      "Organization\022J\n\013affiliation\030\001 \001(\01325.eu.d" +
      "netlib.data.proto.ResultOrganization.Aff" +
      "iliation\032\206\001\n\013Affiliation\0227\n\013relMetadata\030" +
      "\001 \002(\0132\".eu.dnetlib.data.proto.RelMetadat" +
      "a\">\n\007RelName\022\031\n\025isAuthorInstitutionOf\020\001\022" +
      "\030\n\024hasAuthorInstitution\020\002B1\n\025eu.dnetlib." +
      "data.protoB\030ResultOrganizationProtos"
    };
    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_ResultOrganization_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_eu_dnetlib_data_proto_ResultOrganization_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_eu_dnetlib_data_proto_ResultOrganization_descriptor,
              new java.lang.String[] { "Affiliation", },
              eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.class,
              eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Builder.class);
          internal_static_eu_dnetlib_data_proto_ResultOrganization_Affiliation_descriptor =
            internal_static_eu_dnetlib_data_proto_ResultOrganization_descriptor.getNestedTypes().get(0);
          internal_static_eu_dnetlib_data_proto_ResultOrganization_Affiliation_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_eu_dnetlib_data_proto_ResultOrganization_Affiliation_descriptor,
              new java.lang.String[] { "RelMetadata", },
              eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.class,
              eu.dnetlib.data.proto.ResultOrganizationProtos.ResultOrganization.Affiliation.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)
}
