File: artifacts\obj\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests\Release\net11.0\Proto\Issue048192\Customhttp.cs
Project: src\src\Grpc\JsonTranscoding\test\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests.csproj (Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests)
// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: Proto/Issue048192/customhttp.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021, 8981
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace CustomHttpRule {

  /// <summary>Holder for reflection information generated from Proto/Issue048192/customhttp.proto</summary>
  public static partial class CustomhttpReflection {

    #region Descriptor
    /// <summary>File descriptor for Proto/Issue048192/customhttp.proto</summary>
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static CustomhttpReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "CiJQcm90by9Jc3N1ZTA0ODE5Mi9jdXN0b21odHRwLnByb3RvEgpnb29nbGUu",
            "YXBpIlQKBEh0dHASIwoFcnVsZXMYASADKAsyFC5nb29nbGUuYXBpLkh0dHBS",
            "dWxlEicKH2Z1bGx5X2RlY29kZV9yZXNlcnZlZF9leHBhbnNpb24YAiABKAgi",
            "gQIKCEh0dHBSdWxlEhAKCHNlbGVjdG9yGAEgASgJEg0KA2dldBgCIAEoCUgA",
            "Eg0KA3B1dBgDIAEoCUgAEg4KBHBvc3QYBCABKAlIABIQCgZkZWxldGUYBSAB",
            "KAlIABIPCgVwYXRjaBgGIAEoCUgAEi8KBmN1c3RvbRgIIAEoCzIdLmdvb2ds",
            "ZS5hcGkuQ3VzdG9tSHR0cFBhdHRlcm5IABIMCgRib2R5GAcgASgJEhUKDXJl",
            "c3BvbnNlX2JvZHkYDCABKAkSMQoTYWRkaXRpb25hbF9iaW5kaW5ncxgLIAMo",
            "CzIULmdvb2dsZS5hcGkuSHR0cFJ1bGVCCQoHcGF0dGVybiIvChFDdXN0b21I",
            "dHRwUGF0dGVybhIMCgRraW5kGAEgASgJEgwKBHBhdGgYAiABKAlCewoOY29t",
            "Lmdvb2dsZS5hcGlCCUh0dHBQcm90b1ABWkFnb29nbGUuZ29sYW5nLm9yZy9n",
            "ZW5wcm90by9nb29nbGVhcGlzL2FwaS9hbm5vdGF0aW9uczthbm5vdGF0aW9u",
            "c/gBAaICBEdBUEmqAg5DdXN0b21IdHRwUnVsZWIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::CustomHttpRule.Http), global::CustomHttpRule.Http.Parser, new[]{ "Rules", "FullyDecodeReservedExpansion" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::CustomHttpRule.HttpRule), global::CustomHttpRule.HttpRule.Parser, new[]{ "Selector", "Get", "Put", "Post", "Delete", "Patch", "Custom", "Body", "ResponseBody", "AdditionalBindings" }, new[]{ "Pattern" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::CustomHttpRule.CustomHttpPattern), global::CustomHttpRule.CustomHttpPattern.Parser, new[]{ "Kind", "Path" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  /// <summary>
  /// Defines the HTTP configuration for an API service. It contains a list of
  /// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
  /// to one or more HTTP REST API methods.
  /// </summary>
  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class Http : pb::IMessage<Http>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<Http> _parser = new pb::MessageParser<Http>(() => new Http());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<Http> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::CustomHttpRule.CustomhttpReflection.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 Http() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "rules" field.</summary>
    public const int RulesFieldNumber = 1;
    private static readonly pb::FieldCodec<global::CustomHttpRule.HttpRule> _repeated_rules_codec
        = pb::FieldCodec.ForMessage(10, global::CustomHttpRule.HttpRule.Parser);
    private readonly pbc::RepeatedField<global::CustomHttpRule.HttpRule> rules_ = new pbc::RepeatedField<global::CustomHttpRule.HttpRule>();
    /// <summary>
    /// A list of HTTP configuration rules that apply to individual API methods.
    ///
    /// **NOTE:** All service configuration rules follow "last one wins" order.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::CustomHttpRule.HttpRule> Rules {
      get { return rules_; }
    }

    /// <summary>Field number for the "fully_decode_reserved_expansion" field.</summary>
    public const int FullyDecodeReservedExpansionFieldNumber = 2;
    private bool fullyDecodeReservedExpansion_;
    /// <summary>
    /// When set to true, URL path parameters will be fully URI-decoded except in
    /// cases of single segment matches in reserved expansion, where "%2F" will be
    /// left encoded.
    ///
    /// The default behavior is to not decode RFC 6570 reserved characters in multi
    /// segment matches.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool FullyDecodeReservedExpansion {
      get { return fullyDecodeReservedExpansion_; }
      set {
        fullyDecodeReservedExpansion_ = value;
      }
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(Http other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!rules_.Equals(other.rules_)) return false;
      if (FullyDecodeReservedExpansion != other.FullyDecodeReservedExpansion) 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 ^= rules_.GetHashCode();
      if (FullyDecodeReservedExpansion != false) hash ^= FullyDecodeReservedExpansion.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
      rules_.WriteTo(output, _repeated_rules_codec);
      if (FullyDecodeReservedExpansion != false) {
        output.WriteRawTag(16);
        output.WriteBool(FullyDecodeReservedExpansion);
      }
      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) {
      rules_.WriteTo(ref output, _repeated_rules_codec);
      if (FullyDecodeReservedExpansion != false) {
        output.WriteRawTag(16);
        output.WriteBool(FullyDecodeReservedExpansion);
      }
      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 += rules_.CalculateSize(_repeated_rules_codec);
      if (FullyDecodeReservedExpansion != false) {
        size += 1 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(Http other) {
      if (other == null) {
        return;
      }
      rules_.Add(other.rules_);
      if (other.FullyDecodeReservedExpansion != false) {
        FullyDecodeReservedExpansion = other.FullyDecodeReservedExpansion;
      }
      _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: {
            rules_.AddEntriesFrom(input, _repeated_rules_codec);
            break;
          }
          case 16: {
            FullyDecodeReservedExpansion = input.ReadBool();
            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: {
            rules_.AddEntriesFrom(ref input, _repeated_rules_codec);
            break;
          }
          case 16: {
            FullyDecodeReservedExpansion = input.ReadBool();
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// # gRPC Transcoding
  ///
  /// gRPC Transcoding is a feature for mapping between a gRPC method and one or
  /// more HTTP REST endpoints. It allows developers to build a single API service
  /// that supports both gRPC APIs and REST APIs. Many systems, including [Google
  /// APIs](https://github.com/googleapis/googleapis),
  /// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
  /// Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
  /// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
  /// and use it for large scale production services.
  ///
  /// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
  /// how different portions of the gRPC request message are mapped to the URL
  /// path, URL query parameters, and HTTP request body. It also controls how the
  /// gRPC response message is mapped to the HTTP response body. `HttpRule` is
  /// typically specified as an `google.api.http` annotation on the gRPC method.
  ///
  /// Each mapping specifies a URL path template and an HTTP method. The path
  /// template may refer to one or more fields in the gRPC request message, as long
  /// as each field is a non-repeated field with a primitive (non-message) type.
  /// The path template controls how fields of the request message are mapped to
  /// the URL path.
  ///
  /// Example:
  ///
  ///     service Messaging {
  ///       rpc GetMessage(GetMessageRequest) returns (Message) {
  ///         option (google.api.http) = {
  ///             get: "/v1/{name=messages/*}"
  ///         };
  ///       }
  ///     }
  ///     message GetMessageRequest {
  ///       string name = 1; // Mapped to URL path.
  ///     }
  ///     message Message {
  ///       string text = 1; // The resource content.
  ///     }
  ///
  /// This enables an HTTP REST to gRPC mapping as below:
  ///
  /// HTTP | gRPC
  /// -----|-----
  /// `GET /v1/messages/123456`  | `GetMessage(name: "messages/123456")`
  ///
  /// Any fields in the request message which are not bound by the path template
  /// automatically become HTTP query parameters if there is no HTTP request body.
  /// For example:
  ///
  ///     service Messaging {
  ///       rpc GetMessage(GetMessageRequest) returns (Message) {
  ///         option (google.api.http) = {
  ///             get:"/v1/messages/{message_id}"
  ///         };
  ///       }
  ///     }
  ///     message GetMessageRequest {
  ///       message SubMessage {
  ///         string subfield = 1;
  ///       }
  ///       string message_id = 1; // Mapped to URL path.
  ///       int64 revision = 2;    // Mapped to URL query parameter `revision`.
  ///       SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.
  ///     }
  ///
  /// This enables a HTTP JSON to RPC mapping as below:
  ///
  /// HTTP | gRPC
  /// -----|-----
  /// `GET /v1/messages/123456?revision=2&amp;sub.subfield=foo` |
  /// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
  /// "foo"))`
  ///
  /// Note that fields which are mapped to URL query parameters must have a
  /// primitive type or a repeated primitive type or a non-repeated message type.
  /// In the case of a repeated type, the parameter can be repeated in the URL
  /// as `...?param=A&amp;param=B`. In the case of a message type, each field of the
  /// message is mapped to a separate parameter, such as
  /// `...?foo.a=A&amp;foo.b=B&amp;foo.c=C`.
  ///
  /// For HTTP methods that allow a request body, the `body` field
  /// specifies the mapping. Consider a REST update method on the
  /// message resource collection:
  ///
  ///     service Messaging {
  ///       rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
  ///         option (google.api.http) = {
  ///           patch: "/v1/messages/{message_id}"
  ///           body: "message"
  ///         };
  ///       }
  ///     }
  ///     message UpdateMessageRequest {
  ///       string message_id = 1; // mapped to the URL
  ///       Message message = 2;   // mapped to the body
  ///     }
  ///
  /// The following HTTP JSON to RPC mapping is enabled, where the
  /// representation of the JSON in the request body is determined by
  /// protos JSON encoding:
  ///
  /// HTTP | gRPC
  /// -----|-----
  /// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
  /// "123456" message { text: "Hi!" })`
  ///
  /// The special name `*` can be used in the body mapping to define that
  /// every field not bound by the path template should be mapped to the
  /// request body.  This enables the following alternative definition of
  /// the update method:
  ///
  ///     service Messaging {
  ///       rpc UpdateMessage(Message) returns (Message) {
  ///         option (google.api.http) = {
  ///           patch: "/v1/messages/{message_id}"
  ///           body: "*"
  ///         };
  ///       }
  ///     }
  ///     message Message {
  ///       string message_id = 1;
  ///       string text = 2;
  ///     }
  ///
  /// The following HTTP JSON to RPC mapping is enabled:
  ///
  /// HTTP | gRPC
  /// -----|-----
  /// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
  /// "123456" text: "Hi!")`
  ///
  /// Note that when using `*` in the body mapping, it is not possible to
  /// have HTTP parameters, as all fields not bound by the path end in
  /// the body. This makes this option more rarely used in practice when
  /// defining REST APIs. The common usage of `*` is in custom methods
  /// which don't use the URL at all for transferring data.
  ///
  /// It is possible to define multiple HTTP methods for one RPC by using
  /// the `additional_bindings` option. Example:
  ///
  ///     service Messaging {
  ///       rpc GetMessage(GetMessageRequest) returns (Message) {
  ///         option (google.api.http) = {
  ///           get: "/v1/messages/{message_id}"
  ///           additional_bindings {
  ///             get: "/v1/users/{user_id}/messages/{message_id}"
  ///           }
  ///         };
  ///       }
  ///     }
  ///     message GetMessageRequest {
  ///       string message_id = 1;
  ///       string user_id = 2;
  ///     }
  ///
  /// This enables the following two alternative HTTP JSON to RPC mappings:
  ///
  /// HTTP | gRPC
  /// -----|-----
  /// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
  /// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
  /// "123456")`
  ///
  /// ## Rules for HTTP mapping
  ///
  /// 1. Leaf request fields (recursive expansion nested messages in the request
  ///    message) are classified into three categories:
  ///    - Fields referred by the path template. They are passed via the URL path.
  ///    - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP
  ///      request body.
  ///    - All other fields are passed via the URL query parameters, and the
  ///      parameter name is the field path in the request message. A repeated
  ///      field can be represented as multiple query parameters under the same
  ///      name.
  ///  2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields
  ///     are passed via URL path and HTTP request body.
  ///  3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all
  ///     fields are passed via URL path and URL query parameters.
  ///
  /// ### Path template syntax
  ///
  ///     Template = "/" Segments [ Verb ] ;
  ///     Segments = Segment { "/" Segment } ;
  ///     Segment  = "*" | "**" | LITERAL | Variable ;
  ///     Variable = "{" FieldPath [ "=" Segments ] "}" ;
  ///     FieldPath = IDENT { "." IDENT } ;
  ///     Verb     = ":" LITERAL ;
  ///
  /// The syntax `*` matches a single URL path segment. The syntax `**` matches
  /// zero or more URL path segments, which must be the last part of the URL path
  /// except the `Verb`.
  ///
  /// The syntax `Variable` matches part of the URL path as specified by its
  /// template. A variable template must not contain other variables. If a variable
  /// matches a single path segment, its template may be omitted, e.g. `{var}`
  /// is equivalent to `{var=*}`.
  ///
  /// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
  /// contains any reserved character, such characters should be percent-encoded
  /// before the matching.
  ///
  /// If a variable contains exactly one path segment, such as `"{var}"` or
  /// `"{var=*}"`, when such a variable is expanded into a URL path on the client
  /// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
  /// server side does the reverse decoding. Such variables show up in the
  /// [Discovery
  /// Document](https://developers.google.com/discovery/v1/reference/apis) as
  /// `{var}`.
  ///
  /// If a variable contains multiple path segments, such as `"{var=foo/*}"`
  /// or `"{var=**}"`, when such a variable is expanded into a URL path on the
  /// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
  /// The server side does the reverse decoding, except "%2F" and "%2f" are left
  /// unchanged. Such variables show up in the
  /// [Discovery
  /// Document](https://developers.google.com/discovery/v1/reference/apis) as
  /// `{+var}`.
  ///
  /// ## Using gRPC API Service Configuration
  ///
  /// gRPC API Service Configuration (service config) is a configuration language
  /// for configuring a gRPC service to become a user-facing product. The
  /// service config is simply the YAML representation of the `google.api.Service`
  /// proto message.
  ///
  /// As an alternative to annotating your proto file, you can configure gRPC
  /// transcoding in your service config YAML files. You do this by specifying a
  /// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
  /// effect as the proto annotation. This can be particularly useful if you
  /// have a proto that is reused in multiple services. Note that any transcoding
  /// specified in the service config will override any matching transcoding
  /// configuration in the proto.
  ///
  /// Example:
  ///
  ///     http:
  ///       rules:
  ///         # Selects a gRPC method and applies HttpRule to it.
  ///         - selector: example.v1.Messaging.GetMessage
  ///           get: /v1/messages/{message_id}/{sub.subfield}
  ///
  /// ## Special notes
  ///
  /// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
  /// proto to JSON conversion must follow the [proto3
  /// specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
  ///
  /// While the single segment variable follows the semantics of
  /// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
  /// Expansion, the multi segment variable **does not** follow RFC 6570 Section
  /// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
  /// does not expand special characters like `?` and `#`, which would lead
  /// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
  /// for multi segment variables.
  ///
  /// The path variables **must not** refer to any repeated or mapped field,
  /// because client libraries are not capable of handling such variable expansion.
  ///
  /// The path variables **must not** capture the leading "/" character. The reason
  /// is that the most common use case "{var}" does not capture the leading "/"
  /// character. For consistency, all path variables must share the same behavior.
  ///
  /// Repeated message fields must not be mapped to URL query parameters, because
  /// no client library can support such complicated mapping.
  ///
  /// If an API needs to use a JSON array for request or response body, it can map
  /// the request or response body to a repeated field. However, some gRPC
  /// Transcoding implementations may not support this feature.
  /// </summary>
  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class HttpRule : pb::IMessage<HttpRule>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<HttpRule> _parser = new pb::MessageParser<HttpRule>(() => new HttpRule());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<HttpRule> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::CustomHttpRule.CustomhttpReflection.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 HttpRule() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public HttpRule(HttpRule other) : this() {
      selector_ = other.selector_;
      body_ = other.body_;
      responseBody_ = other.responseBody_;
      additionalBindings_ = other.additionalBindings_.Clone();
      switch (other.PatternCase) {
        case PatternOneofCase.Get:
          Get = other.Get;
          break;
        case PatternOneofCase.Put:
          Put = other.Put;
          break;
        case PatternOneofCase.Post:
          Post = other.Post;
          break;
        case PatternOneofCase.Delete:
          Delete = other.Delete;
          break;
        case PatternOneofCase.Patch:
          Patch = other.Patch;
          break;
        case PatternOneofCase.Custom:
          Custom = other.Custom.Clone();
          break;
      }

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

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

    /// <summary>Field number for the "selector" field.</summary>
    public const int SelectorFieldNumber = 1;
    private string selector_ = "";
    /// <summary>
    /// Selects a method to which this rule applies.
    ///
    /// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Selector {
      get { return selector_; }
      set {
        selector_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "get" field.</summary>
    public const int GetFieldNumber = 2;
    /// <summary>
    /// Maps to HTTP GET. Used for listing and getting information about
    /// resources.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Get {
      get { return HasGet ? (string) pattern_ : ""; }
      set {
        pattern_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
        patternCase_ = PatternOneofCase.Get;
      }
    }
    /// <summary>Gets whether the "get" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasGet {
      get { return patternCase_ == PatternOneofCase.Get; }
    }
    /// <summary> Clears the value of the oneof if it's currently set to "get" </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearGet() {
      if (HasGet) {
        ClearPattern();
      }
    }

    /// <summary>Field number for the "put" field.</summary>
    public const int PutFieldNumber = 3;
    /// <summary>
    /// Maps to HTTP PUT. Used for replacing a resource.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Put {
      get { return HasPut ? (string) pattern_ : ""; }
      set {
        pattern_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
        patternCase_ = PatternOneofCase.Put;
      }
    }
    /// <summary>Gets whether the "put" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasPut {
      get { return patternCase_ == PatternOneofCase.Put; }
    }
    /// <summary> Clears the value of the oneof if it's currently set to "put" </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearPut() {
      if (HasPut) {
        ClearPattern();
      }
    }

    /// <summary>Field number for the "post" field.</summary>
    public const int PostFieldNumber = 4;
    /// <summary>
    /// Maps to HTTP POST. Used for creating a resource or performing an action.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Post {
      get { return HasPost ? (string) pattern_ : ""; }
      set {
        pattern_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
        patternCase_ = PatternOneofCase.Post;
      }
    }
    /// <summary>Gets whether the "post" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasPost {
      get { return patternCase_ == PatternOneofCase.Post; }
    }
    /// <summary> Clears the value of the oneof if it's currently set to "post" </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearPost() {
      if (HasPost) {
        ClearPattern();
      }
    }

    /// <summary>Field number for the "delete" field.</summary>
    public const int DeleteFieldNumber = 5;
    /// <summary>
    /// Maps to HTTP DELETE. Used for deleting a resource.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Delete {
      get { return HasDelete ? (string) pattern_ : ""; }
      set {
        pattern_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
        patternCase_ = PatternOneofCase.Delete;
      }
    }
    /// <summary>Gets whether the "delete" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasDelete {
      get { return patternCase_ == PatternOneofCase.Delete; }
    }
    /// <summary> Clears the value of the oneof if it's currently set to "delete" </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearDelete() {
      if (HasDelete) {
        ClearPattern();
      }
    }

    /// <summary>Field number for the "patch" field.</summary>
    public const int PatchFieldNumber = 6;
    /// <summary>
    /// Maps to HTTP PATCH. Used for updating a resource.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Patch {
      get { return HasPatch ? (string) pattern_ : ""; }
      set {
        pattern_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
        patternCase_ = PatternOneofCase.Patch;
      }
    }
    /// <summary>Gets whether the "patch" field is set</summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasPatch {
      get { return patternCase_ == PatternOneofCase.Patch; }
    }
    /// <summary> Clears the value of the oneof if it's currently set to "patch" </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearPatch() {
      if (HasPatch) {
        ClearPattern();
      }
    }

    /// <summary>Field number for the "custom" field.</summary>
    public const int CustomFieldNumber = 8;
    /// <summary>
    /// The custom pattern is used for specifying an HTTP method that is not
    /// included in the `pattern` field, such as HEAD, or "*" to leave the
    /// HTTP method unspecified for this rule. The wild-card rule is useful
    /// for services that provide content to Web (HTML) clients.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::CustomHttpRule.CustomHttpPattern Custom {
      get { return patternCase_ == PatternOneofCase.Custom ? (global::CustomHttpRule.CustomHttpPattern) pattern_ : null; }
      set {
        pattern_ = value;
        patternCase_ = value == null ? PatternOneofCase.None : PatternOneofCase.Custom;
      }
    }

    /// <summary>Field number for the "body" field.</summary>
    public const int BodyFieldNumber = 7;
    private string body_ = "";
    /// <summary>
    /// The name of the request field whose value is mapped to the HTTP request
    /// body, or `*` for mapping all request fields not captured by the path
    /// pattern to the HTTP body, or omitted for not having any HTTP request body.
    ///
    /// NOTE: the referred field must be present at the top-level of the request
    /// message type.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Body {
      get { return body_; }
      set {
        body_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "response_body" field.</summary>
    public const int ResponseBodyFieldNumber = 12;
    private string responseBody_ = "";
    /// <summary>
    /// Optional. The name of the response field whose value is mapped to the HTTP
    /// response body. When omitted, the entire response message will be used
    /// as the HTTP response body.
    ///
    /// NOTE: The referred field must be present at the top-level of the response
    /// message type.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string ResponseBody {
      get { return responseBody_; }
      set {
        responseBody_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "additional_bindings" field.</summary>
    public const int AdditionalBindingsFieldNumber = 11;
    private static readonly pb::FieldCodec<global::CustomHttpRule.HttpRule> _repeated_additionalBindings_codec
        = pb::FieldCodec.ForMessage(90, global::CustomHttpRule.HttpRule.Parser);
    private readonly pbc::RepeatedField<global::CustomHttpRule.HttpRule> additionalBindings_ = new pbc::RepeatedField<global::CustomHttpRule.HttpRule>();
    /// <summary>
    /// Additional HTTP bindings for the selector. Nested bindings must
    /// not contain an `additional_bindings` field themselves (that is,
    /// the nesting may only be one level deep).
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::CustomHttpRule.HttpRule> AdditionalBindings {
      get { return additionalBindings_; }
    }

    private object pattern_;
    /// <summary>Enum of possible cases for the "pattern" oneof.</summary>
    public enum PatternOneofCase {
      None = 0,
      Get = 2,
      Put = 3,
      Post = 4,
      Delete = 5,
      Patch = 6,
      Custom = 8,
    }
    private PatternOneofCase patternCase_ = PatternOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public PatternOneofCase PatternCase {
      get { return patternCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearPattern() {
      patternCase_ = PatternOneofCase.None;
      pattern_ = null;
    }

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

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(HttpRule other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Selector != other.Selector) return false;
      if (Get != other.Get) return false;
      if (Put != other.Put) return false;
      if (Post != other.Post) return false;
      if (Delete != other.Delete) return false;
      if (Patch != other.Patch) return false;
      if (!object.Equals(Custom, other.Custom)) return false;
      if (Body != other.Body) return false;
      if (ResponseBody != other.ResponseBody) return false;
      if(!additionalBindings_.Equals(other.additionalBindings_)) return false;
      if (PatternCase != other.PatternCase) 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 (Selector.Length != 0) hash ^= Selector.GetHashCode();
      if (HasGet) hash ^= Get.GetHashCode();
      if (HasPut) hash ^= Put.GetHashCode();
      if (HasPost) hash ^= Post.GetHashCode();
      if (HasDelete) hash ^= Delete.GetHashCode();
      if (HasPatch) hash ^= Patch.GetHashCode();
      if (patternCase_ == PatternOneofCase.Custom) hash ^= Custom.GetHashCode();
      if (Body.Length != 0) hash ^= Body.GetHashCode();
      if (ResponseBody.Length != 0) hash ^= ResponseBody.GetHashCode();
      hash ^= additionalBindings_.GetHashCode();
      hash ^= (int) patternCase_;
      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 (Selector.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Selector);
      }
      if (HasGet) {
        output.WriteRawTag(18);
        output.WriteString(Get);
      }
      if (HasPut) {
        output.WriteRawTag(26);
        output.WriteString(Put);
      }
      if (HasPost) {
        output.WriteRawTag(34);
        output.WriteString(Post);
      }
      if (HasDelete) {
        output.WriteRawTag(42);
        output.WriteString(Delete);
      }
      if (HasPatch) {
        output.WriteRawTag(50);
        output.WriteString(Patch);
      }
      if (Body.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(Body);
      }
      if (patternCase_ == PatternOneofCase.Custom) {
        output.WriteRawTag(66);
        output.WriteMessage(Custom);
      }
      additionalBindings_.WriteTo(output, _repeated_additionalBindings_codec);
      if (ResponseBody.Length != 0) {
        output.WriteRawTag(98);
        output.WriteString(ResponseBody);
      }
      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 (Selector.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Selector);
      }
      if (HasGet) {
        output.WriteRawTag(18);
        output.WriteString(Get);
      }
      if (HasPut) {
        output.WriteRawTag(26);
        output.WriteString(Put);
      }
      if (HasPost) {
        output.WriteRawTag(34);
        output.WriteString(Post);
      }
      if (HasDelete) {
        output.WriteRawTag(42);
        output.WriteString(Delete);
      }
      if (HasPatch) {
        output.WriteRawTag(50);
        output.WriteString(Patch);
      }
      if (Body.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(Body);
      }
      if (patternCase_ == PatternOneofCase.Custom) {
        output.WriteRawTag(66);
        output.WriteMessage(Custom);
      }
      additionalBindings_.WriteTo(ref output, _repeated_additionalBindings_codec);
      if (ResponseBody.Length != 0) {
        output.WriteRawTag(98);
        output.WriteString(ResponseBody);
      }
      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 (Selector.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Selector);
      }
      if (HasGet) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Get);
      }
      if (HasPut) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Put);
      }
      if (HasPost) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Post);
      }
      if (HasDelete) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Delete);
      }
      if (HasPatch) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Patch);
      }
      if (patternCase_ == PatternOneofCase.Custom) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Custom);
      }
      if (Body.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Body);
      }
      if (ResponseBody.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ResponseBody);
      }
      size += additionalBindings_.CalculateSize(_repeated_additionalBindings_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(HttpRule other) {
      if (other == null) {
        return;
      }
      if (other.Selector.Length != 0) {
        Selector = other.Selector;
      }
      if (other.Body.Length != 0) {
        Body = other.Body;
      }
      if (other.ResponseBody.Length != 0) {
        ResponseBody = other.ResponseBody;
      }
      additionalBindings_.Add(other.additionalBindings_);
      switch (other.PatternCase) {
        case PatternOneofCase.Get:
          Get = other.Get;
          break;
        case PatternOneofCase.Put:
          Put = other.Put;
          break;
        case PatternOneofCase.Post:
          Post = other.Post;
          break;
        case PatternOneofCase.Delete:
          Delete = other.Delete;
          break;
        case PatternOneofCase.Patch:
          Patch = other.Patch;
          break;
        case PatternOneofCase.Custom:
          if (Custom == null) {
            Custom = new global::CustomHttpRule.CustomHttpPattern();
          }
          Custom.MergeFrom(other.Custom);
          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: {
            Selector = input.ReadString();
            break;
          }
          case 18: {
            Get = input.ReadString();
            break;
          }
          case 26: {
            Put = input.ReadString();
            break;
          }
          case 34: {
            Post = input.ReadString();
            break;
          }
          case 42: {
            Delete = input.ReadString();
            break;
          }
          case 50: {
            Patch = input.ReadString();
            break;
          }
          case 58: {
            Body = input.ReadString();
            break;
          }
          case 66: {
            global::CustomHttpRule.CustomHttpPattern subBuilder = new global::CustomHttpRule.CustomHttpPattern();
            if (patternCase_ == PatternOneofCase.Custom) {
              subBuilder.MergeFrom(Custom);
            }
            input.ReadMessage(subBuilder);
            Custom = subBuilder;
            break;
          }
          case 90: {
            additionalBindings_.AddEntriesFrom(input, _repeated_additionalBindings_codec);
            break;
          }
          case 98: {
            ResponseBody = 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: {
            Selector = input.ReadString();
            break;
          }
          case 18: {
            Get = input.ReadString();
            break;
          }
          case 26: {
            Put = input.ReadString();
            break;
          }
          case 34: {
            Post = input.ReadString();
            break;
          }
          case 42: {
            Delete = input.ReadString();
            break;
          }
          case 50: {
            Patch = input.ReadString();
            break;
          }
          case 58: {
            Body = input.ReadString();
            break;
          }
          case 66: {
            global::CustomHttpRule.CustomHttpPattern subBuilder = new global::CustomHttpRule.CustomHttpPattern();
            if (patternCase_ == PatternOneofCase.Custom) {
              subBuilder.MergeFrom(Custom);
            }
            input.ReadMessage(subBuilder);
            Custom = subBuilder;
            break;
          }
          case 90: {
            additionalBindings_.AddEntriesFrom(ref input, _repeated_additionalBindings_codec);
            break;
          }
          case 98: {
            ResponseBody = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// A custom pattern is used for defining custom HTTP verb.
  /// </summary>
  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class CustomHttpPattern : pb::IMessage<CustomHttpPattern>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<CustomHttpPattern> _parser = new pb::MessageParser<CustomHttpPattern>(() => new CustomHttpPattern());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<CustomHttpPattern> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::CustomHttpRule.CustomhttpReflection.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 CustomHttpPattern() {
      OnConstruction();
    }

    partial void OnConstruction();

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

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

    /// <summary>Field number for the "kind" field.</summary>
    public const int KindFieldNumber = 1;
    private string kind_ = "";
    /// <summary>
    /// The name of this custom HTTP verb.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Kind {
      get { return kind_; }
      set {
        kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "path" field.</summary>
    public const int PathFieldNumber = 2;
    private string path_ = "";
    /// <summary>
    /// The path matched by this custom verb.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Path {
      get { return path_; }
      set {
        path_ = 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 CustomHttpPattern);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(CustomHttpPattern other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Kind != other.Kind) return false;
      if (Path != other.Path) 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 (Kind.Length != 0) hash ^= Kind.GetHashCode();
      if (Path.Length != 0) hash ^= Path.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 (Kind.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Kind);
      }
      if (Path.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Path);
      }
      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 (Kind.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Kind);
      }
      if (Path.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Path);
      }
      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 (Kind.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Kind);
      }
      if (Path.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Path);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(CustomHttpPattern other) {
      if (other == null) {
        return;
      }
      if (other.Kind.Length != 0) {
        Kind = other.Kind;
      }
      if (other.Path.Length != 0) {
        Path = other.Path;
      }
      _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: {
            Kind = input.ReadString();
            break;
          }
          case 18: {
            Path = 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: {
            Kind = input.ReadString();
            break;
          }
          case 18: {
            Path = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code