![JAR search and dependency download from the Maven repository](/logo.png)
io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.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.service.discovery.v3
/** DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC
* endpoint for Delta xDS.
*
* With Delta xDS, the DeltaDiscoveryResponses do not need to include a full
* snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a
* diff to the state of a xDS client.
* In Delta XDS there are per-resource versions, which allow tracking state at
* the resource granularity.
* An xDS Delta session is always in the context of a gRPC bidirectional
* stream. This allows the xDS server to keep track of the state of xDS clients
* connected to it.
*
* In Delta xDS the nonce field is required and used to pair
* DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK.
* Optionally, a response message level system_version_info is present for
* debugging purposes only.
*
* DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest
* can be either or both of: [1] informing the server of what resources the
* client has gained/lost interest in (using resource_names_subscribe and
* resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from
* the server (using response_nonce, with presence of error_detail making it a NACK).
* Additionally, the first message (for a given type_url) of a reconnected gRPC stream
* has a third role: informing the server of the resources (and their versions)
* that the client already possesses, using the initial_resource_versions field.
*
* As with state-of-the-world, when multiple resource types are multiplexed (ADS),
* all requests/acknowledgments/updates are logically walled off by type_url:
* a Cluster ACK exists in a completely separate world from a prior Route NACK.
* In particular, initial_resource_versions being sent at the "start" of every
* gRPC stream actually entails a message for each type_url, each with its own
* initial_resource_versions.
* [#next-free-field: 10]
*
* @param node
* The node making the request.
* @param typeUrl
* Type of the resource that is being requested, e.g.
* "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This does not need to be set if
* resources are only referenced via *xds_resource_subscribe* and
* *xds_resources_unsubscribe*.
* @param resourceNamesSubscribe
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
*
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
*
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
*
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
*
* A list of Resource names to add to the list of tracked resources.
* @param resourceNamesUnsubscribe
* A list of Resource names to remove from the list of tracked resources.
* @param resourceLocatorsSubscribe
* [#not-implemented-hide:]
* Alternative to *resource_names_subscribe* field that allows specifying dynamic parameters
* along with each resource name.
* Note that it is legal for a request to have some resources listed
* in *resource_names_subscribe* and others in *resource_locators_subscribe*.
* @param resourceLocatorsUnsubscribe
* [#not-implemented-hide:]
* Alternative to *resource_names_unsubscribe* field that allows specifying dynamic parameters
* along with each resource name.
* Note that it is legal for a request to have some resources listed
* in *resource_names_unsubscribe* and others in *resource_locators_unsubscribe*.
* @param initialResourceVersions
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
* @param responseNonce
* When the DeltaDiscoveryRequest is a ACK or NACK message in response
* to a previous DeltaDiscoveryResponse, the response_nonce must be the
* nonce in the DeltaDiscoveryResponse.
* Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
* @param errorDetail
* This is populated when the previous :ref:`DiscoveryResponse <envoy_v3_api_msg_service.discovery.v3.DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*/
@SerialVersionUID(0L)
final case class DeltaDiscoveryRequest(
node: _root_.scala.Option[io.envoyproxy.envoy.config.core.v3.Node] = _root_.scala.None,
typeUrl: _root_.scala.Predef.String = "",
resourceNamesSubscribe: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty,
resourceNamesUnsubscribe: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty,
resourceLocatorsSubscribe: _root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator] = _root_.scala.Seq.empty,
resourceLocatorsUnsubscribe: _root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator] = _root_.scala.Seq.empty,
initialResourceVersions: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty,
responseNonce: _root_.scala.Predef.String = "",
errorDetail: _root_.scala.Option[com.google.rpc.Status] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[DeltaDiscoveryRequest] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (node.isDefined) {
val __value = node.get
__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(2, __value)
}
};
resourceNamesSubscribe.foreach { __item =>
val __value = __item
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value)
}
resourceNamesUnsubscribe.foreach { __item =>
val __value = __item
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value)
}
resourceLocatorsSubscribe.foreach { __item =>
val __value = __item
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
resourceLocatorsUnsubscribe.foreach { __item =>
val __value = __item
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
initialResourceVersions.foreach { __item =>
val __value = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest._typemapper_initialResourceVersions.toBase(__item)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
{
val __value = responseNonce
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value)
}
};
if (errorDetail.isDefined) {
val __value = errorDetail.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 = {
node.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = typeUrl
if (!__v.isEmpty) {
_output__.writeString(2, __v)
}
};
resourceNamesSubscribe.foreach { __v =>
val __m = __v
_output__.writeString(3, __m)
};
resourceNamesUnsubscribe.foreach { __v =>
val __m = __v
_output__.writeString(4, __m)
};
initialResourceVersions.foreach { __v =>
val __m = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest._typemapper_initialResourceVersions.toBase(__v)
_output__.writeTag(5, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = responseNonce
if (!__v.isEmpty) {
_output__.writeString(6, __v)
}
};
errorDetail.foreach { __v =>
val __m = __v
_output__.writeTag(7, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
resourceLocatorsSubscribe.foreach { __v =>
val __m = __v
_output__.writeTag(8, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
resourceLocatorsUnsubscribe.foreach { __v =>
val __m = __v
_output__.writeTag(9, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getNode: io.envoyproxy.envoy.config.core.v3.Node = node.getOrElse(io.envoyproxy.envoy.config.core.v3.Node.defaultInstance)
def clearNode: DeltaDiscoveryRequest = copy(node = _root_.scala.None)
def withNode(__v: io.envoyproxy.envoy.config.core.v3.Node): DeltaDiscoveryRequest = copy(node = Option(__v))
def withTypeUrl(__v: _root_.scala.Predef.String): DeltaDiscoveryRequest = copy(typeUrl = __v)
def clearResourceNamesSubscribe = copy(resourceNamesSubscribe = _root_.scala.Seq.empty)
def addResourceNamesSubscribe(__vs: _root_.scala.Predef.String *): DeltaDiscoveryRequest = addAllResourceNamesSubscribe(__vs)
def addAllResourceNamesSubscribe(__vs: Iterable[_root_.scala.Predef.String]): DeltaDiscoveryRequest = copy(resourceNamesSubscribe = resourceNamesSubscribe ++ __vs)
def withResourceNamesSubscribe(__v: _root_.scala.Seq[_root_.scala.Predef.String]): DeltaDiscoveryRequest = copy(resourceNamesSubscribe = __v)
def clearResourceNamesUnsubscribe = copy(resourceNamesUnsubscribe = _root_.scala.Seq.empty)
def addResourceNamesUnsubscribe(__vs: _root_.scala.Predef.String *): DeltaDiscoveryRequest = addAllResourceNamesUnsubscribe(__vs)
def addAllResourceNamesUnsubscribe(__vs: Iterable[_root_.scala.Predef.String]): DeltaDiscoveryRequest = copy(resourceNamesUnsubscribe = resourceNamesUnsubscribe ++ __vs)
def withResourceNamesUnsubscribe(__v: _root_.scala.Seq[_root_.scala.Predef.String]): DeltaDiscoveryRequest = copy(resourceNamesUnsubscribe = __v)
def clearResourceLocatorsSubscribe = copy(resourceLocatorsSubscribe = _root_.scala.Seq.empty)
def addResourceLocatorsSubscribe(__vs: io.envoyproxy.envoy.service.discovery.v3.ResourceLocator *): DeltaDiscoveryRequest = addAllResourceLocatorsSubscribe(__vs)
def addAllResourceLocatorsSubscribe(__vs: Iterable[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator]): DeltaDiscoveryRequest = copy(resourceLocatorsSubscribe = resourceLocatorsSubscribe ++ __vs)
def withResourceLocatorsSubscribe(__v: _root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator]): DeltaDiscoveryRequest = copy(resourceLocatorsSubscribe = __v)
def clearResourceLocatorsUnsubscribe = copy(resourceLocatorsUnsubscribe = _root_.scala.Seq.empty)
def addResourceLocatorsUnsubscribe(__vs: io.envoyproxy.envoy.service.discovery.v3.ResourceLocator *): DeltaDiscoveryRequest = addAllResourceLocatorsUnsubscribe(__vs)
def addAllResourceLocatorsUnsubscribe(__vs: Iterable[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator]): DeltaDiscoveryRequest = copy(resourceLocatorsUnsubscribe = resourceLocatorsUnsubscribe ++ __vs)
def withResourceLocatorsUnsubscribe(__v: _root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator]): DeltaDiscoveryRequest = copy(resourceLocatorsUnsubscribe = __v)
def clearInitialResourceVersions = copy(initialResourceVersions = _root_.scala.collection.immutable.Map.empty)
def addInitialResourceVersions(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): DeltaDiscoveryRequest = addAllInitialResourceVersions(__vs)
def addAllInitialResourceVersions(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): DeltaDiscoveryRequest = copy(initialResourceVersions = initialResourceVersions ++ __vs)
def withInitialResourceVersions(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): DeltaDiscoveryRequest = copy(initialResourceVersions = __v)
def withResponseNonce(__v: _root_.scala.Predef.String): DeltaDiscoveryRequest = copy(responseNonce = __v)
def getErrorDetail: com.google.rpc.Status = errorDetail.getOrElse(com.google.rpc.Status.defaultInstance)
def clearErrorDetail: DeltaDiscoveryRequest = copy(errorDetail = _root_.scala.None)
def withErrorDetail(__v: com.google.rpc.Status): DeltaDiscoveryRequest = copy(errorDetail = 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 => node.orNull
case 2 => {
val __t = typeUrl
if (__t != "") __t else null
}
case 3 => resourceNamesSubscribe
case 4 => resourceNamesUnsubscribe
case 8 => resourceLocatorsSubscribe
case 9 => resourceLocatorsUnsubscribe
case 5 => initialResourceVersions.iterator.map(io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest._typemapper_initialResourceVersions.toBase(_)).toSeq
case 6 => {
val __t = responseNonce
if (__t != "") __t else null
}
case 7 => errorDetail.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 => node.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => _root_.scalapb.descriptors.PString(typeUrl)
case 3 => _root_.scalapb.descriptors.PRepeated(resourceNamesSubscribe.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector)
case 4 => _root_.scalapb.descriptors.PRepeated(resourceNamesUnsubscribe.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector)
case 8 => _root_.scalapb.descriptors.PRepeated(resourceLocatorsSubscribe.iterator.map(_.toPMessage).toVector)
case 9 => _root_.scalapb.descriptors.PRepeated(resourceLocatorsUnsubscribe.iterator.map(_.toPMessage).toVector)
case 5 => _root_.scalapb.descriptors.PRepeated(initialResourceVersions.iterator.map(io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest._typemapper_initialResourceVersions.toBase(_).toPMessage).toVector)
case 6 => _root_.scalapb.descriptors.PString(responseNonce)
case 7 => errorDetail.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.type = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest
// @@protoc_insertion_point(GeneratedMessage[envoy.service.discovery.v3.DeltaDiscoveryRequest])
}
object DeltaDiscoveryRequest extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest = {
var __node: _root_.scala.Option[io.envoyproxy.envoy.config.core.v3.Node] = _root_.scala.None
var __typeUrl: _root_.scala.Predef.String = ""
val __resourceNamesSubscribe: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String]
val __resourceNamesUnsubscribe: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String]
val __resourceLocatorsSubscribe: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator]
val __resourceLocatorsUnsubscribe: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator]
val __initialResourceVersions: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String]
var __responseNonce: _root_.scala.Predef.String = ""
var __errorDetail: _root_.scala.Option[com.google.rpc.Status] = _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 =>
__node = Option(__node.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.config.core.v3.Node](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__typeUrl = _input__.readStringRequireUtf8()
case 26 =>
__resourceNamesSubscribe += _input__.readStringRequireUtf8()
case 34 =>
__resourceNamesUnsubscribe += _input__.readStringRequireUtf8()
case 66 =>
__resourceLocatorsSubscribe += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator](_input__)
case 74 =>
__resourceLocatorsUnsubscribe += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator](_input__)
case 42 =>
__initialResourceVersions += io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest._typemapper_initialResourceVersions.toCustom(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry](_input__))
case 50 =>
__responseNonce = _input__.readStringRequireUtf8()
case 58 =>
__errorDetail = Option(__errorDetail.fold(_root_.scalapb.LiteParser.readMessage[com.google.rpc.Status](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest(
node = __node,
typeUrl = __typeUrl,
resourceNamesSubscribe = __resourceNamesSubscribe.result(),
resourceNamesUnsubscribe = __resourceNamesUnsubscribe.result(),
resourceLocatorsSubscribe = __resourceLocatorsSubscribe.result(),
resourceLocatorsUnsubscribe = __resourceLocatorsUnsubscribe.result(),
initialResourceVersions = __initialResourceVersions.result(),
responseNonce = __responseNonce,
errorDetail = __errorDetail,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest] = _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.service.discovery.v3.DeltaDiscoveryRequest(
node = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.config.core.v3.Node]]),
typeUrl = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
resourceNamesSubscribe = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty),
resourceNamesUnsubscribe = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty),
resourceLocatorsSubscribe = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator]]).getOrElse(_root_.scala.Seq.empty),
resourceLocatorsUnsubscribe = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator]]).getOrElse(_root_.scala.Seq.empty),
initialResourceVersions = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest._typemapper_initialResourceVersions.toCustom(_)).toMap,
responseNonce = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
errorDetail = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[com.google.rpc.Status]])
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DiscoveryProto.javaDescriptor.getMessageTypes().get(4)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DiscoveryProto.scalaDescriptor.messages(4)
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.core.v3.Node
case 8 => __out = io.envoyproxy.envoy.service.discovery.v3.ResourceLocator
case 9 => __out = io.envoyproxy.envoy.service.discovery.v3.ResourceLocator
case 5 => __out = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry
case 7 => __out = com.google.rpc.Status
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest(
node = _root_.scala.None,
typeUrl = "",
resourceNamesSubscribe = _root_.scala.Seq.empty,
resourceNamesUnsubscribe = _root_.scala.Seq.empty,
resourceLocatorsSubscribe = _root_.scala.Seq.empty,
resourceLocatorsUnsubscribe = _root_.scala.Seq.empty,
initialResourceVersions = _root_.scala.collection.immutable.Map.empty,
responseNonce = "",
errorDetail = _root_.scala.None
)
@SerialVersionUID(0L)
final case class InitialResourceVersionsEntry(
key: _root_.scala.Predef.String = "",
value: _root_.scala.Predef.String = "",
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[InitialResourceVersionsEntry] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = key
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
{
val __value = value
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
}
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = key
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
{
val __v = value
if (!__v.isEmpty) {
_output__.writeString(2, __v)
}
};
unknownFields.writeTo(_output__)
}
def withKey(__v: _root_.scala.Predef.String): InitialResourceVersionsEntry = copy(key = __v)
def withValue(__v: _root_.scala.Predef.String): InitialResourceVersionsEntry = copy(value = __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 = key
if (__t != "") __t else null
}
case 2 => {
val __t = value
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(key)
case 2 => _root_.scalapb.descriptors.PString(value)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry.type = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry
// @@protoc_insertion_point(GeneratedMessage[envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry])
}
object InitialResourceVersionsEntry extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry = {
var __key: _root_.scala.Predef.String = ""
var __value: _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 =>
__key = _input__.readStringRequireUtf8()
case 18 =>
__value = _input__.readStringRequireUtf8()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry(
key = __key,
value = __value,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry] = _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.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry(
key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.scalaDescriptor.nestedMessages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry(
key = "",
value = ""
)
implicit class InitialResourceVersionsEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry](_l) {
def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_))
def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_))
}
final val KEY_FIELD_NUMBER = 1
final val VALUE_FIELD_NUMBER = 2
@transient
implicit val keyValueMapper: _root_.scalapb.TypeMapper[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] =
_root_.scalapb.TypeMapper[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry(__p._1, __p._2))
def of(
key: _root_.scala.Predef.String,
value: _root_.scala.Predef.String
): _root_.io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry = _root_.io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry(
key,
value
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry])
}
implicit class DeltaDiscoveryRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest](_l) {
def node: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.config.core.v3.Node] = field(_.getNode)((c_, f_) => c_.copy(node = Option(f_)))
def optionalNode: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.config.core.v3.Node]] = field(_.node)((c_, f_) => c_.copy(node = f_))
def typeUrl: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.typeUrl)((c_, f_) => c_.copy(typeUrl = f_))
def resourceNamesSubscribe: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.resourceNamesSubscribe)((c_, f_) => c_.copy(resourceNamesSubscribe = f_))
def resourceNamesUnsubscribe: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.resourceNamesUnsubscribe)((c_, f_) => c_.copy(resourceNamesUnsubscribe = f_))
def resourceLocatorsSubscribe: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator]] = field(_.resourceLocatorsSubscribe)((c_, f_) => c_.copy(resourceLocatorsSubscribe = f_))
def resourceLocatorsUnsubscribe: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator]] = field(_.resourceLocatorsUnsubscribe)((c_, f_) => c_.copy(resourceLocatorsUnsubscribe = f_))
def initialResourceVersions: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.initialResourceVersions)((c_, f_) => c_.copy(initialResourceVersions = f_))
def responseNonce: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.responseNonce)((c_, f_) => c_.copy(responseNonce = f_))
def errorDetail: _root_.scalapb.lenses.Lens[UpperPB, com.google.rpc.Status] = field(_.getErrorDetail)((c_, f_) => c_.copy(errorDetail = Option(f_)))
def optionalErrorDetail: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.rpc.Status]] = field(_.errorDetail)((c_, f_) => c_.copy(errorDetail = f_))
}
final val NODE_FIELD_NUMBER = 1
final val TYPE_URL_FIELD_NUMBER = 2
final val RESOURCE_NAMES_SUBSCRIBE_FIELD_NUMBER = 3
final val RESOURCE_NAMES_UNSUBSCRIBE_FIELD_NUMBER = 4
final val RESOURCE_LOCATORS_SUBSCRIBE_FIELD_NUMBER = 8
final val RESOURCE_LOCATORS_UNSUBSCRIBE_FIELD_NUMBER = 9
final val INITIAL_RESOURCE_VERSIONS_FIELD_NUMBER = 5
final val RESPONSE_NONCE_FIELD_NUMBER = 6
final val ERROR_DETAIL_FIELD_NUMBER = 7
@transient
private[v3] val _typemapper_initialResourceVersions: _root_.scalapb.TypeMapper[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]]
def of(
node: _root_.scala.Option[io.envoyproxy.envoy.config.core.v3.Node],
typeUrl: _root_.scala.Predef.String,
resourceNamesSubscribe: _root_.scala.Seq[_root_.scala.Predef.String],
resourceNamesUnsubscribe: _root_.scala.Seq[_root_.scala.Predef.String],
resourceLocatorsSubscribe: _root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator],
resourceLocatorsUnsubscribe: _root_.scala.Seq[io.envoyproxy.envoy.service.discovery.v3.ResourceLocator],
initialResourceVersions: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String],
responseNonce: _root_.scala.Predef.String,
errorDetail: _root_.scala.Option[com.google.rpc.Status]
): _root_.io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest = _root_.io.envoyproxy.envoy.service.discovery.v3.DeltaDiscoveryRequest(
node,
typeUrl,
resourceNamesSubscribe,
resourceNamesUnsubscribe,
resourceLocatorsSubscribe,
resourceLocatorsUnsubscribe,
initialResourceVersions,
responseNonce,
errorDetail
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.service.discovery.v3.DeltaDiscoveryRequest])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy