
scalapb.com.eventstore.dbclient.proto.shared.UUID.scala Maven / Gradle / Ivy
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package com.eventstore.dbclient.proto.shared
@SerialVersionUID(0L)
final case class UUID(
value: com.eventstore.dbclient.proto.shared.UUID.Value = com.eventstore.dbclient.proto.shared.UUID.Value.Empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[UUID] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (value.structured.isDefined) {
val __value = value.structured.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (value.string.isDefined) {
val __value = value.string.get
__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 = {
value.structured.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
value.string.foreach { __v =>
val __m = __v
_output__.writeString(2, __m)
};
unknownFields.writeTo(_output__)
}
def getStructured: com.eventstore.dbclient.proto.shared.UUID.Structured = value.structured.getOrElse(com.eventstore.dbclient.proto.shared.UUID.Structured.defaultInstance)
def withStructured(__v: com.eventstore.dbclient.proto.shared.UUID.Structured): UUID = copy(value = com.eventstore.dbclient.proto.shared.UUID.Value.Structured(__v))
def getString: _root_.scala.Predef.String = value.string.getOrElse("")
def withString(__v: _root_.scala.Predef.String): UUID = copy(value = com.eventstore.dbclient.proto.shared.UUID.Value.String(__v))
def clearValue: UUID = copy(value = com.eventstore.dbclient.proto.shared.UUID.Value.Empty)
def withValue(__v: com.eventstore.dbclient.proto.shared.UUID.Value): UUID = 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 => value.structured.orNull
case 2 => value.string.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 => value.structured.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => value.string.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.eventstore.dbclient.proto.shared.UUID.type = com.eventstore.dbclient.proto.shared.UUID
// @@protoc_insertion_point(GeneratedMessage[event_store.client.UUID])
}
object UUID extends scalapb.GeneratedMessageCompanion[com.eventstore.dbclient.proto.shared.UUID] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.eventstore.dbclient.proto.shared.UUID] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.eventstore.dbclient.proto.shared.UUID = {
var __value: com.eventstore.dbclient.proto.shared.UUID.Value = com.eventstore.dbclient.proto.shared.UUID.Value.Empty
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__value = com.eventstore.dbclient.proto.shared.UUID.Value.Structured(__value.structured.fold(_root_.scalapb.LiteParser.readMessage[com.eventstore.dbclient.proto.shared.UUID.Structured](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__value = com.eventstore.dbclient.proto.shared.UUID.Value.String(_input__.readStringRequireUtf8())
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.eventstore.dbclient.proto.shared.UUID(
value = __value,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.eventstore.dbclient.proto.shared.UUID] = _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.")
com.eventstore.dbclient.proto.shared.UUID(
value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.eventstore.dbclient.proto.shared.UUID.Structured]]).map(com.eventstore.dbclient.proto.shared.UUID.Value.Structured(_))
.orElse[com.eventstore.dbclient.proto.shared.UUID.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(com.eventstore.dbclient.proto.shared.UUID.Value.String(_)))
.getOrElse(com.eventstore.dbclient.proto.shared.UUID.Value.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = SharedProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = SharedProto.scalaDescriptor.messages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = com.eventstore.dbclient.proto.shared.UUID.Structured
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.com.eventstore.dbclient.proto.shared.UUID.Structured
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = com.eventstore.dbclient.proto.shared.UUID(
value = com.eventstore.dbclient.proto.shared.UUID.Value.Empty
)
sealed trait Value extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isStructured: _root_.scala.Boolean = false
def isString: _root_.scala.Boolean = false
def structured: _root_.scala.Option[com.eventstore.dbclient.proto.shared.UUID.Structured] = _root_.scala.None
def string: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
}
object Value {
@SerialVersionUID(0L)
case object Empty extends com.eventstore.dbclient.proto.shared.UUID.Value {
type ValueType = _root_.scala.Nothing
override def isEmpty: _root_.scala.Boolean = true
override def isDefined: _root_.scala.Boolean = false
override def number: _root_.scala.Int = 0
override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value")
}
@SerialVersionUID(0L)
final case class Structured(value: com.eventstore.dbclient.proto.shared.UUID.Structured) extends com.eventstore.dbclient.proto.shared.UUID.Value {
type ValueType = com.eventstore.dbclient.proto.shared.UUID.Structured
override def isStructured: _root_.scala.Boolean = true
override def structured: _root_.scala.Option[com.eventstore.dbclient.proto.shared.UUID.Structured] = Some(value)
override def number: _root_.scala.Int = 1
}
@SerialVersionUID(0L)
final case class String(value: _root_.scala.Predef.String) extends com.eventstore.dbclient.proto.shared.UUID.Value {
type ValueType = _root_.scala.Predef.String
override def isString: _root_.scala.Boolean = true
override def string: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 2
}
}
@SerialVersionUID(0L)
final case class Structured(
mostSignificantBits: _root_.scala.Long = 0L,
leastSignificantBits: _root_.scala.Long = 0L,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Structured] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = mostSignificantBits
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(1, __value)
}
};
{
val __value = leastSignificantBits
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(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 = mostSignificantBits
if (__v != 0L) {
_output__.writeInt64(1, __v)
}
};
{
val __v = leastSignificantBits
if (__v != 0L) {
_output__.writeInt64(2, __v)
}
};
unknownFields.writeTo(_output__)
}
def withMostSignificantBits(__v: _root_.scala.Long): Structured = copy(mostSignificantBits = __v)
def withLeastSignificantBits(__v: _root_.scala.Long): Structured = copy(leastSignificantBits = __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 = mostSignificantBits
if (__t != 0L) __t else null
}
case 2 => {
val __t = leastSignificantBits
if (__t != 0L) __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.PLong(mostSignificantBits)
case 2 => _root_.scalapb.descriptors.PLong(leastSignificantBits)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.eventstore.dbclient.proto.shared.UUID.Structured.type = com.eventstore.dbclient.proto.shared.UUID.Structured
// @@protoc_insertion_point(GeneratedMessage[event_store.client.UUID.Structured])
}
object Structured extends scalapb.GeneratedMessageCompanion[com.eventstore.dbclient.proto.shared.UUID.Structured] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.eventstore.dbclient.proto.shared.UUID.Structured] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.eventstore.dbclient.proto.shared.UUID.Structured = {
var __mostSignificantBits: _root_.scala.Long = 0L
var __leastSignificantBits: _root_.scala.Long = 0L
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 8 =>
__mostSignificantBits = _input__.readInt64()
case 16 =>
__leastSignificantBits = _input__.readInt64()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.eventstore.dbclient.proto.shared.UUID.Structured(
mostSignificantBits = __mostSignificantBits,
leastSignificantBits = __leastSignificantBits,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.eventstore.dbclient.proto.shared.UUID.Structured] = _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.")
com.eventstore.dbclient.proto.shared.UUID.Structured(
mostSignificantBits = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
leastSignificantBits = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.eventstore.dbclient.proto.shared.UUID.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.eventstore.dbclient.proto.shared.UUID.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 = com.eventstore.dbclient.proto.shared.UUID.Structured(
mostSignificantBits = 0L,
leastSignificantBits = 0L
)
implicit class StructuredLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.eventstore.dbclient.proto.shared.UUID.Structured]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.eventstore.dbclient.proto.shared.UUID.Structured](_l) {
def mostSignificantBits: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.mostSignificantBits)((c_, f_) => c_.copy(mostSignificantBits = f_))
def leastSignificantBits: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.leastSignificantBits)((c_, f_) => c_.copy(leastSignificantBits = f_))
}
final val MOST_SIGNIFICANT_BITS_FIELD_NUMBER = 1
final val LEAST_SIGNIFICANT_BITS_FIELD_NUMBER = 2
def of(
mostSignificantBits: _root_.scala.Long,
leastSignificantBits: _root_.scala.Long
): _root_.com.eventstore.dbclient.proto.shared.UUID.Structured = _root_.com.eventstore.dbclient.proto.shared.UUID.Structured(
mostSignificantBits,
leastSignificantBits
)
// @@protoc_insertion_point(GeneratedMessageCompanion[event_store.client.UUID.Structured])
}
implicit class UUIDLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.eventstore.dbclient.proto.shared.UUID]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.eventstore.dbclient.proto.shared.UUID](_l) {
def structured: _root_.scalapb.lenses.Lens[UpperPB, com.eventstore.dbclient.proto.shared.UUID.Structured] = field(_.getStructured)((c_, f_) => c_.copy(value = com.eventstore.dbclient.proto.shared.UUID.Value.Structured(f_)))
def string: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getString)((c_, f_) => c_.copy(value = com.eventstore.dbclient.proto.shared.UUID.Value.String(f_)))
def value: _root_.scalapb.lenses.Lens[UpperPB, com.eventstore.dbclient.proto.shared.UUID.Value] = field(_.value)((c_, f_) => c_.copy(value = f_))
}
final val STRUCTURED_FIELD_NUMBER = 1
final val STRING_FIELD_NUMBER = 2
def of(
value: com.eventstore.dbclient.proto.shared.UUID.Value
): _root_.com.eventstore.dbclient.proto.shared.UUID = _root_.com.eventstore.dbclient.proto.shared.UUID(
value
)
// @@protoc_insertion_point(GeneratedMessageCompanion[event_store.client.UUID])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy