io.opencensus.proto.trace.v1.Module.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.opencensus.proto.trace.v1
/** A description of a binary module.
*
* @param module
* TODO: document the meaning of this field.
* For example: main binary, kernel modules, and dynamic libraries
* such as libc.so, sharedlib.so.
* @param buildId
* A unique identifier for the module, usually a hash of its
* contents.
*/
@SerialVersionUID(0L)
final case class Module(
module: _root_.scala.Option[io.opencensus.proto.trace.v1.TruncatableString] = _root_.scala.None,
buildId: _root_.scala.Option[io.opencensus.proto.trace.v1.TruncatableString] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Module] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (module.isDefined) {
val __value = module.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (buildId.isDefined) {
val __value = buildId.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 = {
module.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
buildId.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getModule: io.opencensus.proto.trace.v1.TruncatableString = module.getOrElse(io.opencensus.proto.trace.v1.TruncatableString.defaultInstance)
def clearModule: Module = copy(module = _root_.scala.None)
def withModule(__v: io.opencensus.proto.trace.v1.TruncatableString): Module = copy(module = Option(__v))
def getBuildId: io.opencensus.proto.trace.v1.TruncatableString = buildId.getOrElse(io.opencensus.proto.trace.v1.TruncatableString.defaultInstance)
def clearBuildId: Module = copy(buildId = _root_.scala.None)
def withBuildId(__v: io.opencensus.proto.trace.v1.TruncatableString): Module = copy(buildId = 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 => module.orNull
case 2 => buildId.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 => module.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => buildId.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.opencensus.proto.trace.v1.Module.type = io.opencensus.proto.trace.v1.Module
// @@protoc_insertion_point(GeneratedMessage[opencensus.proto.trace.v1.Module])
}
object Module extends scalapb.GeneratedMessageCompanion[io.opencensus.proto.trace.v1.Module] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.opencensus.proto.trace.v1.Module] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.opencensus.proto.trace.v1.Module = {
var __module: _root_.scala.Option[io.opencensus.proto.trace.v1.TruncatableString] = _root_.scala.None
var __buildId: _root_.scala.Option[io.opencensus.proto.trace.v1.TruncatableString] = _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 =>
__module = Option(__module.fold(_root_.scalapb.LiteParser.readMessage[io.opencensus.proto.trace.v1.TruncatableString](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__buildId = Option(__buildId.fold(_root_.scalapb.LiteParser.readMessage[io.opencensus.proto.trace.v1.TruncatableString](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.opencensus.proto.trace.v1.Module(
module = __module,
buildId = __buildId,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.opencensus.proto.trace.v1.Module] = _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.opencensus.proto.trace.v1.Module(
module = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[io.opencensus.proto.trace.v1.TruncatableString]]),
buildId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[io.opencensus.proto.trace.v1.TruncatableString]])
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = TraceProto.javaDescriptor.getMessageTypes().get(4)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = TraceProto.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.opencensus.proto.trace.v1.TruncatableString
case 2 => __out = io.opencensus.proto.trace.v1.TruncatableString
}
__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.opencensus.proto.trace.v1.Module(
module = _root_.scala.None,
buildId = _root_.scala.None
)
implicit class ModuleLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.opencensus.proto.trace.v1.Module]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.opencensus.proto.trace.v1.Module](_l) {
def module: _root_.scalapb.lenses.Lens[UpperPB, io.opencensus.proto.trace.v1.TruncatableString] = field(_.getModule)((c_, f_) => c_.copy(module = Option(f_)))
def optionalModule: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.opencensus.proto.trace.v1.TruncatableString]] = field(_.module)((c_, f_) => c_.copy(module = f_))
def buildId: _root_.scalapb.lenses.Lens[UpperPB, io.opencensus.proto.trace.v1.TruncatableString] = field(_.getBuildId)((c_, f_) => c_.copy(buildId = Option(f_)))
def optionalBuildId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.opencensus.proto.trace.v1.TruncatableString]] = field(_.buildId)((c_, f_) => c_.copy(buildId = f_))
}
final val MODULE_FIELD_NUMBER = 1
final val BUILD_ID_FIELD_NUMBER = 2
def of(
module: _root_.scala.Option[io.opencensus.proto.trace.v1.TruncatableString],
buildId: _root_.scala.Option[io.opencensus.proto.trace.v1.TruncatableString]
): _root_.io.opencensus.proto.trace.v1.Module = _root_.io.opencensus.proto.trace.v1.Module(
module,
buildId
)
// @@protoc_insertion_point(GeneratedMessageCompanion[opencensus.proto.trace.v1.Module])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy