All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.envoyproxy.envoy.api.v2.route.RouteMatch.scala Maven / Gradle / Ivy

There is a newer version: 1.23.0-dev-f04150-1
Show newest version
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package io.envoyproxy.envoy.api.v2.route

/** [#next-free-field: 12]
  *
  * @param caseSensitive
  *   Indicates that prefix/path matching should be case sensitive. The default
  *   is true.
  * @param runtimeFraction
  *   Indicates that the route should additionally match on a runtime key. Every time the route
  *   is considered for a match, it must also fall under the percentage of matches indicated by
  *   this field. For some fraction N/D, a random number in the range [0,D) is selected. If the
  *   number is <= the value of the numerator N, or if the key is not present, the default
  *   value, the router continues to evaluate the remaining match criteria. A runtime_fraction
  *   route configuration can be used to roll out route changes in a gradual manner without full
  *   code/config deploys. Refer to the :ref:`traffic shifting
  *   <config_http_conn_man_route_table_traffic_splitting_shift>` docs for additional documentation.
  *  
  *   .. note::
  *  
  *      Parsing this field is implemented such that the runtime key's data may be represented
  *      as a FractionalPercent proto represented as JSON/YAML and may also be represented as an
  *      integer with the assumption that the value is an integral percentage out of 100. For
  *      instance, a runtime key lookup returning the value "42" would parse as a FractionalPercent
  *      whose numerator is 42 and denominator is HUNDRED. This preserves legacy semantics.
  * @param headers
  *   Specifies a set of headers that the route should match on. The router will
  *   check the request’s headers against all the specified headers in the route
  *   config. A match will happen if all the headers in the route are present in
  *   the request with the same values (or based on presence if the value field
  *   is not in the config).
  * @param queryParameters
  *   Specifies a set of URL query parameters on which the route should
  *   match. The router will check the query string from the *path* header
  *   against all the specified query parameters. If the number of specified
  *   query parameters is nonzero, they all must match the *path* header's
  *   query string for a match to occur.
  * @param grpc
  *   If specified, only gRPC requests will be matched. The router will check
  *   that the content-type header has a application/grpc or one of the various
  *   application/grpc+ values.
  * @param tlsContext
  *   If specified, the client tls context will be matched against the defined
  *   match options.
  *  
  *   [#next-major-version: unify with RBAC]
  */
@SerialVersionUID(0L)
final case class RouteMatch(
    pathSpecifier: io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Empty,
    caseSensitive: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None,
    runtimeFraction: _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent] = _root_.scala.None,
    headers: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.HeaderMatcher] = _root_.scala.Seq.empty,
    queryParameters: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher] = _root_.scala.Seq.empty,
    grpc: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions] = _root_.scala.None,
    tlsContext: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions] = _root_.scala.None,
    unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
    ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RouteMatch] {
    @transient
    private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
    private[this] def __computeSerializedSize(): _root_.scala.Int = {
      var __size = 0
      if (pathSpecifier.prefix.isDefined) {
        val __value = pathSpecifier.prefix.get
        __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
      };
      if (pathSpecifier.path.isDefined) {
        val __value = pathSpecifier.path.get
        __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
      };
      if (pathSpecifier.regex.isDefined) {
        val __value = pathSpecifier.regex.get
        __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value)
      };
      if (pathSpecifier.safeRegex.isDefined) {
        val __value = pathSpecifier.safeRegex.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (caseSensitive.isDefined) {
        val __value = io.envoyproxy.envoy.api.v2.route.RouteMatch._typemapper_caseSensitive.toBase(caseSensitive.get)
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (runtimeFraction.isDefined) {
        val __value = runtimeFraction.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      headers.foreach { __item =>
        val __value = __item
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      }
      queryParameters.foreach { __item =>
        val __value = __item
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      }
      if (grpc.isDefined) {
        val __value = grpc.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (tlsContext.isDefined) {
        val __value = tlsContext.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      __size += unknownFields.serializedSize
      __size
    }
    override def serializedSize: _root_.scala.Int = {
      var __size = __serializedSizeMemoized
      if (__size == 0) {
        __size = __computeSerializedSize() + 1
        __serializedSizeMemoized = __size
      }
      __size - 1
      
    }
    def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
      pathSpecifier.prefix.foreach { __v =>
        val __m = __v
        _output__.writeString(1, __m)
      };
      pathSpecifier.path.foreach { __v =>
        val __m = __v
        _output__.writeString(2, __m)
      };
      pathSpecifier.regex.foreach { __v =>
        val __m = __v
        _output__.writeString(3, __m)
      };
      caseSensitive.foreach { __v =>
        val __m = io.envoyproxy.envoy.api.v2.route.RouteMatch._typemapper_caseSensitive.toBase(__v)
        _output__.writeTag(4, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      headers.foreach { __v =>
        val __m = __v
        _output__.writeTag(6, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      queryParameters.foreach { __v =>
        val __m = __v
        _output__.writeTag(7, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      grpc.foreach { __v =>
        val __m = __v
        _output__.writeTag(8, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      runtimeFraction.foreach { __v =>
        val __m = __v
        _output__.writeTag(9, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      pathSpecifier.safeRegex.foreach { __v =>
        val __m = __v
        _output__.writeTag(10, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      tlsContext.foreach { __v =>
        val __m = __v
        _output__.writeTag(11, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      unknownFields.writeTo(_output__)
    }
    def getPrefix: _root_.scala.Predef.String = pathSpecifier.prefix.getOrElse("")
    def withPrefix(__v: _root_.scala.Predef.String): RouteMatch = copy(pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Prefix(__v))
    def getPath: _root_.scala.Predef.String = pathSpecifier.path.getOrElse("")
    def withPath(__v: _root_.scala.Predef.String): RouteMatch = copy(pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Path(__v))
    def getRegex: _root_.scala.Predef.String = pathSpecifier.regex.getOrElse("")
    def withRegex(__v: _root_.scala.Predef.String): RouteMatch = copy(pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Regex(__v))
    def getSafeRegex: io.envoyproxy.envoy.`type`.matcher.RegexMatcher = pathSpecifier.safeRegex.getOrElse(io.envoyproxy.envoy.`type`.matcher.RegexMatcher.defaultInstance)
    def withSafeRegex(__v: io.envoyproxy.envoy.`type`.matcher.RegexMatcher): RouteMatch = copy(pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.SafeRegex(__v))
    def getCaseSensitive: _root_.scala.Boolean = caseSensitive.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteMatch._typemapper_caseSensitive.toCustom(com.google.protobuf.wrappers.BoolValue.defaultInstance))
    def clearCaseSensitive: RouteMatch = copy(caseSensitive = _root_.scala.None)
    def withCaseSensitive(__v: _root_.scala.Boolean): RouteMatch = copy(caseSensitive = Option(__v))
    def getRuntimeFraction: io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent = runtimeFraction.getOrElse(io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent.defaultInstance)
    def clearRuntimeFraction: RouteMatch = copy(runtimeFraction = _root_.scala.None)
    def withRuntimeFraction(__v: io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent): RouteMatch = copy(runtimeFraction = Option(__v))
    def clearHeaders = copy(headers = _root_.scala.Seq.empty)
    def addHeaders(__vs: io.envoyproxy.envoy.api.v2.route.HeaderMatcher *): RouteMatch = addAllHeaders(__vs)
    def addAllHeaders(__vs: Iterable[io.envoyproxy.envoy.api.v2.route.HeaderMatcher]): RouteMatch = copy(headers = headers ++ __vs)
    def withHeaders(__v: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.HeaderMatcher]): RouteMatch = copy(headers = __v)
    def clearQueryParameters = copy(queryParameters = _root_.scala.Seq.empty)
    def addQueryParameters(__vs: io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher *): RouteMatch = addAllQueryParameters(__vs)
    def addAllQueryParameters(__vs: Iterable[io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher]): RouteMatch = copy(queryParameters = queryParameters ++ __vs)
    def withQueryParameters(__v: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher]): RouteMatch = copy(queryParameters = __v)
    def getGrpc: io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions = grpc.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions.defaultInstance)
    def clearGrpc: RouteMatch = copy(grpc = _root_.scala.None)
    def withGrpc(__v: io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions): RouteMatch = copy(grpc = Option(__v))
    def getTlsContext: io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions = tlsContext.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions.defaultInstance)
    def clearTlsContext: RouteMatch = copy(tlsContext = _root_.scala.None)
    def withTlsContext(__v: io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions): RouteMatch = copy(tlsContext = Option(__v))
    def clearPathSpecifier: RouteMatch = copy(pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Empty)
    def withPathSpecifier(__v: io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier): RouteMatch = copy(pathSpecifier = __v)
    def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
    def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
    def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
      (__fieldNumber: @_root_.scala.unchecked) match {
        case 1 => pathSpecifier.prefix.orNull
        case 2 => pathSpecifier.path.orNull
        case 3 => pathSpecifier.regex.orNull
        case 10 => pathSpecifier.safeRegex.orNull
        case 4 => caseSensitive.map(io.envoyproxy.envoy.api.v2.route.RouteMatch._typemapper_caseSensitive.toBase(_)).orNull
        case 9 => runtimeFraction.orNull
        case 6 => headers
        case 7 => queryParameters
        case 8 => grpc.orNull
        case 11 => tlsContext.orNull
      }
    }
    def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
      _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
      (__field.number: @_root_.scala.unchecked) match {
        case 1 => pathSpecifier.prefix.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 2 => pathSpecifier.path.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 3 => pathSpecifier.regex.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 10 => pathSpecifier.safeRegex.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 4 => caseSensitive.map(io.envoyproxy.envoy.api.v2.route.RouteMatch._typemapper_caseSensitive.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 9 => runtimeFraction.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 6 => _root_.scalapb.descriptors.PRepeated(headers.iterator.map(_.toPMessage).toVector)
        case 7 => _root_.scalapb.descriptors.PRepeated(queryParameters.iterator.map(_.toPMessage).toVector)
        case 8 => grpc.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 11 => tlsContext.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
      }
    }
    def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
    def companion: io.envoyproxy.envoy.api.v2.route.RouteMatch.type = io.envoyproxy.envoy.api.v2.route.RouteMatch
    // @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteMatch])
}

object RouteMatch extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteMatch] {
  implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteMatch] = this
  def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteMatch = {
    var __caseSensitive: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None
    var __runtimeFraction: _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent] = _root_.scala.None
    val __headers: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.HeaderMatcher] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.HeaderMatcher]
    val __queryParameters: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher]
    var __grpc: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions] = _root_.scala.None
    var __tlsContext: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions] = _root_.scala.None
    var __pathSpecifier: io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Empty
    var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
    var _done__ = false
    while (!_done__) {
      val _tag__ = _input__.readTag()
      _tag__ match {
        case 0 => _done__ = true
        case 10 =>
          __pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Prefix(_input__.readStringRequireUtf8())
        case 18 =>
          __pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Path(_input__.readStringRequireUtf8())
        case 26 =>
          __pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Regex(_input__.readStringRequireUtf8())
        case 82 =>
          __pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.SafeRegex(__pathSpecifier.safeRegex.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.`type`.matcher.RegexMatcher](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 34 =>
          __caseSensitive = Option(io.envoyproxy.envoy.api.v2.route.RouteMatch._typemapper_caseSensitive.toCustom(__caseSensitive.map(io.envoyproxy.envoy.api.v2.route.RouteMatch._typemapper_caseSensitive.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BoolValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
        case 74 =>
          __runtimeFraction = Option(__runtimeFraction.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 50 =>
          __headers += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.HeaderMatcher](_input__)
        case 58 =>
          __queryParameters += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher](_input__)
        case 66 =>
          __grpc = Option(__grpc.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 90 =>
          __tlsContext = Option(__tlsContext.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case tag =>
          if (_unknownFields__ == null) {
            _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
          }
          _unknownFields__.parseField(tag, _input__)
      }
    }
    io.envoyproxy.envoy.api.v2.route.RouteMatch(
        caseSensitive = __caseSensitive,
        runtimeFraction = __runtimeFraction,
        headers = __headers.result(),
        queryParameters = __queryParameters.result(),
        grpc = __grpc,
        tlsContext = __tlsContext,
        pathSpecifier = __pathSpecifier,
        unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
    )
  }
  implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteMatch] = _root_.scalapb.descriptors.Reads{
    case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
      _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
      io.envoyproxy.envoy.api.v2.route.RouteMatch(
        caseSensitive = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BoolValue]]).map(io.envoyproxy.envoy.api.v2.route.RouteMatch._typemapper_caseSensitive.toCustom(_)),
        runtimeFraction = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent]]),
        headers = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.HeaderMatcher]]).getOrElse(_root_.scala.Seq.empty),
        queryParameters = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher]]).getOrElse(_root_.scala.Seq.empty),
        grpc = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions]]),
        tlsContext = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions]]),
        pathSpecifier = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Prefix(_))
            .orElse[io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Path(_)))
            .orElse[io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Regex(_)))
            .orElse[io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.RegexMatcher]]).map(io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.SafeRegex(_)))
            .getOrElse(io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Empty)
      )
    case _ => throw new RuntimeException("Expected PMessage")
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = RouteComponentsProto.javaDescriptor.getMessageTypes().get(4)
  def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = RouteComponentsProto.scalaDescriptor.messages(4)
  def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
    var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
    (__number: @_root_.scala.unchecked) match {
      case 10 => __out = io.envoyproxy.envoy.`type`.matcher.RegexMatcher
      case 4 => __out = com.google.protobuf.wrappers.BoolValue
      case 9 => __out = io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent
      case 6 => __out = io.envoyproxy.envoy.api.v2.route.HeaderMatcher
      case 7 => __out = io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher
      case 8 => __out = io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions
      case 11 => __out = io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions
    }
    __out
  }
  lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
    Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
      _root_.io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions,
      _root_.io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions
    )
  def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
  lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteMatch(
    caseSensitive = _root_.scala.None,
    runtimeFraction = _root_.scala.None,
    headers = _root_.scala.Seq.empty,
    queryParameters = _root_.scala.Seq.empty,
    grpc = _root_.scala.None,
    tlsContext = _root_.scala.None,
    pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Empty
  )
  sealed trait PathSpecifier extends _root_.scalapb.GeneratedOneof {
    def isEmpty: _root_.scala.Boolean = false
    def isDefined: _root_.scala.Boolean = true
    def isPrefix: _root_.scala.Boolean = false
    def isPath: _root_.scala.Boolean = false
    def isRegex: _root_.scala.Boolean = false
    def isSafeRegex: _root_.scala.Boolean = false
    def prefix: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
    def path: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
    def regex: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
    def safeRegex: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.RegexMatcher] = _root_.scala.None
  }
  object PathSpecifier {
    @SerialVersionUID(0L)
    case object Empty extends io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier {
      type ValueType = _root_.scala.Nothing
      override def isEmpty: _root_.scala.Boolean = true
      override def isDefined: _root_.scala.Boolean = false
      override def number: _root_.scala.Int = 0
      override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value")
    }
  
    @SerialVersionUID(0L)
    final case class Prefix(value: _root_.scala.Predef.String) extends io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier {
      type ValueType = _root_.scala.Predef.String
      override def isPrefix: _root_.scala.Boolean = true
      override def prefix: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
      override def number: _root_.scala.Int = 1
    }
    @SerialVersionUID(0L)
    final case class Path(value: _root_.scala.Predef.String) extends io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier {
      type ValueType = _root_.scala.Predef.String
      override def isPath: _root_.scala.Boolean = true
      override def path: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
      override def number: _root_.scala.Int = 2
    }
    @SerialVersionUID(0L) @scala.deprecated(message="Marked as deprecated in proto file", "")
    final case class Regex(value: _root_.scala.Predef.String) extends io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier {
      type ValueType = _root_.scala.Predef.String
      override def isRegex: _root_.scala.Boolean = true
      override def regex: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
      override def number: _root_.scala.Int = 3
    }
    @SerialVersionUID(0L)
    final case class SafeRegex(value: io.envoyproxy.envoy.`type`.matcher.RegexMatcher) extends io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier {
      type ValueType = io.envoyproxy.envoy.`type`.matcher.RegexMatcher
      override def isSafeRegex: _root_.scala.Boolean = true
      override def safeRegex: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.RegexMatcher] = Some(value)
      override def number: _root_.scala.Int = 10
    }
  }
  @SerialVersionUID(0L)
  final case class GrpcRouteMatchOptions(
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GrpcRouteMatchOptions] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        __size += unknownFields.serializedSize
        __size
      }
      override def serializedSize: _root_.scala.Int = {
        var __size = __serializedSizeMemoized
        if (__size == 0) {
          __size = __computeSerializedSize() + 1
          __serializedSizeMemoized = __size
        }
        __size - 1
        
      }
      def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
        unknownFields.writeTo(_output__)
      }
      def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
      def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
      def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = throw new MatchError(__fieldNumber)
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = throw new MatchError(__field)
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions.type = io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions
      // @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions])
  }
  
  object GrpcRouteMatchOptions extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions = {
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions(
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions] = _root_.scalapb.descriptors.Reads{
      case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
        _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
        io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions(
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteMatch.javaDescriptor.getNestedTypes().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteMatch.scalaDescriptor.nestedMessages(0)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
    lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
    def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
    lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions(
    )
    implicit class GrpcRouteMatchOptionsLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions](_l) {
    }
    def of(
    ): _root_.io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions = _root_.io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions(
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions])
  }
  
  /** @param presented
    *   If specified, the route will match against whether or not a certificate is presented.
    *   If not specified, certificate presentation status (true or false) will not be considered when route matching.
    * @param validated
    *   If specified, the route will match against whether or not a certificate is validated.
    *   If not specified, certificate validation status (true or false) will not be considered when route matching.
    */
  @SerialVersionUID(0L)
  final case class TlsContextMatchOptions(
      presented: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None,
      validated: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[TlsContextMatchOptions] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        if (presented.isDefined) {
          val __value = io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_presented.toBase(presented.get)
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        if (validated.isDefined) {
          val __value = io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_validated.toBase(validated.get)
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        __size += unknownFields.serializedSize
        __size
      }
      override def serializedSize: _root_.scala.Int = {
        var __size = __serializedSizeMemoized
        if (__size == 0) {
          __size = __computeSerializedSize() + 1
          __serializedSizeMemoized = __size
        }
        __size - 1
        
      }
      def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
        presented.foreach { __v =>
          val __m = io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_presented.toBase(__v)
          _output__.writeTag(1, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        validated.foreach { __v =>
          val __m = io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_validated.toBase(__v)
          _output__.writeTag(2, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        unknownFields.writeTo(_output__)
      }
      def getPresented: _root_.scala.Boolean = presented.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_presented.toCustom(com.google.protobuf.wrappers.BoolValue.defaultInstance))
      def clearPresented: TlsContextMatchOptions = copy(presented = _root_.scala.None)
      def withPresented(__v: _root_.scala.Boolean): TlsContextMatchOptions = copy(presented = Option(__v))
      def getValidated: _root_.scala.Boolean = validated.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_validated.toCustom(com.google.protobuf.wrappers.BoolValue.defaultInstance))
      def clearValidated: TlsContextMatchOptions = copy(validated = _root_.scala.None)
      def withValidated(__v: _root_.scala.Boolean): TlsContextMatchOptions = copy(validated = Option(__v))
      def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
      def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
      def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
        (__fieldNumber: @_root_.scala.unchecked) match {
          case 1 => presented.map(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_presented.toBase(_)).orNull
          case 2 => validated.map(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_validated.toBase(_)).orNull
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => presented.map(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_presented.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
          case 2 => validated.map(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_validated.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions.type = io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions
      // @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteMatch.TlsContextMatchOptions])
  }
  
  object TlsContextMatchOptions extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions = {
      var __presented: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None
      var __validated: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 10 =>
            __presented = Option(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_presented.toCustom(__presented.map(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_presented.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BoolValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
          case 18 =>
            __validated = Option(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_validated.toCustom(__validated.map(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_validated.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BoolValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions(
          presented = __presented,
          validated = __validated,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions] = _root_.scalapb.descriptors.Reads{
      case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
        _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
        io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions(
          presented = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BoolValue]]).map(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_presented.toCustom(_)),
          validated = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BoolValue]]).map(io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions._typemapper_validated.toCustom(_))
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteMatch.javaDescriptor.getNestedTypes().get(1)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteMatch.scalaDescriptor.nestedMessages(1)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
      var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
      (__number: @_root_.scala.unchecked) match {
        case 1 => __out = com.google.protobuf.wrappers.BoolValue
        case 2 => __out = com.google.protobuf.wrappers.BoolValue
      }
      __out
    }
    lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
    def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
    lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions(
      presented = _root_.scala.None,
      validated = _root_.scala.None
    )
    implicit class TlsContextMatchOptionsLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions](_l) {
      def presented: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getPresented)((c_, f_) => c_.copy(presented = Option(f_)))
      def optionalPresented: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Boolean]] = field(_.presented)((c_, f_) => c_.copy(presented = f_))
      def validated: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getValidated)((c_, f_) => c_.copy(validated = Option(f_)))
      def optionalValidated: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Boolean]] = field(_.validated)((c_, f_) => c_.copy(validated = f_))
    }
    final val PRESENTED_FIELD_NUMBER = 1
    final val VALIDATED_FIELD_NUMBER = 2
    @transient
    private[route] val _typemapper_presented: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean]]
    @transient
    private[route] val _typemapper_validated: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean]]
    def of(
      presented: _root_.scala.Option[_root_.scala.Boolean],
      validated: _root_.scala.Option[_root_.scala.Boolean]
    ): _root_.io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions = _root_.io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions(
      presented,
      validated
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteMatch.TlsContextMatchOptions])
  }
  
  implicit class RouteMatchLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteMatch]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteMatch](_l) {
    def prefix: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getPrefix)((c_, f_) => c_.copy(pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Prefix(f_)))
    def path: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getPath)((c_, f_) => c_.copy(pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Path(f_)))
    def regex: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getRegex)((c_, f_) => c_.copy(pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.Regex(f_)))
    def safeRegex: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.`type`.matcher.RegexMatcher] = field(_.getSafeRegex)((c_, f_) => c_.copy(pathSpecifier = io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier.SafeRegex(f_)))
    def caseSensitive: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getCaseSensitive)((c_, f_) => c_.copy(caseSensitive = Option(f_)))
    def optionalCaseSensitive: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Boolean]] = field(_.caseSensitive)((c_, f_) => c_.copy(caseSensitive = f_))
    def runtimeFraction: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent] = field(_.getRuntimeFraction)((c_, f_) => c_.copy(runtimeFraction = Option(f_)))
    def optionalRuntimeFraction: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent]] = field(_.runtimeFraction)((c_, f_) => c_.copy(runtimeFraction = f_))
    def headers: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.HeaderMatcher]] = field(_.headers)((c_, f_) => c_.copy(headers = f_))
    def queryParameters: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher]] = field(_.queryParameters)((c_, f_) => c_.copy(queryParameters = f_))
    def grpc: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions] = field(_.getGrpc)((c_, f_) => c_.copy(grpc = Option(f_)))
    def optionalGrpc: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions]] = field(_.grpc)((c_, f_) => c_.copy(grpc = f_))
    def tlsContext: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions] = field(_.getTlsContext)((c_, f_) => c_.copy(tlsContext = Option(f_)))
    def optionalTlsContext: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions]] = field(_.tlsContext)((c_, f_) => c_.copy(tlsContext = f_))
    def pathSpecifier: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier] = field(_.pathSpecifier)((c_, f_) => c_.copy(pathSpecifier = f_))
  }
  final val PREFIX_FIELD_NUMBER = 1
  final val PATH_FIELD_NUMBER = 2
  final val REGEX_FIELD_NUMBER = 3
  final val SAFE_REGEX_FIELD_NUMBER = 10
  final val CASE_SENSITIVE_FIELD_NUMBER = 4
  final val RUNTIME_FRACTION_FIELD_NUMBER = 9
  final val HEADERS_FIELD_NUMBER = 6
  final val QUERY_PARAMETERS_FIELD_NUMBER = 7
  final val GRPC_FIELD_NUMBER = 8
  final val TLS_CONTEXT_FIELD_NUMBER = 11
  @transient
  private[route] val _typemapper_caseSensitive: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean]]
  def of(
    pathSpecifier: io.envoyproxy.envoy.api.v2.route.RouteMatch.PathSpecifier,
    caseSensitive: _root_.scala.Option[_root_.scala.Boolean],
    runtimeFraction: _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent],
    headers: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.HeaderMatcher],
    queryParameters: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.QueryParameterMatcher],
    grpc: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions],
    tlsContext: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteMatch.TlsContextMatchOptions]
  ): _root_.io.envoyproxy.envoy.api.v2.route.RouteMatch = _root_.io.envoyproxy.envoy.api.v2.route.RouteMatch(
    pathSpecifier,
    caseSensitive,
    runtimeFraction,
    headers,
    queryParameters,
    grpc,
    tlsContext
  )
  // @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteMatch])
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy