![JAR search and dependency download from the Maven repository](/logo.png)
io.envoyproxy.envoy.api.v2.route.RateLimit.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of envoy-scala-control-plane_2.13 Show documentation
Show all versions of envoy-scala-control-plane_2.13 Show documentation
ScalaPB generated bindings for Envoy
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package io.envoyproxy.envoy.api.v2.route
/** Global rate limiting :ref:`architecture overview <arch_overview_global_rate_limit>`.
*
* @param stage
* Refers to the stage set in the filter. The rate limit configuration only
* applies to filters with the same stage number. The default stage number is
* 0.
*
* .. note::
*
* The filter supports a range of 0 - 10 inclusively for stage numbers.
* @param disableKey
* The key to be set in runtime to disable this rate limit configuration.
* @param actions
* A list of actions that are to be applied for this rate limit configuration.
* Order matters as the actions are processed sequentially and the descriptor
* is composed by appending descriptor entries in that sequence. If an action
* cannot append a descriptor entry, no descriptor is generated for the
* configuration. See :ref:`composing actions
* <config_http_filters_rate_limit_composing_actions>` for additional documentation.
*/
@SerialVersionUID(0L)
final case class RateLimit(
stage: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
disableKey: _root_.scala.Predef.String = "",
actions: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RateLimit.Action] = _root_.scala.Seq.empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RateLimit] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (stage.isDefined) {
val __value = io.envoyproxy.envoy.api.v2.route.RateLimit._typemapper_stage.toBase(stage.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = disableKey
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
}
};
actions.foreach { __item =>
val __value = __item
__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 = {
stage.foreach { __v =>
val __m = io.envoyproxy.envoy.api.v2.route.RateLimit._typemapper_stage.toBase(__v)
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = disableKey
if (!__v.isEmpty) {
_output__.writeString(2, __v)
}
};
actions.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getStage: _root_.scala.Int = stage.getOrElse(io.envoyproxy.envoy.api.v2.route.RateLimit._typemapper_stage.toCustom(com.google.protobuf.wrappers.UInt32Value.defaultInstance))
def clearStage: RateLimit = copy(stage = _root_.scala.None)
def withStage(__v: _root_.scala.Int): RateLimit = copy(stage = Option(__v))
def withDisableKey(__v: _root_.scala.Predef.String): RateLimit = copy(disableKey = __v)
def clearActions = copy(actions = _root_.scala.Seq.empty)
def addActions(__vs: io.envoyproxy.envoy.api.v2.route.RateLimit.Action *): RateLimit = addAllActions(__vs)
def addAllActions(__vs: Iterable[io.envoyproxy.envoy.api.v2.route.RateLimit.Action]): RateLimit = copy(actions = actions ++ __vs)
def withActions(__v: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RateLimit.Action]): RateLimit = copy(actions = __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 => stage.map(io.envoyproxy.envoy.api.v2.route.RateLimit._typemapper_stage.toBase(_)).orNull
case 2 => {
val __t = disableKey
if (__t != "") __t else null
}
case 3 => actions
}
}
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 => stage.map(io.envoyproxy.envoy.api.v2.route.RateLimit._typemapper_stage.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => _root_.scalapb.descriptors.PString(disableKey)
case 3 => _root_.scalapb.descriptors.PRepeated(actions.iterator.map(_.toPMessage).toVector)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RateLimit.type = io.envoyproxy.envoy.api.v2.route.RateLimit
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RateLimit])
}
object RateLimit extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RateLimit = {
var __stage: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
var __disableKey: _root_.scala.Predef.String = ""
val __actions: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.RateLimit.Action] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.RateLimit.Action]
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__stage = Option(io.envoyproxy.envoy.api.v2.route.RateLimit._typemapper_stage.toCustom(__stage.map(io.envoyproxy.envoy.api.v2.route.RateLimit._typemapper_stage.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt32Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 18 =>
__disableKey = _input__.readStringRequireUtf8()
case 26 =>
__actions += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RateLimit.Action](_input__)
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RateLimit(
stage = __stage,
disableKey = __disableKey,
actions = __actions.result(),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RateLimit] = _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.RateLimit(
stage = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt32Value]]).map(io.envoyproxy.envoy.api.v2.route.RateLimit._typemapper_stage.toCustom(_)),
disableKey = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
actions = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RateLimit.Action]]).getOrElse(_root_.scala.Seq.empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = RouteComponentsProto.javaDescriptor.getMessageTypes().get(14)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = RouteComponentsProto.scalaDescriptor.messages(14)
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.UInt32Value
case 3 => __out = io.envoyproxy.envoy.api.v2.route.RateLimit.Action
}
__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.RateLimit.Action
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RateLimit(
stage = _root_.scala.None,
disableKey = "",
actions = _root_.scala.Seq.empty
)
/** [#next-free-field: 7]
*/
@SerialVersionUID(0L)
final case class Action(
actionSpecifier: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.Empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Action] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (actionSpecifier.sourceCluster.isDefined) {
val __value = actionSpecifier.sourceCluster.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (actionSpecifier.destinationCluster.isDefined) {
val __value = actionSpecifier.destinationCluster.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (actionSpecifier.requestHeaders.isDefined) {
val __value = actionSpecifier.requestHeaders.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (actionSpecifier.remoteAddress.isDefined) {
val __value = actionSpecifier.remoteAddress.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (actionSpecifier.genericKey.isDefined) {
val __value = actionSpecifier.genericKey.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (actionSpecifier.headerValueMatch.isDefined) {
val __value = actionSpecifier.headerValueMatch.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 = {
actionSpecifier.sourceCluster.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
actionSpecifier.destinationCluster.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
actionSpecifier.requestHeaders.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
actionSpecifier.remoteAddress.foreach { __v =>
val __m = __v
_output__.writeTag(4, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
actionSpecifier.genericKey.foreach { __v =>
val __m = __v
_output__.writeTag(5, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
actionSpecifier.headerValueMatch.foreach { __v =>
val __m = __v
_output__.writeTag(6, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getSourceCluster: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster = actionSpecifier.sourceCluster.getOrElse(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster.defaultInstance)
def withSourceCluster(__v: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster): Action = copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.SourceCluster(__v))
def getDestinationCluster: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster = actionSpecifier.destinationCluster.getOrElse(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster.defaultInstance)
def withDestinationCluster(__v: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster): Action = copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.DestinationCluster(__v))
def getRequestHeaders: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders = actionSpecifier.requestHeaders.getOrElse(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders.defaultInstance)
def withRequestHeaders(__v: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders): Action = copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.RequestHeaders(__v))
def getRemoteAddress: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress = actionSpecifier.remoteAddress.getOrElse(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress.defaultInstance)
def withRemoteAddress(__v: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress): Action = copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.RemoteAddress(__v))
def getGenericKey: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey = actionSpecifier.genericKey.getOrElse(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey.defaultInstance)
def withGenericKey(__v: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey): Action = copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.GenericKey(__v))
def getHeaderValueMatch: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch = actionSpecifier.headerValueMatch.getOrElse(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch.defaultInstance)
def withHeaderValueMatch(__v: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch): Action = copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.HeaderValueMatch(__v))
def clearActionSpecifier: Action = copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.Empty)
def withActionSpecifier(__v: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier): Action = copy(actionSpecifier = __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 => actionSpecifier.sourceCluster.orNull
case 2 => actionSpecifier.destinationCluster.orNull
case 3 => actionSpecifier.requestHeaders.orNull
case 4 => actionSpecifier.remoteAddress.orNull
case 5 => actionSpecifier.genericKey.orNull
case 6 => actionSpecifier.headerValueMatch.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 => actionSpecifier.sourceCluster.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => actionSpecifier.destinationCluster.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => actionSpecifier.requestHeaders.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 4 => actionSpecifier.remoteAddress.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 5 => actionSpecifier.genericKey.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 6 => actionSpecifier.headerValueMatch.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.RateLimit.Action.type = io.envoyproxy.envoy.api.v2.route.RateLimit.Action
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RateLimit.Action])
}
object Action extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RateLimit.Action = {
var __actionSpecifier: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.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 =>
__actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.SourceCluster(__actionSpecifier.sourceCluster.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.DestinationCluster(__actionSpecifier.destinationCluster.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 26 =>
__actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.RequestHeaders(__actionSpecifier.requestHeaders.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 34 =>
__actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.RemoteAddress(__actionSpecifier.remoteAddress.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 42 =>
__actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.GenericKey(__actionSpecifier.genericKey.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 50 =>
__actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.HeaderValueMatch(__actionSpecifier.headerValueMatch.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch](_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.RateLimit.Action(
actionSpecifier = __actionSpecifier,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RateLimit.Action] = _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.RateLimit.Action(
actionSpecifier = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster]]).map(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.SourceCluster(_))
.orElse[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster]]).map(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.DestinationCluster(_)))
.orElse[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders]]).map(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.RequestHeaders(_)))
.orElse[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress]]).map(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.RemoteAddress(_)))
.orElse[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey]]).map(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.GenericKey(_)))
.orElse[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch]]).map(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.HeaderValueMatch(_)))
.getOrElse(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.scalaDescriptor.nestedMessages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster
case 2 => __out = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster
case 3 => __out = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders
case 4 => __out = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress
case 5 => __out = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey
case 6 => __out = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch
}
__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.RateLimit.Action.SourceCluster,
_root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster,
_root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders,
_root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress,
_root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey,
_root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RateLimit.Action(
actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.Empty
)
sealed trait ActionSpecifier extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isSourceCluster: _root_.scala.Boolean = false
def isDestinationCluster: _root_.scala.Boolean = false
def isRequestHeaders: _root_.scala.Boolean = false
def isRemoteAddress: _root_.scala.Boolean = false
def isGenericKey: _root_.scala.Boolean = false
def isHeaderValueMatch: _root_.scala.Boolean = false
def sourceCluster: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster] = _root_.scala.None
def destinationCluster: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster] = _root_.scala.None
def requestHeaders: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders] = _root_.scala.None
def remoteAddress: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress] = _root_.scala.None
def genericKey: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey] = _root_.scala.None
def headerValueMatch: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch] = _root_.scala.None
}
object ActionSpecifier {
@SerialVersionUID(0L)
case object Empty extends io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier {
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 SourceCluster(value: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster) extends io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster
override def isSourceCluster: _root_.scala.Boolean = true
override def sourceCluster: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster] = Some(value)
override def number: _root_.scala.Int = 1
}
@SerialVersionUID(0L)
final case class DestinationCluster(value: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster) extends io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster
override def isDestinationCluster: _root_.scala.Boolean = true
override def destinationCluster: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster] = Some(value)
override def number: _root_.scala.Int = 2
}
@SerialVersionUID(0L)
final case class RequestHeaders(value: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders) extends io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders
override def isRequestHeaders: _root_.scala.Boolean = true
override def requestHeaders: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders] = Some(value)
override def number: _root_.scala.Int = 3
}
@SerialVersionUID(0L)
final case class RemoteAddress(value: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress) extends io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress
override def isRemoteAddress: _root_.scala.Boolean = true
override def remoteAddress: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress] = Some(value)
override def number: _root_.scala.Int = 4
}
@SerialVersionUID(0L)
final case class GenericKey(value: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey) extends io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey
override def isGenericKey: _root_.scala.Boolean = true
override def genericKey: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey] = Some(value)
override def number: _root_.scala.Int = 5
}
@SerialVersionUID(0L)
final case class HeaderValueMatch(value: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch) extends io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch
override def isHeaderValueMatch: _root_.scala.Boolean = true
override def headerValueMatch: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch] = Some(value)
override def number: _root_.scala.Int = 6
}
}
/** The following descriptor entry is appended to the descriptor:
*
* .. code-block:: cpp
*
* ("source_cluster", "<local service cluster>")
*
* <local service cluster> is derived from the :option:`--service-cluster` option.
*/
@SerialVersionUID(0L)
final case class SourceCluster(
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[SourceCluster] {
@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.RateLimit.Action.SourceCluster.type = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RateLimit.Action.SourceCluster])
}
object SourceCluster extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster = {
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.RateLimit.Action.SourceCluster(
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster] = _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.RateLimit.Action.SourceCluster(
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.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.RateLimit.Action.SourceCluster(
)
implicit class SourceClusterLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster](_l) {
}
def of(
): _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster = _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster(
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RateLimit.Action.SourceCluster])
}
/** The following descriptor entry is appended to the descriptor:
*
* .. code-block:: cpp
*
* ("destination_cluster", "<routed target cluster>")
*
* Once a request matches against a route table rule, a routed cluster is determined by one of
* the following :ref:`route table configuration <envoy_api_msg_RouteConfiguration>`
* settings:
*
* * :ref:`cluster <envoy_api_field_route.RouteAction.cluster>` indicates the upstream cluster
* to route to.
* * :ref:`weighted_clusters <envoy_api_field_route.RouteAction.weighted_clusters>`
* chooses a cluster randomly from a set of clusters with attributed weight.
* * :ref:`cluster_header <envoy_api_field_route.RouteAction.cluster_header>` indicates which
* header in the request contains the target cluster.
*/
@SerialVersionUID(0L)
final case class DestinationCluster(
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[DestinationCluster] {
@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.RateLimit.Action.DestinationCluster.type = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RateLimit.Action.DestinationCluster])
}
object DestinationCluster extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster = {
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.RateLimit.Action.DestinationCluster(
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster] = _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.RateLimit.Action.DestinationCluster(
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.javaDescriptor.getNestedTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.scalaDescriptor.nestedMessages(1)
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.RateLimit.Action.DestinationCluster(
)
implicit class DestinationClusterLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster](_l) {
}
def of(
): _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster = _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster(
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RateLimit.Action.DestinationCluster])
}
/** The following descriptor entry is appended when a header contains a key that matches the
* *header_name*:
*
* .. code-block:: cpp
*
* ("<descriptor_key>", "<header_value_queried_from_header>")
*
* @param headerName
* The header name to be queried from the request headers. The header’s
* value is used to populate the value of the descriptor entry for the
* descriptor_key.
* @param descriptorKey
* The key to use in the descriptor entry.
*/
@SerialVersionUID(0L)
final case class RequestHeaders(
headerName: _root_.scala.Predef.String = "",
descriptorKey: _root_.scala.Predef.String = "",
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RequestHeaders] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = headerName
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
{
val __value = descriptorKey
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
}
};
__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 = {
{
val __v = headerName
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
{
val __v = descriptorKey
if (!__v.isEmpty) {
_output__.writeString(2, __v)
}
};
unknownFields.writeTo(_output__)
}
def withHeaderName(__v: _root_.scala.Predef.String): RequestHeaders = copy(headerName = __v)
def withDescriptorKey(__v: _root_.scala.Predef.String): RequestHeaders = copy(descriptorKey = __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 => {
val __t = headerName
if (__t != "") __t else null
}
case 2 => {
val __t = descriptorKey
if (__t != "") __t else null
}
}
}
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 => _root_.scalapb.descriptors.PString(headerName)
case 2 => _root_.scalapb.descriptors.PString(descriptorKey)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders.type = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RateLimit.Action.RequestHeaders])
}
object RequestHeaders extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders = {
var __headerName: _root_.scala.Predef.String = ""
var __descriptorKey: _root_.scala.Predef.String = ""
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__headerName = _input__.readStringRequireUtf8()
case 18 =>
__descriptorKey = _input__.readStringRequireUtf8()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders(
headerName = __headerName,
descriptorKey = __descriptorKey,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders] = _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.RateLimit.Action.RequestHeaders(
headerName = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
descriptorKey = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.javaDescriptor.getNestedTypes().get(2)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.scalaDescriptor.nestedMessages(2)
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.RateLimit.Action.RequestHeaders(
headerName = "",
descriptorKey = ""
)
implicit class RequestHeadersLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders](_l) {
def headerName: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.headerName)((c_, f_) => c_.copy(headerName = f_))
def descriptorKey: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.descriptorKey)((c_, f_) => c_.copy(descriptorKey = f_))
}
final val HEADER_NAME_FIELD_NUMBER = 1
final val DESCRIPTOR_KEY_FIELD_NUMBER = 2
def of(
headerName: _root_.scala.Predef.String,
descriptorKey: _root_.scala.Predef.String
): _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders = _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders(
headerName,
descriptorKey
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RateLimit.Action.RequestHeaders])
}
/** The following descriptor entry is appended to the descriptor and is populated using the
* trusted address from :ref:`x-forwarded-for <config_http_conn_man_headers_x-forwarded-for>`:
*
* .. code-block:: cpp
*
* ("remote_address", "<trusted address from x-forwarded-for>")
*/
@SerialVersionUID(0L)
final case class RemoteAddress(
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RemoteAddress] {
@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.RateLimit.Action.RemoteAddress.type = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RateLimit.Action.RemoteAddress])
}
object RemoteAddress extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress = {
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.RateLimit.Action.RemoteAddress(
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress] = _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.RateLimit.Action.RemoteAddress(
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.javaDescriptor.getNestedTypes().get(3)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.scalaDescriptor.nestedMessages(3)
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.RateLimit.Action.RemoteAddress(
)
implicit class RemoteAddressLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress](_l) {
}
def of(
): _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress = _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress(
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RateLimit.Action.RemoteAddress])
}
/** The following descriptor entry is appended to the descriptor:
*
* .. code-block:: cpp
*
* ("generic_key", "<descriptor_value>")
*
* @param descriptorValue
* The value to use in the descriptor entry.
*/
@SerialVersionUID(0L)
final case class GenericKey(
descriptorValue: _root_.scala.Predef.String = "",
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GenericKey] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = descriptorValue
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
__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 = {
{
val __v = descriptorValue
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
unknownFields.writeTo(_output__)
}
def withDescriptorValue(__v: _root_.scala.Predef.String): GenericKey = copy(descriptorValue = __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 => {
val __t = descriptorValue
if (__t != "") __t else null
}
}
}
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 => _root_.scalapb.descriptors.PString(descriptorValue)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey.type = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RateLimit.Action.GenericKey])
}
object GenericKey extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey = {
var __descriptorValue: _root_.scala.Predef.String = ""
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__descriptorValue = _input__.readStringRequireUtf8()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey(
descriptorValue = __descriptorValue,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey] = _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.RateLimit.Action.GenericKey(
descriptorValue = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.javaDescriptor.getNestedTypes().get(4)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.scalaDescriptor.nestedMessages(4)
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.RateLimit.Action.GenericKey(
descriptorValue = ""
)
implicit class GenericKeyLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey](_l) {
def descriptorValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.descriptorValue)((c_, f_) => c_.copy(descriptorValue = f_))
}
final val DESCRIPTOR_VALUE_FIELD_NUMBER = 1
def of(
descriptorValue: _root_.scala.Predef.String
): _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey = _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey(
descriptorValue
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RateLimit.Action.GenericKey])
}
/** The following descriptor entry is appended to the descriptor:
*
* .. code-block:: cpp
*
* ("header_match", "<descriptor_value>")
*
* @param descriptorValue
* The value to use in the descriptor entry.
* @param expectMatch
* If set to true, the action will append a descriptor entry when the
* request matches the headers. If set to false, the action will append a
* descriptor entry when the request does not match the headers. The
* default value is true.
* @param headers
* Specifies a set of headers that the rate limit action should match
* on. The action will check the request’s headers against all the
* specified headers in the config. A match will happen if all the
* headers in the config are present in the request with the same values
* (or based on presence if the value field is not in the config).
*/
@SerialVersionUID(0L)
final case class HeaderValueMatch(
descriptorValue: _root_.scala.Predef.String = "",
expectMatch: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None,
headers: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.HeaderMatcher] = _root_.scala.Seq.empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[HeaderValueMatch] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = descriptorValue
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
if (expectMatch.isDefined) {
val __value = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch._typemapper_expectMatch.toBase(expectMatch.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
}
__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 = {
{
val __v = descriptorValue
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
expectMatch.foreach { __v =>
val __m = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch._typemapper_expectMatch.toBase(__v)
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
headers.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withDescriptorValue(__v: _root_.scala.Predef.String): HeaderValueMatch = copy(descriptorValue = __v)
def getExpectMatch: _root_.scala.Boolean = expectMatch.getOrElse(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch._typemapper_expectMatch.toCustom(com.google.protobuf.wrappers.BoolValue.defaultInstance))
def clearExpectMatch: HeaderValueMatch = copy(expectMatch = _root_.scala.None)
def withExpectMatch(__v: _root_.scala.Boolean): HeaderValueMatch = copy(expectMatch = Option(__v))
def clearHeaders = copy(headers = _root_.scala.Seq.empty)
def addHeaders(__vs: io.envoyproxy.envoy.api.v2.route.HeaderMatcher *): HeaderValueMatch = addAllHeaders(__vs)
def addAllHeaders(__vs: Iterable[io.envoyproxy.envoy.api.v2.route.HeaderMatcher]): HeaderValueMatch = copy(headers = headers ++ __vs)
def withHeaders(__v: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.HeaderMatcher]): HeaderValueMatch = copy(headers = __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 => {
val __t = descriptorValue
if (__t != "") __t else null
}
case 2 => expectMatch.map(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch._typemapper_expectMatch.toBase(_)).orNull
case 3 => headers
}
}
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 => _root_.scalapb.descriptors.PString(descriptorValue)
case 2 => expectMatch.map(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch._typemapper_expectMatch.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => _root_.scalapb.descriptors.PRepeated(headers.iterator.map(_.toPMessage).toVector)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch.type = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RateLimit.Action.HeaderValueMatch])
}
object HeaderValueMatch extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch = {
var __descriptorValue: _root_.scala.Predef.String = ""
var __expectMatch: _root_.scala.Option[_root_.scala.Boolean] = _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]
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__descriptorValue = _input__.readStringRequireUtf8()
case 18 =>
__expectMatch = Option(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch._typemapper_expectMatch.toCustom(__expectMatch.map(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch._typemapper_expectMatch.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BoolValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 26 =>
__headers += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.HeaderMatcher](_input__)
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch(
descriptorValue = __descriptorValue,
expectMatch = __expectMatch,
headers = __headers.result(),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch] = _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.RateLimit.Action.HeaderValueMatch(
descriptorValue = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
expectMatch = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BoolValue]]).map(io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch._typemapper_expectMatch.toCustom(_)),
headers = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.HeaderMatcher]]).getOrElse(_root_.scala.Seq.empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.javaDescriptor.getNestedTypes().get(5)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.scalaDescriptor.nestedMessages(5)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 2 => __out = com.google.protobuf.wrappers.BoolValue
case 3 => __out = io.envoyproxy.envoy.api.v2.route.HeaderMatcher
}
__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.RateLimit.Action.HeaderValueMatch(
descriptorValue = "",
expectMatch = _root_.scala.None,
headers = _root_.scala.Seq.empty
)
implicit class HeaderValueMatchLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch](_l) {
def descriptorValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.descriptorValue)((c_, f_) => c_.copy(descriptorValue = f_))
def expectMatch: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getExpectMatch)((c_, f_) => c_.copy(expectMatch = Option(f_)))
def optionalExpectMatch: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Boolean]] = field(_.expectMatch)((c_, f_) => c_.copy(expectMatch = 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_))
}
final val DESCRIPTOR_VALUE_FIELD_NUMBER = 1
final val EXPECT_MATCH_FIELD_NUMBER = 2
final val HEADERS_FIELD_NUMBER = 3
@transient
private[route] val _typemapper_expectMatch: _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(
descriptorValue: _root_.scala.Predef.String,
expectMatch: _root_.scala.Option[_root_.scala.Boolean],
headers: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.HeaderMatcher]
): _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch = _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch(
descriptorValue,
expectMatch,
headers
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RateLimit.Action.HeaderValueMatch])
}
implicit class ActionLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action](_l) {
def sourceCluster: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.SourceCluster] = field(_.getSourceCluster)((c_, f_) => c_.copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.SourceCluster(f_)))
def destinationCluster: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.DestinationCluster] = field(_.getDestinationCluster)((c_, f_) => c_.copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.DestinationCluster(f_)))
def requestHeaders: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RequestHeaders] = field(_.getRequestHeaders)((c_, f_) => c_.copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.RequestHeaders(f_)))
def remoteAddress: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.RemoteAddress] = field(_.getRemoteAddress)((c_, f_) => c_.copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.RemoteAddress(f_)))
def genericKey: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.GenericKey] = field(_.getGenericKey)((c_, f_) => c_.copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.GenericKey(f_)))
def headerValueMatch: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.HeaderValueMatch] = field(_.getHeaderValueMatch)((c_, f_) => c_.copy(actionSpecifier = io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier.HeaderValueMatch(f_)))
def actionSpecifier: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier] = field(_.actionSpecifier)((c_, f_) => c_.copy(actionSpecifier = f_))
}
final val SOURCE_CLUSTER_FIELD_NUMBER = 1
final val DESTINATION_CLUSTER_FIELD_NUMBER = 2
final val REQUEST_HEADERS_FIELD_NUMBER = 3
final val REMOTE_ADDRESS_FIELD_NUMBER = 4
final val GENERIC_KEY_FIELD_NUMBER = 5
final val HEADER_VALUE_MATCH_FIELD_NUMBER = 6
def of(
actionSpecifier: io.envoyproxy.envoy.api.v2.route.RateLimit.Action.ActionSpecifier
): _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action = _root_.io.envoyproxy.envoy.api.v2.route.RateLimit.Action(
actionSpecifier
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RateLimit.Action])
}
implicit class RateLimitLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RateLimit](_l) {
def stage: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getStage)((c_, f_) => c_.copy(stage = Option(f_)))
def optionalStage: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Int]] = field(_.stage)((c_, f_) => c_.copy(stage = f_))
def disableKey: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.disableKey)((c_, f_) => c_.copy(disableKey = f_))
def actions: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RateLimit.Action]] = field(_.actions)((c_, f_) => c_.copy(actions = f_))
}
final val STAGE_FIELD_NUMBER = 1
final val DISABLE_KEY_FIELD_NUMBER = 2
final val ACTIONS_FIELD_NUMBER = 3
@transient
private[route] val _typemapper_stage: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt32Value, _root_.scala.Int] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt32Value, _root_.scala.Int]]
def of(
stage: _root_.scala.Option[_root_.scala.Int],
disableKey: _root_.scala.Predef.String,
actions: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RateLimit.Action]
): _root_.io.envoyproxy.envoy.api.v2.route.RateLimit = _root_.io.envoyproxy.envoy.api.v2.route.RateLimit(
stage,
disableKey,
actions
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RateLimit])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy