com.wavesplatform.protobuf.order.Order.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.protobuf.order
@SerialVersionUID(0L)
final case class Order(
chainId: _root_.scala.Int = 0,
matcherPublicKey: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
assetPair: _root_.scala.Option[com.wavesplatform.protobuf.order.AssetPair] = _root_.scala.None,
orderSide: com.wavesplatform.protobuf.order.Order.Side = com.wavesplatform.protobuf.order.Order.Side.BUY,
amount: _root_.scala.Long = 0L,
price: _root_.scala.Long = 0L,
timestamp: _root_.scala.Long = 0L,
expiration: _root_.scala.Long = 0L,
matcherFee: _root_.scala.Option[com.wavesplatform.protobuf.Amount] = _root_.scala.None,
version: _root_.scala.Int = 0,
proofs: _root_.scala.Seq[_root_.com.google.protobuf.ByteString] = _root_.scala.Seq.empty,
priceMode: com.wavesplatform.protobuf.order.Order.PriceMode = com.wavesplatform.protobuf.order.Order.PriceMode.DEFAULT,
attachment: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
sender: com.wavesplatform.protobuf.order.Order.Sender = com.wavesplatform.protobuf.order.Order.Sender.Empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Order] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = chainId
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(1, __value)
}
};
{
val __value = matcherPublicKey
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(3, __value)
}
};
if (assetPair.isDefined) {
val __value = assetPair.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = orderSide.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(5, __value)
}
};
{
val __value = amount
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(6, __value)
}
};
{
val __value = price
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(7, __value)
}
};
{
val __value = timestamp
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(8, __value)
}
};
{
val __value = expiration
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(9, __value)
}
};
if (matcherFee.isDefined) {
val __value = matcherFee.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = version
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(11, __value)
}
};
proofs.foreach { __item =>
val __value = __item
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(12, __value)
}
{
val __value = priceMode.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(14, __value)
}
};
{
val __value = attachment
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(15, __value)
}
};
if (sender.senderPublicKey.isDefined) {
val __value = sender.senderPublicKey.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value)
};
if (sender.eip712Signature.isDefined) {
val __value = sender.eip712Signature.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(13, __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 = chainId
if (__v != 0) {
_output__.writeInt32(1, __v)
}
};
sender.senderPublicKey.foreach { __v =>
val __m = __v
_output__.writeBytes(2, __m)
};
{
val __v = matcherPublicKey
if (!__v.isEmpty) {
_output__.writeBytes(3, __v)
}
};
assetPair.foreach { __v =>
val __m = __v
_output__.writeTag(4, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = orderSide.value
if (__v != 0) {
_output__.writeEnum(5, __v)
}
};
{
val __v = amount
if (__v != 0L) {
_output__.writeInt64(6, __v)
}
};
{
val __v = price
if (__v != 0L) {
_output__.writeInt64(7, __v)
}
};
{
val __v = timestamp
if (__v != 0L) {
_output__.writeInt64(8, __v)
}
};
{
val __v = expiration
if (__v != 0L) {
_output__.writeInt64(9, __v)
}
};
matcherFee.foreach { __v =>
val __m = __v
_output__.writeTag(10, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = version
if (__v != 0) {
_output__.writeInt32(11, __v)
}
};
proofs.foreach { __v =>
val __m = __v
_output__.writeBytes(12, __m)
};
sender.eip712Signature.foreach { __v =>
val __m = __v
_output__.writeBytes(13, __m)
};
{
val __v = priceMode.value
if (__v != 0) {
_output__.writeEnum(14, __v)
}
};
{
val __v = attachment
if (!__v.isEmpty) {
_output__.writeBytes(15, __v)
}
};
unknownFields.writeTo(_output__)
}
def withChainId(__v: _root_.scala.Int): Order = copy(chainId = __v)
def withMatcherPublicKey(__v: _root_.com.google.protobuf.ByteString): Order = copy(matcherPublicKey = __v)
def getAssetPair: com.wavesplatform.protobuf.order.AssetPair = assetPair.getOrElse(com.wavesplatform.protobuf.order.AssetPair.defaultInstance)
def clearAssetPair: Order = copy(assetPair = _root_.scala.None)
def withAssetPair(__v: com.wavesplatform.protobuf.order.AssetPair): Order = copy(assetPair = Option(__v))
def withOrderSide(__v: com.wavesplatform.protobuf.order.Order.Side): Order = copy(orderSide = __v)
def withAmount(__v: _root_.scala.Long): Order = copy(amount = __v)
def withPrice(__v: _root_.scala.Long): Order = copy(price = __v)
def withTimestamp(__v: _root_.scala.Long): Order = copy(timestamp = __v)
def withExpiration(__v: _root_.scala.Long): Order = copy(expiration = __v)
def getMatcherFee: com.wavesplatform.protobuf.Amount = matcherFee.getOrElse(com.wavesplatform.protobuf.Amount.defaultInstance)
def clearMatcherFee: Order = copy(matcherFee = _root_.scala.None)
def withMatcherFee(__v: com.wavesplatform.protobuf.Amount): Order = copy(matcherFee = Option(__v))
def withVersion(__v: _root_.scala.Int): Order = copy(version = __v)
def clearProofs = copy(proofs = _root_.scala.Seq.empty)
def addProofs(__vs: _root_.com.google.protobuf.ByteString *): Order = addAllProofs(__vs)
def addAllProofs(__vs: Iterable[_root_.com.google.protobuf.ByteString]): Order = copy(proofs = proofs ++ __vs)
def withProofs(__v: _root_.scala.Seq[_root_.com.google.protobuf.ByteString]): Order = copy(proofs = __v)
def withPriceMode(__v: com.wavesplatform.protobuf.order.Order.PriceMode): Order = copy(priceMode = __v)
def withAttachment(__v: _root_.com.google.protobuf.ByteString): Order = copy(attachment = __v)
def getSenderPublicKey: _root_.com.google.protobuf.ByteString = sender.senderPublicKey.getOrElse(_root_.com.google.protobuf.ByteString.EMPTY)
def withSenderPublicKey(__v: _root_.com.google.protobuf.ByteString): Order = copy(sender = com.wavesplatform.protobuf.order.Order.Sender.SenderPublicKey(__v))
def getEip712Signature: _root_.com.google.protobuf.ByteString = sender.eip712Signature.getOrElse(_root_.com.google.protobuf.ByteString.EMPTY)
def withEip712Signature(__v: _root_.com.google.protobuf.ByteString): Order = copy(sender = com.wavesplatform.protobuf.order.Order.Sender.Eip712Signature(__v))
def clearSender: Order = copy(sender = com.wavesplatform.protobuf.order.Order.Sender.Empty)
def withSender(__v: com.wavesplatform.protobuf.order.Order.Sender): Order = copy(sender = __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 = chainId
if (__t != 0) __t else null
}
case 3 => {
val __t = matcherPublicKey
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 4 => assetPair.orNull
case 5 => {
val __t = orderSide.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 6 => {
val __t = amount
if (__t != 0L) __t else null
}
case 7 => {
val __t = price
if (__t != 0L) __t else null
}
case 8 => {
val __t = timestamp
if (__t != 0L) __t else null
}
case 9 => {
val __t = expiration
if (__t != 0L) __t else null
}
case 10 => matcherFee.orNull
case 11 => {
val __t = version
if (__t != 0) __t else null
}
case 12 => proofs
case 14 => {
val __t = priceMode.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 15 => {
val __t = attachment
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 2 => sender.senderPublicKey.orNull
case 13 => sender.eip712Signature.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.PInt(chainId)
case 3 => _root_.scalapb.descriptors.PByteString(matcherPublicKey)
case 4 => assetPair.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 5 => _root_.scalapb.descriptors.PEnum(orderSide.scalaValueDescriptor)
case 6 => _root_.scalapb.descriptors.PLong(amount)
case 7 => _root_.scalapb.descriptors.PLong(price)
case 8 => _root_.scalapb.descriptors.PLong(timestamp)
case 9 => _root_.scalapb.descriptors.PLong(expiration)
case 10 => matcherFee.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 11 => _root_.scalapb.descriptors.PInt(version)
case 12 => _root_.scalapb.descriptors.PRepeated(proofs.iterator.map(_root_.scalapb.descriptors.PByteString(_)).toVector)
case 14 => _root_.scalapb.descriptors.PEnum(priceMode.scalaValueDescriptor)
case 15 => _root_.scalapb.descriptors.PByteString(attachment)
case 2 => sender.senderPublicKey.map(_root_.scalapb.descriptors.PByteString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 13 => sender.eip712Signature.map(_root_.scalapb.descriptors.PByteString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.protobuf.order.Order.type = com.wavesplatform.protobuf.order.Order
// @@protoc_insertion_point(GeneratedMessage[waves.Order])
}
object Order extends scalapb.GeneratedMessageCompanion[com.wavesplatform.protobuf.order.Order] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.protobuf.order.Order] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.protobuf.order.Order = {
var __chainId: _root_.scala.Int = 0
var __matcherPublicKey: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __assetPair: _root_.scala.Option[com.wavesplatform.protobuf.order.AssetPair] = _root_.scala.None
var __orderSide: com.wavesplatform.protobuf.order.Order.Side = com.wavesplatform.protobuf.order.Order.Side.BUY
var __amount: _root_.scala.Long = 0L
var __price: _root_.scala.Long = 0L
var __timestamp: _root_.scala.Long = 0L
var __expiration: _root_.scala.Long = 0L
var __matcherFee: _root_.scala.Option[com.wavesplatform.protobuf.Amount] = _root_.scala.None
var __version: _root_.scala.Int = 0
val __proofs: _root_.scala.collection.immutable.VectorBuilder[_root_.com.google.protobuf.ByteString] = new _root_.scala.collection.immutable.VectorBuilder[_root_.com.google.protobuf.ByteString]
var __priceMode: com.wavesplatform.protobuf.order.Order.PriceMode = com.wavesplatform.protobuf.order.Order.PriceMode.DEFAULT
var __attachment: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __sender: com.wavesplatform.protobuf.order.Order.Sender = com.wavesplatform.protobuf.order.Order.Sender.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 =>
__chainId = _input__.readInt32()
case 26 =>
__matcherPublicKey = _input__.readBytes()
case 34 =>
__assetPair = _root_.scala.Option(__assetPair.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.protobuf.order.AssetPair](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 40 =>
__orderSide = com.wavesplatform.protobuf.order.Order.Side.fromValue(_input__.readEnum())
case 48 =>
__amount = _input__.readInt64()
case 56 =>
__price = _input__.readInt64()
case 64 =>
__timestamp = _input__.readInt64()
case 72 =>
__expiration = _input__.readInt64()
case 82 =>
__matcherFee = _root_.scala.Option(__matcherFee.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.protobuf.Amount](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 88 =>
__version = _input__.readInt32()
case 98 =>
__proofs += _input__.readBytes()
case 112 =>
__priceMode = com.wavesplatform.protobuf.order.Order.PriceMode.fromValue(_input__.readEnum())
case 122 =>
__attachment = _input__.readBytes()
case 18 =>
__sender = com.wavesplatform.protobuf.order.Order.Sender.SenderPublicKey(_input__.readBytes())
case 106 =>
__sender = com.wavesplatform.protobuf.order.Order.Sender.Eip712Signature(_input__.readBytes())
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.wavesplatform.protobuf.order.Order(
chainId = __chainId,
matcherPublicKey = __matcherPublicKey,
assetPair = __assetPair,
orderSide = __orderSide,
amount = __amount,
price = __price,
timestamp = __timestamp,
expiration = __expiration,
matcherFee = __matcherFee,
version = __version,
proofs = __proofs.result(),
priceMode = __priceMode,
attachment = __attachment,
sender = __sender,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.protobuf.order.Order] = _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.protobuf.order.Order(
chainId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Int]).getOrElse(0),
matcherPublicKey = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
assetPair = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.protobuf.order.AssetPair]]),
orderSide = com.wavesplatform.protobuf.order.Order.Side.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(com.wavesplatform.protobuf.order.Order.Side.BUY.scalaValueDescriptor).number),
amount = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
price = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
timestamp = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
expiration = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
matcherFee = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.protobuf.Amount]]),
version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Int]).getOrElse(0),
proofs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Seq[_root_.com.google.protobuf.ByteString]]).getOrElse(_root_.scala.Seq.empty),
priceMode = com.wavesplatform.protobuf.order.Order.PriceMode.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(com.wavesplatform.protobuf.order.Order.PriceMode.DEFAULT.scalaValueDescriptor).number),
attachment = __fieldsMap.get(scalaDescriptor.findFieldByNumber(15).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
sender = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[_root_.com.google.protobuf.ByteString]]).map(com.wavesplatform.protobuf.order.Order.Sender.SenderPublicKey(_))
.orElse[com.wavesplatform.protobuf.order.Order.Sender](__fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).flatMap(_.as[_root_.scala.Option[_root_.com.google.protobuf.ByteString]]).map(com.wavesplatform.protobuf.order.Order.Sender.Eip712Signature(_)))
.getOrElse(com.wavesplatform.protobuf.order.Order.Sender.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = OrderProto.javaDescriptor.getMessageTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = OrderProto.scalaDescriptor.messages(1)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 4 => __out = com.wavesplatform.protobuf.order.AssetPair
case 10 => __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[_] = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 5 => com.wavesplatform.protobuf.order.Order.Side
case 14 => com.wavesplatform.protobuf.order.Order.PriceMode
}
}
lazy val defaultInstance = com.wavesplatform.protobuf.order.Order(
chainId = 0,
matcherPublicKey = _root_.com.google.protobuf.ByteString.EMPTY,
assetPair = _root_.scala.None,
orderSide = com.wavesplatform.protobuf.order.Order.Side.BUY,
amount = 0L,
price = 0L,
timestamp = 0L,
expiration = 0L,
matcherFee = _root_.scala.None,
version = 0,
proofs = _root_.scala.Seq.empty,
priceMode = com.wavesplatform.protobuf.order.Order.PriceMode.DEFAULT,
attachment = _root_.com.google.protobuf.ByteString.EMPTY,
sender = com.wavesplatform.protobuf.order.Order.Sender.Empty
)
sealed abstract class Side(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = com.wavesplatform.protobuf.order.Order.Side
type RecognizedType = com.wavesplatform.protobuf.order.Order.Side.Recognized
def isBuy: _root_.scala.Boolean = false
def isSell: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[Side] = com.wavesplatform.protobuf.order.Order.Side
final def asRecognized: _root_.scala.Option[com.wavesplatform.protobuf.order.Order.Side.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[com.wavesplatform.protobuf.order.Order.Side.Recognized])
}
object Side extends _root_.scalapb.GeneratedEnumCompanion[Side] {
sealed trait Recognized extends Side
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[Side] = this
@SerialVersionUID(0L)
case object BUY extends Side(0) with Side.Recognized {
val index = 0
val name = "BUY"
override def isBuy: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object SELL extends Side(1) with Side.Recognized {
val index = 1
val name = "SELL"
override def isSell: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Side(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(BUY, SELL)
def fromValue(__value: _root_.scala.Int): Side = __value match {
case 0 => BUY
case 1 => SELL
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = com.wavesplatform.protobuf.order.Order.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = com.wavesplatform.protobuf.order.Order.scalaDescriptor.enums(0)
}
sealed abstract class PriceMode(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = com.wavesplatform.protobuf.order.Order.PriceMode
type RecognizedType = com.wavesplatform.protobuf.order.Order.PriceMode.Recognized
def isDefault: _root_.scala.Boolean = false
def isFixedDecimals: _root_.scala.Boolean = false
def isAssetDecimals: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[PriceMode] = com.wavesplatform.protobuf.order.Order.PriceMode
final def asRecognized: _root_.scala.Option[com.wavesplatform.protobuf.order.Order.PriceMode.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[com.wavesplatform.protobuf.order.Order.PriceMode.Recognized])
}
object PriceMode extends _root_.scalapb.GeneratedEnumCompanion[PriceMode] {
sealed trait Recognized extends PriceMode
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[PriceMode] = this
@SerialVersionUID(0L)
case object DEFAULT extends PriceMode(0) with PriceMode.Recognized {
val index = 0
val name = "DEFAULT"
override def isDefault: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object FIXED_DECIMALS extends PriceMode(1) with PriceMode.Recognized {
val index = 1
val name = "FIXED_DECIMALS"
override def isFixedDecimals: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object ASSET_DECIMALS extends PriceMode(2) with PriceMode.Recognized {
val index = 2
val name = "ASSET_DECIMALS"
override def isAssetDecimals: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends PriceMode(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(DEFAULT, FIXED_DECIMALS, ASSET_DECIMALS)
def fromValue(__value: _root_.scala.Int): PriceMode = __value match {
case 0 => DEFAULT
case 1 => FIXED_DECIMALS
case 2 => ASSET_DECIMALS
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = com.wavesplatform.protobuf.order.Order.javaDescriptor.getEnumTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = com.wavesplatform.protobuf.order.Order.scalaDescriptor.enums(1)
}
sealed trait Sender extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isSenderPublicKey: _root_.scala.Boolean = false
def isEip712Signature: _root_.scala.Boolean = false
def senderPublicKey: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = _root_.scala.None
def eip712Signature: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = _root_.scala.None
}
object Sender {
@SerialVersionUID(0L)
case object Empty extends com.wavesplatform.protobuf.order.Order.Sender {
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 SenderPublicKey(value: _root_.com.google.protobuf.ByteString) extends com.wavesplatform.protobuf.order.Order.Sender {
type ValueType = _root_.com.google.protobuf.ByteString
override def isSenderPublicKey: _root_.scala.Boolean = true
override def senderPublicKey: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = Some(value)
override def number: _root_.scala.Int = 2
}
@SerialVersionUID(0L)
final case class Eip712Signature(value: _root_.com.google.protobuf.ByteString) extends com.wavesplatform.protobuf.order.Order.Sender {
type ValueType = _root_.com.google.protobuf.ByteString
override def isEip712Signature: _root_.scala.Boolean = true
override def eip712Signature: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = Some(value)
override def number: _root_.scala.Int = 13
}
}
implicit class OrderLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.order.Order]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.protobuf.order.Order](_l) {
def chainId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.chainId)((c_, f_) => c_.copy(chainId = f_))
def matcherPublicKey: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.matcherPublicKey)((c_, f_) => c_.copy(matcherPublicKey = f_))
def assetPair: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.order.AssetPair] = field(_.getAssetPair)((c_, f_) => c_.copy(assetPair = _root_.scala.Option(f_)))
def optionalAssetPair: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.wavesplatform.protobuf.order.AssetPair]] = field(_.assetPair)((c_, f_) => c_.copy(assetPair = f_))
def orderSide: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.order.Order.Side] = field(_.orderSide)((c_, f_) => c_.copy(orderSide = f_))
def amount: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.amount)((c_, f_) => c_.copy(amount = f_))
def price: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.price)((c_, f_) => c_.copy(price = f_))
def timestamp: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.timestamp)((c_, f_) => c_.copy(timestamp = f_))
def expiration: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.expiration)((c_, f_) => c_.copy(expiration = f_))
def matcherFee: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.Amount] = field(_.getMatcherFee)((c_, f_) => c_.copy(matcherFee = _root_.scala.Option(f_)))
def optionalMatcherFee: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.wavesplatform.protobuf.Amount]] = field(_.matcherFee)((c_, f_) => c_.copy(matcherFee = f_))
def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.version)((c_, f_) => c_.copy(version = f_))
def proofs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.com.google.protobuf.ByteString]] = field(_.proofs)((c_, f_) => c_.copy(proofs = f_))
def priceMode: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.order.Order.PriceMode] = field(_.priceMode)((c_, f_) => c_.copy(priceMode = f_))
def attachment: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.attachment)((c_, f_) => c_.copy(attachment = f_))
def senderPublicKey: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.getSenderPublicKey)((c_, f_) => c_.copy(sender = com.wavesplatform.protobuf.order.Order.Sender.SenderPublicKey(f_)))
def eip712Signature: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.getEip712Signature)((c_, f_) => c_.copy(sender = com.wavesplatform.protobuf.order.Order.Sender.Eip712Signature(f_)))
def sender: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.order.Order.Sender] = field(_.sender)((c_, f_) => c_.copy(sender = f_))
}
final val CHAIN_ID_FIELD_NUMBER = 1
final val MATCHER_PUBLIC_KEY_FIELD_NUMBER = 3
final val ASSET_PAIR_FIELD_NUMBER = 4
final val ORDER_SIDE_FIELD_NUMBER = 5
final val AMOUNT_FIELD_NUMBER = 6
final val PRICE_FIELD_NUMBER = 7
final val TIMESTAMP_FIELD_NUMBER = 8
final val EXPIRATION_FIELD_NUMBER = 9
final val MATCHER_FEE_FIELD_NUMBER = 10
final val VERSION_FIELD_NUMBER = 11
final val PROOFS_FIELD_NUMBER = 12
final val PRICE_MODE_FIELD_NUMBER = 14
final val ATTACHMENT_FIELD_NUMBER = 15
final val SENDER_PUBLIC_KEY_FIELD_NUMBER = 2
final val EIP712_SIGNATURE_FIELD_NUMBER = 13
def of(
chainId: _root_.scala.Int,
matcherPublicKey: _root_.com.google.protobuf.ByteString,
assetPair: _root_.scala.Option[com.wavesplatform.protobuf.order.AssetPair],
orderSide: com.wavesplatform.protobuf.order.Order.Side,
amount: _root_.scala.Long,
price: _root_.scala.Long,
timestamp: _root_.scala.Long,
expiration: _root_.scala.Long,
matcherFee: _root_.scala.Option[com.wavesplatform.protobuf.Amount],
version: _root_.scala.Int,
proofs: _root_.scala.Seq[_root_.com.google.protobuf.ByteString],
priceMode: com.wavesplatform.protobuf.order.Order.PriceMode,
attachment: _root_.com.google.protobuf.ByteString,
sender: com.wavesplatform.protobuf.order.Order.Sender
): _root_.com.wavesplatform.protobuf.order.Order = _root_.com.wavesplatform.protobuf.order.Order(
chainId,
matcherPublicKey,
assetPair,
orderSide,
amount,
price,
timestamp,
expiration,
matcherFee,
version,
proofs,
priceMode,
attachment,
sender
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.Order])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy