com.wavesplatform.database.protobuf.LeaseDetails.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package com.wavesplatform.database.protobuf
@SerialVersionUID(0L)
final case class LeaseDetails(
senderPublicKey: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
recipient: _root_.scala.Option[com.wavesplatform.protobuf.transaction.Recipient] = _root_.scala.None,
amount: _root_.scala.Long = 0L,
sourceId: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
height: _root_.scala.Int = 0,
cancelReason: com.wavesplatform.database.protobuf.LeaseDetails.CancelReason = com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[LeaseDetails] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = senderPublicKey
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(1, __value)
}
};
if (recipient.isDefined) {
val __value = recipient.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = amount
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(3, __value)
}
};
{
val __value = sourceId
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(4, __value)
}
};
{
val __value = height
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(5, __value)
}
};
if (cancelReason.cancelled.isDefined) {
val __value = cancelReason.cancelled.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (cancelReason.expired.isDefined) {
val __value = cancelReason.expired.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 = senderPublicKey
if (!__v.isEmpty) {
_output__.writeBytes(1, __v)
}
};
recipient.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = amount
if (__v != 0L) {
_output__.writeInt64(3, __v)
}
};
{
val __v = sourceId
if (!__v.isEmpty) {
_output__.writeBytes(4, __v)
}
};
{
val __v = height
if (__v != 0) {
_output__.writeInt32(5, __v)
}
};
cancelReason.cancelled.foreach { __v =>
val __m = __v
_output__.writeTag(11, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
cancelReason.expired.foreach { __v =>
val __m = __v
_output__.writeTag(12, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withSenderPublicKey(__v: _root_.com.google.protobuf.ByteString): LeaseDetails = copy(senderPublicKey = __v)
def getRecipient: com.wavesplatform.protobuf.transaction.Recipient = recipient.getOrElse(com.wavesplatform.protobuf.transaction.Recipient.defaultInstance)
def clearRecipient: LeaseDetails = copy(recipient = _root_.scala.None)
def withRecipient(__v: com.wavesplatform.protobuf.transaction.Recipient): LeaseDetails = copy(recipient = Option(__v))
def withAmount(__v: _root_.scala.Long): LeaseDetails = copy(amount = __v)
def withSourceId(__v: _root_.com.google.protobuf.ByteString): LeaseDetails = copy(sourceId = __v)
def withHeight(__v: _root_.scala.Int): LeaseDetails = copy(height = __v)
def getCancelled: com.wavesplatform.database.protobuf.LeaseDetails.Cancelled = cancelReason.cancelled.getOrElse(com.wavesplatform.database.protobuf.LeaseDetails.Cancelled.defaultInstance)
def withCancelled(__v: com.wavesplatform.database.protobuf.LeaseDetails.Cancelled): LeaseDetails = copy(cancelReason = com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Cancelled(__v))
def getExpired: com.wavesplatform.database.protobuf.LeaseDetails.Expired = cancelReason.expired.getOrElse(com.wavesplatform.database.protobuf.LeaseDetails.Expired.defaultInstance)
def withExpired(__v: com.wavesplatform.database.protobuf.LeaseDetails.Expired): LeaseDetails = copy(cancelReason = com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Expired(__v))
def clearCancelReason: LeaseDetails = copy(cancelReason = com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Empty)
def withCancelReason(__v: com.wavesplatform.database.protobuf.LeaseDetails.CancelReason): LeaseDetails = copy(cancelReason = __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 = senderPublicKey
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 2 => recipient.orNull
case 3 => {
val __t = amount
if (__t != 0L) __t else null
}
case 4 => {
val __t = sourceId
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 5 => {
val __t = height
if (__t != 0) __t else null
}
case 11 => cancelReason.cancelled.orNull
case 12 => cancelReason.expired.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.PByteString(senderPublicKey)
case 2 => recipient.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => _root_.scalapb.descriptors.PLong(amount)
case 4 => _root_.scalapb.descriptors.PByteString(sourceId)
case 5 => _root_.scalapb.descriptors.PInt(height)
case 11 => cancelReason.cancelled.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 12 => cancelReason.expired.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.database.protobuf.LeaseDetails.type = com.wavesplatform.database.protobuf.LeaseDetails
// @@protoc_insertion_point(GeneratedMessage[waves.api.LeaseDetails])
}
object LeaseDetails extends scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.LeaseDetails] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.LeaseDetails] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.database.protobuf.LeaseDetails = {
var __senderPublicKey: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __recipient: _root_.scala.Option[com.wavesplatform.protobuf.transaction.Recipient] = _root_.scala.None
var __amount: _root_.scala.Long = 0L
var __sourceId: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __height: _root_.scala.Int = 0
var __cancelReason: com.wavesplatform.database.protobuf.LeaseDetails.CancelReason = com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.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 =>
__senderPublicKey = _input__.readBytes()
case 18 =>
__recipient = _root_.scala.Option(__recipient.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.protobuf.transaction.Recipient](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 24 =>
__amount = _input__.readInt64()
case 34 =>
__sourceId = _input__.readBytes()
case 40 =>
__height = _input__.readInt32()
case 90 =>
__cancelReason = com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Cancelled(__cancelReason.cancelled.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.database.protobuf.LeaseDetails.Cancelled](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 98 =>
__cancelReason = com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Expired(__cancelReason.expired.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.database.protobuf.LeaseDetails.Expired](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.wavesplatform.database.protobuf.LeaseDetails(
senderPublicKey = __senderPublicKey,
recipient = __recipient,
amount = __amount,
sourceId = __sourceId,
height = __height,
cancelReason = __cancelReason,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.database.protobuf.LeaseDetails] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
com.wavesplatform.database.protobuf.LeaseDetails(
senderPublicKey = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
recipient = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.protobuf.transaction.Recipient]]),
amount = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
sourceId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
height = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Int]).getOrElse(0),
cancelReason = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.database.protobuf.LeaseDetails.Cancelled]]).map(com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Cancelled(_))
.orElse[com.wavesplatform.database.protobuf.LeaseDetails.CancelReason](__fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.database.protobuf.LeaseDetails.Expired]]).map(com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Expired(_)))
.getOrElse(com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DatabaseProto.javaDescriptor.getMessageTypes().get(8)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DatabaseProto.scalaDescriptor.messages(8)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 2 => __out = com.wavesplatform.protobuf.transaction.Recipient
case 11 => __out = com.wavesplatform.database.protobuf.LeaseDetails.Cancelled
case 12 => __out = com.wavesplatform.database.protobuf.LeaseDetails.Expired
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.com.wavesplatform.database.protobuf.LeaseDetails.Cancelled,
_root_.com.wavesplatform.database.protobuf.LeaseDetails.Expired
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = com.wavesplatform.database.protobuf.LeaseDetails(
senderPublicKey = _root_.com.google.protobuf.ByteString.EMPTY,
recipient = _root_.scala.None,
amount = 0L,
sourceId = _root_.com.google.protobuf.ByteString.EMPTY,
height = 0,
cancelReason = com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Empty
)
sealed trait CancelReason extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isCancelled: _root_.scala.Boolean = false
def isExpired: _root_.scala.Boolean = false
def cancelled: _root_.scala.Option[com.wavesplatform.database.protobuf.LeaseDetails.Cancelled] = _root_.scala.None
def expired: _root_.scala.Option[com.wavesplatform.database.protobuf.LeaseDetails.Expired] = _root_.scala.None
}
object CancelReason {
@SerialVersionUID(0L)
case object Empty extends com.wavesplatform.database.protobuf.LeaseDetails.CancelReason {
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 Cancelled(value: com.wavesplatform.database.protobuf.LeaseDetails.Cancelled) extends com.wavesplatform.database.protobuf.LeaseDetails.CancelReason {
type ValueType = com.wavesplatform.database.protobuf.LeaseDetails.Cancelled
override def isCancelled: _root_.scala.Boolean = true
override def cancelled: _root_.scala.Option[com.wavesplatform.database.protobuf.LeaseDetails.Cancelled] = Some(value)
override def number: _root_.scala.Int = 11
}
@SerialVersionUID(0L)
final case class Expired(value: com.wavesplatform.database.protobuf.LeaseDetails.Expired) extends com.wavesplatform.database.protobuf.LeaseDetails.CancelReason {
type ValueType = com.wavesplatform.database.protobuf.LeaseDetails.Expired
override def isExpired: _root_.scala.Boolean = true
override def expired: _root_.scala.Option[com.wavesplatform.database.protobuf.LeaseDetails.Expired] = Some(value)
override def number: _root_.scala.Int = 12
}
}
@SerialVersionUID(0L)
final case class Cancelled(
height: _root_.scala.Int = 0,
transactionId: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Cancelled] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = height
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(1, __value)
}
};
{
val __value = transactionId
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(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 = height
if (__v != 0) {
_output__.writeInt32(1, __v)
}
};
{
val __v = transactionId
if (!__v.isEmpty) {
_output__.writeBytes(2, __v)
}
};
unknownFields.writeTo(_output__)
}
def withHeight(__v: _root_.scala.Int): Cancelled = copy(height = __v)
def withTransactionId(__v: _root_.com.google.protobuf.ByteString): Cancelled = copy(transactionId = __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 != 0) __t else null
}
case 2 => {
val __t = transactionId
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __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.PInt(height)
case 2 => _root_.scalapb.descriptors.PByteString(transactionId)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.database.protobuf.LeaseDetails.Cancelled.type = com.wavesplatform.database.protobuf.LeaseDetails.Cancelled
// @@protoc_insertion_point(GeneratedMessage[waves.api.LeaseDetails.Cancelled])
}
object Cancelled extends scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.LeaseDetails.Cancelled] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.LeaseDetails.Cancelled] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.database.protobuf.LeaseDetails.Cancelled = {
var __height: _root_.scala.Int = 0
var __transactionId: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
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__.readInt32()
case 18 =>
__transactionId = _input__.readBytes()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.wavesplatform.database.protobuf.LeaseDetails.Cancelled(
height = __height,
transactionId = __transactionId,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.database.protobuf.LeaseDetails.Cancelled] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
com.wavesplatform.database.protobuf.LeaseDetails.Cancelled(
height = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Int]).getOrElse(0),
transactionId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.wavesplatform.database.protobuf.LeaseDetails.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.wavesplatform.database.protobuf.LeaseDetails.scalaDescriptor.nestedMessages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = com.wavesplatform.database.protobuf.LeaseDetails.Cancelled(
height = 0,
transactionId = _root_.com.google.protobuf.ByteString.EMPTY
)
implicit class CancelledLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.LeaseDetails.Cancelled]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.database.protobuf.LeaseDetails.Cancelled](_l) {
def height: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.height)((c_, f_) => c_.copy(height = f_))
def transactionId: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.transactionId)((c_, f_) => c_.copy(transactionId = f_))
}
final val HEIGHT_FIELD_NUMBER = 1
final val TRANSACTION_ID_FIELD_NUMBER = 2
def of(
height: _root_.scala.Int,
transactionId: _root_.com.google.protobuf.ByteString
): _root_.com.wavesplatform.database.protobuf.LeaseDetails.Cancelled = _root_.com.wavesplatform.database.protobuf.LeaseDetails.Cancelled(
height,
transactionId
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.api.LeaseDetails.Cancelled])
}
@SerialVersionUID(0L)
final case class Expired(
height: _root_.scala.Int = 0,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Expired] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = height
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(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 != 0) {
_output__.writeInt32(1, __v)
}
};
unknownFields.writeTo(_output__)
}
def withHeight(__v: _root_.scala.Int): Expired = 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 != 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 => _root_.scalapb.descriptors.PInt(height)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.database.protobuf.LeaseDetails.Expired.type = com.wavesplatform.database.protobuf.LeaseDetails.Expired
// @@protoc_insertion_point(GeneratedMessage[waves.api.LeaseDetails.Expired])
}
object Expired extends scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.LeaseDetails.Expired] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.LeaseDetails.Expired] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.database.protobuf.LeaseDetails.Expired = {
var __height: _root_.scala.Int = 0
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__.readInt32()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.wavesplatform.database.protobuf.LeaseDetails.Expired(
height = __height,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.database.protobuf.LeaseDetails.Expired] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
com.wavesplatform.database.protobuf.LeaseDetails.Expired(
height = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Int]).getOrElse(0)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.wavesplatform.database.protobuf.LeaseDetails.javaDescriptor.getNestedTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.wavesplatform.database.protobuf.LeaseDetails.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 = com.wavesplatform.database.protobuf.LeaseDetails.Expired(
height = 0
)
implicit class ExpiredLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.LeaseDetails.Expired]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.database.protobuf.LeaseDetails.Expired](_l) {
def height: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.height)((c_, f_) => c_.copy(height = f_))
}
final val HEIGHT_FIELD_NUMBER = 1
def of(
height: _root_.scala.Int
): _root_.com.wavesplatform.database.protobuf.LeaseDetails.Expired = _root_.com.wavesplatform.database.protobuf.LeaseDetails.Expired(
height
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.api.LeaseDetails.Expired])
}
implicit class LeaseDetailsLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.LeaseDetails]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.database.protobuf.LeaseDetails](_l) {
def senderPublicKey: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.senderPublicKey)((c_, f_) => c_.copy(senderPublicKey = f_))
def recipient: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.transaction.Recipient] = field(_.getRecipient)((c_, f_) => c_.copy(recipient = _root_.scala.Option(f_)))
def optionalRecipient: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.wavesplatform.protobuf.transaction.Recipient]] = field(_.recipient)((c_, f_) => c_.copy(recipient = f_))
def amount: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.amount)((c_, f_) => c_.copy(amount = f_))
def sourceId: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.sourceId)((c_, f_) => c_.copy(sourceId = f_))
def height: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.height)((c_, f_) => c_.copy(height = f_))
def cancelled: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.LeaseDetails.Cancelled] = field(_.getCancelled)((c_, f_) => c_.copy(cancelReason = com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Cancelled(f_)))
def expired: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.LeaseDetails.Expired] = field(_.getExpired)((c_, f_) => c_.copy(cancelReason = com.wavesplatform.database.protobuf.LeaseDetails.CancelReason.Expired(f_)))
def cancelReason: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.LeaseDetails.CancelReason] = field(_.cancelReason)((c_, f_) => c_.copy(cancelReason = f_))
}
final val SENDER_PUBLIC_KEY_FIELD_NUMBER = 1
final val RECIPIENT_FIELD_NUMBER = 2
final val AMOUNT_FIELD_NUMBER = 3
final val SOURCE_ID_FIELD_NUMBER = 4
final val HEIGHT_FIELD_NUMBER = 5
final val CANCELLED_FIELD_NUMBER = 11
final val EXPIRED_FIELD_NUMBER = 12
def of(
senderPublicKey: _root_.com.google.protobuf.ByteString,
recipient: _root_.scala.Option[com.wavesplatform.protobuf.transaction.Recipient],
amount: _root_.scala.Long,
sourceId: _root_.com.google.protobuf.ByteString,
height: _root_.scala.Int,
cancelReason: com.wavesplatform.database.protobuf.LeaseDetails.CancelReason
): _root_.com.wavesplatform.database.protobuf.LeaseDetails = _root_.com.wavesplatform.database.protobuf.LeaseDetails(
senderPublicKey,
recipient,
amount,
sourceId,
height,
cancelReason
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.api.LeaseDetails])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy