lnrpc.ForwardingHistoryRequest.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package lnrpc
import org.bitcoins.lnd.rpc.LndUtils._
/** @param startTime
* Start time is the starting point of the forwarding history request. All
* records beyond this point will be included, respecting the end time, and
* the index offset.
* @param endTime
* End time is the end point of the forwarding history request. The
* response will carry at most 50k records between the start time and the
* end time. The index offset can be used to implement pagination.
* @param indexOffset
* Index offset is the offset in the time series to start at. As each
* response can only contain 50k records, callers can use this to skip
* around within a packed time series.
* @param numMaxEvents
* The max number of events to return in the response to this query.
* @param peerAliasLookup
* Informs the server if the peer alias should be looked up for each
* forwarding event.
*/
@SerialVersionUID(0L)
final case class ForwardingHistoryRequest(
startTime: org.bitcoins.core.number.UInt64 = lnrpc.ForwardingHistoryRequest._typemapper_startTime.toCustom(0L),
endTime: org.bitcoins.core.number.UInt64 = lnrpc.ForwardingHistoryRequest._typemapper_endTime.toCustom(0L),
indexOffset: org.bitcoins.core.number.UInt32 = lnrpc.ForwardingHistoryRequest._typemapper_indexOffset.toCustom(0),
numMaxEvents: org.bitcoins.core.number.UInt32 = lnrpc.ForwardingHistoryRequest._typemapper_numMaxEvents.toCustom(0),
peerAliasLookup: _root_.scala.Boolean = false,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ForwardingHistoryRequest] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = lnrpc.ForwardingHistoryRequest._typemapper_startTime.toBase(startTime)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(1, __value)
}
};
{
val __value = lnrpc.ForwardingHistoryRequest._typemapper_endTime.toBase(endTime)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(2, __value)
}
};
{
val __value = lnrpc.ForwardingHistoryRequest._typemapper_indexOffset.toBase(indexOffset)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(3, __value)
}
};
{
val __value = lnrpc.ForwardingHistoryRequest._typemapper_numMaxEvents.toBase(numMaxEvents)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(4, __value)
}
};
{
val __value = peerAliasLookup
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(5, __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 = lnrpc.ForwardingHistoryRequest._typemapper_startTime.toBase(startTime)
if (__v != 0L) {
_output__.writeUInt64(1, __v)
}
};
{
val __v = lnrpc.ForwardingHistoryRequest._typemapper_endTime.toBase(endTime)
if (__v != 0L) {
_output__.writeUInt64(2, __v)
}
};
{
val __v = lnrpc.ForwardingHistoryRequest._typemapper_indexOffset.toBase(indexOffset)
if (__v != 0) {
_output__.writeUInt32(3, __v)
}
};
{
val __v = lnrpc.ForwardingHistoryRequest._typemapper_numMaxEvents.toBase(numMaxEvents)
if (__v != 0) {
_output__.writeUInt32(4, __v)
}
};
{
val __v = peerAliasLookup
if (__v != false) {
_output__.writeBool(5, __v)
}
};
unknownFields.writeTo(_output__)
}
def withStartTime(__v: org.bitcoins.core.number.UInt64): ForwardingHistoryRequest = copy(startTime = __v)
def withEndTime(__v: org.bitcoins.core.number.UInt64): ForwardingHistoryRequest = copy(endTime = __v)
def withIndexOffset(__v: org.bitcoins.core.number.UInt32): ForwardingHistoryRequest = copy(indexOffset = __v)
def withNumMaxEvents(__v: org.bitcoins.core.number.UInt32): ForwardingHistoryRequest = copy(numMaxEvents = __v)
def withPeerAliasLookup(__v: _root_.scala.Boolean): ForwardingHistoryRequest = copy(peerAliasLookup = __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 = lnrpc.ForwardingHistoryRequest._typemapper_startTime.toBase(startTime)
if (__t != 0L) __t else null
}
case 2 => {
val __t = lnrpc.ForwardingHistoryRequest._typemapper_endTime.toBase(endTime)
if (__t != 0L) __t else null
}
case 3 => {
val __t = lnrpc.ForwardingHistoryRequest._typemapper_indexOffset.toBase(indexOffset)
if (__t != 0) __t else null
}
case 4 => {
val __t = lnrpc.ForwardingHistoryRequest._typemapper_numMaxEvents.toBase(numMaxEvents)
if (__t != 0) __t else null
}
case 5 => {
val __t = peerAliasLookup
if (__t != false) __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PLong(lnrpc.ForwardingHistoryRequest._typemapper_startTime.toBase(startTime))
case 2 => _root_.scalapb.descriptors.PLong(lnrpc.ForwardingHistoryRequest._typemapper_endTime.toBase(endTime))
case 3 => _root_.scalapb.descriptors.PInt(lnrpc.ForwardingHistoryRequest._typemapper_indexOffset.toBase(indexOffset))
case 4 => _root_.scalapb.descriptors.PInt(lnrpc.ForwardingHistoryRequest._typemapper_numMaxEvents.toBase(numMaxEvents))
case 5 => _root_.scalapb.descriptors.PBoolean(peerAliasLookup)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: lnrpc.ForwardingHistoryRequest.type = lnrpc.ForwardingHistoryRequest
// @@protoc_insertion_point(GeneratedMessage[lnrpc.ForwardingHistoryRequest])
}
object ForwardingHistoryRequest extends scalapb.GeneratedMessageCompanion[lnrpc.ForwardingHistoryRequest] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.ForwardingHistoryRequest] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.ForwardingHistoryRequest = {
var __startTime: _root_.scala.Long = 0L
var __endTime: _root_.scala.Long = 0L
var __indexOffset: _root_.scala.Int = 0
var __numMaxEvents: _root_.scala.Int = 0
var __peerAliasLookup: _root_.scala.Boolean = false
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 8 =>
__startTime = _input__.readUInt64()
case 16 =>
__endTime = _input__.readUInt64()
case 24 =>
__indexOffset = _input__.readUInt32()
case 32 =>
__numMaxEvents = _input__.readUInt32()
case 40 =>
__peerAliasLookup = _input__.readBool()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
lnrpc.ForwardingHistoryRequest(
startTime = lnrpc.ForwardingHistoryRequest._typemapper_startTime.toCustom(__startTime),
endTime = lnrpc.ForwardingHistoryRequest._typemapper_endTime.toCustom(__endTime),
indexOffset = lnrpc.ForwardingHistoryRequest._typemapper_indexOffset.toCustom(__indexOffset),
numMaxEvents = lnrpc.ForwardingHistoryRequest._typemapper_numMaxEvents.toCustom(__numMaxEvents),
peerAliasLookup = __peerAliasLookup,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.ForwardingHistoryRequest] = _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.")
lnrpc.ForwardingHistoryRequest(
startTime = lnrpc.ForwardingHistoryRequest._typemapper_startTime.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
endTime = lnrpc.ForwardingHistoryRequest._typemapper_endTime.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
indexOffset = lnrpc.ForwardingHistoryRequest._typemapper_indexOffset.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
numMaxEvents = lnrpc.ForwardingHistoryRequest._typemapper_numMaxEvents.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
peerAliasLookup = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Boolean]).getOrElse(false)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(157)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(157)
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 = lnrpc.ForwardingHistoryRequest(
startTime = lnrpc.ForwardingHistoryRequest._typemapper_startTime.toCustom(0L),
endTime = lnrpc.ForwardingHistoryRequest._typemapper_endTime.toCustom(0L),
indexOffset = lnrpc.ForwardingHistoryRequest._typemapper_indexOffset.toCustom(0),
numMaxEvents = lnrpc.ForwardingHistoryRequest._typemapper_numMaxEvents.toCustom(0),
peerAliasLookup = false
)
implicit class ForwardingHistoryRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.ForwardingHistoryRequest]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.ForwardingHistoryRequest](_l) {
def startTime: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.startTime)((c_, f_) => c_.copy(startTime = f_))
def endTime: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.endTime)((c_, f_) => c_.copy(endTime = f_))
def indexOffset: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.indexOffset)((c_, f_) => c_.copy(indexOffset = f_))
def numMaxEvents: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.numMaxEvents)((c_, f_) => c_.copy(numMaxEvents = f_))
def peerAliasLookup: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.peerAliasLookup)((c_, f_) => c_.copy(peerAliasLookup = f_))
}
final val START_TIME_FIELD_NUMBER = 1
final val END_TIME_FIELD_NUMBER = 2
final val INDEX_OFFSET_FIELD_NUMBER = 3
final val NUM_MAX_EVENTS_FIELD_NUMBER = 4
final val PEER_ALIAS_LOOKUP_FIELD_NUMBER = 5
@transient
private[lnrpc] val _typemapper_startTime: _root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64]]
@transient
private[lnrpc] val _typemapper_endTime: _root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64]]
@transient
private[lnrpc] val _typemapper_indexOffset: _root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32]]
@transient
private[lnrpc] val _typemapper_numMaxEvents: _root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32]]
def of(
startTime: org.bitcoins.core.number.UInt64,
endTime: org.bitcoins.core.number.UInt64,
indexOffset: org.bitcoins.core.number.UInt32,
numMaxEvents: org.bitcoins.core.number.UInt32,
peerAliasLookup: _root_.scala.Boolean
): _root_.lnrpc.ForwardingHistoryRequest = _root_.lnrpc.ForwardingHistoryRequest(
startTime,
endTime,
indexOffset,
numMaxEvents,
peerAliasLookup
)
// @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.ForwardingHistoryRequest])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy