com.wavesplatform.database.protobuf.EthereumTransactionMeta.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 EthereumTransactionMeta(
payload: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[EthereumTransactionMeta] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (payload.invocation.isDefined) {
val __value = payload.invocation.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (payload.transfer.isDefined) {
val __value = payload.transfer.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 = {
payload.invocation.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
payload.transfer.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getInvocation: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation = payload.invocation.getOrElse(com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation.defaultInstance)
def withInvocation(__v: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation): EthereumTransactionMeta = copy(payload = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Invocation(__v))
def getTransfer: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer = payload.transfer.getOrElse(com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer.defaultInstance)
def withTransfer(__v: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer): EthereumTransactionMeta = copy(payload = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Transfer(__v))
def clearPayload: EthereumTransactionMeta = copy(payload = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Empty)
def withPayload(__v: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload): EthereumTransactionMeta = copy(payload = __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 => payload.invocation.orNull
case 2 => payload.transfer.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 => payload.invocation.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => payload.transfer.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.database.protobuf.EthereumTransactionMeta.type = com.wavesplatform.database.protobuf.EthereumTransactionMeta
// @@protoc_insertion_point(GeneratedMessage[waves.api.EthereumTransactionMeta])
}
object EthereumTransactionMeta extends scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.EthereumTransactionMeta] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.EthereumTransactionMeta] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.database.protobuf.EthereumTransactionMeta = {
var __payload: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.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 =>
__payload = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Invocation(__payload.invocation.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__payload = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Transfer(__payload.transfer.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer](_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.EthereumTransactionMeta(
payload = __payload,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.database.protobuf.EthereumTransactionMeta] = _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.EthereumTransactionMeta(
payload = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation]]).map(com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Invocation(_))
.orElse[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer]]).map(com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Transfer(_)))
.getOrElse(com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DatabaseProto.javaDescriptor.getMessageTypes().get(3)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DatabaseProto.scalaDescriptor.messages(3)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation
case 2 => __out = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation,
_root_.com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = com.wavesplatform.database.protobuf.EthereumTransactionMeta(
payload = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Empty
)
sealed trait Payload extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isInvocation: _root_.scala.Boolean = false
def isTransfer: _root_.scala.Boolean = false
def invocation: _root_.scala.Option[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation] = _root_.scala.None
def transfer: _root_.scala.Option[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer] = _root_.scala.None
}
object Payload {
@SerialVersionUID(0L)
case object Empty extends com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload {
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 Invocation(value: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation) extends com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload {
type ValueType = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation
override def isInvocation: _root_.scala.Boolean = true
override def invocation: _root_.scala.Option[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation] = Some(value)
override def number: _root_.scala.Int = 1
}
@SerialVersionUID(0L)
final case class Transfer(value: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer) extends com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload {
type ValueType = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer
override def isTransfer: _root_.scala.Boolean = true
override def transfer: _root_.scala.Option[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer] = Some(value)
override def number: _root_.scala.Int = 2
}
}
@SerialVersionUID(0L)
final case class Invocation(
functionCall: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
payments: _root_.scala.Seq[com.wavesplatform.protobuf.Amount] = _root_.scala.Seq.empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Invocation] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = functionCall
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(1, __value)
}
};
payments.foreach { __item =>
val __value = __item
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = functionCall
if (!__v.isEmpty) {
_output__.writeBytes(1, __v)
}
};
payments.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withFunctionCall(__v: _root_.com.google.protobuf.ByteString): Invocation = copy(functionCall = __v)
def clearPayments = copy(payments = _root_.scala.Seq.empty)
def addPayments(__vs: com.wavesplatform.protobuf.Amount *): Invocation = addAllPayments(__vs)
def addAllPayments(__vs: Iterable[com.wavesplatform.protobuf.Amount]): Invocation = copy(payments = payments ++ __vs)
def withPayments(__v: _root_.scala.Seq[com.wavesplatform.protobuf.Amount]): Invocation = copy(payments = __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 = functionCall
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 2 => payments
}
}
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(functionCall)
case 2 => _root_.scalapb.descriptors.PRepeated(payments.iterator.map(_.toPMessage).toVector)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation.type = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation
// @@protoc_insertion_point(GeneratedMessage[waves.api.EthereumTransactionMeta.Invocation])
}
object Invocation extends scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation = {
var __functionCall: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
val __payments: _root_.scala.collection.immutable.VectorBuilder[com.wavesplatform.protobuf.Amount] = new _root_.scala.collection.immutable.VectorBuilder[com.wavesplatform.protobuf.Amount]
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__functionCall = _input__.readBytes()
case 18 =>
__payments += _root_.scalapb.LiteParser.readMessage[com.wavesplatform.protobuf.Amount](_input__)
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation(
functionCall = __functionCall,
payments = __payments.result(),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation] = _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.EthereumTransactionMeta.Invocation(
functionCall = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
payments = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[com.wavesplatform.protobuf.Amount]]).getOrElse(_root_.scala.Seq.empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.wavesplatform.database.protobuf.EthereumTransactionMeta.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.wavesplatform.database.protobuf.EthereumTransactionMeta.scalaDescriptor.nestedMessages(0)
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.Amount
}
__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 = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation(
functionCall = _root_.com.google.protobuf.ByteString.EMPTY,
payments = _root_.scala.Seq.empty
)
implicit class InvocationLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation](_l) {
def functionCall: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.functionCall)((c_, f_) => c_.copy(functionCall = f_))
def payments: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[com.wavesplatform.protobuf.Amount]] = field(_.payments)((c_, f_) => c_.copy(payments = f_))
}
final val FUNCTION_CALL_FIELD_NUMBER = 1
final val PAYMENTS_FIELD_NUMBER = 2
def of(
functionCall: _root_.com.google.protobuf.ByteString,
payments: _root_.scala.Seq[com.wavesplatform.protobuf.Amount]
): _root_.com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation = _root_.com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation(
functionCall,
payments
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.api.EthereumTransactionMeta.Invocation])
}
@SerialVersionUID(0L)
final case class Transfer(
publicKeyHash: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
amount: _root_.scala.Option[com.wavesplatform.protobuf.Amount] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Transfer] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = publicKeyHash
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(1, __value)
}
};
if (amount.isDefined) {
val __value = amount.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 = publicKeyHash
if (!__v.isEmpty) {
_output__.writeBytes(1, __v)
}
};
amount.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withPublicKeyHash(__v: _root_.com.google.protobuf.ByteString): Transfer = copy(publicKeyHash = __v)
def getAmount: com.wavesplatform.protobuf.Amount = amount.getOrElse(com.wavesplatform.protobuf.Amount.defaultInstance)
def clearAmount: Transfer = copy(amount = _root_.scala.None)
def withAmount(__v: com.wavesplatform.protobuf.Amount): Transfer = copy(amount = 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 = publicKeyHash
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 2 => amount.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(publicKeyHash)
case 2 => amount.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer.type = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer
// @@protoc_insertion_point(GeneratedMessage[waves.api.EthereumTransactionMeta.Transfer])
}
object Transfer extends scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer = {
var __publicKeyHash: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __amount: _root_.scala.Option[com.wavesplatform.protobuf.Amount] = _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 =>
__publicKeyHash = _input__.readBytes()
case 18 =>
__amount = _root_.scala.Option(__amount.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.protobuf.Amount](_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.EthereumTransactionMeta.Transfer(
publicKeyHash = __publicKeyHash,
amount = __amount,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer] = _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.EthereumTransactionMeta.Transfer(
publicKeyHash = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
amount = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.protobuf.Amount]])
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.wavesplatform.database.protobuf.EthereumTransactionMeta.javaDescriptor.getNestedTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.wavesplatform.database.protobuf.EthereumTransactionMeta.scalaDescriptor.nestedMessages(1)
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.Amount
}
__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 = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer(
publicKeyHash = _root_.com.google.protobuf.ByteString.EMPTY,
amount = _root_.scala.None
)
implicit class TransferLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer](_l) {
def publicKeyHash: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.publicKeyHash)((c_, f_) => c_.copy(publicKeyHash = f_))
def amount: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.Amount] = field(_.getAmount)((c_, f_) => c_.copy(amount = _root_.scala.Option(f_)))
def optionalAmount: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.wavesplatform.protobuf.Amount]] = field(_.amount)((c_, f_) => c_.copy(amount = f_))
}
final val PUBLIC_KEY_HASH_FIELD_NUMBER = 1
final val AMOUNT_FIELD_NUMBER = 2
def of(
publicKeyHash: _root_.com.google.protobuf.ByteString,
amount: _root_.scala.Option[com.wavesplatform.protobuf.Amount]
): _root_.com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer = _root_.com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer(
publicKeyHash,
amount
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.api.EthereumTransactionMeta.Transfer])
}
implicit class EthereumTransactionMetaLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.EthereumTransactionMeta]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.database.protobuf.EthereumTransactionMeta](_l) {
def invocation: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.EthereumTransactionMeta.Invocation] = field(_.getInvocation)((c_, f_) => c_.copy(payload = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Invocation(f_)))
def transfer: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.EthereumTransactionMeta.Transfer] = field(_.getTransfer)((c_, f_) => c_.copy(payload = com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload.Transfer(f_)))
def payload: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload] = field(_.payload)((c_, f_) => c_.copy(payload = f_))
}
final val INVOCATION_FIELD_NUMBER = 1
final val TRANSFER_FIELD_NUMBER = 2
def of(
payload: com.wavesplatform.database.protobuf.EthereumTransactionMeta.Payload
): _root_.com.wavesplatform.database.protobuf.EthereumTransactionMeta = _root_.com.wavesplatform.database.protobuf.EthereumTransactionMeta(
payload
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.api.EthereumTransactionMeta])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy