All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.plasmalabs.sdk.models.Event.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

/** Events are uniquely identifiable occurrences of state mutations within the blockchain protocol.
  * Each event is associated with certain data that may be updated every tick.
  */
@SerialVersionUID(0L)
final case class Event(
    value: org.plasmalabs.sdk.models.Event.Value = org.plasmalabs.sdk.models.Event.Value.Empty,
    unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
    ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Event] {
    @transient
    private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
    private[this] def __computeSerializedSize(): _root_.scala.Int = {
      var __size = 0
      if (value.eon.isDefined) {
        val __value = value.eon.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (value.era.isDefined) {
        val __value = value.era.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (value.epoch.isDefined) {
        val __value = value.epoch.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (value.header.isDefined) {
        val __value = value.header.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (value.ioTransaction.isDefined) {
        val __value = value.ioTransaction.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (value.groupPolicy.isDefined) {
        val __value = value.groupPolicy.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      if (value.seriesPolicy.isDefined) {
        val __value = value.seriesPolicy.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.eon.foreach { __v =>
        val __m = __v
        _output__.writeTag(1, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      value.era.foreach { __v =>
        val __m = __v
        _output__.writeTag(2, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      value.epoch.foreach { __v =>
        val __m = __v
        _output__.writeTag(3, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      value.header.foreach { __v =>
        val __m = __v
        _output__.writeTag(4, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      value.ioTransaction.foreach { __v =>
        val __m = __v
        _output__.writeTag(5, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      value.groupPolicy.foreach { __v =>
        val __m = __v
        _output__.writeTag(6, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      value.seriesPolicy.foreach { __v =>
        val __m = __v
        _output__.writeTag(7, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      unknownFields.writeTo(_output__)
    }
    def getEon: org.plasmalabs.sdk.models.Event.Eon = value.eon.getOrElse(org.plasmalabs.sdk.models.Event.Eon.defaultInstance)
    def withEon(__v: org.plasmalabs.sdk.models.Event.Eon): Event = copy(value = org.plasmalabs.sdk.models.Event.Value.Eon(__v))
    def getEra: org.plasmalabs.sdk.models.Event.Era = value.era.getOrElse(org.plasmalabs.sdk.models.Event.Era.defaultInstance)
    def withEra(__v: org.plasmalabs.sdk.models.Event.Era): Event = copy(value = org.plasmalabs.sdk.models.Event.Value.Era(__v))
    def getEpoch: org.plasmalabs.sdk.models.Event.Epoch = value.epoch.getOrElse(org.plasmalabs.sdk.models.Event.Epoch.defaultInstance)
    def withEpoch(__v: org.plasmalabs.sdk.models.Event.Epoch): Event = copy(value = org.plasmalabs.sdk.models.Event.Value.Epoch(__v))
    def getHeader: org.plasmalabs.sdk.models.Event.Header = value.header.getOrElse(org.plasmalabs.sdk.models.Event.Header.defaultInstance)
    def withHeader(__v: org.plasmalabs.sdk.models.Event.Header): Event = copy(value = org.plasmalabs.sdk.models.Event.Value.Header(__v))
    def getIoTransaction: org.plasmalabs.sdk.models.Event.IoTransaction = value.ioTransaction.getOrElse(org.plasmalabs.sdk.models.Event.IoTransaction.defaultInstance)
    def withIoTransaction(__v: org.plasmalabs.sdk.models.Event.IoTransaction): Event = copy(value = org.plasmalabs.sdk.models.Event.Value.IoTransaction(__v))
    def getGroupPolicy: org.plasmalabs.sdk.models.Event.GroupPolicy = value.groupPolicy.getOrElse(org.plasmalabs.sdk.models.Event.GroupPolicy.defaultInstance)
    def withGroupPolicy(__v: org.plasmalabs.sdk.models.Event.GroupPolicy): Event = copy(value = org.plasmalabs.sdk.models.Event.Value.GroupPolicy(__v))
    def getSeriesPolicy: org.plasmalabs.sdk.models.Event.SeriesPolicy = value.seriesPolicy.getOrElse(org.plasmalabs.sdk.models.Event.SeriesPolicy.defaultInstance)
    def withSeriesPolicy(__v: org.plasmalabs.sdk.models.Event.SeriesPolicy): Event = copy(value = org.plasmalabs.sdk.models.Event.Value.SeriesPolicy(__v))
    def clearValue: Event = copy(value = org.plasmalabs.sdk.models.Event.Value.Empty)
    def withValue(__v: org.plasmalabs.sdk.models.Event.Value): Event = 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.eon.orNull
        case 2 => value.era.orNull
        case 3 => value.epoch.orNull
        case 4 => value.header.orNull
        case 5 => value.ioTransaction.orNull
        case 6 => value.groupPolicy.orNull
        case 7 => value.seriesPolicy.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.eon.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 2 => value.era.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 3 => value.epoch.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 4 => value.header.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 5 => value.ioTransaction.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 6 => value.groupPolicy.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 7 => value.seriesPolicy.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
      }
    }
    def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
    def companion: org.plasmalabs.sdk.models.Event.type = org.plasmalabs.sdk.models.Event
    _root_.scalapb.validate.Validator.assertValid(this)(org.plasmalabs.sdk.models.EventValidator)
    // @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.Event])
}

object Event extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event] {
  implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event] = this
  def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.Event = {
    var __value: org.plasmalabs.sdk.models.Event.Value = org.plasmalabs.sdk.models.Event.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.Event.Value.Eon(__value.eon.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.Event.Eon](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 18 =>
          __value = org.plasmalabs.sdk.models.Event.Value.Era(__value.era.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.Event.Era](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 26 =>
          __value = org.plasmalabs.sdk.models.Event.Value.Epoch(__value.epoch.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.Event.Epoch](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 34 =>
          __value = org.plasmalabs.sdk.models.Event.Value.Header(__value.header.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.Event.Header](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 42 =>
          __value = org.plasmalabs.sdk.models.Event.Value.IoTransaction(__value.ioTransaction.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.Event.IoTransaction](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 50 =>
          __value = org.plasmalabs.sdk.models.Event.Value.GroupPolicy(__value.groupPolicy.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.Event.GroupPolicy](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case 58 =>
          __value = org.plasmalabs.sdk.models.Event.Value.SeriesPolicy(__value.seriesPolicy.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.Event.SeriesPolicy](_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.Event(
        value = __value,
        unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
    )
  }
  implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.Event] = _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.Event(
        value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.Event.Eon]]).map(org.plasmalabs.sdk.models.Event.Value.Eon(_))
            .orElse[org.plasmalabs.sdk.models.Event.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.Event.Era]]).map(org.plasmalabs.sdk.models.Event.Value.Era(_)))
            .orElse[org.plasmalabs.sdk.models.Event.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.Event.Epoch]]).map(org.plasmalabs.sdk.models.Event.Value.Epoch(_)))
            .orElse[org.plasmalabs.sdk.models.Event.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.Event.Header]]).map(org.plasmalabs.sdk.models.Event.Value.Header(_)))
            .orElse[org.plasmalabs.sdk.models.Event.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.Event.IoTransaction]]).map(org.plasmalabs.sdk.models.Event.Value.IoTransaction(_)))
            .orElse[org.plasmalabs.sdk.models.Event.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.Event.GroupPolicy]]).map(org.plasmalabs.sdk.models.Event.Value.GroupPolicy(_)))
            .orElse[org.plasmalabs.sdk.models.Event.Value](__fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[org.plasmalabs.sdk.models.Event.SeriesPolicy]]).map(org.plasmalabs.sdk.models.Event.Value.SeriesPolicy(_)))
            .getOrElse(org.plasmalabs.sdk.models.Event.Value.Empty)
      )
    case _ => throw new RuntimeException("Expected PMessage")
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = EventProto.javaDescriptor.getMessageTypes().get(0)
  def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = EventProto.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.Event.Eon
      case 2 => __out = org.plasmalabs.sdk.models.Event.Era
      case 3 => __out = org.plasmalabs.sdk.models.Event.Epoch
      case 4 => __out = org.plasmalabs.sdk.models.Event.Header
      case 5 => __out = org.plasmalabs.sdk.models.Event.IoTransaction
      case 6 => __out = org.plasmalabs.sdk.models.Event.GroupPolicy
      case 7 => __out = org.plasmalabs.sdk.models.Event.SeriesPolicy
    }
    __out
  }
  lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
    Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
      _root_.org.plasmalabs.sdk.models.Event.Eon,
      _root_.org.plasmalabs.sdk.models.Event.Era,
      _root_.org.plasmalabs.sdk.models.Event.Epoch,
      _root_.org.plasmalabs.sdk.models.Event.Header,
      _root_.org.plasmalabs.sdk.models.Event.IoTransaction,
      _root_.org.plasmalabs.sdk.models.Event.GroupPolicy,
      _root_.org.plasmalabs.sdk.models.Event.SeriesPolicy
    )
  def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
  lazy val defaultInstance = org.plasmalabs.sdk.models.Event(
    value = org.plasmalabs.sdk.models.Event.Value.Empty
  )
  sealed trait Value extends _root_.scalapb.GeneratedOneof {
    def isEmpty: _root_.scala.Boolean = false
    def isDefined: _root_.scala.Boolean = true
    def isEon: _root_.scala.Boolean = false
    def isEra: _root_.scala.Boolean = false
    def isEpoch: _root_.scala.Boolean = false
    def isHeader: _root_.scala.Boolean = false
    def isIoTransaction: _root_.scala.Boolean = false
    def isGroupPolicy: _root_.scala.Boolean = false
    def isSeriesPolicy: _root_.scala.Boolean = false
    def eon: _root_.scala.Option[org.plasmalabs.sdk.models.Event.Eon] = _root_.scala.None
    def era: _root_.scala.Option[org.plasmalabs.sdk.models.Event.Era] = _root_.scala.None
    def epoch: _root_.scala.Option[org.plasmalabs.sdk.models.Event.Epoch] = _root_.scala.None
    def header: _root_.scala.Option[org.plasmalabs.sdk.models.Event.Header] = _root_.scala.None
    def ioTransaction: _root_.scala.Option[org.plasmalabs.sdk.models.Event.IoTransaction] = _root_.scala.None
    def groupPolicy: _root_.scala.Option[org.plasmalabs.sdk.models.Event.GroupPolicy] = _root_.scala.None
    def seriesPolicy: _root_.scala.Option[org.plasmalabs.sdk.models.Event.SeriesPolicy] = _root_.scala.None
  }
  object Value {
    @SerialVersionUID(0L)
    case object Empty extends org.plasmalabs.sdk.models.Event.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 Eon(value: org.plasmalabs.sdk.models.Event.Eon) extends org.plasmalabs.sdk.models.Event.Value {
      type ValueType = org.plasmalabs.sdk.models.Event.Eon
      override def isEon: _root_.scala.Boolean = true
      override def eon: _root_.scala.Option[org.plasmalabs.sdk.models.Event.Eon] = Some(value)
      override def number: _root_.scala.Int = 1
    }
    @SerialVersionUID(0L)
    final case class Era(value: org.plasmalabs.sdk.models.Event.Era) extends org.plasmalabs.sdk.models.Event.Value {
      type ValueType = org.plasmalabs.sdk.models.Event.Era
      override def isEra: _root_.scala.Boolean = true
      override def era: _root_.scala.Option[org.plasmalabs.sdk.models.Event.Era] = Some(value)
      override def number: _root_.scala.Int = 2
    }
    @SerialVersionUID(0L)
    final case class Epoch(value: org.plasmalabs.sdk.models.Event.Epoch) extends org.plasmalabs.sdk.models.Event.Value {
      type ValueType = org.plasmalabs.sdk.models.Event.Epoch
      override def isEpoch: _root_.scala.Boolean = true
      override def epoch: _root_.scala.Option[org.plasmalabs.sdk.models.Event.Epoch] = Some(value)
      override def number: _root_.scala.Int = 3
    }
    @SerialVersionUID(0L)
    final case class Header(value: org.plasmalabs.sdk.models.Event.Header) extends org.plasmalabs.sdk.models.Event.Value {
      type ValueType = org.plasmalabs.sdk.models.Event.Header
      override def isHeader: _root_.scala.Boolean = true
      override def header: _root_.scala.Option[org.plasmalabs.sdk.models.Event.Header] = Some(value)
      override def number: _root_.scala.Int = 4
    }
    @SerialVersionUID(0L)
    final case class IoTransaction(value: org.plasmalabs.sdk.models.Event.IoTransaction) extends org.plasmalabs.sdk.models.Event.Value {
      type ValueType = org.plasmalabs.sdk.models.Event.IoTransaction
      override def isIoTransaction: _root_.scala.Boolean = true
      override def ioTransaction: _root_.scala.Option[org.plasmalabs.sdk.models.Event.IoTransaction] = Some(value)
      override def number: _root_.scala.Int = 5
    }
    @SerialVersionUID(0L)
    final case class GroupPolicy(value: org.plasmalabs.sdk.models.Event.GroupPolicy) extends org.plasmalabs.sdk.models.Event.Value {
      type ValueType = org.plasmalabs.sdk.models.Event.GroupPolicy
      override def isGroupPolicy: _root_.scala.Boolean = true
      override def groupPolicy: _root_.scala.Option[org.plasmalabs.sdk.models.Event.GroupPolicy] = Some(value)
      override def number: _root_.scala.Int = 6
    }
    @SerialVersionUID(0L)
    final case class SeriesPolicy(value: org.plasmalabs.sdk.models.Event.SeriesPolicy) extends org.plasmalabs.sdk.models.Event.Value {
      type ValueType = org.plasmalabs.sdk.models.Event.SeriesPolicy
      override def isSeriesPolicy: _root_.scala.Boolean = true
      override def seriesPolicy: _root_.scala.Option[org.plasmalabs.sdk.models.Event.SeriesPolicy] = Some(value)
      override def number: _root_.scala.Int = 7
    }
  }
  @SerialVersionUID(0L)
  final case class Eon(
      beginSlot: _root_.scala.Long = 0L,
      height: _root_.scala.Long = 0L,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Eon] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        
        {
          val __value = beginSlot
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(1, __value)
          }
        };
        
        {
          val __value = height
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(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 = beginSlot
          if (__v != 0L) {
            _output__.writeUInt64(1, __v)
          }
        };
        {
          val __v = height
          if (__v != 0L) {
            _output__.writeUInt64(2, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def withBeginSlot(__v: _root_.scala.Long): Eon = copy(beginSlot = __v)
      def withHeight(__v: _root_.scala.Long): Eon = copy(height = __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 = beginSlot
            if (__t != 0L) __t else null
          }
          case 2 => {
            val __t = height
            if (__t != 0L) __t else null
          }
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => _root_.scalapb.descriptors.PLong(beginSlot)
          case 2 => _root_.scalapb.descriptors.PLong(height)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: org.plasmalabs.sdk.models.Event.Eon.type = org.plasmalabs.sdk.models.Event.Eon
      // @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.Event.Eon])
  }
  
  object Eon extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Eon] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Eon] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.Event.Eon = {
      var __beginSlot: _root_.scala.Long = 0L
      var __height: _root_.scala.Long = 0L
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 8 =>
            __beginSlot = _input__.readUInt64()
          case 16 =>
            __height = _input__.readUInt64()
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      org.plasmalabs.sdk.models.Event.Eon(
          beginSlot = __beginSlot,
          height = __height,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.Event.Eon] = _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.Event.Eon(
          beginSlot = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          height = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L)
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.Event.javaDescriptor.getNestedTypes().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.Event.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.Event.Eon(
      beginSlot = 0L,
      height = 0L
    )
    implicit class EonLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.Eon]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.Event.Eon](_l) {
      def beginSlot: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.beginSlot)((c_, f_) => c_.copy(beginSlot = f_))
      def height: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.height)((c_, f_) => c_.copy(height = f_))
    }
    final val BEGINSLOT_FIELD_NUMBER = 1
    final val HEIGHT_FIELD_NUMBER = 2
    def of(
      beginSlot: _root_.scala.Long,
      height: _root_.scala.Long
    ): _root_.org.plasmalabs.sdk.models.Event.Eon = _root_.org.plasmalabs.sdk.models.Event.Eon(
      beginSlot,
      height
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Eon])
  }
  
  @SerialVersionUID(0L)
  final case class Era(
      beginSlot: _root_.scala.Long = 0L,
      height: _root_.scala.Long = 0L,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Era] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        
        {
          val __value = beginSlot
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(1, __value)
          }
        };
        
        {
          val __value = height
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(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 = beginSlot
          if (__v != 0L) {
            _output__.writeUInt64(1, __v)
          }
        };
        {
          val __v = height
          if (__v != 0L) {
            _output__.writeUInt64(2, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def withBeginSlot(__v: _root_.scala.Long): Era = copy(beginSlot = __v)
      def withHeight(__v: _root_.scala.Long): Era = copy(height = __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 = beginSlot
            if (__t != 0L) __t else null
          }
          case 2 => {
            val __t = height
            if (__t != 0L) __t else null
          }
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => _root_.scalapb.descriptors.PLong(beginSlot)
          case 2 => _root_.scalapb.descriptors.PLong(height)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: org.plasmalabs.sdk.models.Event.Era.type = org.plasmalabs.sdk.models.Event.Era
      // @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.Event.Era])
  }
  
  object Era extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Era] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Era] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.Event.Era = {
      var __beginSlot: _root_.scala.Long = 0L
      var __height: _root_.scala.Long = 0L
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 8 =>
            __beginSlot = _input__.readUInt64()
          case 16 =>
            __height = _input__.readUInt64()
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      org.plasmalabs.sdk.models.Event.Era(
          beginSlot = __beginSlot,
          height = __height,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.Event.Era] = _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.Event.Era(
          beginSlot = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          height = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L)
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.Event.javaDescriptor.getNestedTypes().get(1)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.Event.scalaDescriptor.nestedMessages(1)
    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.Event.Era(
      beginSlot = 0L,
      height = 0L
    )
    implicit class EraLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.Era]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.Event.Era](_l) {
      def beginSlot: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.beginSlot)((c_, f_) => c_.copy(beginSlot = f_))
      def height: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.height)((c_, f_) => c_.copy(height = f_))
    }
    final val BEGINSLOT_FIELD_NUMBER = 1
    final val HEIGHT_FIELD_NUMBER = 2
    def of(
      beginSlot: _root_.scala.Long,
      height: _root_.scala.Long
    ): _root_.org.plasmalabs.sdk.models.Event.Era = _root_.org.plasmalabs.sdk.models.Event.Era(
      beginSlot,
      height
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Era])
  }
  
  @SerialVersionUID(0L)
  final case class Epoch(
      beginSlot: _root_.scala.Long = 0L,
      height: _root_.scala.Long = 0L,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Epoch] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        
        {
          val __value = beginSlot
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(1, __value)
          }
        };
        
        {
          val __value = height
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(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 = beginSlot
          if (__v != 0L) {
            _output__.writeUInt64(1, __v)
          }
        };
        {
          val __v = height
          if (__v != 0L) {
            _output__.writeUInt64(2, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def withBeginSlot(__v: _root_.scala.Long): Epoch = copy(beginSlot = __v)
      def withHeight(__v: _root_.scala.Long): Epoch = copy(height = __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 = beginSlot
            if (__t != 0L) __t else null
          }
          case 2 => {
            val __t = height
            if (__t != 0L) __t else null
          }
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => _root_.scalapb.descriptors.PLong(beginSlot)
          case 2 => _root_.scalapb.descriptors.PLong(height)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: org.plasmalabs.sdk.models.Event.Epoch.type = org.plasmalabs.sdk.models.Event.Epoch
      // @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.Event.Epoch])
  }
  
  object Epoch extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Epoch] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Epoch] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.Event.Epoch = {
      var __beginSlot: _root_.scala.Long = 0L
      var __height: _root_.scala.Long = 0L
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 8 =>
            __beginSlot = _input__.readUInt64()
          case 16 =>
            __height = _input__.readUInt64()
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      org.plasmalabs.sdk.models.Event.Epoch(
          beginSlot = __beginSlot,
          height = __height,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.Event.Epoch] = _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.Event.Epoch(
          beginSlot = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          height = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L)
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.Event.javaDescriptor.getNestedTypes().get(2)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.Event.scalaDescriptor.nestedMessages(2)
    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.Event.Epoch(
      beginSlot = 0L,
      height = 0L
    )
    implicit class EpochLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.Epoch]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.Event.Epoch](_l) {
      def beginSlot: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.beginSlot)((c_, f_) => c_.copy(beginSlot = f_))
      def height: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.height)((c_, f_) => c_.copy(height = f_))
    }
    final val BEGINSLOT_FIELD_NUMBER = 1
    final val HEIGHT_FIELD_NUMBER = 2
    def of(
      beginSlot: _root_.scala.Long,
      height: _root_.scala.Long
    ): _root_.org.plasmalabs.sdk.models.Event.Epoch = _root_.org.plasmalabs.sdk.models.Event.Epoch(
      beginSlot,
      height
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Epoch])
  }
  
  @SerialVersionUID(0L)
  final case class Header(
      height: _root_.scala.Long = 0L,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Header] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        
        {
          val __value = height
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(1, __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 = height
          if (__v != 0L) {
            _output__.writeUInt64(1, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def withHeight(__v: _root_.scala.Long): Header = copy(height = __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 = height
            if (__t != 0L) __t else null
          }
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => _root_.scalapb.descriptors.PLong(height)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: org.plasmalabs.sdk.models.Event.Header.type = org.plasmalabs.sdk.models.Event.Header
      // @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.Event.Header])
  }
  
  object Header extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Header] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Header] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.Event.Header = {
      var __height: _root_.scala.Long = 0L
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 8 =>
            __height = _input__.readUInt64()
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      org.plasmalabs.sdk.models.Event.Header(
          height = __height,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.Event.Header] = _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.Event.Header(
          height = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L)
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.Event.javaDescriptor.getNestedTypes().get(3)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.Event.scalaDescriptor.nestedMessages(3)
    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.Event.Header(
      height = 0L
    )
    implicit class HeaderLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.Header]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.Event.Header](_l) {
      def height: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.height)((c_, f_) => c_.copy(height = f_))
    }
    final val HEIGHT_FIELD_NUMBER = 1
    def of(
      height: _root_.scala.Long
    ): _root_.org.plasmalabs.sdk.models.Event.Header = _root_.org.plasmalabs.sdk.models.Event.Header(
      height
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.Header])
  }
  
  /** @param schedule
    *  the range of acceptable slots the transaction can be accepted into
    */
  @SerialVersionUID(0L)
  final case class IoTransaction(
      schedule: org.plasmalabs.sdk.models.transaction.Schedule,
      metadata: quivr.models.SmallData,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[IoTransaction] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        
        {
          val __value = schedule
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        
        {
          val __value = metadata
          __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 = schedule
          _output__.writeTag(1, 2)
          _output__.writeUInt32NoTag(__v.serializedSize)
          __v.writeTo(_output__)
        };
        
        {
          val __v = metadata
          _output__.writeTag(4, 2)
          _output__.writeUInt32NoTag(__v.serializedSize)
          __v.writeTo(_output__)
        };
        unknownFields.writeTo(_output__)
      }
      def withSchedule(__v: org.plasmalabs.sdk.models.transaction.Schedule): IoTransaction = copy(schedule = __v)
      def withMetadata(__v: quivr.models.SmallData): IoTransaction = copy(metadata = __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 => schedule
          case 4 => metadata
        }
      }
      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 => schedule.toPMessage
          case 4 => metadata.toPMessage
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: org.plasmalabs.sdk.models.Event.IoTransaction.type = org.plasmalabs.sdk.models.Event.IoTransaction
      // @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.Event.IoTransaction])
  }
  
  object IoTransaction extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.IoTransaction] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.IoTransaction] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.Event.IoTransaction = {
      var __requiredFields0: _root_.scala.Long = 0x3L
      var __schedule: _root_.scala.Option[org.plasmalabs.sdk.models.transaction.Schedule] = _root_.scala.None
      var __metadata: _root_.scala.Option[quivr.models.SmallData] = _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 =>
            __schedule = _root_.scala.Some(__schedule.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.transaction.Schedule](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
            __requiredFields0 &= 0xfffffffffffffffeL
          case 34 =>
            __metadata = _root_.scala.Some(__metadata.fold(_root_.scalapb.LiteParser.readMessage[quivr.models.SmallData](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
            __requiredFields0 &= 0xfffffffffffffffdL
          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.Event.IoTransaction(
          schedule = __schedule.getOrElse(org.plasmalabs.sdk.models.transaction.Schedule.defaultInstance),
          metadata = __metadata.getOrElse(quivr.models.SmallData.defaultInstance),
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.Event.IoTransaction] = _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.Event.IoTransaction(
          schedule = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).get.as[org.plasmalabs.sdk.models.transaction.Schedule],
          metadata = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).get.as[quivr.models.SmallData]
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.Event.javaDescriptor.getNestedTypes().get(4)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.Event.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.transaction.Schedule
        case 4 => __out = quivr.models.SmallData
      }
      __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.Event.IoTransaction(
      schedule = org.plasmalabs.sdk.models.transaction.Schedule.defaultInstance,
      metadata = quivr.models.SmallData.defaultInstance
    )
    implicit class IoTransactionLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.IoTransaction]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.Event.IoTransaction](_l) {
      def schedule: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.transaction.Schedule] = field(_.schedule)((c_, f_) => c_.copy(schedule = f_))
      def metadata: _root_.scalapb.lenses.Lens[UpperPB, quivr.models.SmallData] = field(_.metadata)((c_, f_) => c_.copy(metadata = f_))
    }
    final val SCHEDULE_FIELD_NUMBER = 1
    final val METADATA_FIELD_NUMBER = 4
    def of(
      schedule: org.plasmalabs.sdk.models.transaction.Schedule,
      metadata: quivr.models.SmallData
    ): _root_.org.plasmalabs.sdk.models.Event.IoTransaction = _root_.org.plasmalabs.sdk.models.Event.IoTransaction(
      schedule,
      metadata
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.IoTransaction])
  }
  
  /** @param label
    *   Identifies the group policy for humans (do not confuse with the actual group identifier)
    * @param registrationUtxo
    *   The address of a UTXO. The UTXO contains the LVLs that are paid for minting the group constructor token.
    * @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 GroupPolicy(
      label: _root_.scala.Predef.String = "",
      registrationUtxo: org.plasmalabs.sdk.models.TransactionOutputAddress,
      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[GroupPolicy] {
      @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)
          }
        };
        
        {
          val __value = registrationUtxo
          __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 = label
          if (!__v.isEmpty) {
            _output__.writeString(1, __v)
          }
        };
        
        {
          val __v = registrationUtxo
          _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 withLabel(__v: _root_.scala.Predef.String): GroupPolicy = copy(label = __v)
      def withRegistrationUtxo(__v: org.plasmalabs.sdk.models.TransactionOutputAddress): GroupPolicy = copy(registrationUtxo = __v)
      def getFixedSeries: org.plasmalabs.sdk.models.SeriesId = fixedSeries.getOrElse(org.plasmalabs.sdk.models.SeriesId.defaultInstance)
      def clearFixedSeries: GroupPolicy = copy(fixedSeries = _root_.scala.None)
      def withFixedSeries(__v: org.plasmalabs.sdk.models.SeriesId): GroupPolicy = 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 => {
            val __t = label
            if (__t != "") __t else null
          }
          case 2 => registrationUtxo
          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 => _root_.scalapb.descriptors.PString(label)
          case 2 => registrationUtxo.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.Event.GroupPolicy.type = org.plasmalabs.sdk.models.Event.GroupPolicy
      // @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.Event.GroupPolicy])
  }
  
  object GroupPolicy extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.GroupPolicy] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.GroupPolicy] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.Event.GroupPolicy = {
      var __requiredFields0: _root_.scala.Long = 0x1L
      var __label: _root_.scala.Predef.String = ""
      var __registrationUtxo: _root_.scala.Option[org.plasmalabs.sdk.models.TransactionOutputAddress] = _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 =>
            __label = _input__.readStringRequireUtf8()
          case 18 =>
            __registrationUtxo = _root_.scala.Some(__registrationUtxo.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.TransactionOutputAddress](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
            __requiredFields0 &= 0xfffffffffffffffeL
          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.Event.GroupPolicy(
          label = __label,
          registrationUtxo = __registrationUtxo.getOrElse(org.plasmalabs.sdk.models.TransactionOutputAddress.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.Event.GroupPolicy] = _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.Event.GroupPolicy(
          label = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          registrationUtxo = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).get.as[org.plasmalabs.sdk.models.TransactionOutputAddress],
          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.Event.javaDescriptor.getNestedTypes().get(5)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.Event.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 = org.plasmalabs.sdk.models.TransactionOutputAddress
        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.Event.GroupPolicy(
      label = "",
      registrationUtxo = org.plasmalabs.sdk.models.TransactionOutputAddress.defaultInstance,
      fixedSeries = _root_.scala.None
    )
    implicit class GroupPolicyLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.GroupPolicy]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.Event.GroupPolicy](_l) {
      def label: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.label)((c_, f_) => c_.copy(label = f_))
      def registrationUtxo: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.TransactionOutputAddress] = field(_.registrationUtxo)((c_, f_) => c_.copy(registrationUtxo = 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 LABEL_FIELD_NUMBER = 1
    final val REGISTRATIONUTXO_FIELD_NUMBER = 2
    final val FIXEDSERIES_FIELD_NUMBER = 3
    def of(
      label: _root_.scala.Predef.String,
      registrationUtxo: org.plasmalabs.sdk.models.TransactionOutputAddress,
      fixedSeries: _root_.scala.Option[org.plasmalabs.sdk.models.SeriesId]
    ): _root_.org.plasmalabs.sdk.models.Event.GroupPolicy = _root_.org.plasmalabs.sdk.models.Event.GroupPolicy(
      label,
      registrationUtxo,
      fixedSeries
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.GroupPolicy])
  }
  
  /** @param label
    *   The human readable name of this series. (do not confuse with the actual series identifier)
    * @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 registrationUtxo
    *   The address of a UTXO. The UTXO contains the LVLs that are paid for minting the series constructor token.
    * @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.
    * @param ephemeralMetadataScheme
    *   Describes the schema of the data stored in the metadata field of the Asset Minting Statement.
    * @param permanentMetadataScheme
    *   Describes the schema of the data stored in the Asset Token.
    */
  @SerialVersionUID(0L)
  final case class SeriesPolicy(
      label: _root_.scala.Predef.String = "",
      tokenSupply: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
      registrationUtxo: org.plasmalabs.sdk.models.TransactionOutputAddress,
      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,
      ephemeralMetadataScheme: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None,
      permanentMetadataScheme: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[SeriesPolicy] {
      @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 (tokenSupply.isDefined) {
          val __value = org.plasmalabs.sdk.models.Event.SeriesPolicy._typemapper_tokenSupply.toBase(tokenSupply.get)
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        
        {
          val __value = registrationUtxo
          __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)
          }
        };
        if (ephemeralMetadataScheme.isDefined) {
          val __value = ephemeralMetadataScheme.get
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        if (permanentMetadataScheme.isDefined) {
          val __value = permanentMetadataScheme.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)
          }
        };
        tokenSupply.foreach { __v =>
          val __m = org.plasmalabs.sdk.models.Event.SeriesPolicy._typemapper_tokenSupply.toBase(__v)
          _output__.writeTag(2, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        
        {
          val __v = registrationUtxo
          _output__.writeTag(3, 2)
          _output__.writeUInt32NoTag(__v.serializedSize)
          __v.writeTo(_output__)
        };
        {
          val __v = quantityDescriptor.value
          if (__v != 0) {
            _output__.writeEnum(4, __v)
          }
        };
        {
          val __v = fungibility.value
          if (__v != 0) {
            _output__.writeEnum(5, __v)
          }
        };
        ephemeralMetadataScheme.foreach { __v =>
          val __m = __v
          _output__.writeTag(6, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        permanentMetadataScheme.foreach { __v =>
          val __m = __v
          _output__.writeTag(7, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        unknownFields.writeTo(_output__)
      }
      def withLabel(__v: _root_.scala.Predef.String): SeriesPolicy = copy(label = __v)
      def getTokenSupply: _root_.scala.Int = tokenSupply.getOrElse(org.plasmalabs.sdk.models.Event.SeriesPolicy._typemapper_tokenSupply.toCustom(com.google.protobuf.wrappers.UInt32Value.defaultInstance))
      def clearTokenSupply: SeriesPolicy = copy(tokenSupply = _root_.scala.None)
      def withTokenSupply(__v: _root_.scala.Int): SeriesPolicy = copy(tokenSupply = Option(__v))
      def withRegistrationUtxo(__v: org.plasmalabs.sdk.models.TransactionOutputAddress): SeriesPolicy = copy(registrationUtxo = __v)
      def withQuantityDescriptor(__v: org.plasmalabs.sdk.models.box.QuantityDescriptorType): SeriesPolicy = copy(quantityDescriptor = __v)
      def withFungibility(__v: org.plasmalabs.sdk.models.box.FungibilityType): SeriesPolicy = copy(fungibility = __v)
      def getEphemeralMetadataScheme: com.google.protobuf.struct.Struct = ephemeralMetadataScheme.getOrElse(com.google.protobuf.struct.Struct.defaultInstance)
      def clearEphemeralMetadataScheme: SeriesPolicy = copy(ephemeralMetadataScheme = _root_.scala.None)
      def withEphemeralMetadataScheme(__v: com.google.protobuf.struct.Struct): SeriesPolicy = copy(ephemeralMetadataScheme = Option(__v))
      def getPermanentMetadataScheme: com.google.protobuf.struct.Struct = permanentMetadataScheme.getOrElse(com.google.protobuf.struct.Struct.defaultInstance)
      def clearPermanentMetadataScheme: SeriesPolicy = copy(permanentMetadataScheme = _root_.scala.None)
      def withPermanentMetadataScheme(__v: com.google.protobuf.struct.Struct): SeriesPolicy = copy(permanentMetadataScheme = 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 => tokenSupply.map(org.plasmalabs.sdk.models.Event.SeriesPolicy._typemapper_tokenSupply.toBase(_)).orNull
          case 3 => registrationUtxo
          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
          }
          case 6 => ephemeralMetadataScheme.orNull
          case 7 => permanentMetadataScheme.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 => tokenSupply.map(org.plasmalabs.sdk.models.Event.SeriesPolicy._typemapper_tokenSupply.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
          case 3 => registrationUtxo.toPMessage
          case 4 => _root_.scalapb.descriptors.PEnum(quantityDescriptor.scalaValueDescriptor)
          case 5 => _root_.scalapb.descriptors.PEnum(fungibility.scalaValueDescriptor)
          case 6 => ephemeralMetadataScheme.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
          case 7 => permanentMetadataScheme.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: org.plasmalabs.sdk.models.Event.SeriesPolicy.type = org.plasmalabs.sdk.models.Event.SeriesPolicy
      // @@protoc_insertion_point(GeneratedMessage[org.plasmalabs.sdk.models.Event.SeriesPolicy])
  }
  
  object SeriesPolicy extends scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.SeriesPolicy] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.SeriesPolicy] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): org.plasmalabs.sdk.models.Event.SeriesPolicy = {
      var __requiredFields0: _root_.scala.Long = 0x1L
      var __label: _root_.scala.Predef.String = ""
      var __tokenSupply: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
      var __registrationUtxo: _root_.scala.Option[org.plasmalabs.sdk.models.TransactionOutputAddress] = _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 __ephemeralMetadataScheme: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None
      var __permanentMetadataScheme: _root_.scala.Option[com.google.protobuf.struct.Struct] = _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 =>
            __tokenSupply = _root_.scala.Option(org.plasmalabs.sdk.models.Event.SeriesPolicy._typemapper_tokenSupply.toCustom(__tokenSupply.map(org.plasmalabs.sdk.models.Event.SeriesPolicy._typemapper_tokenSupply.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt32Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
          case 26 =>
            __registrationUtxo = _root_.scala.Some(__registrationUtxo.fold(_root_.scalapb.LiteParser.readMessage[org.plasmalabs.sdk.models.TransactionOutputAddress](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
            __requiredFields0 &= 0xfffffffffffffffeL
          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 50 =>
            __ephemeralMetadataScheme = _root_.scala.Option(__ephemeralMetadataScheme.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
          case 58 =>
            __permanentMetadataScheme = _root_.scala.Option(__permanentMetadataScheme.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_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.Event.SeriesPolicy(
          label = __label,
          tokenSupply = __tokenSupply,
          registrationUtxo = __registrationUtxo.getOrElse(org.plasmalabs.sdk.models.TransactionOutputAddress.defaultInstance),
          quantityDescriptor = __quantityDescriptor,
          fungibility = __fungibility,
          ephemeralMetadataScheme = __ephemeralMetadataScheme,
          permanentMetadataScheme = __permanentMetadataScheme,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[org.plasmalabs.sdk.models.Event.SeriesPolicy] = _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.Event.SeriesPolicy(
          label = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          tokenSupply = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt32Value]]).map(org.plasmalabs.sdk.models.Event.SeriesPolicy._typemapper_tokenSupply.toCustom(_)),
          registrationUtxo = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).get.as[org.plasmalabs.sdk.models.TransactionOutputAddress],
          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),
          ephemeralMetadataScheme = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]),
          permanentMetadataScheme = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]])
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = org.plasmalabs.sdk.models.Event.javaDescriptor.getNestedTypes().get(6)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = org.plasmalabs.sdk.models.Event.scalaDescriptor.nestedMessages(6)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
      var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
      (__number: @_root_.scala.unchecked) match {
        case 2 => __out = com.google.protobuf.wrappers.UInt32Value
        case 3 => __out = org.plasmalabs.sdk.models.TransactionOutputAddress
        case 6 => __out = com.google.protobuf.struct.Struct
        case 7 => __out = com.google.protobuf.struct.Struct
      }
      __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.Event.SeriesPolicy(
      label = "",
      tokenSupply = _root_.scala.None,
      registrationUtxo = org.plasmalabs.sdk.models.TransactionOutputAddress.defaultInstance,
      quantityDescriptor = org.plasmalabs.sdk.models.box.QuantityDescriptorType.LIQUID,
      fungibility = org.plasmalabs.sdk.models.box.FungibilityType.GROUP_AND_SERIES,
      ephemeralMetadataScheme = _root_.scala.None,
      permanentMetadataScheme = _root_.scala.None
    )
    implicit class SeriesPolicyLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.SeriesPolicy]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.Event.SeriesPolicy](_l) {
      def label: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.label)((c_, f_) => c_.copy(label = 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 registrationUtxo: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.TransactionOutputAddress] = field(_.registrationUtxo)((c_, f_) => c_.copy(registrationUtxo = 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_))
      def ephemeralMetadataScheme: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getEphemeralMetadataScheme)((c_, f_) => c_.copy(ephemeralMetadataScheme = _root_.scala.Option(f_)))
      def optionalEphemeralMetadataScheme: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.ephemeralMetadataScheme)((c_, f_) => c_.copy(ephemeralMetadataScheme = f_))
      def permanentMetadataScheme: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getPermanentMetadataScheme)((c_, f_) => c_.copy(permanentMetadataScheme = _root_.scala.Option(f_)))
      def optionalPermanentMetadataScheme: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.permanentMetadataScheme)((c_, f_) => c_.copy(permanentMetadataScheme = f_))
    }
    final val LABEL_FIELD_NUMBER = 1
    final val TOKENSUPPLY_FIELD_NUMBER = 2
    final val REGISTRATIONUTXO_FIELD_NUMBER = 3
    final val QUANTITYDESCRIPTOR_FIELD_NUMBER = 4
    final val FUNGIBILITY_FIELD_NUMBER = 5
    final val EPHEMERALMETADATASCHEME_FIELD_NUMBER = 6
    final val PERMANENTMETADATASCHEME_FIELD_NUMBER = 7
    @transient
    private[models] 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(
      label: _root_.scala.Predef.String,
      tokenSupply: _root_.scala.Option[_root_.scala.Int],
      registrationUtxo: org.plasmalabs.sdk.models.TransactionOutputAddress,
      quantityDescriptor: org.plasmalabs.sdk.models.box.QuantityDescriptorType,
      fungibility: org.plasmalabs.sdk.models.box.FungibilityType,
      ephemeralMetadataScheme: _root_.scala.Option[com.google.protobuf.struct.Struct],
      permanentMetadataScheme: _root_.scala.Option[com.google.protobuf.struct.Struct]
    ): _root_.org.plasmalabs.sdk.models.Event.SeriesPolicy = _root_.org.plasmalabs.sdk.models.Event.SeriesPolicy(
      label,
      tokenSupply,
      registrationUtxo,
      quantityDescriptor,
      fungibility,
      ephemeralMetadataScheme,
      permanentMetadataScheme
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event.SeriesPolicy])
  }
  
  implicit class EventLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, org.plasmalabs.sdk.models.Event](_l) {
    def eon: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.Eon] = field(_.getEon)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.Event.Value.Eon(f_)))
    def era: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.Era] = field(_.getEra)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.Event.Value.Era(f_)))
    def epoch: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.Epoch] = field(_.getEpoch)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.Event.Value.Epoch(f_)))
    def header: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.Header] = field(_.getHeader)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.Event.Value.Header(f_)))
    def ioTransaction: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.IoTransaction] = field(_.getIoTransaction)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.Event.Value.IoTransaction(f_)))
    def groupPolicy: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.GroupPolicy] = field(_.getGroupPolicy)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.Event.Value.GroupPolicy(f_)))
    def seriesPolicy: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.SeriesPolicy] = field(_.getSeriesPolicy)((c_, f_) => c_.copy(value = org.plasmalabs.sdk.models.Event.Value.SeriesPolicy(f_)))
    def value: _root_.scalapb.lenses.Lens[UpperPB, org.plasmalabs.sdk.models.Event.Value] = field(_.value)((c_, f_) => c_.copy(value = f_))
  }
  final val EON_FIELD_NUMBER = 1
  final val ERA_FIELD_NUMBER = 2
  final val EPOCH_FIELD_NUMBER = 3
  final val HEADER_FIELD_NUMBER = 4
  final val IOTRANSACTION_FIELD_NUMBER = 5
  final val GROUPPOLICY_FIELD_NUMBER = 6
  final val SERIESPOLICY_FIELD_NUMBER = 7
  def of(
    value: org.plasmalabs.sdk.models.Event.Value
  ): _root_.org.plasmalabs.sdk.models.Event = _root_.org.plasmalabs.sdk.models.Event(
    value
  )
  implicit def validator: scalapb.validate.Validator[org.plasmalabs.sdk.models.Event] = org.plasmalabs.sdk.models.EventValidator
  // @@protoc_insertion_point(GeneratedMessageCompanion[org.plasmalabs.sdk.models.Event])
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy