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

io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.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.admin.v2alpha

/** Envoy's scoped RDS implementation fills this message with all currently loaded route
  * configuration scopes (defined via ScopedRouteConfigurationsSet protos). This message lists both
  * the scopes defined inline with the higher order object (i.e., the HttpConnectionManager) and the
  * dynamically obtained scopes via the SRDS API.
  *
  * @param inlineScopedRouteConfigs
  *   The statically loaded scoped route configs.
  * @param dynamicScopedRouteConfigs
  *   The dynamically loaded scoped route configs.
  */
@SerialVersionUID(0L)
final case class ScopedRoutesConfigDump(
    inlineScopedRouteConfigs: _root_.scala.Seq[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs] = _root_.scala.Seq.empty,
    dynamicScopedRouteConfigs: _root_.scala.Seq[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs] = _root_.scala.Seq.empty,
    unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
    ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ScopedRoutesConfigDump] {
    @transient
    private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
    private[this] def __computeSerializedSize(): _root_.scala.Int = {
      var __size = 0
      inlineScopedRouteConfigs.foreach { __item =>
        val __value = __item
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      }
      dynamicScopedRouteConfigs.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 = {
      inlineScopedRouteConfigs.foreach { __v =>
        val __m = __v
        _output__.writeTag(1, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      dynamicScopedRouteConfigs.foreach { __v =>
        val __m = __v
        _output__.writeTag(2, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      unknownFields.writeTo(_output__)
    }
    def clearInlineScopedRouteConfigs = copy(inlineScopedRouteConfigs = _root_.scala.Seq.empty)
    def addInlineScopedRouteConfigs(__vs: io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs *): ScopedRoutesConfigDump = addAllInlineScopedRouteConfigs(__vs)
    def addAllInlineScopedRouteConfigs(__vs: Iterable[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs]): ScopedRoutesConfigDump = copy(inlineScopedRouteConfigs = inlineScopedRouteConfigs ++ __vs)
    def withInlineScopedRouteConfigs(__v: _root_.scala.Seq[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs]): ScopedRoutesConfigDump = copy(inlineScopedRouteConfigs = __v)
    def clearDynamicScopedRouteConfigs = copy(dynamicScopedRouteConfigs = _root_.scala.Seq.empty)
    def addDynamicScopedRouteConfigs(__vs: io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs *): ScopedRoutesConfigDump = addAllDynamicScopedRouteConfigs(__vs)
    def addAllDynamicScopedRouteConfigs(__vs: Iterable[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs]): ScopedRoutesConfigDump = copy(dynamicScopedRouteConfigs = dynamicScopedRouteConfigs ++ __vs)
    def withDynamicScopedRouteConfigs(__v: _root_.scala.Seq[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs]): ScopedRoutesConfigDump = copy(dynamicScopedRouteConfigs = __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 => inlineScopedRouteConfigs
        case 2 => dynamicScopedRouteConfigs
      }
    }
    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(inlineScopedRouteConfigs.iterator.map(_.toPMessage).toVector)
        case 2 => _root_.scalapb.descriptors.PRepeated(dynamicScopedRouteConfigs.iterator.map(_.toPMessage).toVector)
      }
    }
    def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
    def companion: io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.type = io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump
    // @@protoc_insertion_point(GeneratedMessage[envoy.admin.v2alpha.ScopedRoutesConfigDump])
}

object ScopedRoutesConfigDump extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump] {
  implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump] = this
  def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump = {
    val __inlineScopedRouteConfigs: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs]
    val __dynamicScopedRouteConfigs: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs]
    var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
    var _done__ = false
    while (!_done__) {
      val _tag__ = _input__.readTag()
      _tag__ match {
        case 0 => _done__ = true
        case 10 =>
          __inlineScopedRouteConfigs += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs](_input__)
        case 18 =>
          __dynamicScopedRouteConfigs += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs](_input__)
        case tag =>
          if (_unknownFields__ == null) {
            _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
          }
          _unknownFields__.parseField(tag, _input__)
      }
    }
    io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump(
        inlineScopedRouteConfigs = __inlineScopedRouteConfigs.result(),
        dynamicScopedRouteConfigs = __dynamicScopedRouteConfigs.result(),
        unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
    )
  }
  implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump] = _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.admin.v2alpha.ScopedRoutesConfigDump(
        inlineScopedRouteConfigs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs]]).getOrElse(_root_.scala.Seq.empty),
        dynamicScopedRouteConfigs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs]]).getOrElse(_root_.scala.Seq.empty)
      )
    case _ => throw new RuntimeException("Expected PMessage")
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ConfigDumpProto.javaDescriptor.getMessageTypes().get(6)
  def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ConfigDumpProto.scalaDescriptor.messages(6)
  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.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs
      case 2 => __out = io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs
    }
    __out
  }
  lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
    Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
      _root_.io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs,
      _root_.io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs
    )
  def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
  lazy val defaultInstance = io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump(
    inlineScopedRouteConfigs = _root_.scala.Seq.empty,
    dynamicScopedRouteConfigs = _root_.scala.Seq.empty
  )
  /** @param name
    *   The name assigned to the scoped route configurations.
    * @param scopedRouteConfigs
    *   The scoped route configurations.
    * @param lastUpdated
    *   The timestamp when the scoped route config set was last updated.
    */
  @SerialVersionUID(0L)
  final case class InlineScopedRouteConfigs(
      name: _root_.scala.Predef.String = "",
      scopedRouteConfigs: _root_.scala.Seq[com.google.protobuf.any.Any] = _root_.scala.Seq.empty,
      lastUpdated: _root_.scala.Option[com.google.protobuf.timestamp.Timestamp] = _root_.scala.None,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[InlineScopedRouteConfigs] {
      @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)
          }
        };
        scopedRouteConfigs.foreach { __item =>
          val __value = __item
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        }
        if (lastUpdated.isDefined) {
          val __value = lastUpdated.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)
          }
        };
        scopedRouteConfigs.foreach { __v =>
          val __m = __v
          _output__.writeTag(2, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        lastUpdated.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): InlineScopedRouteConfigs = copy(name = __v)
      def clearScopedRouteConfigs = copy(scopedRouteConfigs = _root_.scala.Seq.empty)
      def addScopedRouteConfigs(__vs: com.google.protobuf.any.Any *): InlineScopedRouteConfigs = addAllScopedRouteConfigs(__vs)
      def addAllScopedRouteConfigs(__vs: Iterable[com.google.protobuf.any.Any]): InlineScopedRouteConfigs = copy(scopedRouteConfigs = scopedRouteConfigs ++ __vs)
      def withScopedRouteConfigs(__v: _root_.scala.Seq[com.google.protobuf.any.Any]): InlineScopedRouteConfigs = copy(scopedRouteConfigs = __v)
      def getLastUpdated: com.google.protobuf.timestamp.Timestamp = lastUpdated.getOrElse(com.google.protobuf.timestamp.Timestamp.defaultInstance)
      def clearLastUpdated: InlineScopedRouteConfigs = copy(lastUpdated = _root_.scala.None)
      def withLastUpdated(__v: com.google.protobuf.timestamp.Timestamp): InlineScopedRouteConfigs = copy(lastUpdated = 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 => scopedRouteConfigs
          case 3 => lastUpdated.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.PRepeated(scopedRouteConfigs.iterator.map(_.toPMessage).toVector)
          case 3 => lastUpdated.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs.type = io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs
      // @@protoc_insertion_point(GeneratedMessage[envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs])
  }
  
  object InlineScopedRouteConfigs extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs = {
      var __name: _root_.scala.Predef.String = ""
      val __scopedRouteConfigs: _root_.scala.collection.immutable.VectorBuilder[com.google.protobuf.any.Any] = new _root_.scala.collection.immutable.VectorBuilder[com.google.protobuf.any.Any]
      var __lastUpdated: _root_.scala.Option[com.google.protobuf.timestamp.Timestamp] = _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 =>
            __scopedRouteConfigs += _root_.scalapb.LiteParser.readMessage[com.google.protobuf.any.Any](_input__)
          case 26 =>
            __lastUpdated = Option(__lastUpdated.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.timestamp.Timestamp](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs(
          name = __name,
          scopedRouteConfigs = __scopedRouteConfigs.result(),
          lastUpdated = __lastUpdated,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs] = _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.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs(
          name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          scopedRouteConfigs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[com.google.protobuf.any.Any]]).getOrElse(_root_.scala.Seq.empty),
          lastUpdated = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.timestamp.Timestamp]])
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.javaDescriptor.getNestedTypes().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.scalaDescriptor.nestedMessages(0)
    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.any.Any
        case 3 => __out = com.google.protobuf.timestamp.Timestamp
      }
      __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.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs(
      name = "",
      scopedRouteConfigs = _root_.scala.Seq.empty,
      lastUpdated = _root_.scala.None
    )
    implicit class InlineScopedRouteConfigsLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs](_l) {
      def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_))
      def scopedRouteConfigs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[com.google.protobuf.any.Any]] = field(_.scopedRouteConfigs)((c_, f_) => c_.copy(scopedRouteConfigs = f_))
      def lastUpdated: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.timestamp.Timestamp] = field(_.getLastUpdated)((c_, f_) => c_.copy(lastUpdated = Option(f_)))
      def optionalLastUpdated: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.timestamp.Timestamp]] = field(_.lastUpdated)((c_, f_) => c_.copy(lastUpdated = f_))
    }
    final val NAME_FIELD_NUMBER = 1
    final val SCOPED_ROUTE_CONFIGS_FIELD_NUMBER = 2
    final val LAST_UPDATED_FIELD_NUMBER = 3
    def of(
      name: _root_.scala.Predef.String,
      scopedRouteConfigs: _root_.scala.Seq[com.google.protobuf.any.Any],
      lastUpdated: _root_.scala.Option[com.google.protobuf.timestamp.Timestamp]
    ): _root_.io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs = _root_.io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs(
      name,
      scopedRouteConfigs,
      lastUpdated
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs])
  }
  
  /** @param name
    *   The name assigned to the scoped route configurations.
    * @param versionInfo
    *   This is the per-resource version information. This version is currently taken from the
    *   :ref:`version_info <envoy_api_field_DiscoveryResponse.version_info>` field at the time that
    *   the scoped routes configuration was loaded.
    * @param scopedRouteConfigs
    *   The scoped route configurations.
    * @param lastUpdated
    *   The timestamp when the scoped route config set was last updated.
    */
  @SerialVersionUID(0L)
  final case class DynamicScopedRouteConfigs(
      name: _root_.scala.Predef.String = "",
      versionInfo: _root_.scala.Predef.String = "",
      scopedRouteConfigs: _root_.scala.Seq[com.google.protobuf.any.Any] = _root_.scala.Seq.empty,
      lastUpdated: _root_.scala.Option[com.google.protobuf.timestamp.Timestamp] = _root_.scala.None,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[DynamicScopedRouteConfigs] {
      @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 = versionInfo
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
          }
        };
        scopedRouteConfigs.foreach { __item =>
          val __value = __item
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        }
        if (lastUpdated.isDefined) {
          val __value = lastUpdated.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 = versionInfo
          if (!__v.isEmpty) {
            _output__.writeString(2, __v)
          }
        };
        scopedRouteConfigs.foreach { __v =>
          val __m = __v
          _output__.writeTag(3, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        lastUpdated.foreach { __v =>
          val __m = __v
          _output__.writeTag(4, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        unknownFields.writeTo(_output__)
      }
      def withName(__v: _root_.scala.Predef.String): DynamicScopedRouteConfigs = copy(name = __v)
      def withVersionInfo(__v: _root_.scala.Predef.String): DynamicScopedRouteConfigs = copy(versionInfo = __v)
      def clearScopedRouteConfigs = copy(scopedRouteConfigs = _root_.scala.Seq.empty)
      def addScopedRouteConfigs(__vs: com.google.protobuf.any.Any *): DynamicScopedRouteConfigs = addAllScopedRouteConfigs(__vs)
      def addAllScopedRouteConfigs(__vs: Iterable[com.google.protobuf.any.Any]): DynamicScopedRouteConfigs = copy(scopedRouteConfigs = scopedRouteConfigs ++ __vs)
      def withScopedRouteConfigs(__v: _root_.scala.Seq[com.google.protobuf.any.Any]): DynamicScopedRouteConfigs = copy(scopedRouteConfigs = __v)
      def getLastUpdated: com.google.protobuf.timestamp.Timestamp = lastUpdated.getOrElse(com.google.protobuf.timestamp.Timestamp.defaultInstance)
      def clearLastUpdated: DynamicScopedRouteConfigs = copy(lastUpdated = _root_.scala.None)
      def withLastUpdated(__v: com.google.protobuf.timestamp.Timestamp): DynamicScopedRouteConfigs = copy(lastUpdated = 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 = versionInfo
            if (__t != "") __t else null
          }
          case 3 => scopedRouteConfigs
          case 4 => lastUpdated.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(versionInfo)
          case 3 => _root_.scalapb.descriptors.PRepeated(scopedRouteConfigs.iterator.map(_.toPMessage).toVector)
          case 4 => lastUpdated.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.type = io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs
      // @@protoc_insertion_point(GeneratedMessage[envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs])
  }
  
  object DynamicScopedRouteConfigs extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs = {
      var __name: _root_.scala.Predef.String = ""
      var __versionInfo: _root_.scala.Predef.String = ""
      val __scopedRouteConfigs: _root_.scala.collection.immutable.VectorBuilder[com.google.protobuf.any.Any] = new _root_.scala.collection.immutable.VectorBuilder[com.google.protobuf.any.Any]
      var __lastUpdated: _root_.scala.Option[com.google.protobuf.timestamp.Timestamp] = _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 =>
            __versionInfo = _input__.readStringRequireUtf8()
          case 26 =>
            __scopedRouteConfigs += _root_.scalapb.LiteParser.readMessage[com.google.protobuf.any.Any](_input__)
          case 34 =>
            __lastUpdated = Option(__lastUpdated.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.timestamp.Timestamp](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs(
          name = __name,
          versionInfo = __versionInfo,
          scopedRouteConfigs = __scopedRouteConfigs.result(),
          lastUpdated = __lastUpdated,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs] = _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.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs(
          name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          versionInfo = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          scopedRouteConfigs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[com.google.protobuf.any.Any]]).getOrElse(_root_.scala.Seq.empty),
          lastUpdated = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.timestamp.Timestamp]])
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.javaDescriptor.getNestedTypes().get(1)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.scalaDescriptor.nestedMessages(1)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
      var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
      (__number: @_root_.scala.unchecked) match {
        case 3 => __out = com.google.protobuf.any.Any
        case 4 => __out = com.google.protobuf.timestamp.Timestamp
      }
      __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.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs(
      name = "",
      versionInfo = "",
      scopedRouteConfigs = _root_.scala.Seq.empty,
      lastUpdated = _root_.scala.None
    )
    implicit class DynamicScopedRouteConfigsLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs](_l) {
      def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_))
      def versionInfo: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.versionInfo)((c_, f_) => c_.copy(versionInfo = f_))
      def scopedRouteConfigs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[com.google.protobuf.any.Any]] = field(_.scopedRouteConfigs)((c_, f_) => c_.copy(scopedRouteConfigs = f_))
      def lastUpdated: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.timestamp.Timestamp] = field(_.getLastUpdated)((c_, f_) => c_.copy(lastUpdated = Option(f_)))
      def optionalLastUpdated: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.timestamp.Timestamp]] = field(_.lastUpdated)((c_, f_) => c_.copy(lastUpdated = f_))
    }
    final val NAME_FIELD_NUMBER = 1
    final val VERSION_INFO_FIELD_NUMBER = 2
    final val SCOPED_ROUTE_CONFIGS_FIELD_NUMBER = 3
    final val LAST_UPDATED_FIELD_NUMBER = 4
    def of(
      name: _root_.scala.Predef.String,
      versionInfo: _root_.scala.Predef.String,
      scopedRouteConfigs: _root_.scala.Seq[com.google.protobuf.any.Any],
      lastUpdated: _root_.scala.Option[com.google.protobuf.timestamp.Timestamp]
    ): _root_.io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs = _root_.io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs(
      name,
      versionInfo,
      scopedRouteConfigs,
      lastUpdated
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs])
  }
  
  implicit class ScopedRoutesConfigDumpLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump](_l) {
    def inlineScopedRouteConfigs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs]] = field(_.inlineScopedRouteConfigs)((c_, f_) => c_.copy(inlineScopedRouteConfigs = f_))
    def dynamicScopedRouteConfigs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs]] = field(_.dynamicScopedRouteConfigs)((c_, f_) => c_.copy(dynamicScopedRouteConfigs = f_))
  }
  final val INLINE_SCOPED_ROUTE_CONFIGS_FIELD_NUMBER = 1
  final val DYNAMIC_SCOPED_ROUTE_CONFIGS_FIELD_NUMBER = 2
  def of(
    inlineScopedRouteConfigs: _root_.scala.Seq[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs],
    dynamicScopedRouteConfigs: _root_.scala.Seq[io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs]
  ): _root_.io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump = _root_.io.envoyproxy.envoy.admin.v2alpha.ScopedRoutesConfigDump(
    inlineScopedRouteConfigs,
    dynamicScopedRouteConfigs
  )
  // @@protoc_insertion_point(GeneratedMessageCompanion[envoy.admin.v2alpha.ScopedRoutesConfigDump])
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy