com.wavesplatform.database.protobuf.BlockMeta.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 BlockMeta(
header: _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header] = _root_.scala.None,
signature: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
headerHash: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
height: _root_.scala.Int = 0,
size: _root_.scala.Int = 0,
transactionCount: _root_.scala.Int = 0,
totalFeeInWaves: _root_.scala.Long = 0L,
reward: _root_.scala.Long = 0L,
vrf: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
totalScore: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
totalWavesAmount: _root_.scala.Long = 0L,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[BlockMeta] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (header.isDefined) {
val __value = header.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = signature
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value)
}
};
{
val __value = headerHash
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(3, __value)
}
};
{
val __value = height
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(4, __value)
}
};
{
val __value = size
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(5, __value)
}
};
{
val __value = transactionCount
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(6, __value)
}
};
{
val __value = totalFeeInWaves
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(7, __value)
}
};
{
val __value = reward
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(8, __value)
}
};
{
val __value = vrf
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(9, __value)
}
};
{
val __value = totalScore
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(10, __value)
}
};
{
val __value = totalWavesAmount
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(11, __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 = {
header.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = signature
if (!__v.isEmpty) {
_output__.writeBytes(2, __v)
}
};
{
val __v = headerHash
if (!__v.isEmpty) {
_output__.writeBytes(3, __v)
}
};
{
val __v = height
if (__v != 0) {
_output__.writeInt32(4, __v)
}
};
{
val __v = size
if (__v != 0) {
_output__.writeInt32(5, __v)
}
};
{
val __v = transactionCount
if (__v != 0) {
_output__.writeInt32(6, __v)
}
};
{
val __v = totalFeeInWaves
if (__v != 0L) {
_output__.writeInt64(7, __v)
}
};
{
val __v = reward
if (__v != 0L) {
_output__.writeInt64(8, __v)
}
};
{
val __v = vrf
if (!__v.isEmpty) {
_output__.writeBytes(9, __v)
}
};
{
val __v = totalScore
if (!__v.isEmpty) {
_output__.writeBytes(10, __v)
}
};
{
val __v = totalWavesAmount
if (__v != 0L) {
_output__.writeInt64(11, __v)
}
};
unknownFields.writeTo(_output__)
}
def getHeader: com.wavesplatform.protobuf.block.Block.Header = header.getOrElse(com.wavesplatform.protobuf.block.Block.Header.defaultInstance)
def clearHeader: BlockMeta = copy(header = _root_.scala.None)
def withHeader(__v: com.wavesplatform.protobuf.block.Block.Header): BlockMeta = copy(header = Option(__v))
def withSignature(__v: _root_.com.google.protobuf.ByteString): BlockMeta = copy(signature = __v)
def withHeaderHash(__v: _root_.com.google.protobuf.ByteString): BlockMeta = copy(headerHash = __v)
def withHeight(__v: _root_.scala.Int): BlockMeta = copy(height = __v)
def withSize(__v: _root_.scala.Int): BlockMeta = copy(size = __v)
def withTransactionCount(__v: _root_.scala.Int): BlockMeta = copy(transactionCount = __v)
def withTotalFeeInWaves(__v: _root_.scala.Long): BlockMeta = copy(totalFeeInWaves = __v)
def withReward(__v: _root_.scala.Long): BlockMeta = copy(reward = __v)
def withVrf(__v: _root_.com.google.protobuf.ByteString): BlockMeta = copy(vrf = __v)
def withTotalScore(__v: _root_.com.google.protobuf.ByteString): BlockMeta = copy(totalScore = __v)
def withTotalWavesAmount(__v: _root_.scala.Long): BlockMeta = copy(totalWavesAmount = __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 => header.orNull
case 2 => {
val __t = signature
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 3 => {
val __t = headerHash
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 4 => {
val __t = height
if (__t != 0) __t else null
}
case 5 => {
val __t = size
if (__t != 0) __t else null
}
case 6 => {
val __t = transactionCount
if (__t != 0) __t else null
}
case 7 => {
val __t = totalFeeInWaves
if (__t != 0L) __t else null
}
case 8 => {
val __t = reward
if (__t != 0L) __t else null
}
case 9 => {
val __t = vrf
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 10 => {
val __t = totalScore
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
}
case 11 => {
val __t = totalWavesAmount
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 => header.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => _root_.scalapb.descriptors.PByteString(signature)
case 3 => _root_.scalapb.descriptors.PByteString(headerHash)
case 4 => _root_.scalapb.descriptors.PInt(height)
case 5 => _root_.scalapb.descriptors.PInt(size)
case 6 => _root_.scalapb.descriptors.PInt(transactionCount)
case 7 => _root_.scalapb.descriptors.PLong(totalFeeInWaves)
case 8 => _root_.scalapb.descriptors.PLong(reward)
case 9 => _root_.scalapb.descriptors.PByteString(vrf)
case 10 => _root_.scalapb.descriptors.PByteString(totalScore)
case 11 => _root_.scalapb.descriptors.PLong(totalWavesAmount)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.wavesplatform.database.protobuf.BlockMeta.type = com.wavesplatform.database.protobuf.BlockMeta
// @@protoc_insertion_point(GeneratedMessage[waves.api.BlockMeta])
}
object BlockMeta extends scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.BlockMeta] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.wavesplatform.database.protobuf.BlockMeta] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.wavesplatform.database.protobuf.BlockMeta = {
var __header: _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header] = _root_.scala.None
var __signature: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __headerHash: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __height: _root_.scala.Int = 0
var __size: _root_.scala.Int = 0
var __transactionCount: _root_.scala.Int = 0
var __totalFeeInWaves: _root_.scala.Long = 0L
var __reward: _root_.scala.Long = 0L
var __vrf: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __totalScore: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
var __totalWavesAmount: _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 10 =>
__header = _root_.scala.Option(__header.fold(_root_.scalapb.LiteParser.readMessage[com.wavesplatform.protobuf.block.Block.Header](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__signature = _input__.readBytes()
case 26 =>
__headerHash = _input__.readBytes()
case 32 =>
__height = _input__.readInt32()
case 40 =>
__size = _input__.readInt32()
case 48 =>
__transactionCount = _input__.readInt32()
case 56 =>
__totalFeeInWaves = _input__.readInt64()
case 64 =>
__reward = _input__.readInt64()
case 74 =>
__vrf = _input__.readBytes()
case 82 =>
__totalScore = _input__.readBytes()
case 88 =>
__totalWavesAmount = _input__.readInt64()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.wavesplatform.database.protobuf.BlockMeta(
header = __header,
signature = __signature,
headerHash = __headerHash,
height = __height,
size = __size,
transactionCount = __transactionCount,
totalFeeInWaves = __totalFeeInWaves,
reward = __reward,
vrf = __vrf,
totalScore = __totalScore,
totalWavesAmount = __totalWavesAmount,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.wavesplatform.database.protobuf.BlockMeta] = _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.BlockMeta(
header = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header]]),
signature = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
headerHash = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
height = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Int]).getOrElse(0),
size = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Int]).getOrElse(0),
transactionCount = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Int]).getOrElse(0),
totalFeeInWaves = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
reward = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
vrf = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
totalScore = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
totalWavesAmount = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Long]).getOrElse(0L)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DatabaseProto.javaDescriptor.getMessageTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DatabaseProto.scalaDescriptor.messages(1)
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.protobuf.block.Block.Header
}
__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.BlockMeta(
header = _root_.scala.None,
signature = _root_.com.google.protobuf.ByteString.EMPTY,
headerHash = _root_.com.google.protobuf.ByteString.EMPTY,
height = 0,
size = 0,
transactionCount = 0,
totalFeeInWaves = 0L,
reward = 0L,
vrf = _root_.com.google.protobuf.ByteString.EMPTY,
totalScore = _root_.com.google.protobuf.ByteString.EMPTY,
totalWavesAmount = 0L
)
implicit class BlockMetaLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.database.protobuf.BlockMeta]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.wavesplatform.database.protobuf.BlockMeta](_l) {
def header: _root_.scalapb.lenses.Lens[UpperPB, com.wavesplatform.protobuf.block.Block.Header] = field(_.getHeader)((c_, f_) => c_.copy(header = _root_.scala.Option(f_)))
def optionalHeader: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header]] = field(_.header)((c_, f_) => c_.copy(header = f_))
def signature: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.signature)((c_, f_) => c_.copy(signature = f_))
def headerHash: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.headerHash)((c_, f_) => c_.copy(headerHash = f_))
def height: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.height)((c_, f_) => c_.copy(height = f_))
def size: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.size)((c_, f_) => c_.copy(size = f_))
def transactionCount: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.transactionCount)((c_, f_) => c_.copy(transactionCount = f_))
def totalFeeInWaves: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.totalFeeInWaves)((c_, f_) => c_.copy(totalFeeInWaves = f_))
def reward: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.reward)((c_, f_) => c_.copy(reward = f_))
def vrf: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.vrf)((c_, f_) => c_.copy(vrf = f_))
def totalScore: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.totalScore)((c_, f_) => c_.copy(totalScore = f_))
def totalWavesAmount: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.totalWavesAmount)((c_, f_) => c_.copy(totalWavesAmount = f_))
}
final val HEADER_FIELD_NUMBER = 1
final val SIGNATURE_FIELD_NUMBER = 2
final val HEADER_HASH_FIELD_NUMBER = 3
final val HEIGHT_FIELD_NUMBER = 4
final val SIZE_FIELD_NUMBER = 5
final val TRANSACTION_COUNT_FIELD_NUMBER = 6
final val TOTAL_FEE_IN_WAVES_FIELD_NUMBER = 7
final val REWARD_FIELD_NUMBER = 8
final val VRF_FIELD_NUMBER = 9
final val TOTAL_SCORE_FIELD_NUMBER = 10
final val TOTAL_WAVES_AMOUNT_FIELD_NUMBER = 11
def of(
header: _root_.scala.Option[com.wavesplatform.protobuf.block.Block.Header],
signature: _root_.com.google.protobuf.ByteString,
headerHash: _root_.com.google.protobuf.ByteString,
height: _root_.scala.Int,
size: _root_.scala.Int,
transactionCount: _root_.scala.Int,
totalFeeInWaves: _root_.scala.Long,
reward: _root_.scala.Long,
vrf: _root_.com.google.protobuf.ByteString,
totalScore: _root_.com.google.protobuf.ByteString,
totalWavesAmount: _root_.scala.Long
): _root_.com.wavesplatform.database.protobuf.BlockMeta = _root_.com.wavesplatform.database.protobuf.BlockMeta(
header,
signature,
headerHash,
height,
size,
transactionCount,
totalFeeInWaves,
reward,
vrf,
totalScore,
totalWavesAmount
)
// @@protoc_insertion_point(GeneratedMessageCompanion[waves.api.BlockMeta])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy