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

io.envoyproxy.envoy.config.rbac.v3.Principal.scala Maven / Gradle / Ivy

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

package io.envoyproxy.envoy.config.rbac.v3

/** Principal defines an identity or a group of identities for a downstream
  * subject.
  * [#next-free-field: 12]
  */
@SerialVersionUID(0L)
final case class Principal(
    identifier: io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Empty,
    unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
    ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Principal] {
    @transient
    private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
    private[this] def __computeSerializedSize(): _root_.scala.Int = {
      var __size = 0
      if (identifier.andIds.isDefined) {
        val __value = identifier.andIds.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (identifier.orIds.isDefined) {
        val __value = identifier.orIds.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (identifier.any.isDefined) {
        val __value = identifier.any.get
        __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(3, __value)
      };
      if (identifier.authenticated.isDefined) {
        val __value = identifier.authenticated.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (identifier.sourceIp.isDefined) {
        val __value = identifier.sourceIp.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (identifier.directRemoteIp.isDefined) {
        val __value = identifier.directRemoteIp.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (identifier.remoteIp.isDefined) {
        val __value = identifier.remoteIp.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (identifier.header.isDefined) {
        val __value = identifier.header.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (identifier.urlPath.isDefined) {
        val __value = identifier.urlPath.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (identifier.metadata.isDefined) {
        val __value = identifier.metadata.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (identifier.notId.isDefined) {
        val __value = identifier.notId.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 = {
      identifier.andIds.foreach { __v =>
        val __m = __v
        _output__.writeTag(1, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      identifier.orIds.foreach { __v =>
        val __m = __v
        _output__.writeTag(2, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      identifier.any.foreach { __v =>
        val __m = __v
        _output__.writeBool(3, __m)
      };
      identifier.authenticated.foreach { __v =>
        val __m = __v
        _output__.writeTag(4, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      identifier.sourceIp.foreach { __v =>
        val __m = __v
        _output__.writeTag(5, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      identifier.header.foreach { __v =>
        val __m = __v
        _output__.writeTag(6, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      identifier.metadata.foreach { __v =>
        val __m = __v
        _output__.writeTag(7, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      identifier.notId.foreach { __v =>
        val __m = __v
        _output__.writeTag(8, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      identifier.urlPath.foreach { __v =>
        val __m = __v
        _output__.writeTag(9, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      identifier.directRemoteIp.foreach { __v =>
        val __m = __v
        _output__.writeTag(10, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      identifier.remoteIp.foreach { __v =>
        val __m = __v
        _output__.writeTag(11, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      unknownFields.writeTo(_output__)
    }
    def getAndIds: io.envoyproxy.envoy.config.rbac.v3.Principal.Set = identifier.andIds.getOrElse(io.envoyproxy.envoy.config.rbac.v3.Principal.Set.defaultInstance)
    def withAndIds(__v: io.envoyproxy.envoy.config.rbac.v3.Principal.Set): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.AndIds(__v))
    def getOrIds: io.envoyproxy.envoy.config.rbac.v3.Principal.Set = identifier.orIds.getOrElse(io.envoyproxy.envoy.config.rbac.v3.Principal.Set.defaultInstance)
    def withOrIds(__v: io.envoyproxy.envoy.config.rbac.v3.Principal.Set): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.OrIds(__v))
    def getAny: _root_.scala.Boolean = identifier.any.getOrElse(false)
    def withAny(__v: _root_.scala.Boolean): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Any(__v))
    def getAuthenticated: io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated = identifier.authenticated.getOrElse(io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated.defaultInstance)
    def withAuthenticated(__v: io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Authenticated(__v))
    def getSourceIp: io.envoyproxy.envoy.config.core.v3.CidrRange = identifier.sourceIp.getOrElse(io.envoyproxy.envoy.config.core.v3.CidrRange.defaultInstance)
    def withSourceIp(__v: io.envoyproxy.envoy.config.core.v3.CidrRange): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.SourceIp(__v))
    def getDirectRemoteIp: io.envoyproxy.envoy.config.core.v3.CidrRange = identifier.directRemoteIp.getOrElse(io.envoyproxy.envoy.config.core.v3.CidrRange.defaultInstance)
    def withDirectRemoteIp(__v: io.envoyproxy.envoy.config.core.v3.CidrRange): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.DirectRemoteIp(__v))
    def getRemoteIp: io.envoyproxy.envoy.config.core.v3.CidrRange = identifier.remoteIp.getOrElse(io.envoyproxy.envoy.config.core.v3.CidrRange.defaultInstance)
    def withRemoteIp(__v: io.envoyproxy.envoy.config.core.v3.CidrRange): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.RemoteIp(__v))
    def getHeader: io.envoyproxy.envoy.config.route.v3.HeaderMatcher = identifier.header.getOrElse(io.envoyproxy.envoy.config.route.v3.HeaderMatcher.defaultInstance)
    def withHeader(__v: io.envoyproxy.envoy.config.route.v3.HeaderMatcher): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Header(__v))
    def getUrlPath: io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher = identifier.urlPath.getOrElse(io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher.defaultInstance)
    def withUrlPath(__v: io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.UrlPath(__v))
    def getMetadata: io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher = identifier.metadata.getOrElse(io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher.defaultInstance)
    def withMetadata(__v: io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Metadata(__v))
    def getNotId: io.envoyproxy.envoy.config.rbac.v3.Principal = identifier.notId.getOrElse(io.envoyproxy.envoy.config.rbac.v3.Principal.defaultInstance)
    def withNotId(__v: io.envoyproxy.envoy.config.rbac.v3.Principal): Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.NotId(__v))
    def clearIdentifier: Principal = copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Empty)
    def withIdentifier(__v: io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier): Principal = copy(identifier = __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 => identifier.andIds.orNull
        case 2 => identifier.orIds.orNull
        case 3 => identifier.any.orNull
        case 4 => identifier.authenticated.orNull
        case 5 => identifier.sourceIp.orNull
        case 10 => identifier.directRemoteIp.orNull
        case 11 => identifier.remoteIp.orNull
        case 6 => identifier.header.orNull
        case 9 => identifier.urlPath.orNull
        case 7 => identifier.metadata.orNull
        case 8 => identifier.notId.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 => identifier.andIds.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 2 => identifier.orIds.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 3 => identifier.any.map(_root_.scalapb.descriptors.PBoolean(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 4 => identifier.authenticated.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 5 => identifier.sourceIp.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 10 => identifier.directRemoteIp.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 11 => identifier.remoteIp.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 6 => identifier.header.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 9 => identifier.urlPath.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 7 => identifier.metadata.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 8 => identifier.notId.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
      }
    }
    def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
    def companion: io.envoyproxy.envoy.config.rbac.v3.Principal.type = io.envoyproxy.envoy.config.rbac.v3.Principal
    // @@protoc_insertion_point(GeneratedMessage[envoy.config.rbac.v3.Principal])
}

object Principal extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.config.rbac.v3.Principal] {
  implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.config.rbac.v3.Principal] = this
  def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.config.rbac.v3.Principal = {
    var __identifier: io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.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 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.AndIds(__identifier.andIds.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.config.rbac.v3.Principal.Set](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 18 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.OrIds(__identifier.orIds.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.config.rbac.v3.Principal.Set](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 24 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Any(_input__.readBool())
        case 34 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Authenticated(__identifier.authenticated.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 42 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.SourceIp(__identifier.sourceIp.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.config.core.v3.CidrRange](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 82 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.DirectRemoteIp(__identifier.directRemoteIp.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.config.core.v3.CidrRange](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 90 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.RemoteIp(__identifier.remoteIp.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.config.core.v3.CidrRange](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 50 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Header(__identifier.header.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.config.route.v3.HeaderMatcher](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 74 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.UrlPath(__identifier.urlPath.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 58 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Metadata(__identifier.metadata.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 66 =>
          __identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.NotId(__identifier.notId.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.config.rbac.v3.Principal](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case tag =>
          if (_unknownFields__ == null) {
            _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
          }
          _unknownFields__.parseField(tag, _input__)
      }
    }
    io.envoyproxy.envoy.config.rbac.v3.Principal(
        identifier = __identifier,
        unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
    )
  }
  implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.config.rbac.v3.Principal] = _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.config.rbac.v3.Principal(
        identifier = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal.Set]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.AndIds(_))
            .orElse[io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal.Set]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.OrIds(_)))
            .orElse[io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Boolean]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Any(_)))
            .orElse[io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Authenticated(_)))
            .orElse[io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.config.core.v3.CidrRange]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.SourceIp(_)))
            .orElse[io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.config.core.v3.CidrRange]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.DirectRemoteIp(_)))
            .orElse[io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.config.core.v3.CidrRange]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.RemoteIp(_)))
            .orElse[io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.config.route.v3.HeaderMatcher]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Header(_)))
            .orElse[io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.UrlPath(_)))
            .orElse[io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Metadata(_)))
            .orElse[io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal]]).map(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.NotId(_)))
            .getOrElse(io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Empty)
      )
    case _ => throw new RuntimeException("Expected PMessage")
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = RbacProto.javaDescriptor.getMessageTypes().get(3)
  def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = RbacProto.scalaDescriptor.messages(3)
  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.config.rbac.v3.Principal.Set
      case 2 => __out = io.envoyproxy.envoy.config.rbac.v3.Principal.Set
      case 4 => __out = io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated
      case 5 => __out = io.envoyproxy.envoy.config.core.v3.CidrRange
      case 10 => __out = io.envoyproxy.envoy.config.core.v3.CidrRange
      case 11 => __out = io.envoyproxy.envoy.config.core.v3.CidrRange
      case 6 => __out = io.envoyproxy.envoy.config.route.v3.HeaderMatcher
      case 9 => __out = io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher
      case 7 => __out = io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher
      case 8 => __out = io.envoyproxy.envoy.config.rbac.v3.Principal
    }
    __out
  }
  lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
    Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
      _root_.io.envoyproxy.envoy.config.rbac.v3.Principal.Set,
      _root_.io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated
    )
  def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
  lazy val defaultInstance = io.envoyproxy.envoy.config.rbac.v3.Principal(
    identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Empty
  )
  sealed trait Identifier extends _root_.scalapb.GeneratedOneof {
    def isEmpty: _root_.scala.Boolean = false
    def isDefined: _root_.scala.Boolean = true
    def isAndIds: _root_.scala.Boolean = false
    def isOrIds: _root_.scala.Boolean = false
    def isAny: _root_.scala.Boolean = false
    def isAuthenticated: _root_.scala.Boolean = false
    def isSourceIp: _root_.scala.Boolean = false
    def isDirectRemoteIp: _root_.scala.Boolean = false
    def isRemoteIp: _root_.scala.Boolean = false
    def isHeader: _root_.scala.Boolean = false
    def isUrlPath: _root_.scala.Boolean = false
    def isMetadata: _root_.scala.Boolean = false
    def isNotId: _root_.scala.Boolean = false
    def andIds: _root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal.Set] = _root_.scala.None
    def orIds: _root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal.Set] = _root_.scala.None
    def any: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None
    def authenticated: _root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated] = _root_.scala.None
    def sourceIp: _root_.scala.Option[io.envoyproxy.envoy.config.core.v3.CidrRange] = _root_.scala.None
    def directRemoteIp: _root_.scala.Option[io.envoyproxy.envoy.config.core.v3.CidrRange] = _root_.scala.None
    def remoteIp: _root_.scala.Option[io.envoyproxy.envoy.config.core.v3.CidrRange] = _root_.scala.None
    def header: _root_.scala.Option[io.envoyproxy.envoy.config.route.v3.HeaderMatcher] = _root_.scala.None
    def urlPath: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher] = _root_.scala.None
    def metadata: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher] = _root_.scala.None
    def notId: _root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal] = _root_.scala.None
  }
  object Identifier {
    @SerialVersionUID(0L)
    case object Empty extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      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 AndIds(value: io.envoyproxy.envoy.config.rbac.v3.Principal.Set) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = io.envoyproxy.envoy.config.rbac.v3.Principal.Set
      override def isAndIds: _root_.scala.Boolean = true
      override def andIds: _root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal.Set] = Some(value)
      override def number: _root_.scala.Int = 1
    }
    @SerialVersionUID(0L)
    final case class OrIds(value: io.envoyproxy.envoy.config.rbac.v3.Principal.Set) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = io.envoyproxy.envoy.config.rbac.v3.Principal.Set
      override def isOrIds: _root_.scala.Boolean = true
      override def orIds: _root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal.Set] = Some(value)
      override def number: _root_.scala.Int = 2
    }
    @SerialVersionUID(0L)
    final case class Any(value: _root_.scala.Boolean) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = _root_.scala.Boolean
      override def isAny: _root_.scala.Boolean = true
      override def any: _root_.scala.Option[_root_.scala.Boolean] = Some(value)
      override def number: _root_.scala.Int = 3
    }
    @SerialVersionUID(0L)
    final case class Authenticated(value: io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated
      override def isAuthenticated: _root_.scala.Boolean = true
      override def authenticated: _root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated] = Some(value)
      override def number: _root_.scala.Int = 4
    }
    @SerialVersionUID(0L) @scala.deprecated(message="Marked as deprecated in proto file", "")
    final case class SourceIp(value: io.envoyproxy.envoy.config.core.v3.CidrRange) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = io.envoyproxy.envoy.config.core.v3.CidrRange
      override def isSourceIp: _root_.scala.Boolean = true
      override def sourceIp: _root_.scala.Option[io.envoyproxy.envoy.config.core.v3.CidrRange] = Some(value)
      override def number: _root_.scala.Int = 5
    }
    @SerialVersionUID(0L)
    final case class DirectRemoteIp(value: io.envoyproxy.envoy.config.core.v3.CidrRange) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = io.envoyproxy.envoy.config.core.v3.CidrRange
      override def isDirectRemoteIp: _root_.scala.Boolean = true
      override def directRemoteIp: _root_.scala.Option[io.envoyproxy.envoy.config.core.v3.CidrRange] = Some(value)
      override def number: _root_.scala.Int = 10
    }
    @SerialVersionUID(0L)
    final case class RemoteIp(value: io.envoyproxy.envoy.config.core.v3.CidrRange) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = io.envoyproxy.envoy.config.core.v3.CidrRange
      override def isRemoteIp: _root_.scala.Boolean = true
      override def remoteIp: _root_.scala.Option[io.envoyproxy.envoy.config.core.v3.CidrRange] = Some(value)
      override def number: _root_.scala.Int = 11
    }
    @SerialVersionUID(0L)
    final case class Header(value: io.envoyproxy.envoy.config.route.v3.HeaderMatcher) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = io.envoyproxy.envoy.config.route.v3.HeaderMatcher
      override def isHeader: _root_.scala.Boolean = true
      override def header: _root_.scala.Option[io.envoyproxy.envoy.config.route.v3.HeaderMatcher] = Some(value)
      override def number: _root_.scala.Int = 6
    }
    @SerialVersionUID(0L)
    final case class UrlPath(value: io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher
      override def isUrlPath: _root_.scala.Boolean = true
      override def urlPath: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher] = Some(value)
      override def number: _root_.scala.Int = 9
    }
    @SerialVersionUID(0L)
    final case class Metadata(value: io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher
      override def isMetadata: _root_.scala.Boolean = true
      override def metadata: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher] = Some(value)
      override def number: _root_.scala.Int = 7
    }
    @SerialVersionUID(0L)
    final case class NotId(value: io.envoyproxy.envoy.config.rbac.v3.Principal) extends io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier {
      type ValueType = io.envoyproxy.envoy.config.rbac.v3.Principal
      override def isNotId: _root_.scala.Boolean = true
      override def notId: _root_.scala.Option[io.envoyproxy.envoy.config.rbac.v3.Principal] = Some(value)
      override def number: _root_.scala.Int = 8
    }
  }
  /** Used in the `and_ids` and `or_ids` fields in the `identifier` oneof.
    * Depending on the context, each are applied with the associated behavior.
    */
  @SerialVersionUID(0L)
  final case class Set(
      ids: _root_.scala.Seq[io.envoyproxy.envoy.config.rbac.v3.Principal] = _root_.scala.Seq.empty,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Set] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        ids.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 = {
        ids.foreach { __v =>
          val __m = __v
          _output__.writeTag(1, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        unknownFields.writeTo(_output__)
      }
      def clearIds = copy(ids = _root_.scala.Seq.empty)
      def addIds(__vs: io.envoyproxy.envoy.config.rbac.v3.Principal *): Set = addAllIds(__vs)
      def addAllIds(__vs: Iterable[io.envoyproxy.envoy.config.rbac.v3.Principal]): Set = copy(ids = ids ++ __vs)
      def withIds(__v: _root_.scala.Seq[io.envoyproxy.envoy.config.rbac.v3.Principal]): Set = copy(ids = __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 => ids
        }
      }
      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(ids.iterator.map(_.toPMessage).toVector)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: io.envoyproxy.envoy.config.rbac.v3.Principal.Set.type = io.envoyproxy.envoy.config.rbac.v3.Principal.Set
      // @@protoc_insertion_point(GeneratedMessage[envoy.config.rbac.v3.Principal.Set])
  }
  
  object Set extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.config.rbac.v3.Principal.Set] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.config.rbac.v3.Principal.Set] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.config.rbac.v3.Principal.Set = {
      val __ids: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.config.rbac.v3.Principal] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.config.rbac.v3.Principal]
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 10 =>
            __ids += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.config.rbac.v3.Principal](_input__)
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      io.envoyproxy.envoy.config.rbac.v3.Principal.Set(
          ids = __ids.result(),
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.config.rbac.v3.Principal.Set] = _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.config.rbac.v3.Principal.Set(
          ids = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.config.rbac.v3.Principal]]).getOrElse(_root_.scala.Seq.empty)
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.config.rbac.v3.Principal.javaDescriptor.getNestedTypes().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.config.rbac.v3.Principal.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.config.rbac.v3.Principal
      }
      __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.config.rbac.v3.Principal.Set(
      ids = _root_.scala.Seq.empty
    )
    implicit class SetLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal.Set]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal.Set](_l) {
      def ids: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.config.rbac.v3.Principal]] = field(_.ids)((c_, f_) => c_.copy(ids = f_))
    }
    final val IDS_FIELD_NUMBER = 1
    def of(
      ids: _root_.scala.Seq[io.envoyproxy.envoy.config.rbac.v3.Principal]
    ): _root_.io.envoyproxy.envoy.config.rbac.v3.Principal.Set = _root_.io.envoyproxy.envoy.config.rbac.v3.Principal.Set(
      ids
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[envoy.config.rbac.v3.Principal.Set])
  }
  
  /** Authentication attributes for a downstream.
    *
    * @param principalName
    *   The name of the principal. If set, The URI SAN or DNS SAN in that order
    *   is used from the certificate, otherwise the subject field is used. If
    *   unset, it applies to any user that is authenticated.
    */
  @SerialVersionUID(0L)
  final case class Authenticated(
      principalName: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher] = _root_.scala.None,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Authenticated] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        if (principalName.isDefined) {
          val __value = principalName.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 = {
        principalName.foreach { __v =>
          val __m = __v
          _output__.writeTag(2, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        unknownFields.writeTo(_output__)
      }
      def getPrincipalName: io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher = principalName.getOrElse(io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher.defaultInstance)
      def clearPrincipalName: Authenticated = copy(principalName = _root_.scala.None)
      def withPrincipalName(__v: io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher): Authenticated = copy(principalName = 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 2 => principalName.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 2 => principalName.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated.type = io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated
      // @@protoc_insertion_point(GeneratedMessage[envoy.config.rbac.v3.Principal.Authenticated])
  }
  
  object Authenticated extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated = {
      var __principalName: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher] = _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 18 =>
            __principalName = Option(__principalName.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated(
          principalName = __principalName,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated] = _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.config.rbac.v3.Principal.Authenticated(
          principalName = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher]])
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.config.rbac.v3.Principal.javaDescriptor.getNestedTypes().get(1)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.config.rbac.v3.Principal.scalaDescriptor.nestedMessages(1)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
      var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
      (__number: @_root_.scala.unchecked) match {
        case 2 => __out = io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher
      }
      __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.config.rbac.v3.Principal.Authenticated(
      principalName = _root_.scala.None
    )
    implicit class AuthenticatedLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated](_l) {
      def principalName: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher] = field(_.getPrincipalName)((c_, f_) => c_.copy(principalName = Option(f_)))
      def optionalPrincipalName: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher]] = field(_.principalName)((c_, f_) => c_.copy(principalName = f_))
    }
    final val PRINCIPAL_NAME_FIELD_NUMBER = 2
    def of(
      principalName: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.v3.StringMatcher]
    ): _root_.io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated = _root_.io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated(
      principalName
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[envoy.config.rbac.v3.Principal.Authenticated])
  }
  
  implicit class PrincipalLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal](_l) {
    def andIds: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal.Set] = field(_.getAndIds)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.AndIds(f_)))
    def orIds: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal.Set] = field(_.getOrIds)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.OrIds(f_)))
    def any: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getAny)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Any(f_)))
    def authenticated: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal.Authenticated] = field(_.getAuthenticated)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Authenticated(f_)))
    def sourceIp: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.core.v3.CidrRange] = field(_.getSourceIp)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.SourceIp(f_)))
    def directRemoteIp: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.core.v3.CidrRange] = field(_.getDirectRemoteIp)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.DirectRemoteIp(f_)))
    def remoteIp: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.core.v3.CidrRange] = field(_.getRemoteIp)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.RemoteIp(f_)))
    def header: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.route.v3.HeaderMatcher] = field(_.getHeader)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Header(f_)))
    def urlPath: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.`type`.matcher.v3.PathMatcher] = field(_.getUrlPath)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.UrlPath(f_)))
    def metadata: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.`type`.matcher.v3.MetadataMatcher] = field(_.getMetadata)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.Metadata(f_)))
    def notId: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal] = field(_.getNotId)((c_, f_) => c_.copy(identifier = io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier.NotId(f_)))
    def identifier: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier] = field(_.identifier)((c_, f_) => c_.copy(identifier = f_))
  }
  final val AND_IDS_FIELD_NUMBER = 1
  final val OR_IDS_FIELD_NUMBER = 2
  final val ANY_FIELD_NUMBER = 3
  final val AUTHENTICATED_FIELD_NUMBER = 4
  final val SOURCE_IP_FIELD_NUMBER = 5
  final val DIRECT_REMOTE_IP_FIELD_NUMBER = 10
  final val REMOTE_IP_FIELD_NUMBER = 11
  final val HEADER_FIELD_NUMBER = 6
  final val URL_PATH_FIELD_NUMBER = 9
  final val METADATA_FIELD_NUMBER = 7
  final val NOT_ID_FIELD_NUMBER = 8
  def of(
    identifier: io.envoyproxy.envoy.config.rbac.v3.Principal.Identifier
  ): _root_.io.envoyproxy.envoy.config.rbac.v3.Principal = _root_.io.envoyproxy.envoy.config.rbac.v3.Principal(
    identifier
  )
  // @@protoc_insertion_point(GeneratedMessageCompanion[envoy.config.rbac.v3.Principal])
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy