io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.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
/** Specifies a routing scope, which associates a
* :ref:`Key<envoy_api_msg_ScopedRouteConfiguration.Key>` to a
* :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name).
*
* The HTTP connection manager builds up a table consisting of these Key to
* RouteConfiguration mappings, and looks up the RouteConfiguration to use per
* request according to the algorithm specified in the
* :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`
* assigned to the HttpConnectionManager.
*
* For example, with the following configurations (in YAML):
*
* HttpConnectionManager config:
*
* .. code::
*
* ...
* scoped_routes:
* name: foo-scoped-routes
* scope_key_builder:
* fragments:
* - header_value_extractor:
* name: X-Route-Selector
* element_separator: ,
* element:
* separator: =
* key: vip
*
* ScopedRouteConfiguration resources (specified statically via
* :ref:`scoped_route_configurations_list<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scoped_route_configurations_list>`
* or obtained dynamically via SRDS):
*
* .. code::
*
* (1)
* name: route-scope1
* route_configuration_name: route-config1
* key:
* fragments:
* - string_key: 172.10.10.20
*
* (2)
* name: route-scope2
* route_configuration_name: route-config2
* key:
* fragments:
* - string_key: 172.20.20.30
*
* A request from a client such as:
*
* .. code::
*
* GET / HTTP/1.1
* Host: foo.com
* X-Route-Selector: vip=172.10.10.20
*
* would result in the routing table defined by the `route-config1`
* RouteConfiguration being assigned to the HTTP request/stream.
*
* @param name
* The name assigned to the routing scope.
* @param routeConfigurationName
* The resource name to use for a :ref:`envoy_api_msg_DiscoveryRequest` to an
* RDS server to fetch the :ref:`envoy_api_msg_RouteConfiguration` associated
* with this scope.
* @param key
* The key to match against.
*/
@SerialVersionUID(0L)
final case class ScopedRouteConfiguration(
name: _root_.scala.Predef.String = "",
routeConfigurationName: _root_.scala.Predef.String = "",
key: _root_.scala.Option[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ScopedRouteConfiguration] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = name
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
{
val __value = routeConfigurationName
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
}
};
if (key.isDefined) {
val __value = key.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 = {
{
val __v = name
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
{
val __v = routeConfigurationName
if (!__v.isEmpty) {
_output__.writeString(2, __v)
}
};
key.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withName(__v: _root_.scala.Predef.String): ScopedRouteConfiguration = copy(name = __v)
def withRouteConfigurationName(__v: _root_.scala.Predef.String): ScopedRouteConfiguration = copy(routeConfigurationName = __v)
def getKey: io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key = key.getOrElse(io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.defaultInstance)
def clearKey: ScopedRouteConfiguration = copy(key = _root_.scala.None)
def withKey(__v: io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key): ScopedRouteConfiguration = copy(key = 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 => {
val __t = name
if (__t != "") __t else null
}
case 2 => {
val __t = routeConfigurationName
if (__t != "") __t else null
}
case 3 => key.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 => _root_.scalapb.descriptors.PString(name)
case 2 => _root_.scalapb.descriptors.PString(routeConfigurationName)
case 3 => key.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.ScopedRouteConfiguration.type = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.ScopedRouteConfiguration])
}
object ScopedRouteConfiguration extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration = {
var __name: _root_.scala.Predef.String = ""
var __routeConfigurationName: _root_.scala.Predef.String = ""
var __key: _root_.scala.Option[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key] = _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 =>
__name = _input__.readStringRequireUtf8()
case 18 =>
__routeConfigurationName = _input__.readStringRequireUtf8()
case 26 =>
__key = Option(__key.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key](_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.ScopedRouteConfiguration(
name = __name,
routeConfigurationName = __routeConfigurationName,
key = __key,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration] = _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.ScopedRouteConfiguration(
name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
routeConfigurationName = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key]])
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ScopedRouteProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ScopedRouteProto.scalaDescriptor.messages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 3 => __out = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration(
name = "",
routeConfigurationName = "",
key = _root_.scala.None
)
/** Specifies a key which is matched against the output of the
* :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`
* specified in the HttpConnectionManager. The matching is done per HTTP
* request and is dependent on the order of the fragments contained in the
* Key.
*
* @param fragments
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`.
*/
@SerialVersionUID(0L)
final case class Key(
fragments: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment] = _root_.scala.Seq.empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Key] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
fragments.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 = {
fragments.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def clearFragments = copy(fragments = _root_.scala.Seq.empty)
def addFragments(__vs: io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment *): Key = addAllFragments(__vs)
def addAllFragments(__vs: Iterable[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment]): Key = copy(fragments = fragments ++ __vs)
def withFragments(__v: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment]): Key = copy(fragments = __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 => fragments
}
}
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.PRepeated(fragments.iterator.map(_.toPMessage).toVector)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.type = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.ScopedRouteConfiguration.Key])
}
object Key extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key = {
val __fragments: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment]
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__fragments += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment](_input__)
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key(
fragments = __fragments.result(),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key] = _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.ScopedRouteConfiguration.Key(
fragments = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment]]).getOrElse(_root_.scala.Seq.empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.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.ScopedRouteConfiguration.Key.Fragment
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key(
fragments = _root_.scala.Seq.empty
)
@SerialVersionUID(0L)
final case class Fragment(
`type`: io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type.Empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Fragment] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (`type`.stringKey.isDefined) {
val __value = `type`.stringKey.get
__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 = {
`type`.stringKey.foreach { __v =>
val __m = __v
_output__.writeString(1, __m)
};
unknownFields.writeTo(_output__)
}
def getStringKey: _root_.scala.Predef.String = `type`.stringKey.getOrElse("")
def withStringKey(__v: _root_.scala.Predef.String): Fragment = copy(`type` = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type.StringKey(__v))
def clearType: Fragment = copy(`type` = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type.Empty)
def withType(__v: io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type): Fragment = copy(`type` = __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 => `type`.stringKey.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 => `type`.stringKey.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.type = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.ScopedRouteConfiguration.Key.Fragment])
}
object Fragment extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment = {
var __type: io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type.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 =>
__type = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type.StringKey(_input__.readStringRequireUtf8())
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment(
`type` = __type,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment] = _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.ScopedRouteConfiguration.Key.Fragment(
`type` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type.StringKey(_))
.getOrElse(io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.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.ScopedRouteConfiguration.Key.Fragment(
`type` = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type.Empty
)
sealed trait Type extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isStringKey: _root_.scala.Boolean = false
def stringKey: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
}
object Type {
@SerialVersionUID(0L)
case object Empty extends io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type {
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 StringKey(value: _root_.scala.Predef.String) extends io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type {
type ValueType = _root_.scala.Predef.String
override def isStringKey: _root_.scala.Boolean = true
override def stringKey: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 1
}
}
implicit class FragmentLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment](_l) {
def stringKey: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getStringKey)((c_, f_) => c_.copy(`type` = io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type.StringKey(f_)))
def `type`: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type] = field(_.`type`)((c_, f_) => c_.copy(`type` = f_))
}
final val STRING_KEY_FIELD_NUMBER = 1
def of(
`type`: io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment.Type
): _root_.io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment = _root_.io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment(
`type`
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.ScopedRouteConfiguration.Key.Fragment])
}
implicit class KeyLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key](_l) {
def fragments: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment]] = field(_.fragments)((c_, f_) => c_.copy(fragments = f_))
}
final val FRAGMENTS_FIELD_NUMBER = 1
def of(
fragments: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key.Fragment]
): _root_.io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key = _root_.io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key(
fragments
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.ScopedRouteConfiguration.Key])
}
implicit class ScopedRouteConfigurationLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration](_l) {
def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_))
def routeConfigurationName: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.routeConfigurationName)((c_, f_) => c_.copy(routeConfigurationName = f_))
def key: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key] = field(_.getKey)((c_, f_) => c_.copy(key = Option(f_)))
def optionalKey: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key]] = field(_.key)((c_, f_) => c_.copy(key = f_))
}
final val NAME_FIELD_NUMBER = 1
final val ROUTE_CONFIGURATION_NAME_FIELD_NUMBER = 2
final val KEY_FIELD_NUMBER = 3
def of(
name: _root_.scala.Predef.String,
routeConfigurationName: _root_.scala.Predef.String,
key: _root_.scala.Option[io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration.Key]
): _root_.io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration = _root_.io.envoyproxy.envoy.api.v2.ScopedRouteConfiguration(
name,
routeConfigurationName,
key
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.ScopedRouteConfiguration])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy