lnrpc.ListPaymentsRequest.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 includeIncomplete
*
* If true, then return payments that have not yet fully completed. This means
* that pending payments, as well as failed payments will show up if this
* field is set to true. This flag doesn't change the meaning of the indices,
* which are tied to individual payments.
* @param indexOffset
*
* The index of a payment that will be used as either the start or end of a
* query to determine which payments should be returned in the response. The
* index_offset is exclusive. In the case of a zero index_offset, the query
* will start with the oldest payment when paginating forwards, or will end
* with the most recent payment when paginating backwards.
* @param maxPayments
* The maximal number of payments returned in the response to this query.
* @param reversed
*
* If set, the payments returned will result from seeking backwards from the
* specified index offset. This can be used to paginate backwards. The order
* of the returned payments is always oldest first (ascending index order).
* @param countTotalPayments
*
* If set, all payments (complete and incomplete, independent of the
* max_payments parameter) will be counted. Note that setting this to true will
* increase the run time of the call significantly on systems that have a lot
* of payments, as all of them have to be iterated through to be counted.
* @param creationDateStart
* If set, returns all invoices with a creation date greater than or equal
* to it. Measured in seconds since the unix epoch.
* @param creationDateEnd
* If set, returns all invoices with a creation date less than or equal to
* it. Measured in seconds since the unix epoch.
*/
@SerialVersionUID(0L)
final case class ListPaymentsRequest(
includeIncomplete: _root_.scala.Boolean = false,
indexOffset: org.bitcoins.core.number.UInt64 = lnrpc.ListPaymentsRequest._typemapper_indexOffset.toCustom(0L),
maxPayments: org.bitcoins.core.number.UInt64 = lnrpc.ListPaymentsRequest._typemapper_maxPayments.toCustom(0L),
reversed: _root_.scala.Boolean = false,
countTotalPayments: _root_.scala.Boolean = false,
creationDateStart: org.bitcoins.core.number.UInt64 = lnrpc.ListPaymentsRequest._typemapper_creationDateStart.toCustom(0L),
creationDateEnd: org.bitcoins.core.number.UInt64 = lnrpc.ListPaymentsRequest._typemapper_creationDateEnd.toCustom(0L),
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ListPaymentsRequest] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = includeIncomplete
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(1, __value)
}
};
{
val __value = lnrpc.ListPaymentsRequest._typemapper_indexOffset.toBase(indexOffset)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(2, __value)
}
};
{
val __value = lnrpc.ListPaymentsRequest._typemapper_maxPayments.toBase(maxPayments)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(3, __value)
}
};
{
val __value = reversed
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value)
}
};
{
val __value = countTotalPayments
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(5, __value)
}
};
{
val __value = lnrpc.ListPaymentsRequest._typemapper_creationDateStart.toBase(creationDateStart)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(6, __value)
}
};
{
val __value = lnrpc.ListPaymentsRequest._typemapper_creationDateEnd.toBase(creationDateEnd)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(7, __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 = includeIncomplete
if (__v != false) {
_output__.writeBool(1, __v)
}
};
{
val __v = lnrpc.ListPaymentsRequest._typemapper_indexOffset.toBase(indexOffset)
if (__v != 0L) {
_output__.writeUInt64(2, __v)
}
};
{
val __v = lnrpc.ListPaymentsRequest._typemapper_maxPayments.toBase(maxPayments)
if (__v != 0L) {
_output__.writeUInt64(3, __v)
}
};
{
val __v = reversed
if (__v != false) {
_output__.writeBool(4, __v)
}
};
{
val __v = countTotalPayments
if (__v != false) {
_output__.writeBool(5, __v)
}
};
{
val __v = lnrpc.ListPaymentsRequest._typemapper_creationDateStart.toBase(creationDateStart)
if (__v != 0L) {
_output__.writeUInt64(6, __v)
}
};
{
val __v = lnrpc.ListPaymentsRequest._typemapper_creationDateEnd.toBase(creationDateEnd)
if (__v != 0L) {
_output__.writeUInt64(7, __v)
}
};
unknownFields.writeTo(_output__)
}
def withIncludeIncomplete(__v: _root_.scala.Boolean): ListPaymentsRequest = copy(includeIncomplete = __v)
def withIndexOffset(__v: org.bitcoins.core.number.UInt64): ListPaymentsRequest = copy(indexOffset = __v)
def withMaxPayments(__v: org.bitcoins.core.number.UInt64): ListPaymentsRequest = copy(maxPayments = __v)
def withReversed(__v: _root_.scala.Boolean): ListPaymentsRequest = copy(reversed = __v)
def withCountTotalPayments(__v: _root_.scala.Boolean): ListPaymentsRequest = copy(countTotalPayments = __v)
def withCreationDateStart(__v: org.bitcoins.core.number.UInt64): ListPaymentsRequest = copy(creationDateStart = __v)
def withCreationDateEnd(__v: org.bitcoins.core.number.UInt64): ListPaymentsRequest = copy(creationDateEnd = __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 = includeIncomplete
if (__t != false) __t else null
}
case 2 => {
val __t = lnrpc.ListPaymentsRequest._typemapper_indexOffset.toBase(indexOffset)
if (__t != 0L) __t else null
}
case 3 => {
val __t = lnrpc.ListPaymentsRequest._typemapper_maxPayments.toBase(maxPayments)
if (__t != 0L) __t else null
}
case 4 => {
val __t = reversed
if (__t != false) __t else null
}
case 5 => {
val __t = countTotalPayments
if (__t != false) __t else null
}
case 6 => {
val __t = lnrpc.ListPaymentsRequest._typemapper_creationDateStart.toBase(creationDateStart)
if (__t != 0L) __t else null
}
case 7 => {
val __t = lnrpc.ListPaymentsRequest._typemapper_creationDateEnd.toBase(creationDateEnd)
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 => _root_.scalapb.descriptors.PBoolean(includeIncomplete)
case 2 => _root_.scalapb.descriptors.PLong(lnrpc.ListPaymentsRequest._typemapper_indexOffset.toBase(indexOffset))
case 3 => _root_.scalapb.descriptors.PLong(lnrpc.ListPaymentsRequest._typemapper_maxPayments.toBase(maxPayments))
case 4 => _root_.scalapb.descriptors.PBoolean(reversed)
case 5 => _root_.scalapb.descriptors.PBoolean(countTotalPayments)
case 6 => _root_.scalapb.descriptors.PLong(lnrpc.ListPaymentsRequest._typemapper_creationDateStart.toBase(creationDateStart))
case 7 => _root_.scalapb.descriptors.PLong(lnrpc.ListPaymentsRequest._typemapper_creationDateEnd.toBase(creationDateEnd))
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: lnrpc.ListPaymentsRequest.type = lnrpc.ListPaymentsRequest
// @@protoc_insertion_point(GeneratedMessage[lnrpc.ListPaymentsRequest])
}
object ListPaymentsRequest extends scalapb.GeneratedMessageCompanion[lnrpc.ListPaymentsRequest] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.ListPaymentsRequest] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.ListPaymentsRequest = {
var __includeIncomplete: _root_.scala.Boolean = false
var __indexOffset: _root_.scala.Long = 0L
var __maxPayments: _root_.scala.Long = 0L
var __reversed: _root_.scala.Boolean = false
var __countTotalPayments: _root_.scala.Boolean = false
var __creationDateStart: _root_.scala.Long = 0L
var __creationDateEnd: _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 8 =>
__includeIncomplete = _input__.readBool()
case 16 =>
__indexOffset = _input__.readUInt64()
case 24 =>
__maxPayments = _input__.readUInt64()
case 32 =>
__reversed = _input__.readBool()
case 40 =>
__countTotalPayments = _input__.readBool()
case 48 =>
__creationDateStart = _input__.readUInt64()
case 56 =>
__creationDateEnd = _input__.readUInt64()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
lnrpc.ListPaymentsRequest(
includeIncomplete = __includeIncomplete,
indexOffset = lnrpc.ListPaymentsRequest._typemapper_indexOffset.toCustom(__indexOffset),
maxPayments = lnrpc.ListPaymentsRequest._typemapper_maxPayments.toCustom(__maxPayments),
reversed = __reversed,
countTotalPayments = __countTotalPayments,
creationDateStart = lnrpc.ListPaymentsRequest._typemapper_creationDateStart.toCustom(__creationDateStart),
creationDateEnd = lnrpc.ListPaymentsRequest._typemapper_creationDateEnd.toCustom(__creationDateEnd),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.ListPaymentsRequest] = _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.ListPaymentsRequest(
includeIncomplete = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
indexOffset = lnrpc.ListPaymentsRequest._typemapper_indexOffset.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
maxPayments = lnrpc.ListPaymentsRequest._typemapper_maxPayments.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
reversed = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
countTotalPayments = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
creationDateStart = lnrpc.ListPaymentsRequest._typemapper_creationDateStart.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
creationDateEnd = lnrpc.ListPaymentsRequest._typemapper_creationDateEnd.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Long]).getOrElse(0L))
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(138)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(138)
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.ListPaymentsRequest(
includeIncomplete = false,
indexOffset = lnrpc.ListPaymentsRequest._typemapper_indexOffset.toCustom(0L),
maxPayments = lnrpc.ListPaymentsRequest._typemapper_maxPayments.toCustom(0L),
reversed = false,
countTotalPayments = false,
creationDateStart = lnrpc.ListPaymentsRequest._typemapper_creationDateStart.toCustom(0L),
creationDateEnd = lnrpc.ListPaymentsRequest._typemapper_creationDateEnd.toCustom(0L)
)
implicit class ListPaymentsRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.ListPaymentsRequest]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.ListPaymentsRequest](_l) {
def includeIncomplete: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.includeIncomplete)((c_, f_) => c_.copy(includeIncomplete = f_))
def indexOffset: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.indexOffset)((c_, f_) => c_.copy(indexOffset = f_))
def maxPayments: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.maxPayments)((c_, f_) => c_.copy(maxPayments = f_))
def reversed: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.reversed)((c_, f_) => c_.copy(reversed = f_))
def countTotalPayments: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.countTotalPayments)((c_, f_) => c_.copy(countTotalPayments = f_))
def creationDateStart: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.creationDateStart)((c_, f_) => c_.copy(creationDateStart = f_))
def creationDateEnd: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.creationDateEnd)((c_, f_) => c_.copy(creationDateEnd = f_))
}
final val INCLUDE_INCOMPLETE_FIELD_NUMBER = 1
final val INDEX_OFFSET_FIELD_NUMBER = 2
final val MAX_PAYMENTS_FIELD_NUMBER = 3
final val REVERSED_FIELD_NUMBER = 4
final val COUNT_TOTAL_PAYMENTS_FIELD_NUMBER = 5
final val CREATION_DATE_START_FIELD_NUMBER = 6
final val CREATION_DATE_END_FIELD_NUMBER = 7
@transient
private[lnrpc] val _typemapper_indexOffset: _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_maxPayments: _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_creationDateStart: _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_creationDateEnd: _root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64]]
def of(
includeIncomplete: _root_.scala.Boolean,
indexOffset: org.bitcoins.core.number.UInt64,
maxPayments: org.bitcoins.core.number.UInt64,
reversed: _root_.scala.Boolean,
countTotalPayments: _root_.scala.Boolean,
creationDateStart: org.bitcoins.core.number.UInt64,
creationDateEnd: org.bitcoins.core.number.UInt64
): _root_.lnrpc.ListPaymentsRequest = _root_.lnrpc.ListPaymentsRequest(
includeIncomplete,
indexOffset,
maxPayments,
reversed,
countTotalPayments,
creationDateStart,
creationDateEnd
)
// @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.ListPaymentsRequest])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy