/*
 Copyright 2013-2015 Jason Leyba

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */

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

package com.github.jsdossier.proto;

/**
 * Protobuf type {@code dossier.Enumeration}
 *
 * <pre>
 * Describes an enumeration.
 * </pre>
 */
public final class Enumeration extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:dossier.Enumeration)
    EnumerationOrBuilder {
  // Use Enumeration.newBuilder() to construct.
  private Enumeration(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    super(builder);
    this.unknownFields = builder.getUnknownFields();
  }
  private Enumeration(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

  private static final Enumeration defaultInstance;
  public static Enumeration getDefaultInstance() {
    return defaultInstance;
  }

  public Enumeration getDefaultInstanceForType() {
    return defaultInstance;
  }

  private final com.google.protobuf.UnknownFieldSet unknownFields;
  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
    return this.unknownFields;
  }
  private Enumeration(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    initFields();
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!parseUnknownField(input, unknownFields,
                                   extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            com.github.jsdossier.proto.Comment.Builder subBuilder = null;
            if (((bitField0_ & 0x00000001) == 0x00000001)) {
              subBuilder = type_.toBuilder();
            }
            type_ = input.readMessage(com.github.jsdossier.proto.Comment.PARSER, extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(type_);
              type_ = subBuilder.buildPartial();
            }
            bitField0_ |= 0x00000001;
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
              value_ = new java.util.ArrayList<com.github.jsdossier.proto.Enumeration.Value>();
              mutable_bitField0_ |= 0x00000002;
            }
            value_.add(input.readMessage(com.github.jsdossier.proto.Enumeration.Value.PARSER, extensionRegistry));
            break;
          }
          case 24: {
            int rawValue = input.readEnum();
            com.github.jsdossier.proto.Visibility value = com.github.jsdossier.proto.Visibility.valueOf(rawValue);
            if (value == null) {
              unknownFields.mergeVarintField(3, rawValue);
            } else {
              bitField0_ |= 0x00000002;
              visibility_ = 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 {
      if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
        value_ = java.util.Collections.unmodifiableList(value_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.github.jsdossier.proto.Dossier.internal_static_dossier_Enumeration_descriptor;
  }

  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.github.jsdossier.proto.Dossier.internal_static_dossier_Enumeration_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.github.jsdossier.proto.Enumeration.class, com.github.jsdossier.proto.Enumeration.Builder.class);
  }

  public static com.google.protobuf.Parser<Enumeration> PARSER =
      new com.google.protobuf.AbstractParser<Enumeration>() {
    public Enumeration parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new Enumeration(input, extensionRegistry);
    }
  };

  @java.lang.Override
  public com.google.protobuf.Parser<Enumeration> getParserForType() {
    return PARSER;
  }

  public interface ValueOrBuilder extends
      // @@protoc_insertion_point(interface_extends:dossier.Enumeration.Value)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>required string name = 1;</code>
     */
    boolean hasName();
    /**
     * <code>required string name = 1;</code>
     */
    java.lang.String getName();
    /**
     * <code>required string name = 1;</code>
     */
    com.google.protobuf.ByteString
        getNameBytes();

    /**
     * <code>optional .dossier.Comment description = 2;</code>
     */
    boolean hasDescription();
    /**
     * <code>optional .dossier.Comment description = 2;</code>
     */
    com.github.jsdossier.proto.Comment getDescription();
    /**
     * <code>optional .dossier.Comment description = 2;</code>
     */
    com.github.jsdossier.proto.CommentOrBuilder getDescriptionOrBuilder();

    /**
     * <code>optional .dossier.Deprecation deprecation = 3;</code>
     */
    boolean hasDeprecation();
    /**
     * <code>optional .dossier.Deprecation deprecation = 3;</code>
     */
    com.github.jsdossier.proto.Deprecation getDeprecation();
    /**
     * <code>optional .dossier.Deprecation deprecation = 3;</code>
     */
    com.github.jsdossier.proto.DeprecationOrBuilder getDeprecationOrBuilder();
  }
  /**
   * Protobuf type {@code dossier.Enumeration.Value}
   */
  public static final class Value extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:dossier.Enumeration.Value)
      ValueOrBuilder {
    // Use Value.newBuilder() to construct.
    private Value(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private Value(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final Value defaultInstance;
    public static Value getDefaultInstance() {
      return defaultInstance;
    }

    public Value getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private Value(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              com.google.protobuf.ByteString bs = input.readBytes();
              bitField0_ |= 0x00000001;
              name_ = bs;
              break;
            }
            case 18: {
              com.github.jsdossier.proto.Comment.Builder subBuilder = null;
              if (((bitField0_ & 0x00000002) == 0x00000002)) {
                subBuilder = description_.toBuilder();
              }
              description_ = input.readMessage(com.github.jsdossier.proto.Comment.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(description_);
                description_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000002;
              break;
            }
            case 26: {
              com.github.jsdossier.proto.Deprecation.Builder subBuilder = null;
              if (((bitField0_ & 0x00000004) == 0x00000004)) {
                subBuilder = deprecation_.toBuilder();
              }
              deprecation_ = input.readMessage(com.github.jsdossier.proto.Deprecation.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(deprecation_);
                deprecation_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000004;
              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 com.github.jsdossier.proto.Dossier.internal_static_dossier_Enumeration_Value_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.github.jsdossier.proto.Dossier.internal_static_dossier_Enumeration_Value_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.github.jsdossier.proto.Enumeration.Value.class, com.github.jsdossier.proto.Enumeration.Value.Builder.class);
    }

    public static com.google.protobuf.Parser<Value> PARSER =
        new com.google.protobuf.AbstractParser<Value>() {
      public Value parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new Value(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser<Value> getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    public static final int NAME_FIELD_NUMBER = 1;
    private java.lang.Object name_;
    /**
     * <code>required string name = 1;</code>
     */
    public boolean hasName() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required string name = 1;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      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()) {
          name_ = s;
        }
        return s;
      }
    }
    /**
     * <code>required string name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int DESCRIPTION_FIELD_NUMBER = 2;
    private com.github.jsdossier.proto.Comment description_;
    /**
     * <code>optional .dossier.Comment description = 2;</code>
     */
    public boolean hasDescription() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>optional .dossier.Comment description = 2;</code>
     */
    public com.github.jsdossier.proto.Comment getDescription() {
      return description_;
    }
    /**
     * <code>optional .dossier.Comment description = 2;</code>
     */
    public com.github.jsdossier.proto.CommentOrBuilder getDescriptionOrBuilder() {
      return description_;
    }

    public static final int DEPRECATION_FIELD_NUMBER = 3;
    private com.github.jsdossier.proto.Deprecation deprecation_;
    /**
     * <code>optional .dossier.Deprecation deprecation = 3;</code>
     */
    public boolean hasDeprecation() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * <code>optional .dossier.Deprecation deprecation = 3;</code>
     */
    public com.github.jsdossier.proto.Deprecation getDeprecation() {
      return deprecation_;
    }
    /**
     * <code>optional .dossier.Deprecation deprecation = 3;</code>
     */
    public com.github.jsdossier.proto.DeprecationOrBuilder getDeprecationOrBuilder() {
      return deprecation_;
    }

    private void initFields() {
      name_ = "";
      description_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
      deprecation_ = com.github.jsdossier.proto.Deprecation.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (!hasName()) {
        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, getNameBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeMessage(2, description_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeMessage(3, deprecation_);
      }
      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, getNameBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, description_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, deprecation_);
      }
      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 com.github.jsdossier.proto.Enumeration.Value parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.github.jsdossier.proto.Enumeration.Value parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.github.jsdossier.proto.Enumeration.Value parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.github.jsdossier.proto.Enumeration.Value parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.github.jsdossier.proto.Enumeration.Value parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static com.github.jsdossier.proto.Enumeration.Value parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static com.github.jsdossier.proto.Enumeration.Value parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static com.github.jsdossier.proto.Enumeration.Value parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static com.github.jsdossier.proto.Enumeration.Value parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static com.github.jsdossier.proto.Enumeration.Value 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(com.github.jsdossier.proto.Enumeration.Value 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 dossier.Enumeration.Value}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:dossier.Enumeration.Value)
        com.github.jsdossier.proto.Enumeration.ValueOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.github.jsdossier.proto.Dossier.internal_static_dossier_Enumeration_Value_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.github.jsdossier.proto.Dossier.internal_static_dossier_Enumeration_Value_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.github.jsdossier.proto.Enumeration.Value.class, com.github.jsdossier.proto.Enumeration.Value.Builder.class);
      }

      // Construct using com.github.jsdossier.proto.Enumeration.Value.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getDescriptionFieldBuilder();
          getDeprecationFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        name_ = "";
        bitField0_ = (bitField0_ & ~0x00000001);
        if (descriptionBuilder_ == null) {
          description_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
        } else {
          descriptionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        if (deprecationBuilder_ == null) {
          deprecation_ = com.github.jsdossier.proto.Deprecation.getDefaultInstance();
        } else {
          deprecationBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.github.jsdossier.proto.Dossier.internal_static_dossier_Enumeration_Value_descriptor;
      }

      public com.github.jsdossier.proto.Enumeration.Value getDefaultInstanceForType() {
        return com.github.jsdossier.proto.Enumeration.Value.getDefaultInstance();
      }

      public com.github.jsdossier.proto.Enumeration.Value build() {
        com.github.jsdossier.proto.Enumeration.Value result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.github.jsdossier.proto.Enumeration.Value buildPartial() {
        com.github.jsdossier.proto.Enumeration.Value result = new com.github.jsdossier.proto.Enumeration.Value(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.name_ = name_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        if (descriptionBuilder_ == null) {
          result.description_ = description_;
        } else {
          result.description_ = descriptionBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        if (deprecationBuilder_ == null) {
          result.deprecation_ = deprecation_;
        } else {
          result.deprecation_ = deprecationBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.github.jsdossier.proto.Enumeration.Value) {
          return mergeFrom((com.github.jsdossier.proto.Enumeration.Value)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.github.jsdossier.proto.Enumeration.Value other) {
        if (other == com.github.jsdossier.proto.Enumeration.Value.getDefaultInstance()) return this;
        if (other.hasName()) {
          bitField0_ |= 0x00000001;
          name_ = other.name_;
          onChanged();
        }
        if (other.hasDescription()) {
          mergeDescription(other.getDescription());
        }
        if (other.hasDeprecation()) {
          mergeDeprecation(other.getDeprecation());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasName()) {
          
          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.github.jsdossier.proto.Enumeration.Value parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.github.jsdossier.proto.Enumeration.Value) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.lang.Object name_ = "";
      /**
       * <code>required string name = 1;</code>
       */
      public boolean hasName() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required string name = 1;</code>
       */
      public java.lang.String getName() {
        java.lang.Object ref = name_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          if (bs.isValidUtf8()) {
            name_ = s;
          }
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>required string name = 1;</code>
       */
      public com.google.protobuf.ByteString
          getNameBytes() {
        java.lang.Object ref = name_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          name_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>required string name = 1;</code>
       */
      public Builder setName(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        name_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required string name = 1;</code>
       */
      public Builder clearName() {
        bitField0_ = (bitField0_ & ~0x00000001);
        name_ = getDefaultInstance().getName();
        onChanged();
        return this;
      }
      /**
       * <code>required string name = 1;</code>
       */
      public Builder setNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        name_ = value;
        onChanged();
        return this;
      }

      private com.github.jsdossier.proto.Comment description_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          com.github.jsdossier.proto.Comment, com.github.jsdossier.proto.Comment.Builder, com.github.jsdossier.proto.CommentOrBuilder> descriptionBuilder_;
      /**
       * <code>optional .dossier.Comment description = 2;</code>
       */
      public boolean hasDescription() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * <code>optional .dossier.Comment description = 2;</code>
       */
      public com.github.jsdossier.proto.Comment getDescription() {
        if (descriptionBuilder_ == null) {
          return description_;
        } else {
          return descriptionBuilder_.getMessage();
        }
      }
      /**
       * <code>optional .dossier.Comment description = 2;</code>
       */
      public Builder setDescription(com.github.jsdossier.proto.Comment value) {
        if (descriptionBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          description_ = value;
          onChanged();
        } else {
          descriptionBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>optional .dossier.Comment description = 2;</code>
       */
      public Builder setDescription(
          com.github.jsdossier.proto.Comment.Builder builderForValue) {
        if (descriptionBuilder_ == null) {
          description_ = builderForValue.build();
          onChanged();
        } else {
          descriptionBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>optional .dossier.Comment description = 2;</code>
       */
      public Builder mergeDescription(com.github.jsdossier.proto.Comment value) {
        if (descriptionBuilder_ == null) {
          if (((bitField0_ & 0x00000002) == 0x00000002) &&
              description_ != com.github.jsdossier.proto.Comment.getDefaultInstance()) {
            description_ =
              com.github.jsdossier.proto.Comment.newBuilder(description_).mergeFrom(value).buildPartial();
          } else {
            description_ = value;
          }
          onChanged();
        } else {
          descriptionBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>optional .dossier.Comment description = 2;</code>
       */
      public Builder clearDescription() {
        if (descriptionBuilder_ == null) {
          description_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
          onChanged();
        } else {
          descriptionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }
      /**
       * <code>optional .dossier.Comment description = 2;</code>
       */
      public com.github.jsdossier.proto.Comment.Builder getDescriptionBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getDescriptionFieldBuilder().getBuilder();
      }
      /**
       * <code>optional .dossier.Comment description = 2;</code>
       */
      public com.github.jsdossier.proto.CommentOrBuilder getDescriptionOrBuilder() {
        if (descriptionBuilder_ != null) {
          return descriptionBuilder_.getMessageOrBuilder();
        } else {
          return description_;
        }
      }
      /**
       * <code>optional .dossier.Comment description = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
          com.github.jsdossier.proto.Comment, com.github.jsdossier.proto.Comment.Builder, com.github.jsdossier.proto.CommentOrBuilder> 
          getDescriptionFieldBuilder() {
        if (descriptionBuilder_ == null) {
          descriptionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              com.github.jsdossier.proto.Comment, com.github.jsdossier.proto.Comment.Builder, com.github.jsdossier.proto.CommentOrBuilder>(
                  getDescription(),
                  getParentForChildren(),
                  isClean());
          description_ = null;
        }
        return descriptionBuilder_;
      }

      private com.github.jsdossier.proto.Deprecation deprecation_ = com.github.jsdossier.proto.Deprecation.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          com.github.jsdossier.proto.Deprecation, com.github.jsdossier.proto.Deprecation.Builder, com.github.jsdossier.proto.DeprecationOrBuilder> deprecationBuilder_;
      /**
       * <code>optional .dossier.Deprecation deprecation = 3;</code>
       */
      public boolean hasDeprecation() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * <code>optional .dossier.Deprecation deprecation = 3;</code>
       */
      public com.github.jsdossier.proto.Deprecation getDeprecation() {
        if (deprecationBuilder_ == null) {
          return deprecation_;
        } else {
          return deprecationBuilder_.getMessage();
        }
      }
      /**
       * <code>optional .dossier.Deprecation deprecation = 3;</code>
       */
      public Builder setDeprecation(com.github.jsdossier.proto.Deprecation value) {
        if (deprecationBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          deprecation_ = value;
          onChanged();
        } else {
          deprecationBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * <code>optional .dossier.Deprecation deprecation = 3;</code>
       */
      public Builder setDeprecation(
          com.github.jsdossier.proto.Deprecation.Builder builderForValue) {
        if (deprecationBuilder_ == null) {
          deprecation_ = builderForValue.build();
          onChanged();
        } else {
          deprecationBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * <code>optional .dossier.Deprecation deprecation = 3;</code>
       */
      public Builder mergeDeprecation(com.github.jsdossier.proto.Deprecation value) {
        if (deprecationBuilder_ == null) {
          if (((bitField0_ & 0x00000004) == 0x00000004) &&
              deprecation_ != com.github.jsdossier.proto.Deprecation.getDefaultInstance()) {
            deprecation_ =
              com.github.jsdossier.proto.Deprecation.newBuilder(deprecation_).mergeFrom(value).buildPartial();
          } else {
            deprecation_ = value;
          }
          onChanged();
        } else {
          deprecationBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * <code>optional .dossier.Deprecation deprecation = 3;</code>
       */
      public Builder clearDeprecation() {
        if (deprecationBuilder_ == null) {
          deprecation_ = com.github.jsdossier.proto.Deprecation.getDefaultInstance();
          onChanged();
        } else {
          deprecationBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }
      /**
       * <code>optional .dossier.Deprecation deprecation = 3;</code>
       */
      public com.github.jsdossier.proto.Deprecation.Builder getDeprecationBuilder() {
        bitField0_ |= 0x00000004;
        onChanged();
        return getDeprecationFieldBuilder().getBuilder();
      }
      /**
       * <code>optional .dossier.Deprecation deprecation = 3;</code>
       */
      public com.github.jsdossier.proto.DeprecationOrBuilder getDeprecationOrBuilder() {
        if (deprecationBuilder_ != null) {
          return deprecationBuilder_.getMessageOrBuilder();
        } else {
          return deprecation_;
        }
      }
      /**
       * <code>optional .dossier.Deprecation deprecation = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
          com.github.jsdossier.proto.Deprecation, com.github.jsdossier.proto.Deprecation.Builder, com.github.jsdossier.proto.DeprecationOrBuilder> 
          getDeprecationFieldBuilder() {
        if (deprecationBuilder_ == null) {
          deprecationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              com.github.jsdossier.proto.Deprecation, com.github.jsdossier.proto.Deprecation.Builder, com.github.jsdossier.proto.DeprecationOrBuilder>(
                  getDeprecation(),
                  getParentForChildren(),
                  isClean());
          deprecation_ = null;
        }
        return deprecationBuilder_;
      }

      // @@protoc_insertion_point(builder_scope:dossier.Enumeration.Value)
    }

    static {
      defaultInstance = new Value(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:dossier.Enumeration.Value)
  }

  private int bitField0_;
  public static final int TYPE_FIELD_NUMBER = 1;
  private com.github.jsdossier.proto.Comment type_;
  /**
   * <code>required .dossier.Comment type = 1;</code>
   */
  public boolean hasType() {
    return ((bitField0_ & 0x00000001) == 0x00000001);
  }
  /**
   * <code>required .dossier.Comment type = 1;</code>
   */
  public com.github.jsdossier.proto.Comment getType() {
    return type_;
  }
  /**
   * <code>required .dossier.Comment type = 1;</code>
   */
  public com.github.jsdossier.proto.CommentOrBuilder getTypeOrBuilder() {
    return type_;
  }

  public static final int VALUE_FIELD_NUMBER = 2;
  private java.util.List<com.github.jsdossier.proto.Enumeration.Value> value_;
  /**
   * <code>repeated .dossier.Enumeration.Value value = 2;</code>
   */
  public java.util.List<com.github.jsdossier.proto.Enumeration.Value> getValueList() {
    return value_;
  }
  /**
   * <code>repeated .dossier.Enumeration.Value value = 2;</code>
   */
  public java.util.List<? extends com.github.jsdossier.proto.Enumeration.ValueOrBuilder> 
      getValueOrBuilderList() {
    return value_;
  }
  /**
   * <code>repeated .dossier.Enumeration.Value value = 2;</code>
   */
  public int getValueCount() {
    return value_.size();
  }
  /**
   * <code>repeated .dossier.Enumeration.Value value = 2;</code>
   */
  public com.github.jsdossier.proto.Enumeration.Value getValue(int index) {
    return value_.get(index);
  }
  /**
   * <code>repeated .dossier.Enumeration.Value value = 2;</code>
   */
  public com.github.jsdossier.proto.Enumeration.ValueOrBuilder getValueOrBuilder(
      int index) {
    return value_.get(index);
  }

  public static final int VISIBILITY_FIELD_NUMBER = 3;
  private com.github.jsdossier.proto.Visibility visibility_;
  /**
   * <code>optional .dossier.Visibility visibility = 3 [default = PUBLIC];</code>
   */
  public boolean hasVisibility() {
    return ((bitField0_ & 0x00000002) == 0x00000002);
  }
  /**
   * <code>optional .dossier.Visibility visibility = 3 [default = PUBLIC];</code>
   */
  public com.github.jsdossier.proto.Visibility getVisibility() {
    return visibility_;
  }

  private void initFields() {
    type_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
    value_ = java.util.Collections.emptyList();
    visibility_ = com.github.jsdossier.proto.Visibility.PUBLIC;
  }
  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    if (!hasType()) {
      memoizedIsInitialized = 0;
      return false;
    }
    for (int i = 0; i < getValueCount(); i++) {
      if (!getValue(i).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, type_);
    }
    for (int i = 0; i < value_.size(); i++) {
      output.writeMessage(2, value_.get(i));
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      output.writeEnum(3, visibility_.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
        .computeMessageSize(1, type_);
    }
    for (int i = 0; i < value_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, value_.get(i));
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(3, visibility_.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 com.github.jsdossier.proto.Enumeration parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.github.jsdossier.proto.Enumeration parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.github.jsdossier.proto.Enumeration parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.github.jsdossier.proto.Enumeration parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.github.jsdossier.proto.Enumeration parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return PARSER.parseFrom(input);
  }
  public static com.github.jsdossier.proto.Enumeration parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return PARSER.parseFrom(input, extensionRegistry);
  }
  public static com.github.jsdossier.proto.Enumeration parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return PARSER.parseDelimitedFrom(input);
  }
  public static com.github.jsdossier.proto.Enumeration parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return PARSER.parseDelimitedFrom(input, extensionRegistry);
  }
  public static com.github.jsdossier.proto.Enumeration parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return PARSER.parseFrom(input);
  }
  public static com.github.jsdossier.proto.Enumeration 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(com.github.jsdossier.proto.Enumeration 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 dossier.Enumeration}
   *
   * <pre>
   * Describes an enumeration.
   * </pre>
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:dossier.Enumeration)
      com.github.jsdossier.proto.EnumerationOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.github.jsdossier.proto.Dossier.internal_static_dossier_Enumeration_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.github.jsdossier.proto.Dossier.internal_static_dossier_Enumeration_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.github.jsdossier.proto.Enumeration.class, com.github.jsdossier.proto.Enumeration.Builder.class);
    }

    // Construct using com.github.jsdossier.proto.Enumeration.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        getTypeFieldBuilder();
        getValueFieldBuilder();
      }
    }
    private static Builder create() {
      return new Builder();
    }

    public Builder clear() {
      super.clear();
      if (typeBuilder_ == null) {
        type_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
      } else {
        typeBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      if (valueBuilder_ == null) {
        value_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
      } else {
        valueBuilder_.clear();
      }
      visibility_ = com.github.jsdossier.proto.Visibility.PUBLIC;
      bitField0_ = (bitField0_ & ~0x00000004);
      return this;
    }

    public Builder clone() {
      return create().mergeFrom(buildPartial());
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.github.jsdossier.proto.Dossier.internal_static_dossier_Enumeration_descriptor;
    }

    public com.github.jsdossier.proto.Enumeration getDefaultInstanceForType() {
      return com.github.jsdossier.proto.Enumeration.getDefaultInstance();
    }

    public com.github.jsdossier.proto.Enumeration build() {
      com.github.jsdossier.proto.Enumeration result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.github.jsdossier.proto.Enumeration buildPartial() {
      com.github.jsdossier.proto.Enumeration result = new com.github.jsdossier.proto.Enumeration(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
        to_bitField0_ |= 0x00000001;
      }
      if (typeBuilder_ == null) {
        result.type_ = type_;
      } else {
        result.type_ = typeBuilder_.build();
      }
      if (valueBuilder_ == null) {
        if (((bitField0_ & 0x00000002) == 0x00000002)) {
          value_ = java.util.Collections.unmodifiableList(value_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.value_ = value_;
      } else {
        result.value_ = valueBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
        to_bitField0_ |= 0x00000002;
      }
      result.visibility_ = visibility_;
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.github.jsdossier.proto.Enumeration) {
        return mergeFrom((com.github.jsdossier.proto.Enumeration)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.github.jsdossier.proto.Enumeration other) {
      if (other == com.github.jsdossier.proto.Enumeration.getDefaultInstance()) return this;
      if (other.hasType()) {
        mergeType(other.getType());
      }
      if (valueBuilder_ == null) {
        if (!other.value_.isEmpty()) {
          if (value_.isEmpty()) {
            value_ = other.value_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureValueIsMutable();
            value_.addAll(other.value_);
          }
          onChanged();
        }
      } else {
        if (!other.value_.isEmpty()) {
          if (valueBuilder_.isEmpty()) {
            valueBuilder_.dispose();
            valueBuilder_ = null;
            value_ = other.value_;
            bitField0_ = (bitField0_ & ~0x00000002);
            valueBuilder_ = 
              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                 getValueFieldBuilder() : null;
          } else {
            valueBuilder_.addAllMessages(other.value_);
          }
        }
      }
      if (other.hasVisibility()) {
        setVisibility(other.getVisibility());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      return this;
    }

    public final boolean isInitialized() {
      if (!hasType()) {
        
        return false;
      }
      for (int i = 0; i < getValueCount(); i++) {
        if (!getValue(i).isInitialized()) {
          
          return false;
        }
      }
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.github.jsdossier.proto.Enumeration parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.github.jsdossier.proto.Enumeration) e.getUnfinishedMessage();
        throw e;
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private com.github.jsdossier.proto.Comment type_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.Comment, com.github.jsdossier.proto.Comment.Builder, com.github.jsdossier.proto.CommentOrBuilder> typeBuilder_;
    /**
     * <code>required .dossier.Comment type = 1;</code>
     */
    public boolean hasType() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required .dossier.Comment type = 1;</code>
     */
    public com.github.jsdossier.proto.Comment getType() {
      if (typeBuilder_ == null) {
        return type_;
      } else {
        return typeBuilder_.getMessage();
      }
    }
    /**
     * <code>required .dossier.Comment type = 1;</code>
     */
    public Builder setType(com.github.jsdossier.proto.Comment value) {
      if (typeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        type_ = value;
        onChanged();
      } else {
        typeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * <code>required .dossier.Comment type = 1;</code>
     */
    public Builder setType(
        com.github.jsdossier.proto.Comment.Builder builderForValue) {
      if (typeBuilder_ == null) {
        type_ = builderForValue.build();
        onChanged();
      } else {
        typeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * <code>required .dossier.Comment type = 1;</code>
     */
    public Builder mergeType(com.github.jsdossier.proto.Comment value) {
      if (typeBuilder_ == null) {
        if (((bitField0_ & 0x00000001) == 0x00000001) &&
            type_ != com.github.jsdossier.proto.Comment.getDefaultInstance()) {
          type_ =
            com.github.jsdossier.proto.Comment.newBuilder(type_).mergeFrom(value).buildPartial();
        } else {
          type_ = value;
        }
        onChanged();
      } else {
        typeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * <code>required .dossier.Comment type = 1;</code>
     */
    public Builder clearType() {
      if (typeBuilder_ == null) {
        type_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
        onChanged();
      } else {
        typeBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }
    /**
     * <code>required .dossier.Comment type = 1;</code>
     */
    public com.github.jsdossier.proto.Comment.Builder getTypeBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getTypeFieldBuilder().getBuilder();
    }
    /**
     * <code>required .dossier.Comment type = 1;</code>
     */
    public com.github.jsdossier.proto.CommentOrBuilder getTypeOrBuilder() {
      if (typeBuilder_ != null) {
        return typeBuilder_.getMessageOrBuilder();
      } else {
        return type_;
      }
    }
    /**
     * <code>required .dossier.Comment type = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.Comment, com.github.jsdossier.proto.Comment.Builder, com.github.jsdossier.proto.CommentOrBuilder> 
        getTypeFieldBuilder() {
      if (typeBuilder_ == null) {
        typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            com.github.jsdossier.proto.Comment, com.github.jsdossier.proto.Comment.Builder, com.github.jsdossier.proto.CommentOrBuilder>(
                getType(),
                getParentForChildren(),
                isClean());
        type_ = null;
      }
      return typeBuilder_;
    }

    private java.util.List<com.github.jsdossier.proto.Enumeration.Value> value_ =
      java.util.Collections.emptyList();
    private void ensureValueIsMutable() {
      if (!((bitField0_ & 0x00000002) == 0x00000002)) {
        value_ = new java.util.ArrayList<com.github.jsdossier.proto.Enumeration.Value>(value_);
        bitField0_ |= 0x00000002;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilder<
        com.github.jsdossier.proto.Enumeration.Value, com.github.jsdossier.proto.Enumeration.Value.Builder, com.github.jsdossier.proto.Enumeration.ValueOrBuilder> valueBuilder_;

    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public java.util.List<com.github.jsdossier.proto.Enumeration.Value> getValueList() {
      if (valueBuilder_ == null) {
        return java.util.Collections.unmodifiableList(value_);
      } else {
        return valueBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public int getValueCount() {
      if (valueBuilder_ == null) {
        return value_.size();
      } else {
        return valueBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public com.github.jsdossier.proto.Enumeration.Value getValue(int index) {
      if (valueBuilder_ == null) {
        return value_.get(index);
      } else {
        return valueBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public Builder setValue(
        int index, com.github.jsdossier.proto.Enumeration.Value value) {
      if (valueBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureValueIsMutable();
        value_.set(index, value);
        onChanged();
      } else {
        valueBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public Builder setValue(
        int index, com.github.jsdossier.proto.Enumeration.Value.Builder builderForValue) {
      if (valueBuilder_ == null) {
        ensureValueIsMutable();
        value_.set(index, builderForValue.build());
        onChanged();
      } else {
        valueBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public Builder addValue(com.github.jsdossier.proto.Enumeration.Value value) {
      if (valueBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureValueIsMutable();
        value_.add(value);
        onChanged();
      } else {
        valueBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public Builder addValue(
        int index, com.github.jsdossier.proto.Enumeration.Value value) {
      if (valueBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureValueIsMutable();
        value_.add(index, value);
        onChanged();
      } else {
        valueBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public Builder addValue(
        com.github.jsdossier.proto.Enumeration.Value.Builder builderForValue) {
      if (valueBuilder_ == null) {
        ensureValueIsMutable();
        value_.add(builderForValue.build());
        onChanged();
      } else {
        valueBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public Builder addValue(
        int index, com.github.jsdossier.proto.Enumeration.Value.Builder builderForValue) {
      if (valueBuilder_ == null) {
        ensureValueIsMutable();
        value_.add(index, builderForValue.build());
        onChanged();
      } else {
        valueBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public Builder addAllValue(
        java.lang.Iterable<? extends com.github.jsdossier.proto.Enumeration.Value> values) {
      if (valueBuilder_ == null) {
        ensureValueIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, value_);
        onChanged();
      } else {
        valueBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public Builder clearValue() {
      if (valueBuilder_ == null) {
        value_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        valueBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public Builder removeValue(int index) {
      if (valueBuilder_ == null) {
        ensureValueIsMutable();
        value_.remove(index);
        onChanged();
      } else {
        valueBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public com.github.jsdossier.proto.Enumeration.Value.Builder getValueBuilder(
        int index) {
      return getValueFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public com.github.jsdossier.proto.Enumeration.ValueOrBuilder getValueOrBuilder(
        int index) {
      if (valueBuilder_ == null) {
        return value_.get(index);  } else {
        return valueBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public java.util.List<? extends com.github.jsdossier.proto.Enumeration.ValueOrBuilder> 
         getValueOrBuilderList() {
      if (valueBuilder_ != null) {
        return valueBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(value_);
      }
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public com.github.jsdossier.proto.Enumeration.Value.Builder addValueBuilder() {
      return getValueFieldBuilder().addBuilder(
          com.github.jsdossier.proto.Enumeration.Value.getDefaultInstance());
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public com.github.jsdossier.proto.Enumeration.Value.Builder addValueBuilder(
        int index) {
      return getValueFieldBuilder().addBuilder(
          index, com.github.jsdossier.proto.Enumeration.Value.getDefaultInstance());
    }
    /**
     * <code>repeated .dossier.Enumeration.Value value = 2;</code>
     */
    public java.util.List<com.github.jsdossier.proto.Enumeration.Value.Builder> 
         getValueBuilderList() {
      return getValueFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilder<
        com.github.jsdossier.proto.Enumeration.Value, com.github.jsdossier.proto.Enumeration.Value.Builder, com.github.jsdossier.proto.Enumeration.ValueOrBuilder> 
        getValueFieldBuilder() {
      if (valueBuilder_ == null) {
        valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
            com.github.jsdossier.proto.Enumeration.Value, com.github.jsdossier.proto.Enumeration.Value.Builder, com.github.jsdossier.proto.Enumeration.ValueOrBuilder>(
                value_,
                ((bitField0_ & 0x00000002) == 0x00000002),
                getParentForChildren(),
                isClean());
        value_ = null;
      }
      return valueBuilder_;
    }

    private com.github.jsdossier.proto.Visibility visibility_ = com.github.jsdossier.proto.Visibility.PUBLIC;
    /**
     * <code>optional .dossier.Visibility visibility = 3 [default = PUBLIC];</code>
     */
    public boolean hasVisibility() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * <code>optional .dossier.Visibility visibility = 3 [default = PUBLIC];</code>
     */
    public com.github.jsdossier.proto.Visibility getVisibility() {
      return visibility_;
    }
    /**
     * <code>optional .dossier.Visibility visibility = 3 [default = PUBLIC];</code>
     */
    public Builder setVisibility(com.github.jsdossier.proto.Visibility value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000004;
      visibility_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>optional .dossier.Visibility visibility = 3 [default = PUBLIC];</code>
     */
    public Builder clearVisibility() {
      bitField0_ = (bitField0_ & ~0x00000004);
      visibility_ = com.github.jsdossier.proto.Visibility.PUBLIC;
      onChanged();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:dossier.Enumeration)
  }

  static {
    defaultInstance = new Enumeration(true);
    defaultInstance.initFields();
  }

  // @@protoc_insertion_point(class_scope:dossier.Enumeration)
}

