org.plasmalabs.sdk.models.box.Value.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package org.plasmalabs.sdk.models.box
/** The value contained in a box
*/
@SerialVersionUID(0L)
final case class Value(
value: org.plasmalabs.sdk.models.box.Value.Value = org.plasmalabs.sdk.models.box.Value.Value.Empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Value] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (value.lvl.isDefined) {
val __value = value.lvl.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (value.topl.isDefined) {
val __value = value.topl.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (value.asset.isDefined) {
val __value = value.asset.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (value.group.isDefined) {
val __value = value.group.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (value.series.isDefined) {
val __value = value.series.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (value.updateProposal.isDefined) {
val __value = value.updateProposal.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (value.configProposal.isDefined) {
val __value = value.configProposal.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 = {
value.lvl.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
value.topl.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
value.asset.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
value.group.foreach { __v =>
val __m = __v
_output__.writeTag(4, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
value.series.foreach { __v =>
val __m = __v
_output__.writeTag(5, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
value.updateProposal.foreach { __v =>
val __m = __v
_output__.writeTag(6, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
value.configProposal.foreach { __v =>
val __m = __v
_output__.writeTag(7, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getLvl: org.plasmalabs.sdk.models.box.Value.LVL = value.lvl.getOrElse(org.plasmalabs.sdk.models.box.Value.LVL.defaultInstance)
def withLvl(__v: org.plasmalabs.sdk.models.box.Value.LVL): Value = copy(value = org.plasmalabs.sdk.models.box.Value.Value.Lvl(__v))
def getTopl: org.plasmalabs.sdk.models.box.Value.TOPL = value.topl.getOrElse(org.plasmalabs.sdk.models.box.Value.TOPL.defaultInstance)
def withTopl(__v: org.plasmalabs.sdk.models.box.Value.TOPL): Value = copy(value = org.plasmalabs.sdk.models.box.Value.Value.Topl(__v))
def getAsset: org.plasmalabs.sdk.models.box.Value.Asset = value.asset.getOrElse(org.plasmalabs.sdk.models.box.Value.Asset.defaultInstance)
def withAsset(__v: org.plasmalabs.sdk.models.box.Value.Asset): Value = copy(value = org.plasmalabs.sdk.models.box.Value.Value.Asset(__v))
def getGroup: org.plasmalabs.sdk.models.box.Value.Group = value.group.getOrElse(org.plasmalabs.sdk.models.box.Value.Group.defaultInstance)
def withGroup(__v: org.plasmalabs.sdk.models.box.Value.Group): Value = copy(value = org.plasmalabs.sdk.models.box.Value.Value.Group(__v))
def getSeries: org.plasmalabs.sdk.models.box.Value.Series = value.series.getOrElse(org.plasmalabs.sdk.models.box.Value.Series.defaultInstance)
def withSeries(__v: org.plasmalabs.sdk.models.box.Value.Series): Value = copy(value = org.plasmalabs.sdk.models.box.Value.Value.Series(__v))
def getUpdateProposal: org.plasmalabs.sdk.models.box.Value.UpdateProposal = value.updateProposal.getOrElse(org.plasmalabs.sdk.models.box.Value.UpdateProposal.defaultInstance)
def withUpdateProposal(__v: org.plasmalabs.sdk.models.box.Value.UpdateProposal): Value = copy(value = org.plasmalabs.sdk.models.box.Value.Value.UpdateProposal(__v))
def getConfigProposal: org.plasmalabs.sdk.models.box.Value.ConfigProposal = value.configProposal.getOrElse(org.plasmalabs.sdk.models.box.Value.ConfigProposal.defaultInstance)
def withConfigProposal(__v: org.plasmalabs.sdk.models.box.Value.ConfigProposal): Value = copy(value = org.plasmalabs.sdk.models.box.Value.Value.ConfigProposal(__v))
def clearValue: Value = copy(value = org.plasmalabs.sdk.models.box.Value.Value.Empty)
def withValue(__v: org.plasmalabs.sdk.models.box.Value.Value): Value = 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.lvl.orNull
case 2 => value.topl.orNull
case 3 => value.asset.orNull
case 4 => value.group.orNull
case 5 => value.series.orNull
case 6 => value.updateProposal.orNull
case 7 => value.configProposal.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.lvl.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => value.topl.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => value.asset.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 4 => value.group.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 5 => value.series.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 6 => value.updateProposal.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 7 => value.configProposal.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: org.plasmalabs.sdk.models.box.Value.type = org.plasmalabs.sdk.models.box.Value
_root_.scalapb.validate.Validator.assertValid(this)(org.plasmalabs.sdk.models.box.ValueValidator)
// @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.box.Value])
}
object Value extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.box.Value = {
var __value: org.plasmalabs.sdk.models.box.Value.Value = org.plasmalabs.sdk.models.box.Value.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 = org.plasmalabs.sdk.models.box.Value.Value.Lvl(__value.lvl.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.box.Value.LVL](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__value = org.plasmalabs.sdk.models.box.Value.Value.Topl(__value.topl.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.box.Value.TOPL](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 26 =>
__value = org.plasmalabs.sdk.models.box.Value.Value.Asset(__value.asset.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.box.Value.Asset](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 34 =>
__value = org.plasmalabs.sdk.models.box.Value.Value.Group(__value.group.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.box.Value.Group](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 42 =>
__value = org.plasmalabs.sdk.models.box.Value.Value.Series(__value.series.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.box.Value.Series](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 50 =>
__value = org.plasmalabs.sdk.models.box.Value.Value.UpdateProposal(__value.updateProposal.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.box.Value.UpdateProposal](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 58 =>
__value = org.plasmalabs.sdk.models.box.Value.Value.ConfigProposal(__value.configProposal.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.box.Value.ConfigProposal](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
org.plasmalabs.sdk.models.box.Value(
value = __value,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.box.Value] = _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.")
org.plasmalabs.sdk.models.box.Value(
value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.box.Value.LVL]]).map(org.plasmalabs.sdk.models.box.Value.Value.Lvl(_))
.orElse[org.plasmalabs.sdk.models.box.Value.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.box.Value.TOPL]]).map(org.plasmalabs.sdk.models.box.Value.Value.Topl(_)))
.orElse[org.plasmalabs.sdk.models.box.Value.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.box.Value.Asset]]).map(org.plasmalabs.sdk.models.box.Value.Value.Asset(_)))
.orElse[org.plasmalabs.sdk.models.box.Value.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.box.Value.Group]]).map(org.plasmalabs.sdk.models.box.Value.Value.Group(_)))
.orElse[org.plasmalabs.sdk.models.box.Value.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.box.Value.Series]]).map(org.plasmalabs.sdk.models.box.Value.Value.Series(_)))
.orElse[org.plasmalabs.sdk.models.box.Value.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.box.Value.UpdateProposal]]).map(org.plasmalabs.sdk.models.box.Value.Value.UpdateProposal(_)))
.orElse[org.plasmalabs.sdk.models.box.Value.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.box.Value.ConfigProposal]]).map(org.plasmalabs.sdk.models.box.Value.Value.ConfigProposal(_)))
.getOrElse(org.plasmalabs.sdk.models.box.Value.Value.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ValueProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ValueProto.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 = org.plasmalabs.sdk.models.box.Value.LVL
case 2 => __out = org.plasmalabs.sdk.models.box.Value.TOPL
case 3 => __out = org.plasmalabs.sdk.models.box.Value.Asset
case 4 => __out = org.plasmalabs.sdk.models.box.Value.Group
case 5 => __out = org.plasmalabs.sdk.models.box.Value.Series
case 6 => __out = org.plasmalabs.sdk.models.box.Value.UpdateProposal
case 7 => __out = org.plasmalabs.sdk.models.box.Value.ConfigProposal
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.org.plasmalabs.sdk.models.box.Value.LVL,
_root_.org.plasmalabs.sdk.models.box.Value.TOPL,
_root_.org.plasmalabs.sdk.models.box.Value.Asset,
_root_.org.plasmalabs.sdk.models.box.Value.Group,
_root_.org.plasmalabs.sdk.models.box.Value.Series,
_root_.org.plasmalabs.sdk.models.box.Value.UpdateProposal,
_root_.org.plasmalabs.sdk.models.box.Value.ConfigProposal
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = org.plasmalabs.sdk.models.box.Value(
value = org.plasmalabs.sdk.models.box.Value.Value.Empty
)
sealed trait Value extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isLvl: _root_.scala.Boolean = false
def isTopl: _root_.scala.Boolean = false
def isAsset: _root_.scala.Boolean = false
def isGroup: _root_.scala.Boolean = false
def isSeries: _root_.scala.Boolean = false
def isUpdateProposal: _root_.scala.Boolean = false
def isConfigProposal: _root_.scala.Boolean = false
def lvl: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.LVL] = _root_.scala.None
def topl: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.TOPL] = _root_.scala.None
def asset: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.Asset] = _root_.scala.None
def group: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.Group] = _root_.scala.None
def series: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.Series] = _root_.scala.None
def updateProposal: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.UpdateProposal] = _root_.scala.None
def configProposal: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.ConfigProposal] = _root_.scala.None
}
object Value {
@SerialVersionUID(0L)
case object Empty extends org.plasmalabs.sdk.models.box.Value.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 Lvl(value: org.plasmalabs.sdk.models.box.Value.LVL) extends org.plasmalabs.sdk.models.box.Value.Value {
type ValueType = org.plasmalabs.sdk.models.box.Value.LVL
override def isLvl: _root_.scala.Boolean = true
override def lvl: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.LVL] = Some(value)
override def number: _root_.scala.Int = 1
}
@SerialVersionUID(0L)
final case class Topl(value: org.plasmalabs.sdk.models.box.Value.TOPL) extends org.plasmalabs.sdk.models.box.Value.Value {
type ValueType = org.plasmalabs.sdk.models.box.Value.TOPL
override def isTopl: _root_.scala.Boolean = true
override def topl: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.TOPL] = Some(value)
override def number: _root_.scala.Int = 2
}
@SerialVersionUID(0L)
final case class Asset(value: org.plasmalabs.sdk.models.box.Value.Asset) extends org.plasmalabs.sdk.models.box.Value.Value {
type ValueType = org.plasmalabs.sdk.models.box.Value.Asset
override def isAsset: _root_.scala.Boolean = true
override def asset: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.Asset] = Some(value)
override def number: _root_.scala.Int = 3
}
@SerialVersionUID(0L)
final case class Group(value: org.plasmalabs.sdk.models.box.Value.Group) extends org.plasmalabs.sdk.models.box.Value.Value {
type ValueType = org.plasmalabs.sdk.models.box.Value.Group
override def isGroup: _root_.scala.Boolean = true
override def group: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.Group] = Some(value)
override def number: _root_.scala.Int = 4
}
@SerialVersionUID(0L)
final case class Series(value: org.plasmalabs.sdk.models.box.Value.Series) extends org.plasmalabs.sdk.models.box.Value.Value {
type ValueType = org.plasmalabs.sdk.models.box.Value.Series
override def isSeries: _root_.scala.Boolean = true
override def series: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.Series] = Some(value)
override def number: _root_.scala.Int = 5
}
@SerialVersionUID(0L)
final case class UpdateProposal(value: org.plasmalabs.sdk.models.box.Value.UpdateProposal) extends org.plasmalabs.sdk.models.box.Value.Value {
type ValueType = org.plasmalabs.sdk.models.box.Value.UpdateProposal
override def isUpdateProposal: _root_.scala.Boolean = true
override def updateProposal: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.UpdateProposal] = Some(value)
override def number: _root_.scala.Int = 6
}
@SerialVersionUID(0L)
final case class ConfigProposal(value: org.plasmalabs.sdk.models.box.Value.ConfigProposal) extends org.plasmalabs.sdk.models.box.Value.Value {
type ValueType = org.plasmalabs.sdk.models.box.Value.ConfigProposal
override def isConfigProposal: _root_.scala.Boolean = true
override def configProposal: _root_.scala.Option[org.plasmalabs.sdk.models.box.Value.ConfigProposal] = Some(value)
override def number: _root_.scala.Int = 7
}
}
/** A payment token
*/
@SerialVersionUID(0L)
final case class LVL(
quantity: quivr.models.Int128,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[LVL] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = quantity
__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 = {
{
val __v = quantity
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__v.serializedSize)
__v.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withQuantity(__v: quivr.models.Int128): LVL = copy(quantity = __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 => quantity
}
}
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 => quantity.toPMessage
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: org.plasmalabs.sdk.models.box.Value.LVL.type = org.plasmalabs.sdk.models.box.Value.LVL
// @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.box.Value.LVL])
}
object LVL extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.LVL] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.LVL] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.box.Value.LVL = {
var __requiredFields0: _root_.scala.Long = 0x1L
var __quantity: _root_.scala.Option[quivr.models.Int128] = _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 =>
__quantity = _root_.scala.Some(__quantity.fold(_root_.scalapb.LiteParser.readMessage[quivr.models.Int128](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
__requiredFields0 &= 0xfffffffffffffffeL
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
if (__requiredFields0 != 0L) { throw new _root_.com.google.protobuf.InvalidProtocolBufferException("Message missing required fields.") }
org.plasmalabs.sdk.models.box.Value.LVL(
quantity = __quantity.getOrElse(quivr.models.Int128.defaultInstance),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.box.Value.LVL] = _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.")
org.plasmalabs.sdk.models.box.Value.LVL(
quantity = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).get.as[quivr.models.Int128]
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.scalaDescriptor.nestedMessages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = quivr.models.Int128
}
__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 = org.plasmalabs.sdk.models.box.Value.LVL(
quantity = quivr.models.Int128.defaultInstance
)
implicit class LVLLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.LVL]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.box.Value.LVL](_l) {
def quantity: _root_.scalapb.lenses.Lens[UpperPB, quivr.models.Int128] = field(_.quantity)((c_, f_) => c_.copy(quantity = f_))
}
final val QUANTITY_FIELD_NUMBER = 1
def of(
quantity: quivr.models.Int128
): _root_.org.plasmalabs.sdk.models.box.Value.LVL = _root_.org.plasmalabs.sdk.models.box.Value.LVL(
quantity
)
// @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.LVL])
}
/** A staking token
*
* @param registration
* Optional. If provided, the registration will take effect at the start of 2 epochs from now. If not provided, this token will not be used for staking purposes.
*/
@SerialVersionUID(0L)
final case class TOPL(
quantity: quivr.models.Int128,
registration: _root_.scala.Option[org.plasmalabs.consensus.models.StakingRegistration] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[TOPL] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = quantity
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (registration.isDefined) {
val __value = registration.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 = {
{
val __v = quantity
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__v.serializedSize)
__v.writeTo(_output__)
};
registration.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withQuantity(__v: quivr.models.Int128): TOPL = copy(quantity = __v)
def getRegistration: org.plasmalabs.consensus.models.StakingRegistration = registration.getOrElse(org.plasmalabs.consensus.models.StakingRegistration.defaultInstance)
def clearRegistration: TOPL = copy(registration = _root_.scala.None)
def withRegistration(__v: org.plasmalabs.consensus.models.StakingRegistration): TOPL = copy(registration = 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 => quantity
case 3 => registration.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 => quantity.toPMessage
case 3 => registration.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: org.plasmalabs.sdk.models.box.Value.TOPL.type = org.plasmalabs.sdk.models.box.Value.TOPL
// @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.box.Value.TOPL])
}
object TOPL extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.TOPL] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.TOPL] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.box.Value.TOPL = {
var __requiredFields0: _root_.scala.Long = 0x1L
var __quantity: _root_.scala.Option[quivr.models.Int128] = _root_.scala.None
var __registration: _root_.scala.Option[org.plasmalabs.consensus.models.StakingRegistration] = _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 =>
__quantity = _root_.scala.Some(__quantity.fold(_root_.scalapb.LiteParser.readMessage[quivr.models.Int128](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
__requiredFields0 &= 0xfffffffffffffffeL
case 26 =>
__registration = _root_.scala.Option(__registration.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.consensus.models.StakingRegistration](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
if (__requiredFields0 != 0L) { throw new _root_.com.google.protobuf.InvalidProtocolBufferException("Message missing required fields.") }
org.plasmalabs.sdk.models.box.Value.TOPL(
quantity = __quantity.getOrElse(quivr.models.Int128.defaultInstance),
registration = __registration,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.box.Value.TOPL] = _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.")
org.plasmalabs.sdk.models.box.Value.TOPL(
quantity = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).get.as[quivr.models.Int128],
registration = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.consensus.models.StakingRegistration]])
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.javaDescriptor.getNestedTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.scalaDescriptor.nestedMessages(1)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = quivr.models.Int128
case 3 => __out = org.plasmalabs.consensus.models.StakingRegistration
}
__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 = org.plasmalabs.sdk.models.box.Value.TOPL(
quantity = quivr.models.Int128.defaultInstance,
registration = _root_.scala.None
)
implicit class TOPLLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.TOPL]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.box.Value.TOPL](_l) {
def quantity: _root_.scalapb.lenses.Lens[UpperPB, quivr.models.Int128] = field(_.quantity)((c_, f_) => c_.copy(quantity = f_))
def registration: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.consensus.models.StakingRegistration] = field(_.getRegistration)((c_, f_) => c_.copy(registration = _root_.scala.Option(f_)))
def optionalRegistration: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[org.plasmalabs.consensus.models.StakingRegistration]] = field(_.registration)((c_, f_) => c_.copy(registration = f_))
}
final val QUANTITY_FIELD_NUMBER = 1
final val REGISTRATION_FIELD_NUMBER = 3
def of(
quantity: quivr.models.Int128,
registration: _root_.scala.Option[org.plasmalabs.consensus.models.StakingRegistration]
): _root_.org.plasmalabs.sdk.models.box.Value.TOPL = _root_.org.plasmalabs.sdk.models.box.Value.TOPL(
quantity,
registration
)
// @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.TOPL])
}
/** A user-defined token
*
* @param groupId
* The group identifier of the group token that was used to mint this asset. When there is a groupAlloy this field is not used.
* @param seriesId
* The series identifier of the series token that was used to mint this asset. When there is a seriesAlloy this field is not used.
* @param quantity
* A quantity
* @param groupAlloy
* This field is optional and represents a Merkle root of the alloy of groups in this asset. This is only valid for tokens that are series fungible.
* length = 32
* @param seriesAlloy
* This field is optional and represents a Merkle root of the alloy of series in this asset. This is only valid for tokens that are group fungible.
* length = 32
* @param fungibility
* Describes the fungibility of the asset..
* @param quantityDescriptor
* Describes the quantity behavior of this asset.
* @param ephemeralMetadata
* This is the ephemeral metadata of an asset. It follows the schema defined in the ephemeral metadata schema of the series policy corresponding to the token being minted.
* The conformance of this field to the schema is not checked by the node. This field is managed by the user.
* @param commitment
* This field is optional and meant to store a commitment in the form of a hash. This field is managed by the user.
* Metadata concerning this field can be added to the metadata.
*/
@SerialVersionUID(0L)
final case class Asset(
groupId: _root_.scala.Option[org.plasmalabs.sdk.models.GroupId] = _root_.scala.None,
seriesId: _root_.scala.Option[org.plasmalabs.sdk.models.SeriesId] = _root_.scala.None,
quantity: quivr.models.Int128,
groupAlloy: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = _root_.scala.None,
seriesAlloy: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = _root_.scala.None,
fungibility: org.plasmalabs.sdk.models.box.FungibilityType = org.plasmalabs.sdk.models.box.FungibilityType.GROUP_AND_SERIES,
quantityDescriptor: org.plasmalabs.sdk.models.box.QuantityDescriptorType = org.plasmalabs.sdk.models.box.QuantityDescriptorType.LIQUID,
ephemeralMetadata: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None,
commitment: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Asset] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (groupId.isDefined) {
val __value = groupId.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (seriesId.isDefined) {
val __value = seriesId.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = quantity
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (groupAlloy.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.Asset._typemapper_groupAlloy.toBase(groupAlloy.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (seriesAlloy.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.Asset._typemapper_seriesAlloy.toBase(seriesAlloy.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = fungibility.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(6, __value)
}
};
{
val __value = quantityDescriptor.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(7, __value)
}
};
if (ephemeralMetadata.isDefined) {
val __value = ephemeralMetadata.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (commitment.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.Asset._typemapper_commitment.toBase(commitment.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 = {
groupId.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
seriesId.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = quantity
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__v.serializedSize)
__v.writeTo(_output__)
};
groupAlloy.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.Asset._typemapper_groupAlloy.toBase(__v)
_output__.writeTag(4, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
seriesAlloy.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.Asset._typemapper_seriesAlloy.toBase(__v)
_output__.writeTag(5, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = fungibility.value
if (__v != 0) {
_output__.writeEnum(6, __v)
}
};
{
val __v = quantityDescriptor.value
if (__v != 0) {
_output__.writeEnum(7, __v)
}
};
ephemeralMetadata.foreach { __v =>
val __m = __v
_output__.writeTag(8, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
commitment.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.Asset._typemapper_commitment.toBase(__v)
_output__.writeTag(9, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getGroupId: org.plasmalabs.sdk.models.GroupId = groupId.getOrElse(org.plasmalabs.sdk.models.GroupId.defaultInstance)
def clearGroupId: Asset = copy(groupId = _root_.scala.None)
def withGroupId(__v: org.plasmalabs.sdk.models.GroupId): Asset = copy(groupId = Option(__v))
def getSeriesId: org.plasmalabs.sdk.models.SeriesId = seriesId.getOrElse(org.plasmalabs.sdk.models.SeriesId.defaultInstance)
def clearSeriesId: Asset = copy(seriesId = _root_.scala.None)
def withSeriesId(__v: org.plasmalabs.sdk.models.SeriesId): Asset = copy(seriesId = Option(__v))
def withQuantity(__v: quivr.models.Int128): Asset = copy(quantity = __v)
def getGroupAlloy: _root_.com.google.protobuf.ByteString = groupAlloy.getOrElse(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_groupAlloy.toCustom(com.google.protobuf.wrappers.BytesValue.defaultInstance))
def clearGroupAlloy: Asset = copy(groupAlloy = _root_.scala.None)
def withGroupAlloy(__v: _root_.com.google.protobuf.ByteString): Asset = copy(groupAlloy = Option(__v))
def getSeriesAlloy: _root_.com.google.protobuf.ByteString = seriesAlloy.getOrElse(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_seriesAlloy.toCustom(com.google.protobuf.wrappers.BytesValue.defaultInstance))
def clearSeriesAlloy: Asset = copy(seriesAlloy = _root_.scala.None)
def withSeriesAlloy(__v: _root_.com.google.protobuf.ByteString): Asset = copy(seriesAlloy = Option(__v))
def withFungibility(__v: org.plasmalabs.sdk.models.box.FungibilityType): Asset = copy(fungibility = __v)
def withQuantityDescriptor(__v: org.plasmalabs.sdk.models.box.QuantityDescriptorType): Asset = copy(quantityDescriptor = __v)
def getEphemeralMetadata: com.google.protobuf.struct.Struct = ephemeralMetadata.getOrElse(com.google.protobuf.struct.Struct.defaultInstance)
def clearEphemeralMetadata: Asset = copy(ephemeralMetadata = _root_.scala.None)
def withEphemeralMetadata(__v: com.google.protobuf.struct.Struct): Asset = copy(ephemeralMetadata = Option(__v))
def getCommitment: _root_.com.google.protobuf.ByteString = commitment.getOrElse(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_commitment.toCustom(com.google.protobuf.wrappers.BytesValue.defaultInstance))
def clearCommitment: Asset = copy(commitment = _root_.scala.None)
def withCommitment(__v: _root_.com.google.protobuf.ByteString): Asset = copy(commitment = 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 => groupId.orNull
case 2 => seriesId.orNull
case 3 => quantity
case 4 => groupAlloy.map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_groupAlloy.toBase(_)).orNull
case 5 => seriesAlloy.map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_seriesAlloy.toBase(_)).orNull
case 6 => {
val __t = fungibility.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 7 => {
val __t = quantityDescriptor.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 8 => ephemeralMetadata.orNull
case 9 => commitment.map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_commitment.toBase(_)).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 => groupId.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => seriesId.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => quantity.toPMessage
case 4 => groupAlloy.map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_groupAlloy.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 5 => seriesAlloy.map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_seriesAlloy.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 6 => _root_.scalapb.descriptors.PEnum(fungibility.scalaValueDescriptor)
case 7 => _root_.scalapb.descriptors.PEnum(quantityDescriptor.scalaValueDescriptor)
case 8 => ephemeralMetadata.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 9 => commitment.map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_commitment.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: org.plasmalabs.sdk.models.box.Value.Asset.type = org.plasmalabs.sdk.models.box.Value.Asset
// @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.box.Value.Asset])
}
object Asset extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.Asset] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.Asset] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.box.Value.Asset = {
var __requiredFields0: _root_.scala.Long = 0x1L
var __groupId: _root_.scala.Option[org.plasmalabs.sdk.models.GroupId] = _root_.scala.None
var __seriesId: _root_.scala.Option[org.plasmalabs.sdk.models.SeriesId] = _root_.scala.None
var __quantity: _root_.scala.Option[quivr.models.Int128] = _root_.scala.None
var __groupAlloy: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = _root_.scala.None
var __seriesAlloy: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = _root_.scala.None
var __fungibility: org.plasmalabs.sdk.models.box.FungibilityType = org.plasmalabs.sdk.models.box.FungibilityType.GROUP_AND_SERIES
var __quantityDescriptor: org.plasmalabs.sdk.models.box.QuantityDescriptorType = org.plasmalabs.sdk.models.box.QuantityDescriptorType.LIQUID
var __ephemeralMetadata: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None
var __commitment: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = _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 =>
__groupId = _root_.scala.Option(__groupId.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.GroupId](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__seriesId = _root_.scala.Option(__seriesId.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.SeriesId](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 26 =>
__quantity = _root_.scala.Some(__quantity.fold(_root_.scalapb.LiteParser.readMessage[quivr.models.Int128](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
__requiredFields0 &= 0xfffffffffffffffeL
case 34 =>
__groupAlloy = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_groupAlloy.toCustom(__groupAlloy.map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_groupAlloy.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BytesValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 42 =>
__seriesAlloy = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_seriesAlloy.toCustom(__seriesAlloy.map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_seriesAlloy.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BytesValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 48 =>
__fungibility = org.plasmalabs.sdk.models.box.FungibilityType.fromValue(_input__.readEnum())
case 56 =>
__quantityDescriptor = org.plasmalabs.sdk.models.box.QuantityDescriptorType.fromValue(_input__.readEnum())
case 66 =>
__ephemeralMetadata = _root_.scala.Option(__ephemeralMetadata.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 74 =>
__commitment = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_commitment.toCustom(__commitment.map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_commitment.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BytesValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
if (__requiredFields0 != 0L) { throw new _root_.com.google.protobuf.InvalidProtocolBufferException("Message missing required fields.") }
org.plasmalabs.sdk.models.box.Value.Asset(
groupId = __groupId,
seriesId = __seriesId,
quantity = __quantity.getOrElse(quivr.models.Int128.defaultInstance),
groupAlloy = __groupAlloy,
seriesAlloy = __seriesAlloy,
fungibility = __fungibility,
quantityDescriptor = __quantityDescriptor,
ephemeralMetadata = __ephemeralMetadata,
commitment = __commitment,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.box.Value.Asset] = _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.")
org.plasmalabs.sdk.models.box.Value.Asset(
groupId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.GroupId]]),
seriesId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.SeriesId]]),
quantity = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).get.as[quivr.models.Int128],
groupAlloy = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BytesValue]]).map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_groupAlloy.toCustom(_)),
seriesAlloy = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BytesValue]]).map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_seriesAlloy.toCustom(_)),
fungibility = org.plasmalabs.sdk.models.box.FungibilityType.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(org.plasmalabs.sdk.models.box.FungibilityType.GROUP_AND_SERIES.scalaValueDescriptor).number),
quantityDescriptor = org.plasmalabs.sdk.models.box.QuantityDescriptorType.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(org.plasmalabs.sdk.models.box.QuantityDescriptorType.LIQUID.scalaValueDescriptor).number),
ephemeralMetadata = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]),
commitment = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BytesValue]]).map(org.plasmalabs.sdk.models.box.Value.Asset._typemapper_commitment.toCustom(_))
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.javaDescriptor.getNestedTypes().get(2)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.scalaDescriptor.nestedMessages(2)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = org.plasmalabs.sdk.models.GroupId
case 2 => __out = org.plasmalabs.sdk.models.SeriesId
case 3 => __out = quivr.models.Int128
case 4 => __out = com.google.protobuf.wrappers.BytesValue
case 5 => __out = com.google.protobuf.wrappers.BytesValue
case 8 => __out = com.google.protobuf.struct.Struct
case 9 => __out = com.google.protobuf.wrappers.BytesValue
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 6 => org.plasmalabs.sdk.models.box.FungibilityType
case 7 => org.plasmalabs.sdk.models.box.QuantityDescriptorType
}
}
lazy val defaultInstance = org.plasmalabs.sdk.models.box.Value.Asset(
groupId = _root_.scala.None,
seriesId = _root_.scala.None,
quantity = quivr.models.Int128.defaultInstance,
groupAlloy = _root_.scala.None,
seriesAlloy = _root_.scala.None,
fungibility = org.plasmalabs.sdk.models.box.FungibilityType.GROUP_AND_SERIES,
quantityDescriptor = org.plasmalabs.sdk.models.box.QuantityDescriptorType.LIQUID,
ephemeralMetadata = _root_.scala.None,
commitment = _root_.scala.None
)
implicit class AssetLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.Asset]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.box.Value.Asset](_l) {
def groupId: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.GroupId] = field(_.getGroupId)((c_, f_) => c_.copy(groupId = _root_.scala.Option(f_)))
def optionalGroupId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[org.plasmalabs.sdk.models.GroupId]] = field(_.groupId)((c_, f_) => c_.copy(groupId = f_))
def seriesId: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.SeriesId] = field(_.getSeriesId)((c_, f_) => c_.copy(seriesId = _root_.scala.Option(f_)))
def optionalSeriesId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[org.plasmalabs.sdk.models.SeriesId]] = field(_.seriesId)((c_, f_) => c_.copy(seriesId = f_))
def quantity: _root_.scalapb.lenses.Lens[UpperPB, quivr.models.Int128] = field(_.quantity)((c_, f_) => c_.copy(quantity = f_))
def groupAlloy: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.getGroupAlloy)((c_, f_) => c_.copy(groupAlloy = _root_.scala.Option(f_)))
def optionalGroupAlloy: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.com.google.protobuf.ByteString]] = field(_.groupAlloy)((c_, f_) => c_.copy(groupAlloy = f_))
def seriesAlloy: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.getSeriesAlloy)((c_, f_) => c_.copy(seriesAlloy = _root_.scala.Option(f_)))
def optionalSeriesAlloy: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.com.google.protobuf.ByteString]] = field(_.seriesAlloy)((c_, f_) => c_.copy(seriesAlloy = f_))
def fungibility: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.FungibilityType] = field(_.fungibility)((c_, f_) => c_.copy(fungibility = f_))
def quantityDescriptor: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.QuantityDescriptorType] = field(_.quantityDescriptor)((c_, f_) => c_.copy(quantityDescriptor = f_))
def ephemeralMetadata: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getEphemeralMetadata)((c_, f_) => c_.copy(ephemeralMetadata = _root_.scala.Option(f_)))
def optionalEphemeralMetadata: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.ephemeralMetadata)((c_, f_) => c_.copy(ephemeralMetadata = f_))
def commitment: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.getCommitment)((c_, f_) => c_.copy(commitment = _root_.scala.Option(f_)))
def optionalCommitment: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.com.google.protobuf.ByteString]] = field(_.commitment)((c_, f_) => c_.copy(commitment = f_))
}
final val GROUPID_FIELD_NUMBER = 1
final val SERIESID_FIELD_NUMBER = 2
final val QUANTITY_FIELD_NUMBER = 3
final val GROUPALLOY_FIELD_NUMBER = 4
final val SERIESALLOY_FIELD_NUMBER = 5
final val FUNGIBILITY_FIELD_NUMBER = 6
final val QUANTITYDESCRIPTOR_FIELD_NUMBER = 7
final val EPHEMERALMETADATA_FIELD_NUMBER = 8
final val COMMITMENT_FIELD_NUMBER = 9
@transient
private[box] val _typemapper_groupAlloy: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BytesValue, _root_.com.google.protobuf.ByteString] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BytesValue, _root_.com.google.protobuf.ByteString]]
@transient
private[box] val _typemapper_seriesAlloy: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BytesValue, _root_.com.google.protobuf.ByteString] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BytesValue, _root_.com.google.protobuf.ByteString]]
@transient
private[box] val _typemapper_commitment: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BytesValue, _root_.com.google.protobuf.ByteString] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BytesValue, _root_.com.google.protobuf.ByteString]]
def of(
groupId: _root_.scala.Option[org.plasmalabs.sdk.models.GroupId],
seriesId: _root_.scala.Option[org.plasmalabs.sdk.models.SeriesId],
quantity: quivr.models.Int128,
groupAlloy: _root_.scala.Option[_root_.com.google.protobuf.ByteString],
seriesAlloy: _root_.scala.Option[_root_.com.google.protobuf.ByteString],
fungibility: org.plasmalabs.sdk.models.box.FungibilityType,
quantityDescriptor: org.plasmalabs.sdk.models.box.QuantityDescriptorType,
ephemeralMetadata: _root_.scala.Option[com.google.protobuf.struct.Struct],
commitment: _root_.scala.Option[_root_.com.google.protobuf.ByteString]
): _root_.org.plasmalabs.sdk.models.box.Value.Asset = _root_.org.plasmalabs.sdk.models.box.Value.Asset(
groupId,
seriesId,
quantity,
groupAlloy,
seriesAlloy,
fungibility,
quantityDescriptor,
ephemeralMetadata,
commitment
)
// @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.Asset])
}
/** A group constructor token
*
* @param groupId
* The ID of _this_ Group. It is the digest of the Group Policy.
* @param quantity
* The quantity of group constructor tokens stored in a given UTXO.
* @param fixedSeries
* An optional series identifier. When this series identifier is defined, this groups that implement this policy can only be used to mint assets with the aforementioned series identifier
*/
@SerialVersionUID(0L)
final case class Group(
groupId: org.plasmalabs.sdk.models.GroupId,
quantity: quivr.models.Int128,
fixedSeries: _root_.scala.Option[org.plasmalabs.sdk.models.SeriesId] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Group] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = groupId
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = quantity
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (fixedSeries.isDefined) {
val __value = fixedSeries.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 = {
{
val __v = groupId
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__v.serializedSize)
__v.writeTo(_output__)
};
{
val __v = quantity
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__v.serializedSize)
__v.writeTo(_output__)
};
fixedSeries.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withGroupId(__v: org.plasmalabs.sdk.models.GroupId): Group = copy(groupId = __v)
def withQuantity(__v: quivr.models.Int128): Group = copy(quantity = __v)
def getFixedSeries: org.plasmalabs.sdk.models.SeriesId = fixedSeries.getOrElse(org.plasmalabs.sdk.models.SeriesId.defaultInstance)
def clearFixedSeries: Group = copy(fixedSeries = _root_.scala.None)
def withFixedSeries(__v: org.plasmalabs.sdk.models.SeriesId): Group = copy(fixedSeries = 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 => groupId
case 2 => quantity
case 3 => fixedSeries.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 => groupId.toPMessage
case 2 => quantity.toPMessage
case 3 => fixedSeries.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: org.plasmalabs.sdk.models.box.Value.Group.type = org.plasmalabs.sdk.models.box.Value.Group
// @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.box.Value.Group])
}
object Group extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.Group] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.Group] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.box.Value.Group = {
var __requiredFields0: _root_.scala.Long = 0x3L
var __groupId: _root_.scala.Option[org.plasmalabs.sdk.models.GroupId] = _root_.scala.None
var __quantity: _root_.scala.Option[quivr.models.Int128] = _root_.scala.None
var __fixedSeries: _root_.scala.Option[org.plasmalabs.sdk.models.SeriesId] = _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 =>
__groupId = _root_.scala.Some(__groupId.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.GroupId](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
__requiredFields0 &= 0xfffffffffffffffeL
case 18 =>
__quantity = _root_.scala.Some(__quantity.fold(_root_.scalapb.LiteParser.readMessage[quivr.models.Int128](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
__requiredFields0 &= 0xfffffffffffffffdL
case 26 =>
__fixedSeries = _root_.scala.Option(__fixedSeries.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.SeriesId](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
if (__requiredFields0 != 0L) { throw new _root_.com.google.protobuf.InvalidProtocolBufferException("Message missing required fields.") }
org.plasmalabs.sdk.models.box.Value.Group(
groupId = __groupId.getOrElse(org.plasmalabs.sdk.models.GroupId.defaultInstance),
quantity = __quantity.getOrElse(quivr.models.Int128.defaultInstance),
fixedSeries = __fixedSeries,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.box.Value.Group] = _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.")
org.plasmalabs.sdk.models.box.Value.Group(
groupId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).get.as[org.plasmalabs.sdk.models.GroupId],
quantity = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).get.as[quivr.models.Int128],
fixedSeries = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.SeriesId]])
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.javaDescriptor.getNestedTypes().get(3)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.scalaDescriptor.nestedMessages(3)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = org.plasmalabs.sdk.models.GroupId
case 2 => __out = quivr.models.Int128
case 3 => __out = org.plasmalabs.sdk.models.SeriesId
}
__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 = org.plasmalabs.sdk.models.box.Value.Group(
groupId = org.plasmalabs.sdk.models.GroupId.defaultInstance,
quantity = quivr.models.Int128.defaultInstance,
fixedSeries = _root_.scala.None
)
implicit class GroupLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.Group]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.box.Value.Group](_l) {
def groupId: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.GroupId] = field(_.groupId)((c_, f_) => c_.copy(groupId = f_))
def quantity: _root_.scalapb.lenses.Lens[UpperPB, quivr.models.Int128] = field(_.quantity)((c_, f_) => c_.copy(quantity = f_))
def fixedSeries: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.SeriesId] = field(_.getFixedSeries)((c_, f_) => c_.copy(fixedSeries = _root_.scala.Option(f_)))
def optionalFixedSeries: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[org.plasmalabs.sdk.models.SeriesId]] = field(_.fixedSeries)((c_, f_) => c_.copy(fixedSeries = f_))
}
final val GROUPID_FIELD_NUMBER = 1
final val QUANTITY_FIELD_NUMBER = 2
final val FIXEDSERIES_FIELD_NUMBER = 3
def of(
groupId: org.plasmalabs.sdk.models.GroupId,
quantity: quivr.models.Int128,
fixedSeries: _root_.scala.Option[org.plasmalabs.sdk.models.SeriesId]
): _root_.org.plasmalabs.sdk.models.box.Value.Group = _root_.org.plasmalabs.sdk.models.box.Value.Group(
groupId,
quantity,
fixedSeries
)
// @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.Group])
}
/** A series constructor token
*
* @param seriesId
* The ID of _this_ Series. It is the digest of the Series Policy.
* @param quantity
* The quantity of series constructor tokens stored in a given UTXO.
* @param tokenSupply
* This is an optional field. When provided it fixes the quantity of tokens that will be minted when this series is consumed,
* and the series constructor is burned by the minting transaction.
* When not provided, the series constructor is not burned, thus making the token supply unlimited.
* @param quantityDescriptor
* Describes the behavior of the quantity field of the assets minted using the series constructor derived from this policy.
* @param fungibility
* Describes the fungibility of the assets minted using the series constructor token derived from this policy.
*/
@SerialVersionUID(0L)
final case class Series(
seriesId: org.plasmalabs.sdk.models.SeriesId,
quantity: quivr.models.Int128,
tokenSupply: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
quantityDescriptor: org.plasmalabs.sdk.models.box.QuantityDescriptorType = org.plasmalabs.sdk.models.box.QuantityDescriptorType.LIQUID,
fungibility: org.plasmalabs.sdk.models.box.FungibilityType = org.plasmalabs.sdk.models.box.FungibilityType.GROUP_AND_SERIES,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Series] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = seriesId
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = quantity
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (tokenSupply.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.Series._typemapper_tokenSupply.toBase(tokenSupply.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = quantityDescriptor.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(4, __value)
}
};
{
val __value = fungibility.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(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 = seriesId
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__v.serializedSize)
__v.writeTo(_output__)
};
{
val __v = quantity
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__v.serializedSize)
__v.writeTo(_output__)
};
tokenSupply.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.Series._typemapper_tokenSupply.toBase(__v)
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = quantityDescriptor.value
if (__v != 0) {
_output__.writeEnum(4, __v)
}
};
{
val __v = fungibility.value
if (__v != 0) {
_output__.writeEnum(5, __v)
}
};
unknownFields.writeTo(_output__)
}
def withSeriesId(__v: org.plasmalabs.sdk.models.SeriesId): Series = copy(seriesId = __v)
def withQuantity(__v: quivr.models.Int128): Series = copy(quantity = __v)
def getTokenSupply: _root_.scala.Int = tokenSupply.getOrElse(org.plasmalabs.sdk.models.box.Value.Series._typemapper_tokenSupply.toCustom(com.google.protobuf.wrappers.UInt32Value.defaultInstance))
def clearTokenSupply: Series = copy(tokenSupply = _root_.scala.None)
def withTokenSupply(__v: _root_.scala.Int): Series = copy(tokenSupply = Option(__v))
def withQuantityDescriptor(__v: org.plasmalabs.sdk.models.box.QuantityDescriptorType): Series = copy(quantityDescriptor = __v)
def withFungibility(__v: org.plasmalabs.sdk.models.box.FungibilityType): Series = copy(fungibility = __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 => seriesId
case 2 => quantity
case 3 => tokenSupply.map(org.plasmalabs.sdk.models.box.Value.Series._typemapper_tokenSupply.toBase(_)).orNull
case 4 => {
val __t = quantityDescriptor.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 5 => {
val __t = fungibility.javaValueDescriptor
if (__t.getNumber() != 0) __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 => seriesId.toPMessage
case 2 => quantity.toPMessage
case 3 => tokenSupply.map(org.plasmalabs.sdk.models.box.Value.Series._typemapper_tokenSupply.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 4 => _root_.scalapb.descriptors.PEnum(quantityDescriptor.scalaValueDescriptor)
case 5 => _root_.scalapb.descriptors.PEnum(fungibility.scalaValueDescriptor)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: org.plasmalabs.sdk.models.box.Value.Series.type = org.plasmalabs.sdk.models.box.Value.Series
// @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.box.Value.Series])
}
object Series extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.Series] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.Series] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.box.Value.Series = {
var __requiredFields0: _root_.scala.Long = 0x3L
var __seriesId: _root_.scala.Option[org.plasmalabs.sdk.models.SeriesId] = _root_.scala.None
var __quantity: _root_.scala.Option[quivr.models.Int128] = _root_.scala.None
var __tokenSupply: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
var __quantityDescriptor: org.plasmalabs.sdk.models.box.QuantityDescriptorType = org.plasmalabs.sdk.models.box.QuantityDescriptorType.LIQUID
var __fungibility: org.plasmalabs.sdk.models.box.FungibilityType = org.plasmalabs.sdk.models.box.FungibilityType.GROUP_AND_SERIES
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__seriesId = _root_.scala.Some(__seriesId.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.SeriesId](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
__requiredFields0 &= 0xfffffffffffffffeL
case 18 =>
__quantity = _root_.scala.Some(__quantity.fold(_root_.scalapb.LiteParser.readMessage[quivr.models.Int128](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
__requiredFields0 &= 0xfffffffffffffffdL
case 26 =>
__tokenSupply = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.Series._typemapper_tokenSupply.toCustom(__tokenSupply.map(org.plasmalabs.sdk.models.box.Value.Series._typemapper_tokenSupply.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt32Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 32 =>
__quantityDescriptor = org.plasmalabs.sdk.models.box.QuantityDescriptorType.fromValue(_input__.readEnum())
case 40 =>
__fungibility = org.plasmalabs.sdk.models.box.FungibilityType.fromValue(_input__.readEnum())
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
if (__requiredFields0 != 0L) { throw new _root_.com.google.protobuf.InvalidProtocolBufferException("Message missing required fields.") }
org.plasmalabs.sdk.models.box.Value.Series(
seriesId = __seriesId.getOrElse(org.plasmalabs.sdk.models.SeriesId.defaultInstance),
quantity = __quantity.getOrElse(quivr.models.Int128.defaultInstance),
tokenSupply = __tokenSupply,
quantityDescriptor = __quantityDescriptor,
fungibility = __fungibility,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.box.Value.Series] = _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.")
org.plasmalabs.sdk.models.box.Value.Series(
seriesId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).get.as[org.plasmalabs.sdk.models.SeriesId],
quantity = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).get.as[quivr.models.Int128],
tokenSupply = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt32Value]]).map(org.plasmalabs.sdk.models.box.Value.Series._typemapper_tokenSupply.toCustom(_)),
quantityDescriptor = org.plasmalabs.sdk.models.box.QuantityDescriptorType.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(org.plasmalabs.sdk.models.box.QuantityDescriptorType.LIQUID.scalaValueDescriptor).number),
fungibility = org.plasmalabs.sdk.models.box.FungibilityType.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(org.plasmalabs.sdk.models.box.FungibilityType.GROUP_AND_SERIES.scalaValueDescriptor).number)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.javaDescriptor.getNestedTypes().get(4)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.scalaDescriptor.nestedMessages(4)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = org.plasmalabs.sdk.models.SeriesId
case 2 => __out = quivr.models.Int128
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[_] = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 4 => org.plasmalabs.sdk.models.box.QuantityDescriptorType
case 5 => org.plasmalabs.sdk.models.box.FungibilityType
}
}
lazy val defaultInstance = org.plasmalabs.sdk.models.box.Value.Series(
seriesId = org.plasmalabs.sdk.models.SeriesId.defaultInstance,
quantity = quivr.models.Int128.defaultInstance,
tokenSupply = _root_.scala.None,
quantityDescriptor = org.plasmalabs.sdk.models.box.QuantityDescriptorType.LIQUID,
fungibility = org.plasmalabs.sdk.models.box.FungibilityType.GROUP_AND_SERIES
)
implicit class SeriesLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.Series]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.box.Value.Series](_l) {
def seriesId: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.SeriesId] = field(_.seriesId)((c_, f_) => c_.copy(seriesId = f_))
def quantity: _root_.scalapb.lenses.Lens[UpperPB, quivr.models.Int128] = field(_.quantity)((c_, f_) => c_.copy(quantity = f_))
def tokenSupply: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getTokenSupply)((c_, f_) => c_.copy(tokenSupply = _root_.scala.Option(f_)))
def optionalTokenSupply: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Int]] = field(_.tokenSupply)((c_, f_) => c_.copy(tokenSupply = f_))
def quantityDescriptor: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.QuantityDescriptorType] = field(_.quantityDescriptor)((c_, f_) => c_.copy(quantityDescriptor = f_))
def fungibility: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.FungibilityType] = field(_.fungibility)((c_, f_) => c_.copy(fungibility = f_))
}
final val SERIESID_FIELD_NUMBER = 1
final val QUANTITY_FIELD_NUMBER = 2
final val TOKENSUPPLY_FIELD_NUMBER = 3
final val QUANTITYDESCRIPTOR_FIELD_NUMBER = 4
final val FUNGIBILITY_FIELD_NUMBER = 5
@transient
private[box] val _typemapper_tokenSupply: _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(
seriesId: org.plasmalabs.sdk.models.SeriesId,
quantity: quivr.models.Int128,
tokenSupply: _root_.scala.Option[_root_.scala.Int],
quantityDescriptor: org.plasmalabs.sdk.models.box.QuantityDescriptorType,
fungibility: org.plasmalabs.sdk.models.box.FungibilityType
): _root_.org.plasmalabs.sdk.models.box.Value.Series = _root_.org.plasmalabs.sdk.models.box.Value.Series(
seriesId,
quantity,
tokenSupply,
quantityDescriptor,
fungibility
)
// @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.Series])
}
/** @param label
* Update proposal label for humans (do not confuse with the actual update proposal identifier)
* @param fEffective
* fEffective
* @param vrfLddCutoff
* vrfLddCutoff
* Verifiable Random Function: mechanism for leader election in Ouroboros proof-of-stake
* Local dynamic difficulty, Short timescale variation of the block production eligibility threshold.
* @param vrfPrecision
* vrfPrecision
* @param vrfBaselineDifficulty
* vrfBaselineDifficulty
* @param vrfAmplitude
* vrfAmplitude
* @param chainSelectionKLookback
* chainSelectionKLookback
* @param slotDuration
* slotDuration, Slot: Atomic time unit in Ouroboros, smallest piece of time (~1 second for Topl, 2 for Cardano)
* @param forwardBiasedSlotWindow
* forwardBiasedSlotWindow
* @param operationalPeriodsPerEpoch
* operationalPeriodsPerEpoch, Epoch: Long time scale in Ouroboros, epochs are composed of many slots
* @param kesKeyHours
* kesKeyHours Key-Evolving Signature: mechanism for securing chain selection process in Ouroboros proof-of-stake
* @param kesKeyMinutes
* kesKeyMinutes Key-Evolving Signature: mechanism for securing chain selection process in Ouroboros proof-of-stake
* @param slotGapLeaderElection
* gap of non-eligibility after a block is minted
*/
@SerialVersionUID(0L)
final case class UpdateProposal(
label: _root_.scala.Predef.String = "",
fEffective: _root_.scala.Option[quivr.models.Ratio] = _root_.scala.None,
vrfLddCutoff: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
vrfPrecision: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
vrfBaselineDifficulty: _root_.scala.Option[quivr.models.Ratio] = _root_.scala.None,
vrfAmplitude: _root_.scala.Option[quivr.models.Ratio] = _root_.scala.None,
chainSelectionKLookback: _root_.scala.Option[_root_.scala.Long] = _root_.scala.None,
slotDuration: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None,
forwardBiasedSlotWindow: _root_.scala.Option[_root_.scala.Long] = _root_.scala.None,
operationalPeriodsPerEpoch: _root_.scala.Option[_root_.scala.Long] = _root_.scala.None,
kesKeyHours: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
kesKeyMinutes: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
slotGapLeaderElection: _root_.scala.Option[_root_.scala.Long] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[UpdateProposal] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = label
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
if (fEffective.isDefined) {
val __value = fEffective.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (vrfLddCutoff.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfLddCutoff.toBase(vrfLddCutoff.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (vrfPrecision.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfPrecision.toBase(vrfPrecision.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (vrfBaselineDifficulty.isDefined) {
val __value = vrfBaselineDifficulty.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (vrfAmplitude.isDefined) {
val __value = vrfAmplitude.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (chainSelectionKLookback.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_chainSelectionKLookback.toBase(chainSelectionKLookback.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (slotDuration.isDefined) {
val __value = slotDuration.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (forwardBiasedSlotWindow.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_forwardBiasedSlotWindow.toBase(forwardBiasedSlotWindow.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (operationalPeriodsPerEpoch.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_operationalPeriodsPerEpoch.toBase(operationalPeriodsPerEpoch.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (kesKeyHours.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyHours.toBase(kesKeyHours.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (kesKeyMinutes.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyMinutes.toBase(kesKeyMinutes.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (slotGapLeaderElection.isDefined) {
val __value = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_slotGapLeaderElection.toBase(slotGapLeaderElection.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 = {
{
val __v = label
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
fEffective.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
vrfLddCutoff.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfLddCutoff.toBase(__v)
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
vrfPrecision.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfPrecision.toBase(__v)
_output__.writeTag(4, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
vrfBaselineDifficulty.foreach { __v =>
val __m = __v
_output__.writeTag(5, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
vrfAmplitude.foreach { __v =>
val __m = __v
_output__.writeTag(6, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
chainSelectionKLookback.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_chainSelectionKLookback.toBase(__v)
_output__.writeTag(7, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
slotDuration.foreach { __v =>
val __m = __v
_output__.writeTag(8, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
forwardBiasedSlotWindow.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_forwardBiasedSlotWindow.toBase(__v)
_output__.writeTag(9, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
operationalPeriodsPerEpoch.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_operationalPeriodsPerEpoch.toBase(__v)
_output__.writeTag(10, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
kesKeyHours.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyHours.toBase(__v)
_output__.writeTag(11, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
kesKeyMinutes.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyMinutes.toBase(__v)
_output__.writeTag(12, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
slotGapLeaderElection.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_slotGapLeaderElection.toBase(__v)
_output__.writeTag(13, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withLabel(__v: _root_.scala.Predef.String): UpdateProposal = copy(label = __v)
def getFEffective: quivr.models.Ratio = fEffective.getOrElse(quivr.models.Ratio.defaultInstance)
def clearFEffective: UpdateProposal = copy(fEffective = _root_.scala.None)
def withFEffective(__v: quivr.models.Ratio): UpdateProposal = copy(fEffective = Option(__v))
def getVrfLddCutoff: _root_.scala.Int = vrfLddCutoff.getOrElse(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfLddCutoff.toCustom(com.google.protobuf.wrappers.UInt32Value.defaultInstance))
def clearVrfLddCutoff: UpdateProposal = copy(vrfLddCutoff = _root_.scala.None)
def withVrfLddCutoff(__v: _root_.scala.Int): UpdateProposal = copy(vrfLddCutoff = Option(__v))
def getVrfPrecision: _root_.scala.Int = vrfPrecision.getOrElse(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfPrecision.toCustom(com.google.protobuf.wrappers.UInt32Value.defaultInstance))
def clearVrfPrecision: UpdateProposal = copy(vrfPrecision = _root_.scala.None)
def withVrfPrecision(__v: _root_.scala.Int): UpdateProposal = copy(vrfPrecision = Option(__v))
def getVrfBaselineDifficulty: quivr.models.Ratio = vrfBaselineDifficulty.getOrElse(quivr.models.Ratio.defaultInstance)
def clearVrfBaselineDifficulty: UpdateProposal = copy(vrfBaselineDifficulty = _root_.scala.None)
def withVrfBaselineDifficulty(__v: quivr.models.Ratio): UpdateProposal = copy(vrfBaselineDifficulty = Option(__v))
def getVrfAmplitude: quivr.models.Ratio = vrfAmplitude.getOrElse(quivr.models.Ratio.defaultInstance)
def clearVrfAmplitude: UpdateProposal = copy(vrfAmplitude = _root_.scala.None)
def withVrfAmplitude(__v: quivr.models.Ratio): UpdateProposal = copy(vrfAmplitude = Option(__v))
def getChainSelectionKLookback: _root_.scala.Long = chainSelectionKLookback.getOrElse(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_chainSelectionKLookback.toCustom(com.google.protobuf.wrappers.UInt64Value.defaultInstance))
def clearChainSelectionKLookback: UpdateProposal = copy(chainSelectionKLookback = _root_.scala.None)
def withChainSelectionKLookback(__v: _root_.scala.Long): UpdateProposal = copy(chainSelectionKLookback = Option(__v))
def getSlotDuration: com.google.protobuf.duration.Duration = slotDuration.getOrElse(com.google.protobuf.duration.Duration.defaultInstance)
def clearSlotDuration: UpdateProposal = copy(slotDuration = _root_.scala.None)
def withSlotDuration(__v: com.google.protobuf.duration.Duration): UpdateProposal = copy(slotDuration = Option(__v))
def getForwardBiasedSlotWindow: _root_.scala.Long = forwardBiasedSlotWindow.getOrElse(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_forwardBiasedSlotWindow.toCustom(com.google.protobuf.wrappers.UInt64Value.defaultInstance))
def clearForwardBiasedSlotWindow: UpdateProposal = copy(forwardBiasedSlotWindow = _root_.scala.None)
def withForwardBiasedSlotWindow(__v: _root_.scala.Long): UpdateProposal = copy(forwardBiasedSlotWindow = Option(__v))
def getOperationalPeriodsPerEpoch: _root_.scala.Long = operationalPeriodsPerEpoch.getOrElse(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_operationalPeriodsPerEpoch.toCustom(com.google.protobuf.wrappers.UInt64Value.defaultInstance))
def clearOperationalPeriodsPerEpoch: UpdateProposal = copy(operationalPeriodsPerEpoch = _root_.scala.None)
def withOperationalPeriodsPerEpoch(__v: _root_.scala.Long): UpdateProposal = copy(operationalPeriodsPerEpoch = Option(__v))
def getKesKeyHours: _root_.scala.Int = kesKeyHours.getOrElse(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyHours.toCustom(com.google.protobuf.wrappers.UInt32Value.defaultInstance))
def clearKesKeyHours: UpdateProposal = copy(kesKeyHours = _root_.scala.None)
def withKesKeyHours(__v: _root_.scala.Int): UpdateProposal = copy(kesKeyHours = Option(__v))
def getKesKeyMinutes: _root_.scala.Int = kesKeyMinutes.getOrElse(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyMinutes.toCustom(com.google.protobuf.wrappers.UInt32Value.defaultInstance))
def clearKesKeyMinutes: UpdateProposal = copy(kesKeyMinutes = _root_.scala.None)
def withKesKeyMinutes(__v: _root_.scala.Int): UpdateProposal = copy(kesKeyMinutes = Option(__v))
def getSlotGapLeaderElection: _root_.scala.Long = slotGapLeaderElection.getOrElse(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_slotGapLeaderElection.toCustom(com.google.protobuf.wrappers.UInt64Value.defaultInstance))
def clearSlotGapLeaderElection: UpdateProposal = copy(slotGapLeaderElection = _root_.scala.None)
def withSlotGapLeaderElection(__v: _root_.scala.Long): UpdateProposal = copy(slotGapLeaderElection = 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 => {
val __t = label
if (__t != "") __t else null
}
case 2 => fEffective.orNull
case 3 => vrfLddCutoff.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfLddCutoff.toBase(_)).orNull
case 4 => vrfPrecision.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfPrecision.toBase(_)).orNull
case 5 => vrfBaselineDifficulty.orNull
case 6 => vrfAmplitude.orNull
case 7 => chainSelectionKLookback.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_chainSelectionKLookback.toBase(_)).orNull
case 8 => slotDuration.orNull
case 9 => forwardBiasedSlotWindow.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_forwardBiasedSlotWindow.toBase(_)).orNull
case 10 => operationalPeriodsPerEpoch.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_operationalPeriodsPerEpoch.toBase(_)).orNull
case 11 => kesKeyHours.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyHours.toBase(_)).orNull
case 12 => kesKeyMinutes.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyMinutes.toBase(_)).orNull
case 13 => slotGapLeaderElection.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_slotGapLeaderElection.toBase(_)).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 => _root_.scalapb.descriptors.PString(label)
case 2 => fEffective.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => vrfLddCutoff.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfLddCutoff.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 4 => vrfPrecision.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfPrecision.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 5 => vrfBaselineDifficulty.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 6 => vrfAmplitude.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 7 => chainSelectionKLookback.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_chainSelectionKLookback.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 8 => slotDuration.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 9 => forwardBiasedSlotWindow.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_forwardBiasedSlotWindow.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 10 => operationalPeriodsPerEpoch.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_operationalPeriodsPerEpoch.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 11 => kesKeyHours.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyHours.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 12 => kesKeyMinutes.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyMinutes.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 13 => slotGapLeaderElection.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_slotGapLeaderElection.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: org.plasmalabs.sdk.models.box.Value.UpdateProposal.type = org.plasmalabs.sdk.models.box.Value.UpdateProposal
// @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.box.Value.UpdateProposal])
}
object UpdateProposal extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.UpdateProposal] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.UpdateProposal] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.box.Value.UpdateProposal = {
var __label: _root_.scala.Predef.String = ""
var __fEffective: _root_.scala.Option[quivr.models.Ratio] = _root_.scala.None
var __vrfLddCutoff: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
var __vrfPrecision: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
var __vrfBaselineDifficulty: _root_.scala.Option[quivr.models.Ratio] = _root_.scala.None
var __vrfAmplitude: _root_.scala.Option[quivr.models.Ratio] = _root_.scala.None
var __chainSelectionKLookback: _root_.scala.Option[_root_.scala.Long] = _root_.scala.None
var __slotDuration: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None
var __forwardBiasedSlotWindow: _root_.scala.Option[_root_.scala.Long] = _root_.scala.None
var __operationalPeriodsPerEpoch: _root_.scala.Option[_root_.scala.Long] = _root_.scala.None
var __kesKeyHours: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
var __kesKeyMinutes: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
var __slotGapLeaderElection: _root_.scala.Option[_root_.scala.Long] = _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 =>
__label = _input__.readStringRequireUtf8()
case 18 =>
__fEffective = _root_.scala.Option(__fEffective.fold(_root_.scalapb.LiteParser.readMessage[quivr.models.Ratio](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 26 =>
__vrfLddCutoff = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfLddCutoff.toCustom(__vrfLddCutoff.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfLddCutoff.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt32Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 34 =>
__vrfPrecision = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfPrecision.toCustom(__vrfPrecision.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfPrecision.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt32Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 42 =>
__vrfBaselineDifficulty = _root_.scala.Option(__vrfBaselineDifficulty.fold(_root_.scalapb.LiteParser.readMessage[quivr.models.Ratio](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 50 =>
__vrfAmplitude = _root_.scala.Option(__vrfAmplitude.fold(_root_.scalapb.LiteParser.readMessage[quivr.models.Ratio](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 58 =>
__chainSelectionKLookback = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_chainSelectionKLookback.toCustom(__chainSelectionKLookback.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_chainSelectionKLookback.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt64Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 66 =>
__slotDuration = _root_.scala.Option(__slotDuration.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.duration.Duration](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 74 =>
__forwardBiasedSlotWindow = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_forwardBiasedSlotWindow.toCustom(__forwardBiasedSlotWindow.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_forwardBiasedSlotWindow.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt64Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 82 =>
__operationalPeriodsPerEpoch = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_operationalPeriodsPerEpoch.toCustom(__operationalPeriodsPerEpoch.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_operationalPeriodsPerEpoch.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt64Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 90 =>
__kesKeyHours = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyHours.toCustom(__kesKeyHours.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyHours.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt32Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 98 =>
__kesKeyMinutes = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyMinutes.toCustom(__kesKeyMinutes.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyMinutes.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt32Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 106 =>
__slotGapLeaderElection = _root_.scala.Option(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_slotGapLeaderElection.toCustom(__slotGapLeaderElection.map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_slotGapLeaderElection.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt64Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
org.plasmalabs.sdk.models.box.Value.UpdateProposal(
label = __label,
fEffective = __fEffective,
vrfLddCutoff = __vrfLddCutoff,
vrfPrecision = __vrfPrecision,
vrfBaselineDifficulty = __vrfBaselineDifficulty,
vrfAmplitude = __vrfAmplitude,
chainSelectionKLookback = __chainSelectionKLookback,
slotDuration = __slotDuration,
forwardBiasedSlotWindow = __forwardBiasedSlotWindow,
operationalPeriodsPerEpoch = __operationalPeriodsPerEpoch,
kesKeyHours = __kesKeyHours,
kesKeyMinutes = __kesKeyMinutes,
slotGapLeaderElection = __slotGapLeaderElection,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.box.Value.UpdateProposal] = _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.")
org.plasmalabs.sdk.models.box.Value.UpdateProposal(
label = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
fEffective = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[quivr.models.Ratio]]),
vrfLddCutoff = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt32Value]]).map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfLddCutoff.toCustom(_)),
vrfPrecision = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt32Value]]).map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_vrfPrecision.toCustom(_)),
vrfBaselineDifficulty = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[quivr.models.Ratio]]),
vrfAmplitude = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[quivr.models.Ratio]]),
chainSelectionKLookback = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt64Value]]).map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_chainSelectionKLookback.toCustom(_)),
slotDuration = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.duration.Duration]]),
forwardBiasedSlotWindow = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt64Value]]).map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_forwardBiasedSlotWindow.toCustom(_)),
operationalPeriodsPerEpoch = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt64Value]]).map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_operationalPeriodsPerEpoch.toCustom(_)),
kesKeyHours = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt32Value]]).map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyHours.toCustom(_)),
kesKeyMinutes = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt32Value]]).map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_kesKeyMinutes.toCustom(_)),
slotGapLeaderElection = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt64Value]]).map(org.plasmalabs.sdk.models.box.Value.UpdateProposal._typemapper_slotGapLeaderElection.toCustom(_))
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.javaDescriptor.getNestedTypes().get(5)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.scalaDescriptor.nestedMessages(5)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 2 => __out = quivr.models.Ratio
case 3 => __out = com.google.protobuf.wrappers.UInt32Value
case 4 => __out = com.google.protobuf.wrappers.UInt32Value
case 5 => __out = quivr.models.Ratio
case 6 => __out = quivr.models.Ratio
case 7 => __out = com.google.protobuf.wrappers.UInt64Value
case 8 => __out = com.google.protobuf.duration.Duration
case 9 => __out = com.google.protobuf.wrappers.UInt64Value
case 10 => __out = com.google.protobuf.wrappers.UInt64Value
case 11 => __out = com.google.protobuf.wrappers.UInt32Value
case 12 => __out = com.google.protobuf.wrappers.UInt32Value
case 13 => __out = com.google.protobuf.wrappers.UInt64Value
}
__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 = org.plasmalabs.sdk.models.box.Value.UpdateProposal(
label = "",
fEffective = _root_.scala.None,
vrfLddCutoff = _root_.scala.None,
vrfPrecision = _root_.scala.None,
vrfBaselineDifficulty = _root_.scala.None,
vrfAmplitude = _root_.scala.None,
chainSelectionKLookback = _root_.scala.None,
slotDuration = _root_.scala.None,
forwardBiasedSlotWindow = _root_.scala.None,
operationalPeriodsPerEpoch = _root_.scala.None,
kesKeyHours = _root_.scala.None,
kesKeyMinutes = _root_.scala.None,
slotGapLeaderElection = _root_.scala.None
)
implicit class UpdateProposalLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.UpdateProposal]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.box.Value.UpdateProposal](_l) {
def label: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.label)((c_, f_) => c_.copy(label = f_))
def fEffective: _root_.scalapb.lenses.Lens[UpperPB, quivr.models.Ratio] = field(_.getFEffective)((c_, f_) => c_.copy(fEffective = _root_.scala.Option(f_)))
def optionalFEffective: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[quivr.models.Ratio]] = field(_.fEffective)((c_, f_) => c_.copy(fEffective = f_))
def vrfLddCutoff: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getVrfLddCutoff)((c_, f_) => c_.copy(vrfLddCutoff = _root_.scala.Option(f_)))
def optionalVrfLddCutoff: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Int]] = field(_.vrfLddCutoff)((c_, f_) => c_.copy(vrfLddCutoff = f_))
def vrfPrecision: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getVrfPrecision)((c_, f_) => c_.copy(vrfPrecision = _root_.scala.Option(f_)))
def optionalVrfPrecision: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Int]] = field(_.vrfPrecision)((c_, f_) => c_.copy(vrfPrecision = f_))
def vrfBaselineDifficulty: _root_.scalapb.lenses.Lens[UpperPB, quivr.models.Ratio] = field(_.getVrfBaselineDifficulty)((c_, f_) => c_.copy(vrfBaselineDifficulty = _root_.scala.Option(f_)))
def optionalVrfBaselineDifficulty: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[quivr.models.Ratio]] = field(_.vrfBaselineDifficulty)((c_, f_) => c_.copy(vrfBaselineDifficulty = f_))
def vrfAmplitude: _root_.scalapb.lenses.Lens[UpperPB, quivr.models.Ratio] = field(_.getVrfAmplitude)((c_, f_) => c_.copy(vrfAmplitude = _root_.scala.Option(f_)))
def optionalVrfAmplitude: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[quivr.models.Ratio]] = field(_.vrfAmplitude)((c_, f_) => c_.copy(vrfAmplitude = f_))
def chainSelectionKLookback: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.getChainSelectionKLookback)((c_, f_) => c_.copy(chainSelectionKLookback = _root_.scala.Option(f_)))
def optionalChainSelectionKLookback: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Long]] = field(_.chainSelectionKLookback)((c_, f_) => c_.copy(chainSelectionKLookback = f_))
def slotDuration: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.duration.Duration] = field(_.getSlotDuration)((c_, f_) => c_.copy(slotDuration = _root_.scala.Option(f_)))
def optionalSlotDuration: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.duration.Duration]] = field(_.slotDuration)((c_, f_) => c_.copy(slotDuration = f_))
def forwardBiasedSlotWindow: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.getForwardBiasedSlotWindow)((c_, f_) => c_.copy(forwardBiasedSlotWindow = _root_.scala.Option(f_)))
def optionalForwardBiasedSlotWindow: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Long]] = field(_.forwardBiasedSlotWindow)((c_, f_) => c_.copy(forwardBiasedSlotWindow = f_))
def operationalPeriodsPerEpoch: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.getOperationalPeriodsPerEpoch)((c_, f_) => c_.copy(operationalPeriodsPerEpoch = _root_.scala.Option(f_)))
def optionalOperationalPeriodsPerEpoch: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Long]] = field(_.operationalPeriodsPerEpoch)((c_, f_) => c_.copy(operationalPeriodsPerEpoch = f_))
def kesKeyHours: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getKesKeyHours)((c_, f_) => c_.copy(kesKeyHours = _root_.scala.Option(f_)))
def optionalKesKeyHours: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Int]] = field(_.kesKeyHours)((c_, f_) => c_.copy(kesKeyHours = f_))
def kesKeyMinutes: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getKesKeyMinutes)((c_, f_) => c_.copy(kesKeyMinutes = _root_.scala.Option(f_)))
def optionalKesKeyMinutes: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Int]] = field(_.kesKeyMinutes)((c_, f_) => c_.copy(kesKeyMinutes = f_))
def slotGapLeaderElection: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.getSlotGapLeaderElection)((c_, f_) => c_.copy(slotGapLeaderElection = _root_.scala.Option(f_)))
def optionalSlotGapLeaderElection: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Long]] = field(_.slotGapLeaderElection)((c_, f_) => c_.copy(slotGapLeaderElection = f_))
}
final val LABEL_FIELD_NUMBER = 1
final val FEFFECTIVE_FIELD_NUMBER = 2
final val VRFLDDCUTOFF_FIELD_NUMBER = 3
final val VRFPRECISION_FIELD_NUMBER = 4
final val VRFBASELINEDIFFICULTY_FIELD_NUMBER = 5
final val VRFAMPLITUDE_FIELD_NUMBER = 6
final val CHAINSELECTIONKLOOKBACK_FIELD_NUMBER = 7
final val SLOTDURATION_FIELD_NUMBER = 8
final val FORWARDBIASEDSLOTWINDOW_FIELD_NUMBER = 9
final val OPERATIONALPERIODSPEREPOCH_FIELD_NUMBER = 10
final val KESKEYHOURS_FIELD_NUMBER = 11
final val KESKEYMINUTES_FIELD_NUMBER = 12
final val SLOTGAPLEADERELECTION_FIELD_NUMBER = 13
@transient
private[box] val _typemapper_vrfLddCutoff: _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[box] val _typemapper_vrfPrecision: _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[box] val _typemapper_chainSelectionKLookback: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt64Value, _root_.scala.Long] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt64Value, _root_.scala.Long]]
@transient
private[box] val _typemapper_forwardBiasedSlotWindow: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt64Value, _root_.scala.Long] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt64Value, _root_.scala.Long]]
@transient
private[box] val _typemapper_operationalPeriodsPerEpoch: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt64Value, _root_.scala.Long] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt64Value, _root_.scala.Long]]
@transient
private[box] val _typemapper_kesKeyHours: _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[box] val _typemapper_kesKeyMinutes: _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[box] val _typemapper_slotGapLeaderElection: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt64Value, _root_.scala.Long] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt64Value, _root_.scala.Long]]
def of(
label: _root_.scala.Predef.String,
fEffective: _root_.scala.Option[quivr.models.Ratio],
vrfLddCutoff: _root_.scala.Option[_root_.scala.Int],
vrfPrecision: _root_.scala.Option[_root_.scala.Int],
vrfBaselineDifficulty: _root_.scala.Option[quivr.models.Ratio],
vrfAmplitude: _root_.scala.Option[quivr.models.Ratio],
chainSelectionKLookback: _root_.scala.Option[_root_.scala.Long],
slotDuration: _root_.scala.Option[com.google.protobuf.duration.Duration],
forwardBiasedSlotWindow: _root_.scala.Option[_root_.scala.Long],
operationalPeriodsPerEpoch: _root_.scala.Option[_root_.scala.Long],
kesKeyHours: _root_.scala.Option[_root_.scala.Int],
kesKeyMinutes: _root_.scala.Option[_root_.scala.Int],
slotGapLeaderElection: _root_.scala.Option[_root_.scala.Long]
): _root_.org.plasmalabs.sdk.models.box.Value.UpdateProposal = _root_.org.plasmalabs.sdk.models.box.Value.UpdateProposal(
label,
fEffective,
vrfLddCutoff,
vrfPrecision,
vrfBaselineDifficulty,
vrfAmplitude,
chainSelectionKLookback,
slotDuration,
forwardBiasedSlotWindow,
operationalPeriodsPerEpoch,
kesKeyHours,
kesKeyMinutes,
slotGapLeaderElection
)
// @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.UpdateProposal])
}
@SerialVersionUID(0L)
final case class ConfigProposal(
value: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ConfigProposal] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
value.foreach { __item =>
val __value = org.plasmalabs.sdk.models.box.Value.ConfigProposal._typemapper_value.toBase(__item)
__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 = {
value.foreach { __v =>
val __m = org.plasmalabs.sdk.models.box.Value.ConfigProposal._typemapper_value.toBase(__v)
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def clearValue = copy(value = _root_.scala.collection.immutable.Map.empty)
def addValue(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): ConfigProposal = addAllValue(__vs)
def addAllValue(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): ConfigProposal = copy(value = value ++ __vs)
def withValue(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): ConfigProposal = 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.iterator.map(org.plasmalabs.sdk.models.box.Value.ConfigProposal._typemapper_value.toBase(_)).toSeq
}
}
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(value.iterator.map(org.plasmalabs.sdk.models.box.Value.ConfigProposal._typemapper_value.toBase(_).toPMessage).toVector)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: org.plasmalabs.sdk.models.box.Value.ConfigProposal.type = org.plasmalabs.sdk.models.box.Value.ConfigProposal
// @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.box.Value.ConfigProposal])
}
object ConfigProposal extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.ConfigProposal] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.ConfigProposal] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.box.Value.ConfigProposal = {
val __value: _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 `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__value += org.plasmalabs.sdk.models.box.Value.ConfigProposal._typemapper_value.toCustom(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry](_input__))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
org.plasmalabs.sdk.models.box.Value.ConfigProposal(
value = __value.result(),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.box.Value.ConfigProposal] = _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.")
org.plasmalabs.sdk.models.box.Value.ConfigProposal(
value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(org.plasmalabs.sdk.models.box.Value.ConfigProposal._typemapper_value.toCustom(_)).toMap
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.javaDescriptor.getNestedTypes().get(6)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.scalaDescriptor.nestedMessages(6)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = org.plasmalabs.sdk.models.box.Value.ConfigProposal(
value = _root_.scala.collection.immutable.Map.empty
)
@SerialVersionUID(0L)
final case class ValueEntry(
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[ValueEntry] {
@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): ValueEntry = copy(key = __v)
def withValue(__v: _root_.scala.Predef.String): ValueEntry = 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: org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry.type = org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry
// @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry])
}
object ValueEntry extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry = {
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__)
}
}
org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry(
key = __key,
value = __value,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry] = _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.")
org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry(
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 = org.plasmalabs.sdk.models.box.Value.ConfigProposal.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.box.Value.ConfigProposal.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 = org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry(
key = "",
value = ""
)
implicit class ValueEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry](_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[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] =
_root_.scalapb.TypeMapper[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry(__p._1, __p._2))
def of(
key: _root_.scala.Predef.String,
value: _root_.scala.Predef.String
): _root_.org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry = _root_.org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry(
key,
value
)
// @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry])
}
implicit class ConfigProposalLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.ConfigProposal]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.box.Value.ConfigProposal](_l) {
def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.value)((c_, f_) => c_.copy(value = f_))
}
final val VALUE_FIELD_NUMBER = 1
@transient
private[box] val _typemapper_value: _root_.scalapb.TypeMapper[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[org.plasmalabs.sdk.models.box.Value.ConfigProposal.ValueEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]]
def of(
value: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]
): _root_.org.plasmalabs.sdk.models.box.Value.ConfigProposal = _root_.org.plasmalabs.sdk.models.box.Value.ConfigProposal(
value
)
// @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value.ConfigProposal])
}
implicit class ValueLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.box.Value](_l) {
def lvl: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.LVL] = field(_.getLvl)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.box.Value.Value.Lvl(f_)))
def topl: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.TOPL] = field(_.getTopl)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.box.Value.Value.Topl(f_)))
def asset: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.Asset] = field(_.getAsset)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.box.Value.Value.Asset(f_)))
def group: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.Group] = field(_.getGroup)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.box.Value.Value.Group(f_)))
def series: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.Series] = field(_.getSeries)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.box.Value.Value.Series(f_)))
def updateProposal: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.UpdateProposal] = field(_.getUpdateProposal)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.box.Value.Value.UpdateProposal(f_)))
def configProposal: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.ConfigProposal] = field(_.getConfigProposal)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.box.Value.Value.ConfigProposal(f_)))
def value: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.box.Value.Value] = field(_.value)((c_, f_) => c_.copy(value = f_))
}
final val LVL_FIELD_NUMBER = 1
final val TOPL_FIELD_NUMBER = 2
final val ASSET_FIELD_NUMBER = 3
final val GROUP_FIELD_NUMBER = 4
final val SERIES_FIELD_NUMBER = 5
final val UPDATEPROPOSAL_FIELD_NUMBER = 6
final val CONFIGPROPOSAL_FIELD_NUMBER = 7
def of(
value: org.plasmalabs.sdk.models.box.Value.Value
): _root_.org.plasmalabs.sdk.models.box.Value = _root_.org.plasmalabs.sdk.models.box.Value(
value
)
implicit def validator: scalapb.validate.Validator[org.plasmalabs.sdk.models.box.Value] = org.plasmalabs.sdk.models.box.ValueValidator
// @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.box.Value])
}