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

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

  public SourceFileRenderSpec getDefaultInstanceForType() {
    return defaultInstance;
  }

  private final com.google.protobuf.UnknownFieldSet unknownFields;
  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
    return this.unknownFields;
  }
  private SourceFileRenderSpec(
      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.Resources.Builder subBuilder = null;
            if (((bitField0_ & 0x00000001) == 0x00000001)) {
              subBuilder = resources_.toBuilder();
            }
            resources_ = input.readMessage(com.github.jsdossier.proto.Resources.PARSER, extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(resources_);
              resources_ = subBuilder.buildPartial();
            }
            bitField0_ |= 0x00000001;
            break;
          }
          case 18: {
            com.github.jsdossier.proto.SourceFile.Builder subBuilder = null;
            if (((bitField0_ & 0x00000002) == 0x00000002)) {
              subBuilder = file_.toBuilder();
            }
            file_ = input.readMessage(com.github.jsdossier.proto.SourceFile.PARSER, extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(file_);
              file_ = subBuilder.buildPartial();
            }
            bitField0_ |= 0x00000002;
            break;
          }
          case 26: {
            com.github.jsdossier.proto.Index.Builder subBuilder = null;
            if (((bitField0_ & 0x00000004) == 0x00000004)) {
              subBuilder = index_.toBuilder();
            }
            index_ = input.readMessage(com.github.jsdossier.proto.Index.PARSER, extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(index_);
              index_ = 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_SourceFileRenderSpec_descriptor;
  }

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

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

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

  private int bitField0_;
  public static final int RESOURCES_FIELD_NUMBER = 1;
  private com.github.jsdossier.proto.Resources resources_;
  /**
   * <code>required .dossier.Resources resources = 1;</code>
   *
   * <pre>
   * The resources to include.
   * </pre>
   */
  public boolean hasResources() {
    return ((bitField0_ & 0x00000001) == 0x00000001);
  }
  /**
   * <code>required .dossier.Resources resources = 1;</code>
   *
   * <pre>
   * The resources to include.
   * </pre>
   */
  public com.github.jsdossier.proto.Resources getResources() {
    return resources_;
  }
  /**
   * <code>required .dossier.Resources resources = 1;</code>
   *
   * <pre>
   * The resources to include.
   * </pre>
   */
  public com.github.jsdossier.proto.ResourcesOrBuilder getResourcesOrBuilder() {
    return resources_;
  }

  public static final int FILE_FIELD_NUMBER = 2;
  private com.github.jsdossier.proto.SourceFile file_;
  /**
   * <code>required .dossier.SourceFile file = 2;</code>
   *
   * <pre>
   * The file to render.
   * </pre>
   */
  public boolean hasFile() {
    return ((bitField0_ & 0x00000002) == 0x00000002);
  }
  /**
   * <code>required .dossier.SourceFile file = 2;</code>
   *
   * <pre>
   * The file to render.
   * </pre>
   */
  public com.github.jsdossier.proto.SourceFile getFile() {
    return file_;
  }
  /**
   * <code>required .dossier.SourceFile file = 2;</code>
   *
   * <pre>
   * The file to render.
   * </pre>
   */
  public com.github.jsdossier.proto.SourceFileOrBuilder getFileOrBuilder() {
    return file_;
  }

  public static final int INDEX_FIELD_NUMBER = 3;
  private com.github.jsdossier.proto.Index index_;
  /**
   * <code>required .dossier.Index index = 3;</code>
   *
   * <pre>
   * Navigation index.
   * </pre>
   */
  public boolean hasIndex() {
    return ((bitField0_ & 0x00000004) == 0x00000004);
  }
  /**
   * <code>required .dossier.Index index = 3;</code>
   *
   * <pre>
   * Navigation index.
   * </pre>
   */
  public com.github.jsdossier.proto.Index getIndex() {
    return index_;
  }
  /**
   * <code>required .dossier.Index index = 3;</code>
   *
   * <pre>
   * Navigation index.
   * </pre>
   */
  public com.github.jsdossier.proto.IndexOrBuilder getIndexOrBuilder() {
    return index_;
  }

  private void initFields() {
    resources_ = com.github.jsdossier.proto.Resources.getDefaultInstance();
    file_ = com.github.jsdossier.proto.SourceFile.getDefaultInstance();
    index_ = com.github.jsdossier.proto.Index.getDefaultInstance();
  }
  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    if (!hasResources()) {
      memoizedIsInitialized = 0;
      return false;
    }
    if (!hasFile()) {
      memoizedIsInitialized = 0;
      return false;
    }
    if (!hasIndex()) {
      memoizedIsInitialized = 0;
      return false;
    }
    if (!getFile().isInitialized()) {
      memoizedIsInitialized = 0;
      return false;
    }
    if (!getIndex().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, resources_);
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      output.writeMessage(2, file_);
    }
    if (((bitField0_ & 0x00000004) == 0x00000004)) {
      output.writeMessage(3, index_);
    }
    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, resources_);
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, file_);
    }
    if (((bitField0_ & 0x00000004) == 0x00000004)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, index_);
    }
    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.SourceFileRenderSpec parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.github.jsdossier.proto.SourceFileRenderSpec 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.SourceFileRenderSpec parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.github.jsdossier.proto.SourceFileRenderSpec parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.github.jsdossier.proto.SourceFileRenderSpec parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return PARSER.parseFrom(input);
  }
  public static com.github.jsdossier.proto.SourceFileRenderSpec 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.SourceFileRenderSpec parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return PARSER.parseDelimitedFrom(input);
  }
  public static com.github.jsdossier.proto.SourceFileRenderSpec 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.SourceFileRenderSpec parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return PARSER.parseFrom(input);
  }
  public static com.github.jsdossier.proto.SourceFileRenderSpec 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.SourceFileRenderSpec 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.SourceFileRenderSpec}
   *
   * <pre>
   * Describes how to render a source file.
   * </pre>
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:dossier.SourceFileRenderSpec)
      com.github.jsdossier.proto.SourceFileRenderSpecOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.github.jsdossier.proto.Dossier.internal_static_dossier_SourceFileRenderSpec_descriptor;
    }

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

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

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

    public Builder clear() {
      super.clear();
      if (resourcesBuilder_ == null) {
        resources_ = com.github.jsdossier.proto.Resources.getDefaultInstance();
      } else {
        resourcesBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      if (fileBuilder_ == null) {
        file_ = com.github.jsdossier.proto.SourceFile.getDefaultInstance();
      } else {
        fileBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000002);
      if (indexBuilder_ == null) {
        index_ = com.github.jsdossier.proto.Index.getDefaultInstance();
      } else {
        indexBuilder_.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_SourceFileRenderSpec_descriptor;
    }

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

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

    public com.github.jsdossier.proto.SourceFileRenderSpec buildPartial() {
      com.github.jsdossier.proto.SourceFileRenderSpec result = new com.github.jsdossier.proto.SourceFileRenderSpec(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
        to_bitField0_ |= 0x00000001;
      }
      if (resourcesBuilder_ == null) {
        result.resources_ = resources_;
      } else {
        result.resources_ = resourcesBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
        to_bitField0_ |= 0x00000002;
      }
      if (fileBuilder_ == null) {
        result.file_ = file_;
      } else {
        result.file_ = fileBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
        to_bitField0_ |= 0x00000004;
      }
      if (indexBuilder_ == null) {
        result.index_ = index_;
      } else {
        result.index_ = indexBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(com.github.jsdossier.proto.SourceFileRenderSpec other) {
      if (other == com.github.jsdossier.proto.SourceFileRenderSpec.getDefaultInstance()) return this;
      if (other.hasResources()) {
        mergeResources(other.getResources());
      }
      if (other.hasFile()) {
        mergeFile(other.getFile());
      }
      if (other.hasIndex()) {
        mergeIndex(other.getIndex());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      return this;
    }

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

    private com.github.jsdossier.proto.Resources resources_ = com.github.jsdossier.proto.Resources.getDefaultInstance();
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.Resources, com.github.jsdossier.proto.Resources.Builder, com.github.jsdossier.proto.ResourcesOrBuilder> resourcesBuilder_;
    /**
     * <code>required .dossier.Resources resources = 1;</code>
     *
     * <pre>
     * The resources to include.
     * </pre>
     */
    public boolean hasResources() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required .dossier.Resources resources = 1;</code>
     *
     * <pre>
     * The resources to include.
     * </pre>
     */
    public com.github.jsdossier.proto.Resources getResources() {
      if (resourcesBuilder_ == null) {
        return resources_;
      } else {
        return resourcesBuilder_.getMessage();
      }
    }
    /**
     * <code>required .dossier.Resources resources = 1;</code>
     *
     * <pre>
     * The resources to include.
     * </pre>
     */
    public Builder setResources(com.github.jsdossier.proto.Resources value) {
      if (resourcesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        resources_ = value;
        onChanged();
      } else {
        resourcesBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * <code>required .dossier.Resources resources = 1;</code>
     *
     * <pre>
     * The resources to include.
     * </pre>
     */
    public Builder setResources(
        com.github.jsdossier.proto.Resources.Builder builderForValue) {
      if (resourcesBuilder_ == null) {
        resources_ = builderForValue.build();
        onChanged();
      } else {
        resourcesBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * <code>required .dossier.Resources resources = 1;</code>
     *
     * <pre>
     * The resources to include.
     * </pre>
     */
    public Builder mergeResources(com.github.jsdossier.proto.Resources value) {
      if (resourcesBuilder_ == null) {
        if (((bitField0_ & 0x00000001) == 0x00000001) &&
            resources_ != com.github.jsdossier.proto.Resources.getDefaultInstance()) {
          resources_ =
            com.github.jsdossier.proto.Resources.newBuilder(resources_).mergeFrom(value).buildPartial();
        } else {
          resources_ = value;
        }
        onChanged();
      } else {
        resourcesBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * <code>required .dossier.Resources resources = 1;</code>
     *
     * <pre>
     * The resources to include.
     * </pre>
     */
    public Builder clearResources() {
      if (resourcesBuilder_ == null) {
        resources_ = com.github.jsdossier.proto.Resources.getDefaultInstance();
        onChanged();
      } else {
        resourcesBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }
    /**
     * <code>required .dossier.Resources resources = 1;</code>
     *
     * <pre>
     * The resources to include.
     * </pre>
     */
    public com.github.jsdossier.proto.Resources.Builder getResourcesBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getResourcesFieldBuilder().getBuilder();
    }
    /**
     * <code>required .dossier.Resources resources = 1;</code>
     *
     * <pre>
     * The resources to include.
     * </pre>
     */
    public com.github.jsdossier.proto.ResourcesOrBuilder getResourcesOrBuilder() {
      if (resourcesBuilder_ != null) {
        return resourcesBuilder_.getMessageOrBuilder();
      } else {
        return resources_;
      }
    }
    /**
     * <code>required .dossier.Resources resources = 1;</code>
     *
     * <pre>
     * The resources to include.
     * </pre>
     */
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.Resources, com.github.jsdossier.proto.Resources.Builder, com.github.jsdossier.proto.ResourcesOrBuilder> 
        getResourcesFieldBuilder() {
      if (resourcesBuilder_ == null) {
        resourcesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            com.github.jsdossier.proto.Resources, com.github.jsdossier.proto.Resources.Builder, com.github.jsdossier.proto.ResourcesOrBuilder>(
                getResources(),
                getParentForChildren(),
                isClean());
        resources_ = null;
      }
      return resourcesBuilder_;
    }

    private com.github.jsdossier.proto.SourceFile file_ = com.github.jsdossier.proto.SourceFile.getDefaultInstance();
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.SourceFile, com.github.jsdossier.proto.SourceFile.Builder, com.github.jsdossier.proto.SourceFileOrBuilder> fileBuilder_;
    /**
     * <code>required .dossier.SourceFile file = 2;</code>
     *
     * <pre>
     * The file to render.
     * </pre>
     */
    public boolean hasFile() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>required .dossier.SourceFile file = 2;</code>
     *
     * <pre>
     * The file to render.
     * </pre>
     */
    public com.github.jsdossier.proto.SourceFile getFile() {
      if (fileBuilder_ == null) {
        return file_;
      } else {
        return fileBuilder_.getMessage();
      }
    }
    /**
     * <code>required .dossier.SourceFile file = 2;</code>
     *
     * <pre>
     * The file to render.
     * </pre>
     */
    public Builder setFile(com.github.jsdossier.proto.SourceFile value) {
      if (fileBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        file_ = value;
        onChanged();
      } else {
        fileBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      return this;
    }
    /**
     * <code>required .dossier.SourceFile file = 2;</code>
     *
     * <pre>
     * The file to render.
     * </pre>
     */
    public Builder setFile(
        com.github.jsdossier.proto.SourceFile.Builder builderForValue) {
      if (fileBuilder_ == null) {
        file_ = builderForValue.build();
        onChanged();
      } else {
        fileBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      return this;
    }
    /**
     * <code>required .dossier.SourceFile file = 2;</code>
     *
     * <pre>
     * The file to render.
     * </pre>
     */
    public Builder mergeFile(com.github.jsdossier.proto.SourceFile value) {
      if (fileBuilder_ == null) {
        if (((bitField0_ & 0x00000002) == 0x00000002) &&
            file_ != com.github.jsdossier.proto.SourceFile.getDefaultInstance()) {
          file_ =
            com.github.jsdossier.proto.SourceFile.newBuilder(file_).mergeFrom(value).buildPartial();
        } else {
          file_ = value;
        }
        onChanged();
      } else {
        fileBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000002;
      return this;
    }
    /**
     * <code>required .dossier.SourceFile file = 2;</code>
     *
     * <pre>
     * The file to render.
     * </pre>
     */
    public Builder clearFile() {
      if (fileBuilder_ == null) {
        file_ = com.github.jsdossier.proto.SourceFile.getDefaultInstance();
        onChanged();
      } else {
        fileBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000002);
      return this;
    }
    /**
     * <code>required .dossier.SourceFile file = 2;</code>
     *
     * <pre>
     * The file to render.
     * </pre>
     */
    public com.github.jsdossier.proto.SourceFile.Builder getFileBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getFileFieldBuilder().getBuilder();
    }
    /**
     * <code>required .dossier.SourceFile file = 2;</code>
     *
     * <pre>
     * The file to render.
     * </pre>
     */
    public com.github.jsdossier.proto.SourceFileOrBuilder getFileOrBuilder() {
      if (fileBuilder_ != null) {
        return fileBuilder_.getMessageOrBuilder();
      } else {
        return file_;
      }
    }
    /**
     * <code>required .dossier.SourceFile file = 2;</code>
     *
     * <pre>
     * The file to render.
     * </pre>
     */
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.SourceFile, com.github.jsdossier.proto.SourceFile.Builder, com.github.jsdossier.proto.SourceFileOrBuilder> 
        getFileFieldBuilder() {
      if (fileBuilder_ == null) {
        fileBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            com.github.jsdossier.proto.SourceFile, com.github.jsdossier.proto.SourceFile.Builder, com.github.jsdossier.proto.SourceFileOrBuilder>(
                getFile(),
                getParentForChildren(),
                isClean());
        file_ = null;
      }
      return fileBuilder_;
    }

    private com.github.jsdossier.proto.Index index_ = com.github.jsdossier.proto.Index.getDefaultInstance();
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.Index, com.github.jsdossier.proto.Index.Builder, com.github.jsdossier.proto.IndexOrBuilder> indexBuilder_;
    /**
     * <code>required .dossier.Index index = 3;</code>
     *
     * <pre>
     * Navigation index.
     * </pre>
     */
    public boolean hasIndex() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * <code>required .dossier.Index index = 3;</code>
     *
     * <pre>
     * Navigation index.
     * </pre>
     */
    public com.github.jsdossier.proto.Index getIndex() {
      if (indexBuilder_ == null) {
        return index_;
      } else {
        return indexBuilder_.getMessage();
      }
    }
    /**
     * <code>required .dossier.Index index = 3;</code>
     *
     * <pre>
     * Navigation index.
     * </pre>
     */
    public Builder setIndex(com.github.jsdossier.proto.Index value) {
      if (indexBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        index_ = value;
        onChanged();
      } else {
        indexBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      return this;
    }
    /**
     * <code>required .dossier.Index index = 3;</code>
     *
     * <pre>
     * Navigation index.
     * </pre>
     */
    public Builder setIndex(
        com.github.jsdossier.proto.Index.Builder builderForValue) {
      if (indexBuilder_ == null) {
        index_ = builderForValue.build();
        onChanged();
      } else {
        indexBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      return this;
    }
    /**
     * <code>required .dossier.Index index = 3;</code>
     *
     * <pre>
     * Navigation index.
     * </pre>
     */
    public Builder mergeIndex(com.github.jsdossier.proto.Index value) {
      if (indexBuilder_ == null) {
        if (((bitField0_ & 0x00000004) == 0x00000004) &&
            index_ != com.github.jsdossier.proto.Index.getDefaultInstance()) {
          index_ =
            com.github.jsdossier.proto.Index.newBuilder(index_).mergeFrom(value).buildPartial();
        } else {
          index_ = value;
        }
        onChanged();
      } else {
        indexBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      return this;
    }
    /**
     * <code>required .dossier.Index index = 3;</code>
     *
     * <pre>
     * Navigation index.
     * </pre>
     */
    public Builder clearIndex() {
      if (indexBuilder_ == null) {
        index_ = com.github.jsdossier.proto.Index.getDefaultInstance();
        onChanged();
      } else {
        indexBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000004);
      return this;
    }
    /**
     * <code>required .dossier.Index index = 3;</code>
     *
     * <pre>
     * Navigation index.
     * </pre>
     */
    public com.github.jsdossier.proto.Index.Builder getIndexBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getIndexFieldBuilder().getBuilder();
    }
    /**
     * <code>required .dossier.Index index = 3;</code>
     *
     * <pre>
     * Navigation index.
     * </pre>
     */
    public com.github.jsdossier.proto.IndexOrBuilder getIndexOrBuilder() {
      if (indexBuilder_ != null) {
        return indexBuilder_.getMessageOrBuilder();
      } else {
        return index_;
      }
    }
    /**
     * <code>required .dossier.Index index = 3;</code>
     *
     * <pre>
     * Navigation index.
     * </pre>
     */
    private com.google.protobuf.SingleFieldBuilder<
        com.github.jsdossier.proto.Index, com.github.jsdossier.proto.Index.Builder, com.github.jsdossier.proto.IndexOrBuilder> 
        getIndexFieldBuilder() {
      if (indexBuilder_ == null) {
        indexBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            com.github.jsdossier.proto.Index, com.github.jsdossier.proto.Index.Builder, com.github.jsdossier.proto.IndexOrBuilder>(
                getIndex(),
                getParentForChildren(),
                isClean());
        index_ = null;
      }
      return indexBuilder_;
    }

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

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

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

