io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse.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
/** [#next-free-field: 7]
*
* @param systemVersionInfo
* The version of the response data (used for debugging).
* @param resources
* The response resources. These are typed resources, whose types must match
* the type_url field.
* @param typeUrl
* Type URL for resources. Identifies the xDS API when muxing over ADS.
* Must be consistent with the type_url in the Any within 'resources' if 'resources' is non-empty.
* @param removedResources
* Resources names of resources that have be deleted and to be removed from the xDS Client.
* Removed resources for missing resources can be ignored.
* @param nonce
* The nonce provides a way for DeltaDiscoveryRequests to uniquely
* reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required.
*/
@SerialVersionUID(0L)
final case class DeltaDiscoveryResponse(
systemVersionInfo: _root_.scala.Predef.String = "",
resources: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.Resource] = _root_.scala.Seq.empty,
typeUrl: _root_.scala.Predef.String = "",
removedResources: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty,
nonce: _root_.scala.Predef.String = "",
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[DeltaDiscoveryResponse] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = systemVersionInfo
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
resources.foreach { __item =>
val __value = __item
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
{
val __value = typeUrl
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value)
}
};
removedResources.foreach { __item =>
val __value = __item
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value)
}
{
val __value = nonce
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value)
}
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = systemVersionInfo
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
resources.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = typeUrl
if (!__v.isEmpty) {
_output__.writeString(4, __v)
}
};
{
val __v = nonce
if (!__v.isEmpty) {
_output__.writeString(5, __v)
}
};
removedResources.foreach { __v =>
val __m = __v
_output__.writeString(6, __m)
};
unknownFields.writeTo(_output__)
}
def withSystemVersionInfo(__v: _root_.scala.Predef.String): DeltaDiscoveryResponse = copy(systemVersionInfo = __v)
def clearResources = copy(resources = _root_.scala.Seq.empty)
def addResources(__vs: io.envoyproxy.envoy.api.v2.Resource *): DeltaDiscoveryResponse = addAllResources(__vs)
def addAllResources(__vs: Iterable[io.envoyproxy.envoy.api.v2.Resource]): DeltaDiscoveryResponse = copy(resources = resources ++ __vs)
def withResources(__v: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.Resource]): DeltaDiscoveryResponse = copy(resources = __v)
def withTypeUrl(__v: _root_.scala.Predef.String): DeltaDiscoveryResponse = copy(typeUrl = __v)
def clearRemovedResources = copy(removedResources = _root_.scala.Seq.empty)
def addRemovedResources(__vs: _root_.scala.Predef.String *): DeltaDiscoveryResponse = addAllRemovedResources(__vs)
def addAllRemovedResources(__vs: Iterable[_root_.scala.Predef.String]): DeltaDiscoveryResponse = copy(removedResources = removedResources ++ __vs)
def withRemovedResources(__v: _root_.scala.Seq[_root_.scala.Predef.String]): DeltaDiscoveryResponse = copy(removedResources = __v)
def withNonce(__v: _root_.scala.Predef.String): DeltaDiscoveryResponse = copy(nonce = __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 = systemVersionInfo
if (__t != "") __t else null
}
case 2 => resources
case 4 => {
val __t = typeUrl
if (__t != "") __t else null
}
case 6 => removedResources
case 5 => {
val __t = nonce
if (__t != "") __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PString(systemVersionInfo)
case 2 => _root_.scalapb.descriptors.PRepeated(resources.iterator.map(_.toPMessage).toVector)
case 4 => _root_.scalapb.descriptors.PString(typeUrl)
case 6 => _root_.scalapb.descriptors.PRepeated(removedResources.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector)
case 5 => _root_.scalapb.descriptors.PString(nonce)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse.type = io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.DeltaDiscoveryResponse])
}
object DeltaDiscoveryResponse extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse = {
var __systemVersionInfo: _root_.scala.Predef.String = ""
val __resources: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.Resource] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.Resource]
var __typeUrl: _root_.scala.Predef.String = ""
val __removedResources: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String]
var __nonce: _root_.scala.Predef.String = ""
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__systemVersionInfo = _input__.readStringRequireUtf8()
case 18 =>
__resources += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.Resource](_input__)
case 34 =>
__typeUrl = _input__.readStringRequireUtf8()
case 50 =>
__removedResources += _input__.readStringRequireUtf8()
case 42 =>
__nonce = _input__.readStringRequireUtf8()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse(
systemVersionInfo = __systemVersionInfo,
resources = __resources.result(),
typeUrl = __typeUrl,
removedResources = __removedResources.result(),
nonce = __nonce,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse] = _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.DeltaDiscoveryResponse(
systemVersionInfo = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
resources = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.api.v2.Resource]]).getOrElse(_root_.scala.Seq.empty),
typeUrl = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
removedResources = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty),
nonce = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DiscoveryProto.javaDescriptor.getMessageTypes().get(3)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DiscoveryProto.scalaDescriptor.messages(3)
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.api.v2.Resource
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse(
systemVersionInfo = "",
resources = _root_.scala.Seq.empty,
typeUrl = "",
removedResources = _root_.scala.Seq.empty,
nonce = ""
)
implicit class DeltaDiscoveryResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse](_l) {
def systemVersionInfo: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.systemVersionInfo)((c_, f_) => c_.copy(systemVersionInfo = f_))
def resources: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.api.v2.Resource]] = field(_.resources)((c_, f_) => c_.copy(resources = f_))
def typeUrl: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.typeUrl)((c_, f_) => c_.copy(typeUrl = f_))
def removedResources: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.removedResources)((c_, f_) => c_.copy(removedResources = f_))
def nonce: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.nonce)((c_, f_) => c_.copy(nonce = f_))
}
final val SYSTEM_VERSION_INFO_FIELD_NUMBER = 1
final val RESOURCES_FIELD_NUMBER = 2
final val TYPE_URL_FIELD_NUMBER = 4
final val REMOVED_RESOURCES_FIELD_NUMBER = 6
final val NONCE_FIELD_NUMBER = 5
def of(
systemVersionInfo: _root_.scala.Predef.String,
resources: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.Resource],
typeUrl: _root_.scala.Predef.String,
removedResources: _root_.scala.Seq[_root_.scala.Predef.String],
nonce: _root_.scala.Predef.String
): _root_.io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse = _root_.io.envoyproxy.envoy.api.v2.DeltaDiscoveryResponse(
systemVersionInfo,
resources,
typeUrl,
removedResources,
nonce
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.DeltaDiscoveryResponse])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy