text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Cloud.DocumentAI.V1Beta3 {

  /// Holder for reflection information generated from google/cloud/documentai/v1beta3/document_io.proto
  public static partial class DocumentIoReflection {

    #region Descriptor
    /// File descriptor for google/cloud/documentai/v1beta3/document_io.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static DocumentIoReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "CjFnb29nbGUvY2xvdWQvZG9jdW1lbnRhaS92MWJldGEzL2RvY3VtZW50X2lv",
            "LnByb3RvEh9nb29nbGUuY2xvdWQuZG9jdW1lbnRhaS52MWJldGEzGhxnb29n",
            "bGUvYXBpL2Fubm90YXRpb25zLnByb3RvIjEKC1Jhd0RvY3VtZW50Eg8KB2Nv",
            "bnRlbnQYASABKAwSEQoJbWltZV90eXBlGAIgASgJIjEKC0djc0RvY3VtZW50",
            "Eg8KB2djc191cmkYASABKAkSEQoJbWltZV90eXBlGAIgASgJIk8KDEdjc0Rv",
            "Y3VtZW50cxI/Cglkb2N1bWVudHMYASADKAsyLC5nb29nbGUuY2xvdWQuZG9j",
            "dW1lbnRhaS52MWJldGEzLkdjc0RvY3VtZW50IiMKCUdjc1ByZWZpeBIWCg5n",
            "Y3NfdXJpX3ByZWZpeBgBIAEoCSKvAQoZQmF0Y2hEb2N1bWVudHNJbnB1dENv",
            "bmZpZxJACgpnY3NfcHJlZml4GAEgASgLMiouZ29vZ2xlLmNsb3VkLmRvY3Vt",
            "ZW50YWkudjFiZXRhMy5HY3NQcmVmaXhIABJGCg1nY3NfZG9jdW1lbnRzGAIg",
            "ASgLMi0uZ29vZ2xlLmNsb3VkLmRvY3VtZW50YWkudjFiZXRhMy5HY3NEb2N1",
            "bWVudHNIAEIICgZzb3VyY2UirQEKFERvY3VtZW50T3V0cHV0Q29uZmlnEmIK",
            "EWdjc19vdXRwdXRfY29uZmlnGAEgASgLMkUuZ29vZ2xlLmNsb3VkLmRvY3Vt",
            "ZW50YWkudjFiZXRhMy5Eb2N1bWVudE91dHB1dENvbmZpZy5HY3NPdXRwdXRD",
            "b25maWdIABoiCg9HY3NPdXRwdXRDb25maWcSDwoHZ2NzX3VyaRgBIAEoCUIN",
            "CgtkZXN0aW5hdGlvbkLsAQojY29tLmdvb2dsZS5jbG91ZC5kb2N1bWVudGFp",
            "LnYxYmV0YTNCD0RvY3VtZW50SW9Qcm90b1ABWklnb29nbGUuZ29sYW5nLm9y",
            "Zy9nZW5wcm90by9nb29nbGVhcGlzL2Nsb3VkL2RvY3VtZW50YWkvdjFiZXRh",
            "Mztkb2N1bWVudGFpqgIfR29vZ2xlLkNsb3VkLkRvY3VtZW50QUkuVjFCZXRh",
            "M8oCH0dvb2dsZVxDbG91ZFxEb2N1bWVudEFJXFYxYmV0YTPqAiJHb29nbGU6",
            "OkNsb3VkOjpEb2N1bWVudEFJOjpWMWJldGEzYgZwcm90bzM="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.DocumentAI.V1Beta3.RawDocument), global::Google.Cloud.DocumentAI.V1Beta3.RawDocument.Parser, new[]{ "Content", "MimeType" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.DocumentAI.V1Beta3.GcsDocument), global::Google.Cloud.DocumentAI.V1Beta3.GcsDocument.Parser, new[]{ "GcsUri", "MimeType" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.DocumentAI.V1Beta3.GcsDocuments), global::Google.Cloud.DocumentAI.V1Beta3.GcsDocuments.Parser, new[]{ "Documents" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.DocumentAI.V1Beta3.GcsPrefix), global::Google.Cloud.DocumentAI.V1Beta3.GcsPrefix.Parser, new[]{ "GcsUriPrefix" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.DocumentAI.V1Beta3.BatchDocumentsInputConfig), global::Google.Cloud.DocumentAI.V1Beta3.BatchDocumentsInputConfig.Parser, new[]{ "GcsPrefix", "GcsDocuments" }, new[]{ "Source" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig), global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Parser, new[]{ "GcsOutputConfig" }, new[]{ "Destination" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Types.GcsOutputConfig), global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Types.GcsOutputConfig.Parser, new[]{ "GcsUri" }, null, null, null, null)})
          }));
    }
    #endregion

  }
  #region Messages
  ///
  /// Payload message of raw document content (bytes).
  ///
  public sealed partial class RawDocument : pb::IMessage<RawDocument>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<RawDocument> _parser = new pb::MessageParser<RawDocument>(() => new RawDocument());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<RawDocument> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Cloud.DocumentAI.V1Beta3.DocumentIoReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public RawDocument() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public RawDocument(RawDocument other) : this() {
      content_ = other.content_;
      mimeType_ = other.mimeType_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public RawDocument Clone() {
      return new RawDocument(this);
    }

    /// Field number for the "content" field.
    public const int ContentFieldNumber = 1;
    private pb::ByteString content_ = pb::ByteString.Empty;
    ///
    /// Inline document content.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pb::ByteString Content {
      get { return content_; }
      set {
        content_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "mime_type" field.
    public const int MimeTypeFieldNumber = 2;
    private string mimeType_ = "";
    ///
    /// An IANA MIME type (RFC6838) indicating the nature and format of the
    /// [content].
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string MimeType {
      get { return mimeType_; }
      set {
        mimeType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as RawDocument);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(RawDocument other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Content != other.Content) return false;
      if (MimeType != other.MimeType) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Content.Length != 0) hash ^= Content.GetHashCode();
      if (MimeType.Length != 0) hash ^= MimeType.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Content.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(Content);
      }
      if (MimeType.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(MimeType);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Content.Length != 0) {
        output.WriteRawTag(10);
        output.WriteBytes(Content);
      }
      if (MimeType.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(MimeType);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Content.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeBytesSize(Content);
      }
      if (MimeType.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(MimeType);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(RawDocument other) {
      if (other == null) {
        return;
      }
      if (other.Content.Length != 0) {
        Content = other.Content;
      }
      if (other.MimeType.Length != 0) {
        MimeType = other.MimeType;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            Content = input.ReadBytes();
            break;
          }
          case 18: {
            MimeType = input.ReadString();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            Content = input.ReadBytes();
            break;
          }
          case 18: {
            MimeType = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// Specifies a document stored on Cloud Storage.
  ///
  public sealed partial class GcsDocument : pb::IMessage<GcsDocument>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<GcsDocument> _parser = new pb::MessageParser<GcsDocument>(() => new GcsDocument());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<GcsDocument> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Cloud.DocumentAI.V1Beta3.DocumentIoReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GcsDocument() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GcsDocument(GcsDocument other) : this() {
      gcsUri_ = other.gcsUri_;
      mimeType_ = other.mimeType_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GcsDocument Clone() {
      return new GcsDocument(this);
    }

    /// Field number for the "gcs_uri" field.
    public const int GcsUriFieldNumber = 1;
    private string gcsUri_ = "";
    ///
    /// The Cloud Storage object uri.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string GcsUri {
      get { return gcsUri_; }
      set {
        gcsUri_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "mime_type" field.
    public const int MimeTypeFieldNumber = 2;
    private string mimeType_ = "";
    ///
    /// An IANA MIME type (RFC6838) of the content.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string MimeType {
      get { return mimeType_; }
      set {
        mimeType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as GcsDocument);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GcsDocument other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GcsUri != other.GcsUri) return false;
      if (MimeType != other.MimeType) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (GcsUri.Length != 0) hash ^= GcsUri.GetHashCode();
      if (MimeType.Length != 0) hash ^= MimeType.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (GcsUri.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(GcsUri);
      }
      if (MimeType.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(MimeType);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (GcsUri.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(GcsUri);
      }
      if (MimeType.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(MimeType);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (GcsUri.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GcsUri);
      }
      if (MimeType.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(MimeType);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GcsDocument other) {
      if (other == null) {
        return;
      }
      if (other.GcsUri.Length != 0) {
        GcsUri = other.GcsUri;
      }
      if (other.MimeType.Length != 0) {
        MimeType = other.MimeType;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            GcsUri = input.ReadString();
            break;
          }
          case 18: {
            MimeType = input.ReadString();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            GcsUri = input.ReadString();
            break;
          }
          case 18: {
            MimeType = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// Specifies a set of documents on Cloud Storage.
  ///
  public sealed partial class GcsDocuments : pb::IMessage<GcsDocuments>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<GcsDocuments> _parser = new pb::MessageParser<GcsDocuments>(() => new GcsDocuments());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<GcsDocuments> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Cloud.DocumentAI.V1Beta3.DocumentIoReflection.Descriptor.MessageTypes[2]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GcsDocuments() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GcsDocuments(GcsDocuments other) : this() {
      documents_ = other.documents_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GcsDocuments Clone() {
      return new GcsDocuments(this);
    }

    /// Field number for the "documents" field.
    public const int DocumentsFieldNumber = 1;
    private static readonly pb::FieldCodec<global::Google.Cloud.DocumentAI.V1Beta3.GcsDocument> _repeated_documents_codec
        = pb::FieldCodec.ForMessage(10, global::Google.Cloud.DocumentAI.V1Beta3.GcsDocument.Parser);
    private readonly pbc::RepeatedField<global::Google.Cloud.DocumentAI.V1Beta3.GcsDocument> documents_ = new pbc::RepeatedField<global::Google.Cloud.DocumentAI.V1Beta3.GcsDocument>();
    ///
    /// The list of documents.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Google.Cloud.DocumentAI.V1Beta3.GcsDocument> Documents {
      get { return documents_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as GcsDocuments);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GcsDocuments other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!documents_.Equals(other.documents_)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= documents_.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      documents_.WriteTo(output, _repeated_documents_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      documents_.WriteTo(ref output, _repeated_documents_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      size += documents_.CalculateSize(_repeated_documents_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GcsDocuments other) {
      if (other == null) {
        return;
      }
      documents_.Add(other.documents_);
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            documents_.AddEntriesFrom(input, _repeated_documents_codec);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            documents_.AddEntriesFrom(ref input, _repeated_documents_codec);
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// Specifies all documents on Cloud Storage with a common prefix.
  ///
  public sealed partial class GcsPrefix : pb::IMessage<GcsPrefix>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<GcsPrefix> _parser = new pb::MessageParser<GcsPrefix>(() => new GcsPrefix());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<GcsPrefix> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Cloud.DocumentAI.V1Beta3.DocumentIoReflection.Descriptor.MessageTypes[3]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GcsPrefix() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GcsPrefix(GcsPrefix other) : this() {
      gcsUriPrefix_ = other.gcsUriPrefix_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GcsPrefix Clone() {
      return new GcsPrefix(this);
    }

    /// Field number for the "gcs_uri_prefix" field.
    public const int GcsUriPrefixFieldNumber = 1;
    private string gcsUriPrefix_ = "";
    ///
    /// The URI prefix.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string GcsUriPrefix {
      get { return gcsUriPrefix_; }
      set {
        gcsUriPrefix_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as GcsPrefix);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GcsPrefix other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (GcsUriPrefix != other.GcsUriPrefix) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (GcsUriPrefix.Length != 0) hash ^= GcsUriPrefix.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (GcsUriPrefix.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(GcsUriPrefix);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (GcsUriPrefix.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(GcsUriPrefix);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (GcsUriPrefix.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(GcsUriPrefix);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GcsPrefix other) {
      if (other == null) {
        return;
      }
      if (other.GcsUriPrefix.Length != 0) {
        GcsUriPrefix = other.GcsUriPrefix;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            GcsUriPrefix = input.ReadString();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            GcsUriPrefix = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// The common config to specify a set of documents used as input.
  ///
  public sealed partial class BatchDocumentsInputConfig : pb::IMessage<BatchDocumentsInputConfig>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<BatchDocumentsInputConfig> _parser = new pb::MessageParser<BatchDocumentsInputConfig>(() => new BatchDocumentsInputConfig());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<BatchDocumentsInputConfig> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Cloud.DocumentAI.V1Beta3.DocumentIoReflection.Descriptor.MessageTypes[4]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public BatchDocumentsInputConfig() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public BatchDocumentsInputConfig(BatchDocumentsInputConfig other) : this() {
      switch (other.SourceCase) {
        case SourceOneofCase.GcsPrefix:
          GcsPrefix = other.GcsPrefix.Clone();
          break;
        case SourceOneofCase.GcsDocuments:
          GcsDocuments = other.GcsDocuments.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public BatchDocumentsInputConfig Clone() {
      return new BatchDocumentsInputConfig(this);
    }

    /// Field number for the "gcs_prefix" field.
    public const int GcsPrefixFieldNumber = 1;
    ///
    /// The set of documents that match the specified Cloud Storage [gcs_prefix].
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Cloud.DocumentAI.V1Beta3.GcsPrefix GcsPrefix {
      get { return sourceCase_ == SourceOneofCase.GcsPrefix ? (global::Google.Cloud.DocumentAI.V1Beta3.GcsPrefix) source_ : null; }
      set {
        source_ = value;
        sourceCase_ = value == null ? SourceOneofCase.None : SourceOneofCase.GcsPrefix;
      }
    }

    /// Field number for the "gcs_documents" field.
    public const int GcsDocumentsFieldNumber = 2;
    ///
    /// The set of documents individually specified on Cloud Storage.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Cloud.DocumentAI.V1Beta3.GcsDocuments GcsDocuments {
      get { return sourceCase_ == SourceOneofCase.GcsDocuments ? (global::Google.Cloud.DocumentAI.V1Beta3.GcsDocuments) source_ : null; }
      set {
        source_ = value;
        sourceCase_ = value == null ? SourceOneofCase.None : SourceOneofCase.GcsDocuments;
      }
    }

    private object source_;
    /// Enum of possible cases for the "source" oneof.
    public enum SourceOneofCase {
      None = 0,
      GcsPrefix = 1,
      GcsDocuments = 2,
    }
    private SourceOneofCase sourceCase_ = SourceOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public SourceOneofCase SourceCase {
      get { return sourceCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearSource() {
      sourceCase_ = SourceOneofCase.None;
      source_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as BatchDocumentsInputConfig);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(BatchDocumentsInputConfig other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(GcsPrefix, other.GcsPrefix)) return false;
      if (!object.Equals(GcsDocuments, other.GcsDocuments)) return false;
      if (SourceCase != other.SourceCase) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (sourceCase_ == SourceOneofCase.GcsPrefix) hash ^= GcsPrefix.GetHashCode();
      if (sourceCase_ == SourceOneofCase.GcsDocuments) hash ^= GcsDocuments.GetHashCode();
      hash ^= (int) sourceCase_;
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (sourceCase_ == SourceOneofCase.GcsPrefix) {
        output.WriteRawTag(10);
        output.WriteMessage(GcsPrefix);
      }
      if (sourceCase_ == SourceOneofCase.GcsDocuments) {
        output.WriteRawTag(18);
        output.WriteMessage(GcsDocuments);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (sourceCase_ == SourceOneofCase.GcsPrefix) {
        output.WriteRawTag(10);
        output.WriteMessage(GcsPrefix);
      }
      if (sourceCase_ == SourceOneofCase.GcsDocuments) {
        output.WriteRawTag(18);
        output.WriteMessage(GcsDocuments);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (sourceCase_ == SourceOneofCase.GcsPrefix) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(GcsPrefix);
      }
      if (sourceCase_ == SourceOneofCase.GcsDocuments) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(GcsDocuments);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(BatchDocumentsInputConfig other) {
      if (other == null) {
        return;
      }
      switch (other.SourceCase) {
        case SourceOneofCase.GcsPrefix:
          if (GcsPrefix == null) {
            GcsPrefix = new global::Google.Cloud.DocumentAI.V1Beta3.GcsPrefix();
          }
          GcsPrefix.MergeFrom(other.GcsPrefix);
          break;
        case SourceOneofCase.GcsDocuments:
          if (GcsDocuments == null) {
            GcsDocuments = new global::Google.Cloud.DocumentAI.V1Beta3.GcsDocuments();
          }
          GcsDocuments.MergeFrom(other.GcsDocuments);
          break;
      }

      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            global::Google.Cloud.DocumentAI.V1Beta3.GcsPrefix subBuilder = new global::Google.Cloud.DocumentAI.V1Beta3.GcsPrefix();
            if (sourceCase_ == SourceOneofCase.GcsPrefix) {
              subBuilder.MergeFrom(GcsPrefix);
            }
            input.ReadMessage(subBuilder);
            GcsPrefix = subBuilder;
            break;
          }
          case 18: {
            global::Google.Cloud.DocumentAI.V1Beta3.GcsDocuments subBuilder = new global::Google.Cloud.DocumentAI.V1Beta3.GcsDocuments();
            if (sourceCase_ == SourceOneofCase.GcsDocuments) {
              subBuilder.MergeFrom(GcsDocuments);
            }
            input.ReadMessage(subBuilder);
            GcsDocuments = subBuilder;
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            global::Google.Cloud.DocumentAI.V1Beta3.GcsPrefix subBuilder = new global::Google.Cloud.DocumentAI.V1Beta3.GcsPrefix();
            if (sourceCase_ == SourceOneofCase.GcsPrefix) {
              subBuilder.MergeFrom(GcsPrefix);
            }
            input.ReadMessage(subBuilder);
            GcsPrefix = subBuilder;
            break;
          }
          case 18: {
            global::Google.Cloud.DocumentAI.V1Beta3.GcsDocuments subBuilder = new global::Google.Cloud.DocumentAI.V1Beta3.GcsDocuments();
            if (sourceCase_ == SourceOneofCase.GcsDocuments) {
              subBuilder.MergeFrom(GcsDocuments);
            }
            input.ReadMessage(subBuilder);
            GcsDocuments = subBuilder;
            break;
          }
        }
      }
    }
    #endif

  }

  ///
  /// Config that controls the output of documents. All documents will be written
  /// as a JSON file.
  ///
  public sealed partial class DocumentOutputConfig : pb::IMessage<DocumentOutputConfig>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<DocumentOutputConfig> _parser = new pb::MessageParser<DocumentOutputConfig>(() => new DocumentOutputConfig());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<DocumentOutputConfig> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Cloud.DocumentAI.V1Beta3.DocumentIoReflection.Descriptor.MessageTypes[5]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DocumentOutputConfig() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DocumentOutputConfig(DocumentOutputConfig other) : this() {
      switch (other.DestinationCase) {
        case DestinationOneofCase.GcsOutputConfig:
          GcsOutputConfig = other.GcsOutputConfig.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DocumentOutputConfig Clone() {
      return new DocumentOutputConfig(this);
    }

    /// Field number for the "gcs_output_config" field.
    public const int GcsOutputConfigFieldNumber = 1;
    ///
    /// Output config to write the results to Cloud Storage.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Types.GcsOutputConfig GcsOutputConfig {
      get { return destinationCase_ == DestinationOneofCase.GcsOutputConfig ? (global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Types.GcsOutputConfig) destination_ : null; }
      set {
        destination_ = value;
        destinationCase_ = value == null ? DestinationOneofCase.None : DestinationOneofCase.GcsOutputConfig;
      }
    }

    private object destination_;
    /// Enum of possible cases for the "destination" oneof.
    public enum DestinationOneofCase {
      None = 0,
      GcsOutputConfig = 1,
    }
    private DestinationOneofCase destinationCase_ = DestinationOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public DestinationOneofCase DestinationCase {
      get { return destinationCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearDestination() {
      destinationCase_ = DestinationOneofCase.None;
      destination_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as DocumentOutputConfig);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(DocumentOutputConfig other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (!object.Equals(GcsOutputConfig, other.GcsOutputConfig)) return false;
      if (DestinationCase != other.DestinationCase) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (destinationCase_ == DestinationOneofCase.GcsOutputConfig) hash ^= GcsOutputConfig.GetHashCode();
      hash ^= (int) destinationCase_;
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (destinationCase_ == DestinationOneofCase.GcsOutputConfig) {
        output.WriteRawTag(10);
        output.WriteMessage(GcsOutputConfig);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (destinationCase_ == DestinationOneofCase.GcsOutputConfig) {
        output.WriteRawTag(10);
        output.WriteMessage(GcsOutputConfig);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (destinationCase_ == DestinationOneofCase.GcsOutputConfig) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(GcsOutputConfig);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(DocumentOutputConfig other) {
      if (other == null) {
        return;
      }
      switch (other.DestinationCase) {
        case DestinationOneofCase.GcsOutputConfig:
          if (GcsOutputConfig == null) {
            GcsOutputConfig = new global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Types.GcsOutputConfig();
          }
          GcsOutputConfig.MergeFrom(other.GcsOutputConfig);
          break;
      }

      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Types.GcsOutputConfig subBuilder = new global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Types.GcsOutputConfig();
            if (destinationCase_ == DestinationOneofCase.GcsOutputConfig) {
              subBuilder.MergeFrom(GcsOutputConfig);
            }
            input.ReadMessage(subBuilder);
            GcsOutputConfig = subBuilder;
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Types.GcsOutputConfig subBuilder = new global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Types.GcsOutputConfig();
            if (destinationCase_ == DestinationOneofCase.GcsOutputConfig) {
              subBuilder.MergeFrom(GcsOutputConfig);
            }
            input.ReadMessage(subBuilder);
            GcsOutputConfig = subBuilder;
            break;
          }
        }
      }
    }
    #endif

    #region Nested types
    /// Container for nested types declared in the DocumentOutputConfig message type.
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static partial class Types {
      ///
      /// The configuration used when outputting documents.
      ///
      public sealed partial class GcsOutputConfig : pb::IMessage<GcsOutputConfig>
      #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
          , pb::IBufferMessage
      #endif
      {
        private static readonly pb::MessageParser<GcsOutputConfig> _parser = new pb::MessageParser<GcsOutputConfig>(() => new GcsOutputConfig());
        private pb::UnknownFieldSet _unknownFields;
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public static pb::MessageParser<GcsOutputConfig> Parser { get { return _parser; } }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public static pbr::MessageDescriptor Descriptor {
          get { return global::Google.Cloud.DocumentAI.V1Beta3.DocumentOutputConfig.Descriptor.NestedTypes[0]; }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        pbr::MessageDescriptor pb::IMessage.Descriptor {
          get { return Descriptor; }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public GcsOutputConfig() {
          OnConstruction();
        }

        partial void OnConstruction();

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public GcsOutputConfig(GcsOutputConfig other) : this() {
          gcsUri_ = other.gcsUri_;
          _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public GcsOutputConfig Clone() {
          return new GcsOutputConfig(this);
        }

        /// Field number for the "gcs_uri" field.
        public const int GcsUriFieldNumber = 1;
        private string gcsUri_ = "";
        ///
        /// The Cloud Storage uri (a directory) of the output.
        ///
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public string GcsUri {
          get { return gcsUri_; }
          set {
            gcsUri_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
          }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public override bool Equals(object other) {
          return Equals(other as GcsOutputConfig);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public bool Equals(GcsOutputConfig other) {
          if (ReferenceEquals(other, null)) {
            return false;
          }
          if (ReferenceEquals(other, this)) {
            return true;
          }
          if (GcsUri != other.GcsUri) return false;
          return Equals(_unknownFields, other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public override int GetHashCode() {
          int hash = 1;
          if (GcsUri.Length != 0) hash ^= GcsUri.GetHashCode();
          if (_unknownFields != null) {
            hash ^= _unknownFields.GetHashCode();
          }
          return hash;
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public override string ToString() {
          return pb::JsonFormatter.ToDiagnosticString(this);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void WriteTo(pb::CodedOutputStream output) {
        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
          output.WriteRawMessage(this);
        #else
          if (GcsUri.Length != 0) {
            output.WriteRawTag(10);
            output.WriteString(GcsUri);
          }
          if (_unknownFields != null) {
            _unknownFields.WriteTo(output);
          }
        #endif
        }

        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
          if (GcsUri.Length != 0) {
            output.WriteRawTag(10);
            output.WriteString(GcsUri);
          }
          if (_unknownFields != null) {
            _unknownFields.WriteTo(ref output);
          }
        }
        #endif

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public int CalculateSize() {
          int size = 0;
          if (GcsUri.Length != 0) {
            size += 1 + pb::CodedOutputStream.ComputeStringSize(GcsUri);
          }
          if (_unknownFields != null) {
            size += _unknownFields.CalculateSize();
          }
          return size;
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void MergeFrom(GcsOutputConfig other) {
          if (other == null) {
            return;
          }
          if (other.GcsUri.Length != 0) {
            GcsUri = other.GcsUri;
          }
          _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void MergeFrom(pb::CodedInputStream input) {
        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
          input.ReadRawMessage(this);
        #else
          uint tag;
          while ((tag = input.ReadTag()) != 0) {
            switch(tag) {
              default:
                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                break;
              case 10: {
                GcsUri = input.ReadString();
                break;
              }
            }
          }
        #endif
        }

        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
          uint tag;
          while ((tag = input.ReadTag()) != 0) {
            switch(tag) {
              default:
                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
                break;
              case 10: {
                GcsUri = input.ReadString();
                break;
              }
            }
          }
        }
        #endif

      }

    }
    #endregion

  }

  #endregion

}

#endregion Designer generated code


text:
.loading {
    position: absolute;
    top: 30%;
    left: 50%;
    width: 128px;
    height: 128px;
    background: url(loading.gif) center no-repeat;
}

.invisible {
    display:none;
}

/*
 "lavender" theme for commits. see http://www.computerhope.com/htmcolor.htm
*/

.commit-group {
    list-style-type: none;
    margin-bottom: 15px;
    margin-left: 0;
    border: 1px solid #e3e4fa;
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
    background-color: #f7f8ff;
}
.commit-group-head {
    padding: 5px 8px;
    margin-bottom: 0;
    border: 1px solid #e3e4fa;
    border-top-right-radius: 4px;
    border-top-left-radius: 4px;
    background-color: #c5c6dc;
}
.commit-group-item {
    position: relative;
    padding: 8px 8px 8px 52px;
    border-top: 1px solid #E2EAEE;
}
.commit-group-item .gravatar {
    float: left;
    margin-left: -48px;
    border-radius: 4px;
}
.commit-title {
    margin-top: 2px;
    margin-bottom: 2px;
    padding-left: 8px;
}
.commit-title span.shortMessage {
    font-weight: bold;
}
.commit-message pre {
    background: #FAF8EE;
}

img.blobImage {
    max-width: 400px;
    padding: 15px;
}

.plainPre, .plainPre code {
    background-color: inherit;
    padding: 0;
    border: none;
}

.readme {
    border: 2px solid #E2EAEE;
    padding: 25px;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-bottom: 20px;
}

.readme-head {
    padding-bottom: 5px;
    margin-bottom: 0;
    padding-top: 5px;
    padding-left: 25px;
    background: #E2EAEE;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border: 2px solid #E2EAEE;
}

/* commit / diff */

ul.changedFiles {
    list-style: none;
}
ul.changedFiles li {
    position: relative;
    padding: 5px 0;
    margin-left: -25px;
    border-top: 1px solid #E2EAEE;
}

span.changeType {
    width: 1em;
}
span.actions {
    width: 20px;
}

div.MODIFY, div.DELETE, div.ADD, div.COPY, div.RENAME {
    width: 0.6em;
    height: 0.6em;
    border: 1px solid #aaa;
    display: inline;
    float: left;
    margin: 2px 8px;
}
div.MODIFY {
    background-color: orange;
}
div.ADD {
    background-color: #008000;
}
div.DELETE {
    background-color: red;
}
div.COPY {
    background-color: #0480be;
}
div.RENAME {
    background-color: #ee82ee;
}

.monospace {
    font-family: monospace;
    font-size: 13px;
}

pre.commitDiff {
    background-color: inherit;
}
/*
 * Copy&Past from gitblit!! Thanks!!
 * http://gitblit.com
 */

table.plain {
    width: 100%;
}

div.diff {
    font-family: monospace;
    overflow: auto;
}

div.diff.header {
    -moz-border-bottom-colors: none;
    -moz-border-image: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    background-color: #EDECE6;
    border-color: #D9D8D1;
    border-style: solid;
    border-width: 1px;
    font-weight: bold;
    margin-top: 10px;
    padding: 4px 0 2px;
}

div.diff.extended_header {
    background-color: #F6F5EE;
    padding: 2px 0;
    font-family: inherit;
}

div.diff.hunk_header {
    -moz-border-bottom-colors: none;
    -moz-border-image: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    border-color: #FFE0FF;
    border-style: dotted;
    border-width: 1px 0 0;
    margin-top: 2px;
    font-family: inherit;
}

span.diff.hunk_info {
    background-color: #FFEEFF;
    color: #990099;
    font-family: inherit;
}

span.diff.hunk_section {
    color: #AA22AA;
    font-family: inherit;
}

div.diff.add2 {
    background-color: #DDFFDD;
    font-family: inherit;
}

div.diff.remove2 {
    background-color: #FFDDDD;
    font-family: inherit;
}

div.diff table {
    border-radius: 0;
    /*border-right: 1px solid #bbb;*/
    /*border-bottom: 1px solid #bbb;*/
    width: 100%;
}

div.diff table th, div.diff table td {
    margin: 0px;
    padding: 0px;
    font-family: monospace;
    border: 0;
}

div.diff table th {
    /*background-color: #f0f0f0;*/
    text-align: center;
    color: #999;
    padding-left: 5px;
    padding-right: 5px;
    width: 30px;
}

div.diff table th.header {
    background-color: #D2C3AF;
    border-right: 0px;
    border-bottom: 1px solid #808080;
    font-family: inherit;
    font-size:0.9em;
    color: black;
    padding: 2px;
    text-align: left;
}

div.diff table td.hunk_header {
    background-color: #dAe2e5 !important;
    border-top: 1px solid #bac2c5;
    border-bottom: 1px solid #bac2c5;
    color: #555;
}

div.diff table td {
    border-left: 1px solid #bbb;
    /*background-color: #f5f5f5;*/
}

redpajama_set_name: RedPajamaGithub


text:
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

/*
	this class holds some properties of the car
*/

#ifndef _MYCAR_H_
#define _MYCAR_H_

#include <stdio.h>
#include <stdlib.h>
#include <cstring>

#include <tgf.h>
#include <track.h>
#include <car.h>
#include <raceman.h>
#include <robot.h>
#include <robottools.h>
#include <math.h>
#include <tmath/linalg_t.h>

#include "trackdesc.h"
#include "pathfinder.h"

class Pathfinder;
class PathSeg;

class AbstractCar
{
	public:
		AbstractCar() {};
		~AbstractCar() {};
		inline tCarElt* getCarPtr() { return me; }
		inline vec2d* getCurrentPos() { return &currentpos; }
		inline vec2d* getDir() { return &dir; }
		inline double getSpeedSqr() { return speedsqr; }
		inline double getSpeed() { return speed; }
		inline int getCurrentSegId() { return currentsegid; }

	protected:
		inline void setCarPtr(tCarElt* car) { me = car; }
		inline void updateDir() { dir.x = cos(me->_yaw); dir.y = sin(me->_yaw); }
		inline void updatePos() { currentpos.x = me->_pos_X; currentpos.y = me->_pos_Y; }
		inline void updateSpeedSqr() { speedsqr = (me->_speed_x)*(me->_speed_x) + (me->_speed_y)*(me->_speed_y) + (me->_speed_z)*(me->_speed_z); }
		inline void updateSpeed() { speed = sqrt(speedsqr); }
		inline void initCGh() { cgh = GfParmGetNum(me->_carHandle, SECT_CAR, PRM_GCHEIGHT, NULL, 0.0); }

		tCarElt* me;
		vec2d currentpos;
		vec2d dir;
		double speedsqr;
		double speed;
		int currentsegid;

	private:
		double cgh;		// Height of center of gravity.
};

class MyCar : public AbstractCar
{
	public:
		// Possible behaviours.
		enum {
			INSANE = 0, PUSH = 1, NORMAL = 2, CAREFUL = 3, SLOW = 4, START = 5
		};

		static const double PATHERR;				// If derror > PATHERR we take actions to come back to the path [m].
		static const double CORRLEN;				// CORRLEN * derror is the length of the correction [m].
		static const double TURNTOL;				// Tolerance for end backing up [m].
		static const double TURNSPEED;				// If speed lower than this you can back up [m/s].
		static const double MARGIN;					// Security margin from track border [m].
		static const double STABLESPEED;			// We brake currentspeed/stablespeed if car seems unstable [m/s].
		static const double TIMETOCATCH;			// When do we start thinking about overtaking [s].
		static const double MINOVERTAKERANGE;		// Minimum length for overtaking [m].
		static const double OVERTAKERADIUS;			// Min allowed radius to start overtaking [m].
		static const double OVERTAKEDIST;			// Planned distance of CG's while overtaking [m].
		static const double OVERTAKEMINDIST;		// Minimal distance of CG's while overtaking [m].
		static const double OVERTAKEANGLE;			// [-] radians.
		static const double MAXALLOWEDPITCH;		// [-] radians.
		static const double FLYSPEED;				// Speed where antifly checking gets activated [m/s].
		static const double OVERLAPSTARTDIST;		// Distance where we start to check the need to let pass the opponent.
		static const double OVERLAPPASSDIST;		// Distance smaller than that and waiting long enough -> let him pass.
		static const double OVERLAPWAITTIME;		// Minimal waiting time before we consider let him pass.
		static const double LAPBACKTIMEPENALTY; 	// Penalty if i am able to "lap back" [s].
		static const double TCL_SLIP;				// [m/s] range [0..10].
		static const double TCL_RANGE;				// [m/s] range [0..10].
		static const double SHIFT;					// [-] (% of rpmredline).
		static const double SHIFT_MARGIN;			// [m/s].
		static const double MAX_SPEED;				// [m/s].
		static const double MAX_FUEL_PER_METER;		// [liter/m] fuel consumtion.
		static const double LOOKAHEAD_MAX_ERROR;	// [m].
		static const double LOOKAHEAD_FACTOR;		// [-].
		static const double STEER_D_CONTROLLER_GAIN;// [-] Output gain of steering d-controller.
		static const float CLUTCH_SPEED;			// [m/s]
		static const float CLUTCH_FULL_MAX_TIME;	// [s] Time to apply full clutch.
		static const int TEAM_DAMAGE_CHANGE_LEAD;	// When to change position in the team?
		static const float FUEL_SAFETY_MARGIN;		// [kg] How much additional fuel in parts of maxfuelperlap for random errors.

		// Data for behavior.
		int bmode;
		double behaviour[6][8];
		int MAXDAMMAGE;									// If dammage > MAXDAMMAGE then we plan a pit stop [-].
		double DIST;									// Minimal distance to other cars [m].
		double MAXRELAX;								// To avoid skidding (0..0.99) [-].
		double MAXANGLE;								// Biggest allowed angle to the path [deg].
		double ACCELINC;								// Increment/decrement for acceleration [-].
		double SPEEDSQRFACTOR;							// Multiplier for speedsqr.
		double GCTIME;									// Minimal time between gear changes.
		double ACCELLIMIT;								// Maximal allowed acceleration.
		double PATHERRFACTOR;							// If derror > PATHERR*PATHERRFACTOR we compute a corrected path [-].

		double CARWIDTH;								// Width of the car [m].
		double CARLEN;									// Length of the car [m].
		double AEROMAGIC;								// Aerodynamic lift factor [-].
		double CFRICTION;								// Friction "magic" coefficient [-].

		double STEER_P_CONTROLLER_MAX;					// [-] Maximum output of p-controller.
		double STEER_P_CONTROLLER_GAIN;					// [-] Output gain of p-controller.

		// Static data.
		double cgcorr_b;
		double ca;
		double cw;

		// Dynamic data.
		double mass;
		int destsegid;
		double trtime;

		TrackSegment2D* currentseg;
		TrackSegment2D* destseg;
		int currentpathsegid;
		int destpathsegid;
		PathSeg* dynpath;

		int undamaged;
		double lastfuel;
		double fuelperlap;
		double lastpitfuel;

		double turnaround;
		int tr_mode;
		double accel;
		bool fuelchecked;
		bool startmode;

		double derror;			// Distance to desired trajectory.
		float clutchtime;		// Clutch timer.

		MyCar(TrackDesc* track, tCarElt* car, tSituation *situation);
		~MyCar();

		void info(void);
		void update(TrackDesc* track, tCarElt* car, tSituation *situation);
		void loadBehaviour(int id);
		double querySlipSpeed(tCarElt* car);
		double queryAcceleration(tCarElt * car, double speed);
		inline double getDeltaPitch() { return deltapitch; }
		inline double getWheelBase() { return wheelbase; }
		inline double getWheelTrack() { return wheeltrack; }
		inline double getErrorSgn() { return derrorsgn; }
		inline Pathfinder* getPathfinderPtr() { return pf; }

	private:
		enum { DRWD = 0, DFWD = 1, D4WD = 2 };

		int drivetrain;			// RWD, FWD or 4WD.
		double carmass;			// Mass of car without fuel.
		double deltapitch;		// Angle of attack between road and car.
		double wheelbase;
		double wheeltrack;
		double derrorsgn;		// On which side of the trajectory am i left -1 or 1 right.

		Pathfinder* pf;

		void updateCa();
		void updateDError();
		void initCarGeometry();
};

class OtherCar: public AbstractCar
{
	public:
		void init(TrackDesc* itrack, tCarElt* car, tSituation *situation);
		void update(void);

	private:
		TrackDesc* track;
		double dt;
};

#endif // _MYCAR_H_


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
    <link rel="stylesheet" href="lib/foundation-apps/dist/css/foundation-apps.min.css">

	<title>XXX Stadium</title>


text: python3 SampleAI.py


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>{{ page_title }}</title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <link rel="stylesheet" href="theme.scss" type="text/css">
  <link rel="stylesheet" href="tablet-and-desktop.scss" type="text/css" media="screen and (min-width: 768px)">

  {{ content_for_header }}

            {% include "columns_1" %}

            {{ content_for_footer }}

            {% if site.footer_content.size > 0 %}

{{ site.footer_content }}

            {% endif %}

                {% if request.logged_in? %}
                  Hi {{ request.current_signup.name_or_email }}. View your
                  {% if site.show_public_profiles? %}
                    public profile,
                  {% endif %}
                  account settings, or
                  sign out.
                {% else %}
                  Sign in with Facebook, Twitter or email.
                {% endif %}

                Created with NationBuilder

{% if site.has_background_image? %}

{% endif %}


text:
RSpec.describe Hyrax::AdminSetSearchBuilder do
  let(:context) do
    double(blacklight_config: CatalogController.blacklight_config,
           current_ability: ability,
           search_state_class: nil)
  end
  let(:ability) do
    ::Ability.new(user)
  end
  let(:user) { create(:user) }
  let(:builder) { described_class.new(context, access) }

  describe '#filter_models' do
    before { builder.filter_models(solr_params) }
    let(:access) { :read }
    let(:solr_params) { { fq: [] } }

    it 'adds AdminSet to query' do
      expect(solr_params[:fq].first).to include('{!terms f=has_model_ssim}AdminSet')
    end
  end

  describe "#gated_discovery_filters" do
    subject { builder.gated_discovery_filters }

    context "when access is :deposit" do
      let(:access) { :deposit }

      context "and user has access" do
        before do
          allow(Hyrax::Collections::PermissionsService).to receive(:source_ids_for_deposit).and_return([7, 8])
        end

        it { is_expected.to eq ["{!terms f=id}7,8"] }
      end

      context "and user has no access" do
        it { is_expected.to eq ["{!terms f=id}"] }
      end
    end
  end

  describe ".default_processor_chain" do
    subject { described_class.default_processor_chain }

    it { is_expected.to include(:filter_models, :add_access_controls_to_solr_params) }
  end

  describe "#to_h" do
    subject { builder.to_h }

    context "when searching for read access" do
      before do
        # we just want to look at the user part of the access filters
        allow(ability).to receive(:user_groups).and_return([])
      end
      let(:access) { :read }

      it 'is successful' do
        expect(subject['fq']).to eq ["edit_access_person_ssim:#{user.user_key} OR " \
                                       "discover_access_person_ssim:#{user.user_key} OR " \
                                       "read_access_person_ssim:#{user.user_key}",
                                     "{!terms f=has_model_ssim}AdminSet,Hyrax::AdministrativeSet"]
      end
    end

    context "when searching for deposit access" do
      let(:access) { :deposit }

      before do
        allow(Hyrax::Collections::PermissionsService).to receive(:source_ids_for_deposit).and_return([7, 8])
      end

      it 'is successful' do
        expect(subject['fq']).to eq ["{!terms f=id}7,8", "{!terms f=has_model_ssim}AdminSet,Hyrax::AdministrativeSet"]
      end
    end
  end
end


text:
package test.UserFragments;

import android.app.Activity;
import android.app.Fragment;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import java.util.List;

import test.adapters.ProjectListAdapter;
import test.assesortron5.R;
import test.objects.Project;
import test.persistence.Constants;
import test.persistence.Storage;

/**
 * Created by otf on 7/17/15.
 */
public class ActiveProjects extends Fragment {
    ListView listView;
    List<Project> projects;

    public ActiveProjects() {
        super();
    }

    public static ActiveProjects newInstance(String userId) {
        ActiveProjects activeProjects = new ActiveProjects();
        Bundle bundle = new Bundle();
        bundle.putString(Constants.USER_ID, userId);
        activeProjects.setArguments(bundle);
        return activeProjects;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup vg, Bundle saved) {
        super.onCreateView(inflater, vg, saved);
        View view = inflater.inflate(R.layout.fragment_list, null);
        listView = (ListView)view.findViewById(R.id.list_fragment_list);
        setProjects(getArguments().getString(Constants.USER_ID));
        return view;
    }

    @Override
    public void onResume() {
        super.onResume();
        setProjects(getArguments().getString(Constants.USER_ID));
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
    }

    private void setProjects(final String userId) {
        AsyncTask<String, Void, List<Project>> task = new AsyncTask<String, Void, List<Project>>() {
            @Override
            protected List<Project> doInBackground(String... strings) {
                return Storage.getActiveProjects(getActivity(), userId);
            }

            @Override
            protected void onPostExecute(List<Project> projectList) {
                ProjectListAdapter adapter = new ProjectListAdapter(getActivity(), projectList, userId);
                listView.setAdapter(adapter);
                projects = projectList;

            }
        };
        task.execute(userId);
    }
}


text:
/*
Package voicetext provides a VoiceText Web API client.
*/
package voicetext


text:
.. role:: python(code)
          :language: python

===============
django-richenum
===============

.. image:: https://travis-ci.org/hearsaycorp/django-richenum.png?branch=master
    :alt: Build Status
    :target: https://travis-ci.org/hearsaycorp/django-richenum

.. image:: https://pypip.in/v/django-richenum/badge.png
    :alt: Latest PyPI Version
    :target: https://pypi.python.org/pypi/django-richenum/

=====
About
=====
A Django extension of richenum for Python. If you're unfamiliar with richenums, please read up on them (see `Related Packages`_) before using django-richenum.

-----------
Model Fields
-----------
IndexEnumField
  Store ints in DB, but expose OrderedRichEnumValues in Python.
CanonicalNameEnumField
  Store varchar in DB, but expose RichEnumValues in Python.
  We recommend that you use IndexEnumField for storage and query efficiency.
LaxIndexEnumField
  Like IndexEnumField, but also allows casting to and from canonical names.
  Mainly used to help migrate existing code that uses strings as database values.

-----------
Form Fields
-----------
CanonicalEnumField
  Uses the RichEnum/OrderedRichEnum canonical_name as form field values.
IndexEnumField
  Uses the OrderedRichEnum index as form field values.

-----------
Django Admin
-----------
RichEnumFieldListFilter
  Enables filtering by RichEnum model fields in the Django admin UI

-----
Links
-----
| `GitHub <https://github.com/hearsaycorp/django-richenum>`_
| `PyPi <https://pypi.python.org/pypi/django-richenum/>`_

============
Installation
============
.. code:: bash

    $ pip install django-richenum

=============
Example Usage
=============
--------------
IndexEnumField
--------------
.. code:: python

    >>> from richenum import OrderedRichEnum, OrderedRichEnumValue
    >>> class MyOrderedRichEnum(OrderedRichEnum):
    ...    FOO = OrderedRichEnumValue(index=1, canonical_name="foo", display_name="Foo")
    ...    BAR = OrderedRichEnumValue(index=2, canonical_name="bar", display_name="Bar")
    ...
    >>> from django.db import models
    >>> from django_richenum.models import IndexEnumField
    >>> class MyModel(models.Model):
    ...    my_enum = IndexEnumField(MyOrderedRichEnum, default=MyOrderedRichEnum.FOO)
    ...
    >>> m = MyModel.objects.create(my_enum=MyOrderedRichEnum.BAR)
    >>> m.save()
    >>> m.my_enum
    OrderedRichEnumValue - idx: 2  canonical_name: 'bar'  display_name: 'Bar'
    >>> MyModel.objects.filter(my_enum=MyOrderedRichEnum.BAR)

----------------------
CanonicalNameEnumField
----------------------
.. code:: python

    >>> from richenum import RichEnum, RichEnumValue
    >>> class MyRichEnum(RichEnum):
    ...    FOO = RichEnumValue(canonical_name="foo", display_name="Foo")
    ...    BAR = RichEnumValue(canonical_name="bar", display_name="Bar")
    ...
    >>> from django.db import models
    >>> from django_richenum.models import CanonicalNameEnumField
    >>> class MyModel(models.Model):
    ...    my_enum = CanonicalNameEnumField(MyRichEnum, default=MyRichEnum.FOO)
    ...
    >>> m = MyModel.objects.create(my_enum=MyRichEnum.BAR)
    >>> m.save()
    >>> m.my_enum
    RichEnumValue - canonical_name: 'bar'  display_name: 'Bar'
    >>> MyModel.objects.filter(my_enum=MyRichEnum.BAR)

----------------------
RichEnumFieldListFilter
----------------------
.. code:: python

    >>> from django_richenum.admin import register_admin_filters
    >>> register_admin_filters()

================
Related Packages
================

richenum
  Package implementing RichEnum and OrderedRichEnum that django-richenum depends on.

  | `GitHub <https://github.com/hearsaycorp/richenum>`_

  | `PyPi <https://pypi.python.org/pypi/richenum/>`_

=====
Notes
=====

If you're using Django 1.7+, you'll need to use the :python:`@deconstructible` decorator for your :python:`RichEnumValue` and :python:`OrderedRichEnumValue` classes so Django's migration framework knows how to serialize your :python:`RichEnumValue` and :python:`OrderedRichEnumValue`.

.. code:: python

    >>> from django.utils.deconstruct import deconstructible
    >>> from richenum import RichEnumValue, OrderedRichEnumValue
    >>> @deconstructible
    ... class CustomRichEnumValue(RichEnumValue):
    ...     pass
    ...
    >>> @deconstructible
    ... class CustomOrderedRichEnumValue(OrderedRichEnumValue):
    ...     pass
    ...

============
Contributing
============

#. Fork the repo from `GitHub <https://github.com/hearsaycorp/django-richenum>`_.
#. Make your changes.
#. Add unittests for your changes.
#. Run `pep8 <https://pypi.python.org/pypi/pep8>`_, `pyflakes <https://pypi.python.org/pypi/pyflakes>`_, and `pylint <https://pypi.python.org/pypi/pyflakes>`_ to make sure your changes follow the Python style guide and doesn't have any errors.
#. Add yourself to the AUTHORS file (in alphabetical order).
#. Send a pull request from your fork to the main repo.


text:
package Paws::WAFRegional::ByteMatchSetUpdate;
  use Moose;
  has Action => (is => 'ro', isa => 'Str', required => 1);
  has ByteMatchTuple => (is => 'ro', isa => 'Paws::WAFRegional::ByteMatchTuple', required => 1);
1;

### main pod documentation begin ###

=head1 NAME

Paws::WAFRegional::ByteMatchSetUpdate

=head1 USAGE

This class represents one of two things:

=head3 Arguments in a call to a service

Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
Each attribute should be used as a named argument in the calls that expect this type of object.

As an example, if Att1 is expected to be a Paws::WAFRegional::ByteMatchSetUpdate object:

  $service_obj->Method(Att1 => { Action => $value, ..., ByteMatchTuple => $value  });

=head3 Results returned from an API call

Use accessors for each attribute. If Att1 is expected to be an Paws::WAFRegional::ByteMatchSetUpdate object:

  $result = $service_obj->Method(...);
  $result->Att1->Action

=head1 DESCRIPTION

In an UpdateByteMatchSet request, C<ByteMatchSetUpdate> specifies
whether to insert or delete a ByteMatchTuple and includes the settings
for the C<ByteMatchTuple>.

=head1 ATTRIBUTES

=head2 B<REQUIRED> Action => Str

  Specifies whether to insert or delete a ByteMatchTuple.

=head2 B<REQUIRED> ByteMatchTuple => L<Paws::WAFRegional::ByteMatchTuple>

  Information about the part of a web request that you want AWS WAF to
inspect and the value that you want AWS WAF to search for. If you
specify C<DELETE> for the value of C<Action>, the C<ByteMatchTuple>
values must exactly match the values in the C<ByteMatchTuple> that you
want to delete from the C<ByteMatchSet>.

=head1 SEE ALSO

This class forms part of L<Paws>, describing an object used in L<Paws::WAFRegional>

=head1 BUGS and CONTRIBUTIONS

The source code is located here: https://github.com/pplu/aws-sdk-perl

Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues

=cut


text:
import os
import json

from typing import Dict, Any, Optional  # noqa
from chalice.app import Chalice  # noqa
from chalice.constants import DEFAULT_STAGE_NAME

StrMap = Dict[str, Any]

class Config(object):
    """Configuration information for a chalice app.

    Configuration values for a chalice app can come from
    a number of locations, files on disk, CLI params, default
    values, etc.  This object is an abstraction that normalizes
    these values.

    In general, there's a precedence for looking up
    config values:

        * User specified params
        * Config file values
        * Default values

    A user specified parameter would mean values explicitly
    specified by a user.  Generally these come from command
    line parameters (e.g ``--profile prod``), but for the purposes
    of this object would also mean values passed explicitly to
    this config object when instantiated.

    Additionally, there are some configurations that can vary
    per chalice stage (note that a chalice stage is different
    from an api gateway stage).  For config values loaded from
    disk, we allow values to be specified for all stages or
    for a specific stage.  For example, take ``environment_variables``.
    You can set this as a top level key to specify env vars
    to set for all stages, or you can set this value per chalice
    stage to set stage-specific environment variables.  Consider
    this config file::

        {
          "environment_variables": {
            "TABLE": "foo"
          },
          "stages": {
            "dev": {
              "environment_variables": {
                "S3BUCKET": "devbucket"
              }
            },
            "prod": {
              "environment_variables": {
                "S3BUCKET": "prodbucket",
                "TABLE": "prodtable"
              }
            }
          }
        }

    If the currently configured chalice stage is "dev", then
    the config.environment_variables would be::

        {"TABLE": "foo", "S3BUCKET": "devbucket"}

    The "prod" stage would be::

        {"TABLE": "prodtable", "S3BUCKET": "prodbucket"}

    """
    def __init__(self,
                 chalice_stage=DEFAULT_STAGE_NAME,
                 user_provided_params=None,
                 config_from_disk=None,
                 default_params=None):
        # type: (str, StrMap, StrMap, StrMap) -> None
        #: Params that a user provided explicitly,
        #: typically via the command line.
        self.chalice_stage = chalice_stage
        if user_provided_params is None:
            user_provided_params = {}
        self._user_provided_params = user_provided_params
        #: The json.loads() from .chalice/config.json
        if config_from_disk is None:
            config_from_disk = {}
        self._config_from_disk = config_from_disk
        if default_params is None:
            default_params = {}
        self._default_params = default_params

    @classmethod
    def create(cls, chalice_stage=DEFAULT_STAGE_NAME, **kwargs):
        # type: (str, **Any) -> Config
        return cls(chalice_stage=chalice_stage,
                   user_provided_params=kwargs.copy())

    @property
    def profile(self):
        # type: () -> str
        return self._chain_lookup('profile')

    @property
    def app_name(self):
        # type: () -> str
        return self._chain_lookup('app_name')

    @property
    def project_dir(self):
        # type: () -> str
        return self._chain_lookup('project_dir')

    @property
    def chalice_app(self):
        # type: () -> Chalice
        return self._chain_lookup('chalice_app')

    @property
    def config_from_disk(self):
        # type: () -> StrMap
        return self._config_from_disk

    @property
    def iam_policy_file(self):
        # type: () -> str
        return self._chain_lookup('iam_policy_file',
                                  varies_per_chalice_stage=True)

    def _chain_lookup(self, name, varies_per_chalice_stage=False):
        # type: (str, bool) -> Any
        search_dicts = [self._user_provided_params]
        if varies_per_chalice_stage:
            search_dicts.append(
                self._config_from_disk.get('stages', {}).get(
                    self.chalice_stage, {}))
        search_dicts.extend([self._config_from_disk, self._default_params])
        for cfg_dict in search_dicts:
            if isinstance(cfg_dict, dict) and cfg_dict.get(name) is not None:
                return cfg_dict[name]

    def _chain_merge(self, name):
        # type: (str) -> Dict[str, Any]
        # Merge values for all search dicts instead of returning on first
        # found.
        search_dicts = [
            # This is reverse order to _chain_lookup().
            self._default_params,
            self._config_from_disk,
            self._config_from_disk.get('stages', {}).get(
                self.chalice_stage, {}),
            self._user_provided_params,
        ]
        final = {}
        for cfg_dict in search_dicts:
            value = cfg_dict.get(name, {})
            if isinstance(value, dict):
                final.update(value)
        return final

    @property
    def config_file_version(self):
        # type: () -> str
        return self._config_from_disk.get('version', '1.0')

    # These are all config values that can vary per
    # chalice stage.

    @property
    def api_gateway_stage(self):
        # type: () -> str
        return self._chain_lookup('api_gateway_stage',
                                  varies_per_chalice_stage=True)

    @property
    def iam_role_arn(self):
        # type: () -> str
        return self._chain_lookup('iam_role_arn',
                                  varies_per_chalice_stage=True)

    @property
    def manage_iam_role(self):
        # type: () -> bool
        result = self._chain_lookup('manage_iam_role',
                                    varies_per_chalice_stage=True)
        if result is None:
            # To simplify downstream code, if manage_iam_role
            # is None (indicating the user hasn't configured/specified this
            # value anywhere), then we'll return a default value of True.
            # Otherwise client code has to do an awkward
            # "if manage_iam_role is None and not manage_iam_role".
            return True
        return result

    @property
    def autogen_policy(self):
        # type: () -> bool
        return self._chain_lookup('autogen_policy',
                                  varies_per_chalice_stage=True)

    @property
    def environment_variables(self):
        # type: () -> Dict[str, str]
        return self._chain_merge('environment_variables')

    def deployed_resources(self, chalice_stage_name):
        # type: (str) -> Optional[DeployedResources]
        """Return resources associated with a given stage.

        If a deployment to a given stage has never happened,
        this method will return a value of None.

        """
        # This is arguably the wrong level of abstraction.
        # We might be able to move this elsewhere.
        deployed_file = os.path.join(self.project_dir, '.chalice',
                                     'deployed.json')
        if not os.path.isfile(deployed_file):
            return None
        with open(deployed_file, 'r') as f:
            data = json.load(f)
        if chalice_stage_name not in data:
            return None
        return DeployedResources.from_dict(data[chalice_stage_name])

class DeployedResources(object):
    def __init__(self, backend, api_handler_arn,
                 api_handler_name, rest_api_id, api_gateway_stage,
                 region, chalice_version):
        # type: (str, str, str, str, str, str, str) -> None
        self.backend = backend
        self.api_handler_arn = api_handler_arn
        self.api_handler_name = api_handler_name
        self.rest_api_id = rest_api_id
        self.api_gateway_stage = api_gateway_stage
        self.region = region
        self.chalice_version = chalice_version

    @classmethod
    def from_dict(cls, data):
        # type: (Dict[str, str]) -> DeployedResources
        return cls(
            data['backend'],
            data['api_handler_arn'],
            data['api_handler_name'],
            data['rest_api_id'],
            data['api_gateway_stage'],
            data['region'],
            data['chalice_version'],
        )