io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig.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.tap.v2alpha
/** Tap output configuration.
*
* @param sinks
* Output sinks for tap data. Currently a single sink is allowed in the list. Once multiple
* sink types are supported this constraint will be relaxed.
* @param maxBufferedRxBytes
* For buffered tapping, the maximum amount of received body that will be buffered prior to
* truncation. If truncation occurs, the :ref:`truncated
* <envoy_api_field_data.tap.v2alpha.Body.truncated>` field will be set. If not specified, the
* default is 1KiB.
* @param maxBufferedTxBytes
* For buffered tapping, the maximum amount of transmitted body that will be buffered prior to
* truncation. If truncation occurs, the :ref:`truncated
* <envoy_api_field_data.tap.v2alpha.Body.truncated>` field will be set. If not specified, the
* default is 1KiB.
* @param streaming
* Indicates whether taps produce a single buffered message per tap, or multiple streamed
* messages per tap in the emitted :ref:`TraceWrapper
* <envoy_api_msg_data.tap.v2alpha.TraceWrapper>` messages. Note that streamed tapping does not
* mean that no buffering takes place. Buffering may be required if data is processed before a
* match can be determined. See the HTTP tap filter :ref:`streaming
* <config_http_filters_tap_streaming>` documentation for more information.
*/
@SerialVersionUID(0L)
final case class OutputConfig(
sinks: _root_.scala.Seq[io.envoyproxy.envoy.service.tap.v2alpha.OutputSink] = _root_.scala.Seq.empty,
maxBufferedRxBytes: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
maxBufferedTxBytes: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
streaming: _root_.scala.Boolean = false,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[OutputConfig] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
sinks.foreach { __item =>
val __value = __item
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
if (maxBufferedRxBytes.isDefined) {
val __value = io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedRxBytes.toBase(maxBufferedRxBytes.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (maxBufferedTxBytes.isDefined) {
val __value = io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedTxBytes.toBase(maxBufferedTxBytes.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = streaming
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __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 = {
sinks.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
maxBufferedRxBytes.foreach { __v =>
val __m = io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedRxBytes.toBase(__v)
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
maxBufferedTxBytes.foreach { __v =>
val __m = io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedTxBytes.toBase(__v)
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = streaming
if (__v != false) {
_output__.writeBool(4, __v)
}
};
unknownFields.writeTo(_output__)
}
def clearSinks = copy(sinks = _root_.scala.Seq.empty)
def addSinks(__vs: io.envoyproxy.envoy.service.tap.v2alpha.OutputSink *): OutputConfig = addAllSinks(__vs)
def addAllSinks(__vs: Iterable[io.envoyproxy.envoy.service.tap.v2alpha.OutputSink]): OutputConfig = copy(sinks = sinks ++ __vs)
def withSinks(__v: _root_.scala.Seq[io.envoyproxy.envoy.service.tap.v2alpha.OutputSink]): OutputConfig = copy(sinks = __v)
def getMaxBufferedRxBytes: _root_.scala.Int = maxBufferedRxBytes.getOrElse(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedRxBytes.toCustom(com.google.protobuf.wrappers.UInt32Value.defaultInstance))
def clearMaxBufferedRxBytes: OutputConfig = copy(maxBufferedRxBytes = _root_.scala.None)
def withMaxBufferedRxBytes(__v: _root_.scala.Int): OutputConfig = copy(maxBufferedRxBytes = Option(__v))
def getMaxBufferedTxBytes: _root_.scala.Int = maxBufferedTxBytes.getOrElse(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedTxBytes.toCustom(com.google.protobuf.wrappers.UInt32Value.defaultInstance))
def clearMaxBufferedTxBytes: OutputConfig = copy(maxBufferedTxBytes = _root_.scala.None)
def withMaxBufferedTxBytes(__v: _root_.scala.Int): OutputConfig = copy(maxBufferedTxBytes = Option(__v))
def withStreaming(__v: _root_.scala.Boolean): OutputConfig = copy(streaming = __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 => sinks
case 2 => maxBufferedRxBytes.map(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedRxBytes.toBase(_)).orNull
case 3 => maxBufferedTxBytes.map(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedTxBytes.toBase(_)).orNull
case 4 => {
val __t = streaming
if (__t != false) __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.PRepeated(sinks.iterator.map(_.toPMessage).toVector)
case 2 => maxBufferedRxBytes.map(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedRxBytes.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => maxBufferedTxBytes.map(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedTxBytes.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 4 => _root_.scalapb.descriptors.PBoolean(streaming)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig.type = io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig
// @@protoc_insertion_point(GeneratedMessage[envoy.service.tap.v2alpha.OutputConfig])
}
object OutputConfig extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig = {
val __sinks: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.service.tap.v2alpha.OutputSink] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.service.tap.v2alpha.OutputSink]
var __maxBufferedRxBytes: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
var __maxBufferedTxBytes: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
var __streaming: _root_.scala.Boolean = false
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__sinks += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.service.tap.v2alpha.OutputSink](_input__)
case 18 =>
__maxBufferedRxBytes = Option(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedRxBytes.toCustom(__maxBufferedRxBytes.map(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedRxBytes.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt32Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 26 =>
__maxBufferedTxBytes = Option(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedTxBytes.toCustom(__maxBufferedTxBytes.map(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedTxBytes.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt32Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 32 =>
__streaming = _input__.readBool()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig(
sinks = __sinks.result(),
maxBufferedRxBytes = __maxBufferedRxBytes,
maxBufferedTxBytes = __maxBufferedTxBytes,
streaming = __streaming,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig] = _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.tap.v2alpha.OutputConfig(
sinks = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.service.tap.v2alpha.OutputSink]]).getOrElse(_root_.scala.Seq.empty),
maxBufferedRxBytes = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt32Value]]).map(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedRxBytes.toCustom(_)),
maxBufferedTxBytes = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt32Value]]).map(io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig._typemapper_maxBufferedTxBytes.toCustom(_)),
streaming = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = CommonProto.javaDescriptor.getMessageTypes().get(3)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = CommonProto.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.service.tap.v2alpha.OutputSink
case 2 => __out = com.google.protobuf.wrappers.UInt32Value
case 3 => __out = com.google.protobuf.wrappers.UInt32Value
}
__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.service.tap.v2alpha.OutputConfig(
sinks = _root_.scala.Seq.empty,
maxBufferedRxBytes = _root_.scala.None,
maxBufferedTxBytes = _root_.scala.None,
streaming = false
)
implicit class OutputConfigLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig](_l) {
def sinks: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.service.tap.v2alpha.OutputSink]] = field(_.sinks)((c_, f_) => c_.copy(sinks = f_))
def maxBufferedRxBytes: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getMaxBufferedRxBytes)((c_, f_) => c_.copy(maxBufferedRxBytes = Option(f_)))
def optionalMaxBufferedRxBytes: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Int]] = field(_.maxBufferedRxBytes)((c_, f_) => c_.copy(maxBufferedRxBytes = f_))
def maxBufferedTxBytes: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getMaxBufferedTxBytes)((c_, f_) => c_.copy(maxBufferedTxBytes = Option(f_)))
def optionalMaxBufferedTxBytes: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Int]] = field(_.maxBufferedTxBytes)((c_, f_) => c_.copy(maxBufferedTxBytes = f_))
def streaming: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.streaming)((c_, f_) => c_.copy(streaming = f_))
}
final val SINKS_FIELD_NUMBER = 1
final val MAX_BUFFERED_RX_BYTES_FIELD_NUMBER = 2
final val MAX_BUFFERED_TX_BYTES_FIELD_NUMBER = 3
final val STREAMING_FIELD_NUMBER = 4
@transient
private[v2alpha] val _typemapper_maxBufferedRxBytes: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt32Value, _root_.scala.Int] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt32Value, _root_.scala.Int]]
@transient
private[v2alpha] val _typemapper_maxBufferedTxBytes: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt32Value, _root_.scala.Int] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt32Value, _root_.scala.Int]]
def of(
sinks: _root_.scala.Seq[io.envoyproxy.envoy.service.tap.v2alpha.OutputSink],
maxBufferedRxBytes: _root_.scala.Option[_root_.scala.Int],
maxBufferedTxBytes: _root_.scala.Option[_root_.scala.Int],
streaming: _root_.scala.Boolean
): _root_.io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig = _root_.io.envoyproxy.envoy.service.tap.v2alpha.OutputConfig(
sinks,
maxBufferedRxBytes,
maxBufferedTxBytes,
streaming
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.service.tap.v2alpha.OutputConfig])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy