/*
 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.Function}
 *
 * <pre>
 * Describes a function JavaScript property.
 * </pre>
 */
public final class Function extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:dossier.Function)
    FunctionOrBuilder {
  // Use Function.newBuilder() to construct.
  private Function(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    super(builder);
    this.unknownFields = builder.getUnknownFields();
  }
  private Function(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

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

  public Function getDefaultInstanceForType() {
    return defaultInstance;
  }

  private final com.google.protobuf.UnknownFieldSet unknownFields;
  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
    return this.unknownFields;
  }
  private Function(
      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.BaseProperty.Builder subBuilder = null;
            if (((bitField0_ & 0x00000001) == 0x00000001)) {
              subBuilder = base_.toBuilder();
            }
            base_ = input.readMessage(com.github.jsdossier.proto.BaseProperty.PARSER, extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(base_);
              base_ = subBuilder.buildPartial();
            }
            bitField0_ |= 0x00000001;
            break;
          }
          case 18: {
            com.google.protobuf.ByteString bs = input.readBytes();
            if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
              templateName_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000002;
            }
            templateName_.add(bs);
            break;
          }
          case 24: {
            bitField0_ |= 0x00000002;
            isConstructor_ = input.readBool();
            break;
          }
          case 34: {
            if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
              parameter_ = new java.util.ArrayList<com.github.jsdossier.proto.Function.Detail>();
              mutable_bitField0_ |= 0x00000008;
            }
            parameter_.add(input.readMessage(com.github.jsdossier.proto.Function.Detail.PARSER, extensionRegistry));
            break;
          }
          case 42: {
            com.github.jsdossier.proto.Function.Detail.Builder subBuilder = null;
            if (((bitField0_ & 0x00000004) == 0x00000004)) {
              subBuilder = return_.toBuilder();
            }
            return_ = input.readMessage(com.github.jsdossier.proto.Function.Detail.PARSER, extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(return_);
              return_ = subBuilder.buildPartial();
            }
            bitField0_ |= 0x00000004;
            break;
          }
          case 50: {
            if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
              thrown_ = new java.util.ArrayList<com.github.jsdossier.proto.Function.Detail>();
              mutable_bitField0_ |= 0x00000020;
            }
            thrown_.add(input.readMessage(com.github.jsdossier.proto.Function.Detail.PARSER, extensionRegistry));
            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)) {
        templateName_ = templateName_.getUnmodifiableView();
      }
      if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
        parameter_ = java.util.Collections.unmodifiableList(parameter_);
      }
      if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
        thrown_ = java.util.Collections.unmodifiableList(thrown_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.github.jsdossier.proto.Dossier.internal_static_dossier_Function_descriptor;
  }

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

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

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

  public interface DetailOrBuilder extends
      // @@protoc_insertion_point(interface_extends:dossier.Function.Detail)
      com.google.protobuf.MessageOrBuilder {

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

    /**
     * <code>optional .dossier.Comment type = 2;</code>
     */
    boolean hasType();
    /**
     * <code>optional .dossier.Comment type = 2;</code>
     */
    com.github.jsdossier.proto.Comment getType();
    /**
     * <code>optional .dossier.Comment type = 2;</code>
     */
    com.github.jsdossier.proto.CommentOrBuilder getTypeOrBuilder();

    /**
     * <code>optional .dossier.Comment description = 3;</code>
     */
    boolean hasDescription();
    /**
     * <code>optional .dossier.Comment description = 3;</code>
     */
    com.github.jsdossier.proto.Comment getDescription();
    /**
     * <code>optional .dossier.Comment description = 3;</code>
     */
    com.github.jsdossier.proto.CommentOrBuilder getDescriptionOrBuilder();
  }
  /**
   * Protobuf type {@code dossier.Function.Detail}
   */
  public static final class Detail extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:dossier.Function.Detail)
      DetailOrBuilder {
    // Use Detail.newBuilder() to construct.
    private Detail(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private Detail(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

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

    public Detail getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private Detail(
        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 = type_.toBuilder();
              }
              type_ = input.readMessage(com.github.jsdossier.proto.Comment.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(type_);
                type_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000002;
              break;
            }
            case 26: {
              com.github.jsdossier.proto.Comment.Builder subBuilder = null;
              if (((bitField0_ & 0x00000004) == 0x00000004)) {
                subBuilder = description_.toBuilder();
              }
              description_ = input.readMessage(com.github.jsdossier.proto.Comment.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(description_);
                description_ = 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_Function_Detail_descriptor;
    }

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

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

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

    private int bitField0_;
    public static final int NAME_FIELD_NUMBER = 1;
    private java.lang.Object name_;
    /**
     * <code>optional string name = 1;</code>
     */
    public boolean hasName() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>optional 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>optional 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 TYPE_FIELD_NUMBER = 2;
    private com.github.jsdossier.proto.Comment type_;
    /**
     * <code>optional .dossier.Comment type = 2;</code>
     */
    public boolean hasType() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>optional .dossier.Comment type = 2;</code>
     */
    public com.github.jsdossier.proto.Comment getType() {
      return type_;
    }
    /**
     * <code>optional .dossier.Comment type = 2;</code>
     */
    public com.github.jsdossier.proto.CommentOrBuilder getTypeOrBuilder() {
      return type_;
    }

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

    private void initFields() {
      name_ = "";
      type_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
      description_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 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, type_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeMessage(3, description_);
      }
      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, type_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, description_);
      }
      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.Function.Detail parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.github.jsdossier.proto.Function.Detail 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.Function.Detail parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.github.jsdossier.proto.Function.Detail parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.github.jsdossier.proto.Function.Detail parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static com.github.jsdossier.proto.Function.Detail 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.Function.Detail parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static com.github.jsdossier.proto.Function.Detail 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.Function.Detail parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static com.github.jsdossier.proto.Function.Detail 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.Function.Detail 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.Function.Detail}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:dossier.Function.Detail)
        com.github.jsdossier.proto.Function.DetailOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.github.jsdossier.proto.Dossier.internal_static_dossier_Function_Detail_descriptor;
      }

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

      // Construct using com.github.jsdossier.proto.Function.Detail.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();
          getDescriptionFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        name_ = "";
        bitField0_ = (bitField0_ & ~0x00000001);
        if (typeBuilder_ == null) {
          type_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
        } else {
          typeBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        if (descriptionBuilder_ == null) {
          description_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
        } else {
          descriptionBuilder_.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_Function_Detail_descriptor;
      }

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

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

      public com.github.jsdossier.proto.Function.Detail buildPartial() {
        com.github.jsdossier.proto.Function.Detail result = new com.github.jsdossier.proto.Function.Detail(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 (typeBuilder_ == null) {
          result.type_ = type_;
        } else {
          result.type_ = typeBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        if (descriptionBuilder_ == null) {
          result.description_ = description_;
        } else {
          result.description_ = descriptionBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(com.github.jsdossier.proto.Function.Detail other) {
        if (other == com.github.jsdossier.proto.Function.Detail.getDefaultInstance()) return this;
        if (other.hasName()) {
          bitField0_ |= 0x00000001;
          name_ = other.name_;
          onChanged();
        }
        if (other.hasType()) {
          mergeType(other.getType());
        }
        if (other.hasDescription()) {
          mergeDescription(other.getDescription());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

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

      private java.lang.Object name_ = "";
      /**
       * <code>optional string name = 1;</code>
       */
      public boolean hasName() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>optional 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>optional 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>optional 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>optional string name = 1;</code>
       */
      public Builder clearName() {
        bitField0_ = (bitField0_ & ~0x00000001);
        name_ = getDefaultInstance().getName();
        onChanged();
        return this;
      }
      /**
       * <code>optional 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 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>optional .dossier.Comment type = 2;</code>
       */
      public boolean hasType() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * <code>optional .dossier.Comment type = 2;</code>
       */
      public com.github.jsdossier.proto.Comment getType() {
        if (typeBuilder_ == null) {
          return type_;
        } else {
          return typeBuilder_.getMessage();
        }
      }
      /**
       * <code>optional .dossier.Comment type = 2;</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_ |= 0x00000002;
        return this;
      }
      /**
       * <code>optional .dossier.Comment type = 2;</code>
       */
      public Builder setType(
          com.github.jsdossier.proto.Comment.Builder builderForValue) {
        if (typeBuilder_ == null) {
          type_ = builderForValue.build();
          onChanged();
        } else {
          typeBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>optional .dossier.Comment type = 2;</code>
       */
      public Builder mergeType(com.github.jsdossier.proto.Comment value) {
        if (typeBuilder_ == null) {
          if (((bitField0_ & 0x00000002) == 0x00000002) &&
              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_ |= 0x00000002;
        return this;
      }
      /**
       * <code>optional .dossier.Comment type = 2;</code>
       */
      public Builder clearType() {
        if (typeBuilder_ == null) {
          type_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
          onChanged();
        } else {
          typeBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }
      /**
       * <code>optional .dossier.Comment type = 2;</code>
       */
      public com.github.jsdossier.proto.Comment.Builder getTypeBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getTypeFieldBuilder().getBuilder();
      }
      /**
       * <code>optional .dossier.Comment type = 2;</code>
       */
      public com.github.jsdossier.proto.CommentOrBuilder getTypeOrBuilder() {
        if (typeBuilder_ != null) {
          return typeBuilder_.getMessageOrBuilder();
        } else {
          return type_;
        }
      }
      /**
       * <code>optional .dossier.Comment type = 2;</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 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 = 3;</code>
       */
      public boolean hasDescription() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * <code>optional .dossier.Comment description = 3;</code>
       */
      public com.github.jsdossier.proto.Comment getDescription() {
        if (descriptionBuilder_ == null) {
          return description_;
        } else {
          return descriptionBuilder_.getMessage();
        }
      }
      /**
       * <code>optional .dossier.Comment description = 3;</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_ |= 0x00000004;
        return this;
      }
      /**
       * <code>optional .dossier.Comment description = 3;</code>
       */
      public Builder setDescription(
          com.github.jsdossier.proto.Comment.Builder builderForValue) {
        if (descriptionBuilder_ == null) {
          description_ = builderForValue.build();
          onChanged();
        } else {
          descriptionBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * <code>optional .dossier.Comment description = 3;</code>
       */
      public Builder mergeDescription(com.github.jsdossier.proto.Comment value) {
        if (descriptionBuilder_ == null) {
          if (((bitField0_ & 0x00000004) == 0x00000004) &&
              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_ |= 0x00000004;
        return this;
      }
      /**
       * <code>optional .dossier.Comment description = 3;</code>
       */
      public Builder clearDescription() {
        if (descriptionBuilder_ == null) {
          description_ = com.github.jsdossier.proto.Comment.getDefaultInstance();
          onChanged();
        } else {
          descriptionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }
      /**
       * <code>optional .dossier.Comment description = 3;</code>
       */
      public com.github.jsdossier.proto.Comment.Builder getDescriptionBuilder() {
        bitField0_ |= 0x00000004;
        onChanged();
        return getDescriptionFieldBuilder().getBuilder();
      }
      /**
       * <code>optional .dossier.Comment description = 3;</code>
       */
      public com.github.jsdossier.proto.CommentOrBuilder getDescriptionOrBuilder() {
        if (descriptionBuilder_ != null) {
          return descriptionBuilder_.getMessageOrBuilder();
        } else {
          return description_;
        }
      }
      /**
       * <code>optional .dossier.Comment description = 3;</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_;
      }

      // @@protoc_insertion_point(builder_scope:dossier.Function.Detail)
    }

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

    // @@protoc_insertion_point(class_scope:dossier.Function.Detail)
  }

  private int bitField0_;
  public static final int BASE_FIELD_NUMBER = 1;
  private com.github.jsdossier.proto.BaseProperty base_;
  /**
   * <code>required .dossier.BaseProperty base = 1;</code>
   */
  public boolean hasBase() {
    return ((bitField0_ & 0x00000001) == 0x00000001);
  }
  /**
   * <code>required .dossier.BaseProperty base = 1;</code>
   */
  public com.github.jsdossier.proto.BaseProperty getBase() {
    return base_;
  }
  /**
   * <code>required .dossier.BaseProperty base = 1;</code>
   */
  public com.github.jsdossier.proto.BasePropertyOrBuilder getBaseOrBuilder() {
    return base_;
  }

  public static final int TEMPLATE_NAME_FIELD_NUMBER = 2;
  private com.google.protobuf.LazyStringList templateName_;
  /**
   * <code>repeated string template_name = 2;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getTemplateNameList() {
    return templateName_;
  }
  /**
   * <code>repeated string template_name = 2;</code>
   */
  public int getTemplateNameCount() {
    return templateName_.size();
  }
  /**
   * <code>repeated string template_name = 2;</code>
   */
  public java.lang.String getTemplateName(int index) {
    return templateName_.get(index);
  }
  /**
   * <code>repeated string template_name = 2;</code>
   */
  public com.google.protobuf.ByteString
      getTemplateNameBytes(int index) {
    return templateName_.getByteString(index);
  }

  public static final int IS_CONSTRUCTOR_FIELD_NUMBER = 3;
  private boolean isConstructor_;
  /**
   * <code>optional bool is_constructor = 3 [default = false];</code>
   */
  public boolean hasIsConstructor() {
    return ((bitField0_ & 0x00000002) == 0x00000002);
  }
  /**
   * <code>optional bool is_constructor = 3 [default = false];</code>
   */
  public boolean getIsConstructor() {
    return isConstructor_;
  }

  public static final int PARAMETER_FIELD_NUMBER = 4;
  private java.util.List<com.github.jsdossier.proto.Function.Detail> parameter_;
  /**
   * <code>repeated .dossier.Function.Detail parameter = 4;</code>
   */
  public java.util.List<com.github.jsdossier.proto.Function.Detail> getParameterList() {
    return parameter_;
  }
  /**
   * <code>repeated .dossier.Function.Detail parameter = 4;</code>
   */
  public java.util.List<? extends com.github.jsdossier.proto.Function.DetailOrBuilder> 
      getParameterOrBuilderList() {
    return parameter_;
  }
  /**
   * <code>repeated .dossier.Function.Detail parameter = 4;</code>
   */
  public int getParameterCount() {
    return parameter_.size();
  }
  /**
   * <code>repeated .dossier.Function.Detail parameter = 4;</code>
   */
  public com.github.jsdossier.proto.Function.Detail getParameter(int index) {
    return parameter_.get(index);
  }
  /**
   * <code>repeated .dossier.Function.Detail parameter = 4;</code>
   */
  public com.github.jsdossier.proto.Function.DetailOrBuilder getParameterOrBuilder(
      int index) {
    return parameter_.get(index);
  }

  public static final int RETURN_FIELD_NUMBER = 5;
  private com.github.jsdossier.proto.Function.Detail return_;
  /**
   * <code>optional .dossier.Function.Detail return = 5;</code>
   */
  public boolean hasReturn() {
    return ((bitField0_ & 0x00000004) == 0x00000004);
  }
  /**
   * <code>optional .dossier.Function.Detail return = 5;</code>
   */
  public com.github.jsdossier.proto.Function.Detail getReturn() {
    return return_;
  }
  /**
   * <code>optional .dossier.Function.Detail return = 5;</code>
   */
  public com.github.jsdossier.proto.Function.DetailOrBuilder getReturnOrBuilder() {
    return return_;
  }

  public static final int THROWN_FIELD_NUMBER = 6;
  private java.util.List<com.github.jsdossier.proto.Function.Detail> thrown_;
  /**
   * <code>repeated .dossier.Function.Detail thrown = 6;</code>
   */
  public java.util.List<com.github.jsdossier.proto.Function.Detail> getThrownList() {
    return thrown_;
  }
  /**
   * <code>repeated .dossier.Function.Detail thrown = 6;</code>
   */
  public java.util.List<? extends com.github.jsdossier.proto.Function.DetailOrBuilder> 
      getThrownOrBuilderList() {
    return thrown_;
  }
  /**
   * <code>repeated .dossier.Function.Detail thrown = 6;</code>
   */
  public int getThrownCount() {
    return thrown_.size();
  }
  /**
   * <code>repeated .dossier.Function.Detail thrown = 6;</code>
   */
  public com.github.jsdossier.proto.Function.Detail getThrown(int index) {
    return thrown_.get(index);
  }
  /**
   * <code>repeated .dossier.Function.Detail thrown = 6;</code>
   */
  public com.github.jsdossier.proto.Function.DetailOrBuilder getThrownOrBuilder(
      int index) {
    return thrown_.get(index);
  }

  private void initFields() {
    base_ = com.github.jsdossier.proto.BaseProperty.getDefaultInstance();
    templateName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    isConstructor_ = false;
    parameter_ = java.util.Collections.emptyList();
    return_ = com.github.jsdossier.proto.Function.Detail.getDefaultInstance();
    thrown_ = java.util.Collections.emptyList();
  }
  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    if (!hasBase()) {
      memoizedIsInitialized = 0;
      return false;
    }
    if (!getBase().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, base_);
    }
    for (int i = 0; i < templateName_.size(); i++) {
      output.writeBytes(2, templateName_.getByteString(i));
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      output.writeBool(3, isConstructor_);
    }
    for (int i = 0; i < parameter_.size(); i++) {
      output.writeMessage(4, parameter_.get(i));
    }
    if (((bitField0_ & 0x00000004) == 0x00000004)) {
      output.writeMessage(5, return_);
    }
    for (int i = 0; i < thrown_.size(); i++) {
      output.writeMessage(6, thrown_.get(i));
    }
    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, base_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < templateName_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeBytesSizeNoTag(templateName_.getByteString(i));
      }
      size += dataSize;
      size += 1 * getTemplateNameList().size();
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(3, isConstructor_);
    }
    for (int i = 0; i < parameter_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, parameter_.get(i));
    }
    if (((bitField0_ & 0x00000004) == 0x00000004)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, return_);
    }
    for (int i = 0; i < thrown_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, thrown_.get(i));
    }
    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.Function parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.github.jsdossier.proto.Function 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.Function parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.github.jsdossier.proto.Function parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.github.jsdossier.proto.Function parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return PARSER.parseFrom(input);
  }
  public static com.github.jsdossier.proto.Function 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.Function parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return PARSER.parseDelimitedFrom(input);
  }
  public static com.github.jsdossier.proto.Function 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.Function parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return PARSER.parseFrom(input);
  }
  public static com.github.jsdossier.proto.Function 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.Function 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.Function}
   *
   * <pre>
   * Describes a function JavaScript property.
   * </pre>
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:dossier.Function)
      com.github.jsdossier.proto.FunctionOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.github.jsdossier.proto.Dossier.internal_static_dossier_Function_descriptor;
    }

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

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

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        getBaseFieldBuilder();
        getParameterFieldBuilder();
        getReturnFieldBuilder();
        getThrownFieldBuilder();
      }
    }
    private static Builder create() {
      return new Builder();
    }

    public Builder clear() {
      super.clear();
      if (baseBuilder_ == null) {
        base_ = com.github.jsdossier.proto.BaseProperty.getDefaultInstance();
      } else {
        baseBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      templateName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      isConstructor_ = false;
      bitField0_ = (bitField0_ & ~0x00000004);
      if (parameterBuilder_ == null) {
        parameter_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
      } else {
        parameterBuilder_.clear();
      }
      if (returnBuilder_ == null) {
        return_ = com.github.jsdossier.proto.Function.Detail.getDefaultInstance();
      } else {
        returnBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000010);
      if (thrownBuilder_ == null) {
        thrown_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000020);
      } else {
        thrownBuilder_.clear();
      }
      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_Function_descriptor;
    }

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

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

    public com.github.jsdossier.proto.Function buildPartial() {
      com.github.jsdossier.proto.Function result = new com.github.jsdossier.proto.Function(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
        to_bitField0_ |= 0x00000001;
      }
      if (baseBuilder_ == null) {
        result.base_ = base_;
      } else {
        result.base_ = baseBuilder_.build();
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        templateName_ = templateName_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.templateName_ = templateName_;
      if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
        to_bitField0_ |= 0x00000002;
      }
      result.isConstructor_ = isConstructor_;
      if (parameterBuilder_ == null) {
        if (((bitField0_ & 0x00000008) == 0x00000008)) {
          parameter_ = java.util.Collections.unmodifiableList(parameter_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.parameter_ = parameter_;
      } else {
        result.parameter_ = parameterBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
        to_bitField0_ |= 0x00000004;
      }
      if (returnBuilder_ == null) {
        result.return_ = return_;
      } else {
        result.return_ = returnBuilder_.build();
      }
      if (thrownBuilder_ == null) {
        if (((bitField0_ & 0x00000020) == 0x00000020)) {
          thrown_ = java.util.Collections.unmodifiableList(thrown_);
          bitField0_ = (bitField0_ & ~0x00000020);
        }
        result.thrown_ = thrown_;
      } else {
        result.thrown_ = thrownBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(com.github.jsdossier.proto.Function other) {
      if (other == com.github.jsdossier.proto.Function.getDefaultInstance()) return this;
      if (other.hasBase()) {
        mergeBase(other.getBase());
      }
      if (!other.templateName_.isEmpty()) {
        if (templateName_.isEmpty()) {
          templateName_ = other.templateName_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureTemplateNameIsMutable();
          templateName_.addAll(other.templateName_);
        }
        onChanged();
      }
      if (other.hasIsConstructor()) {
        setIsConstructor(other.getIsConstructor());
      }
      if (parameterBuilder_ == null) {
        if (!other.parameter_.isEmpty()) {
          if (parameter_.isEmpty()) {
            parameter_ = other.parameter_;
            bitField0_ = (bitField0_ & ~0x00000008);
          } else {
            ensureParameterIsMutable();
            parameter_.addAll(other.parameter_);
          }
          onChanged();
        }
      } else {
        if (!other.parameter_.isEmpty()) {
          if (parameterBuilder_.isEmpty()) {
            parameterBuilder_.dispose();
            parameterBuilder_ = null;
            parameter_ = other.parameter_;
            bitField0_ = (bitField0_ & ~0x00000008);
            parameterBuilder_ = 
              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                 getParameterFieldBuilder() : null;
          } else {
            parameterBuilder_.addAllMessages(other.parameter_);
          }
        }
      }
      if (other.hasReturn()) {
        mergeReturn(other.getReturn());
      }
      if (thrownBuilder_ == null) {
        if (!other.thrown_.isEmpty()) {
          if (thrown_.isEmpty()) {
            thrown_ = other.thrown_;
            bitField0_ = (bitField0_ & ~0x00000020);
          } else {
            ensureThrownIsMutable();
            thrown_.addAll(other.thrown_);
          }
          onChanged();
        }
      } else {
        if (!other.thrown_.isEmpty()) {
          if (thrownBuilder_.isEmpty()) {
            thrownBuilder_.dispose();
            thrownBuilder_ = null;
            thrown_ = other.thrown_;
            bitField0_ = (bitField0_ & ~0x00000020);
            thrownBuilder_ = 
              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                 getThrownFieldBuilder() : null;
          } else {
            thrownBuilder_.addAllMessages(other.thrown_);
          }
        }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      return this;
    }

    public final boolean isInitialized() {
      if (!hasBase()) {
        
        return false;
      }
      if (!getBase().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.Function parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.github.jsdossier.proto.Function) e.getUnfinishedMessage();
        throw e;
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private com.github.jsdossier.proto.BaseProperty base_ = com.github.jsdossier.proto.BaseProperty.getDefaultInstance();
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.BaseProperty, com.github.jsdossier.proto.BaseProperty.Builder, com.github.jsdossier.proto.BasePropertyOrBuilder> baseBuilder_;
    /**
     * <code>required .dossier.BaseProperty base = 1;</code>
     */
    public boolean hasBase() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required .dossier.BaseProperty base = 1;</code>
     */
    public com.github.jsdossier.proto.BaseProperty getBase() {
      if (baseBuilder_ == null) {
        return base_;
      } else {
        return baseBuilder_.getMessage();
      }
    }
    /**
     * <code>required .dossier.BaseProperty base = 1;</code>
     */
    public Builder setBase(com.github.jsdossier.proto.BaseProperty value) {
      if (baseBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        base_ = value;
        onChanged();
      } else {
        baseBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * <code>required .dossier.BaseProperty base = 1;</code>
     */
    public Builder setBase(
        com.github.jsdossier.proto.BaseProperty.Builder builderForValue) {
      if (baseBuilder_ == null) {
        base_ = builderForValue.build();
        onChanged();
      } else {
        baseBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * <code>required .dossier.BaseProperty base = 1;</code>
     */
    public Builder mergeBase(com.github.jsdossier.proto.BaseProperty value) {
      if (baseBuilder_ == null) {
        if (((bitField0_ & 0x00000001) == 0x00000001) &&
            base_ != com.github.jsdossier.proto.BaseProperty.getDefaultInstance()) {
          base_ =
            com.github.jsdossier.proto.BaseProperty.newBuilder(base_).mergeFrom(value).buildPartial();
        } else {
          base_ = value;
        }
        onChanged();
      } else {
        baseBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * <code>required .dossier.BaseProperty base = 1;</code>
     */
    public Builder clearBase() {
      if (baseBuilder_ == null) {
        base_ = com.github.jsdossier.proto.BaseProperty.getDefaultInstance();
        onChanged();
      } else {
        baseBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }
    /**
     * <code>required .dossier.BaseProperty base = 1;</code>
     */
    public com.github.jsdossier.proto.BaseProperty.Builder getBaseBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getBaseFieldBuilder().getBuilder();
    }
    /**
     * <code>required .dossier.BaseProperty base = 1;</code>
     */
    public com.github.jsdossier.proto.BasePropertyOrBuilder getBaseOrBuilder() {
      if (baseBuilder_ != null) {
        return baseBuilder_.getMessageOrBuilder();
      } else {
        return base_;
      }
    }
    /**
     * <code>required .dossier.BaseProperty base = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.BaseProperty, com.github.jsdossier.proto.BaseProperty.Builder, com.github.jsdossier.proto.BasePropertyOrBuilder> 
        getBaseFieldBuilder() {
      if (baseBuilder_ == null) {
        baseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            com.github.jsdossier.proto.BaseProperty, com.github.jsdossier.proto.BaseProperty.Builder, com.github.jsdossier.proto.BasePropertyOrBuilder>(
                getBase(),
                getParentForChildren(),
                isClean());
        base_ = null;
      }
      return baseBuilder_;
    }

    private com.google.protobuf.LazyStringList templateName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureTemplateNameIsMutable() {
      if (!((bitField0_ & 0x00000002) == 0x00000002)) {
        templateName_ = new com.google.protobuf.LazyStringArrayList(templateName_);
        bitField0_ |= 0x00000002;
       }
    }
    /**
     * <code>repeated string template_name = 2;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getTemplateNameList() {
      return templateName_.getUnmodifiableView();
    }
    /**
     * <code>repeated string template_name = 2;</code>
     */
    public int getTemplateNameCount() {
      return templateName_.size();
    }
    /**
     * <code>repeated string template_name = 2;</code>
     */
    public java.lang.String getTemplateName(int index) {
      return templateName_.get(index);
    }
    /**
     * <code>repeated string template_name = 2;</code>
     */
    public com.google.protobuf.ByteString
        getTemplateNameBytes(int index) {
      return templateName_.getByteString(index);
    }
    /**
     * <code>repeated string template_name = 2;</code>
     */
    public Builder setTemplateName(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureTemplateNameIsMutable();
      templateName_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <code>repeated string template_name = 2;</code>
     */
    public Builder addTemplateName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureTemplateNameIsMutable();
      templateName_.add(value);
      onChanged();
      return this;
    }
    /**
     * <code>repeated string template_name = 2;</code>
     */
    public Builder addAllTemplateName(
        java.lang.Iterable<java.lang.String> values) {
      ensureTemplateNameIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, templateName_);
      onChanged();
      return this;
    }
    /**
     * <code>repeated string template_name = 2;</code>
     */
    public Builder clearTemplateName() {
      templateName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * <code>repeated string template_name = 2;</code>
     */
    public Builder addTemplateNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureTemplateNameIsMutable();
      templateName_.add(value);
      onChanged();
      return this;
    }

    private boolean isConstructor_ ;
    /**
     * <code>optional bool is_constructor = 3 [default = false];</code>
     */
    public boolean hasIsConstructor() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * <code>optional bool is_constructor = 3 [default = false];</code>
     */
    public boolean getIsConstructor() {
      return isConstructor_;
    }
    /**
     * <code>optional bool is_constructor = 3 [default = false];</code>
     */
    public Builder setIsConstructor(boolean value) {
      bitField0_ |= 0x00000004;
      isConstructor_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>optional bool is_constructor = 3 [default = false];</code>
     */
    public Builder clearIsConstructor() {
      bitField0_ = (bitField0_ & ~0x00000004);
      isConstructor_ = false;
      onChanged();
      return this;
    }

    private java.util.List<com.github.jsdossier.proto.Function.Detail> parameter_ =
      java.util.Collections.emptyList();
    private void ensureParameterIsMutable() {
      if (!((bitField0_ & 0x00000008) == 0x00000008)) {
        parameter_ = new java.util.ArrayList<com.github.jsdossier.proto.Function.Detail>(parameter_);
        bitField0_ |= 0x00000008;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilder<
        com.github.jsdossier.proto.Function.Detail, com.github.jsdossier.proto.Function.Detail.Builder, com.github.jsdossier.proto.Function.DetailOrBuilder> parameterBuilder_;

    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public java.util.List<com.github.jsdossier.proto.Function.Detail> getParameterList() {
      if (parameterBuilder_ == null) {
        return java.util.Collections.unmodifiableList(parameter_);
      } else {
        return parameterBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public int getParameterCount() {
      if (parameterBuilder_ == null) {
        return parameter_.size();
      } else {
        return parameterBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public com.github.jsdossier.proto.Function.Detail getParameter(int index) {
      if (parameterBuilder_ == null) {
        return parameter_.get(index);
      } else {
        return parameterBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public Builder setParameter(
        int index, com.github.jsdossier.proto.Function.Detail value) {
      if (parameterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureParameterIsMutable();
        parameter_.set(index, value);
        onChanged();
      } else {
        parameterBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public Builder setParameter(
        int index, com.github.jsdossier.proto.Function.Detail.Builder builderForValue) {
      if (parameterBuilder_ == null) {
        ensureParameterIsMutable();
        parameter_.set(index, builderForValue.build());
        onChanged();
      } else {
        parameterBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public Builder addParameter(com.github.jsdossier.proto.Function.Detail value) {
      if (parameterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureParameterIsMutable();
        parameter_.add(value);
        onChanged();
      } else {
        parameterBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public Builder addParameter(
        int index, com.github.jsdossier.proto.Function.Detail value) {
      if (parameterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureParameterIsMutable();
        parameter_.add(index, value);
        onChanged();
      } else {
        parameterBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public Builder addParameter(
        com.github.jsdossier.proto.Function.Detail.Builder builderForValue) {
      if (parameterBuilder_ == null) {
        ensureParameterIsMutable();
        parameter_.add(builderForValue.build());
        onChanged();
      } else {
        parameterBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public Builder addParameter(
        int index, com.github.jsdossier.proto.Function.Detail.Builder builderForValue) {
      if (parameterBuilder_ == null) {
        ensureParameterIsMutable();
        parameter_.add(index, builderForValue.build());
        onChanged();
      } else {
        parameterBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public Builder addAllParameter(
        java.lang.Iterable<? extends com.github.jsdossier.proto.Function.Detail> values) {
      if (parameterBuilder_ == null) {
        ensureParameterIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, parameter_);
        onChanged();
      } else {
        parameterBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public Builder clearParameter() {
      if (parameterBuilder_ == null) {
        parameter_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
      } else {
        parameterBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public Builder removeParameter(int index) {
      if (parameterBuilder_ == null) {
        ensureParameterIsMutable();
        parameter_.remove(index);
        onChanged();
      } else {
        parameterBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public com.github.jsdossier.proto.Function.Detail.Builder getParameterBuilder(
        int index) {
      return getParameterFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public com.github.jsdossier.proto.Function.DetailOrBuilder getParameterOrBuilder(
        int index) {
      if (parameterBuilder_ == null) {
        return parameter_.get(index);  } else {
        return parameterBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public java.util.List<? extends com.github.jsdossier.proto.Function.DetailOrBuilder> 
         getParameterOrBuilderList() {
      if (parameterBuilder_ != null) {
        return parameterBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(parameter_);
      }
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public com.github.jsdossier.proto.Function.Detail.Builder addParameterBuilder() {
      return getParameterFieldBuilder().addBuilder(
          com.github.jsdossier.proto.Function.Detail.getDefaultInstance());
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public com.github.jsdossier.proto.Function.Detail.Builder addParameterBuilder(
        int index) {
      return getParameterFieldBuilder().addBuilder(
          index, com.github.jsdossier.proto.Function.Detail.getDefaultInstance());
    }
    /**
     * <code>repeated .dossier.Function.Detail parameter = 4;</code>
     */
    public java.util.List<com.github.jsdossier.proto.Function.Detail.Builder> 
         getParameterBuilderList() {
      return getParameterFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilder<
        com.github.jsdossier.proto.Function.Detail, com.github.jsdossier.proto.Function.Detail.Builder, com.github.jsdossier.proto.Function.DetailOrBuilder> 
        getParameterFieldBuilder() {
      if (parameterBuilder_ == null) {
        parameterBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
            com.github.jsdossier.proto.Function.Detail, com.github.jsdossier.proto.Function.Detail.Builder, com.github.jsdossier.proto.Function.DetailOrBuilder>(
                parameter_,
                ((bitField0_ & 0x00000008) == 0x00000008),
                getParentForChildren(),
                isClean());
        parameter_ = null;
      }
      return parameterBuilder_;
    }

    private com.github.jsdossier.proto.Function.Detail return_ = com.github.jsdossier.proto.Function.Detail.getDefaultInstance();
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.Function.Detail, com.github.jsdossier.proto.Function.Detail.Builder, com.github.jsdossier.proto.Function.DetailOrBuilder> returnBuilder_;
    /**
     * <code>optional .dossier.Function.Detail return = 5;</code>
     */
    public boolean hasReturn() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    /**
     * <code>optional .dossier.Function.Detail return = 5;</code>
     */
    public com.github.jsdossier.proto.Function.Detail getReturn() {
      if (returnBuilder_ == null) {
        return return_;
      } else {
        return returnBuilder_.getMessage();
      }
    }
    /**
     * <code>optional .dossier.Function.Detail return = 5;</code>
     */
    public Builder setReturn(com.github.jsdossier.proto.Function.Detail value) {
      if (returnBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        return_ = value;
        onChanged();
      } else {
        returnBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      return this;
    }
    /**
     * <code>optional .dossier.Function.Detail return = 5;</code>
     */
    public Builder setReturn(
        com.github.jsdossier.proto.Function.Detail.Builder builderForValue) {
      if (returnBuilder_ == null) {
        return_ = builderForValue.build();
        onChanged();
      } else {
        returnBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      return this;
    }
    /**
     * <code>optional .dossier.Function.Detail return = 5;</code>
     */
    public Builder mergeReturn(com.github.jsdossier.proto.Function.Detail value) {
      if (returnBuilder_ == null) {
        if (((bitField0_ & 0x00000010) == 0x00000010) &&
            return_ != com.github.jsdossier.proto.Function.Detail.getDefaultInstance()) {
          return_ =
            com.github.jsdossier.proto.Function.Detail.newBuilder(return_).mergeFrom(value).buildPartial();
        } else {
          return_ = value;
        }
        onChanged();
      } else {
        returnBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      return this;
    }
    /**
     * <code>optional .dossier.Function.Detail return = 5;</code>
     */
    public Builder clearReturn() {
      if (returnBuilder_ == null) {
        return_ = com.github.jsdossier.proto.Function.Detail.getDefaultInstance();
        onChanged();
      } else {
        returnBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000010);
      return this;
    }
    /**
     * <code>optional .dossier.Function.Detail return = 5;</code>
     */
    public com.github.jsdossier.proto.Function.Detail.Builder getReturnBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getReturnFieldBuilder().getBuilder();
    }
    /**
     * <code>optional .dossier.Function.Detail return = 5;</code>
     */
    public com.github.jsdossier.proto.Function.DetailOrBuilder getReturnOrBuilder() {
      if (returnBuilder_ != null) {
        return returnBuilder_.getMessageOrBuilder();
      } else {
        return return_;
      }
    }
    /**
     * <code>optional .dossier.Function.Detail return = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.Function.Detail, com.github.jsdossier.proto.Function.Detail.Builder, com.github.jsdossier.proto.Function.DetailOrBuilder> 
        getReturnFieldBuilder() {
      if (returnBuilder_ == null) {
        returnBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            com.github.jsdossier.proto.Function.Detail, com.github.jsdossier.proto.Function.Detail.Builder, com.github.jsdossier.proto.Function.DetailOrBuilder>(
                getReturn(),
                getParentForChildren(),
                isClean());
        return_ = null;
      }
      return returnBuilder_;
    }

    private java.util.List<com.github.jsdossier.proto.Function.Detail> thrown_ =
      java.util.Collections.emptyList();
    private void ensureThrownIsMutable() {
      if (!((bitField0_ & 0x00000020) == 0x00000020)) {
        thrown_ = new java.util.ArrayList<com.github.jsdossier.proto.Function.Detail>(thrown_);
        bitField0_ |= 0x00000020;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilder<
        com.github.jsdossier.proto.Function.Detail, com.github.jsdossier.proto.Function.Detail.Builder, com.github.jsdossier.proto.Function.DetailOrBuilder> thrownBuilder_;

    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public java.util.List<com.github.jsdossier.proto.Function.Detail> getThrownList() {
      if (thrownBuilder_ == null) {
        return java.util.Collections.unmodifiableList(thrown_);
      } else {
        return thrownBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public int getThrownCount() {
      if (thrownBuilder_ == null) {
        return thrown_.size();
      } else {
        return thrownBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public com.github.jsdossier.proto.Function.Detail getThrown(int index) {
      if (thrownBuilder_ == null) {
        return thrown_.get(index);
      } else {
        return thrownBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public Builder setThrown(
        int index, com.github.jsdossier.proto.Function.Detail value) {
      if (thrownBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureThrownIsMutable();
        thrown_.set(index, value);
        onChanged();
      } else {
        thrownBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public Builder setThrown(
        int index, com.github.jsdossier.proto.Function.Detail.Builder builderForValue) {
      if (thrownBuilder_ == null) {
        ensureThrownIsMutable();
        thrown_.set(index, builderForValue.build());
        onChanged();
      } else {
        thrownBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public Builder addThrown(com.github.jsdossier.proto.Function.Detail value) {
      if (thrownBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureThrownIsMutable();
        thrown_.add(value);
        onChanged();
      } else {
        thrownBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public Builder addThrown(
        int index, com.github.jsdossier.proto.Function.Detail value) {
      if (thrownBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureThrownIsMutable();
        thrown_.add(index, value);
        onChanged();
      } else {
        thrownBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public Builder addThrown(
        com.github.jsdossier.proto.Function.Detail.Builder builderForValue) {
      if (thrownBuilder_ == null) {
        ensureThrownIsMutable();
        thrown_.add(builderForValue.build());
        onChanged();
      } else {
        thrownBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public Builder addThrown(
        int index, com.github.jsdossier.proto.Function.Detail.Builder builderForValue) {
      if (thrownBuilder_ == null) {
        ensureThrownIsMutable();
        thrown_.add(index, builderForValue.build());
        onChanged();
      } else {
        thrownBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public Builder addAllThrown(
        java.lang.Iterable<? extends com.github.jsdossier.proto.Function.Detail> values) {
      if (thrownBuilder_ == null) {
        ensureThrownIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, thrown_);
        onChanged();
      } else {
        thrownBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public Builder clearThrown() {
      if (thrownBuilder_ == null) {
        thrown_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000020);
        onChanged();
      } else {
        thrownBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public Builder removeThrown(int index) {
      if (thrownBuilder_ == null) {
        ensureThrownIsMutable();
        thrown_.remove(index);
        onChanged();
      } else {
        thrownBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public com.github.jsdossier.proto.Function.Detail.Builder getThrownBuilder(
        int index) {
      return getThrownFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public com.github.jsdossier.proto.Function.DetailOrBuilder getThrownOrBuilder(
        int index) {
      if (thrownBuilder_ == null) {
        return thrown_.get(index);  } else {
        return thrownBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public java.util.List<? extends com.github.jsdossier.proto.Function.DetailOrBuilder> 
         getThrownOrBuilderList() {
      if (thrownBuilder_ != null) {
        return thrownBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(thrown_);
      }
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public com.github.jsdossier.proto.Function.Detail.Builder addThrownBuilder() {
      return getThrownFieldBuilder().addBuilder(
          com.github.jsdossier.proto.Function.Detail.getDefaultInstance());
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public com.github.jsdossier.proto.Function.Detail.Builder addThrownBuilder(
        int index) {
      return getThrownFieldBuilder().addBuilder(
          index, com.github.jsdossier.proto.Function.Detail.getDefaultInstance());
    }
    /**
     * <code>repeated .dossier.Function.Detail thrown = 6;</code>
     */
    public java.util.List<com.github.jsdossier.proto.Function.Detail.Builder> 
         getThrownBuilderList() {
      return getThrownFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilder<
        com.github.jsdossier.proto.Function.Detail, com.github.jsdossier.proto.Function.Detail.Builder, com.github.jsdossier.proto.Function.DetailOrBuilder> 
        getThrownFieldBuilder() {
      if (thrownBuilder_ == null) {
        thrownBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
            com.github.jsdossier.proto.Function.Detail, com.github.jsdossier.proto.Function.Detail.Builder, com.github.jsdossier.proto.Function.DetailOrBuilder>(
                thrown_,
                ((bitField0_ & 0x00000020) == 0x00000020),
                getParentForChildren(),
                isClean());
        thrown_ = null;
      }
      return thrownBuilder_;
    }

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

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

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

