walletrpc.PendingSweep.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package walletrpc
/** @param outpoint
* The outpoint of the output we're attempting to sweep.
* @param witnessType
* The witness type of the output we're attempting to sweep.
* @param amountSat
* The value of the output we're attempting to sweep.
* @param satPerByte
*
* Deprecated, use sat_per_vbyte.
* The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee
* rate is only determined once a sweeping transaction for the output is
* created, so it's possible for this to be 0 before this.
* @param broadcastAttempts
* The number of broadcast attempts we've made to sweep the output.
* @param nextBroadcastHeight
*
* The next height of the chain at which we'll attempt to broadcast the
* sweep transaction of the output.
* @param requestedConfTarget
* The requested confirmation target for this output.
* @param requestedSatPerByte
* Deprecated, use requested_sat_per_vbyte.
* The requested fee rate, expressed in sat/vbyte, for this output.
* @param satPerVbyte
*
* The fee rate we'll use to sweep the output, expressed in sat/vbyte. The fee
* rate is only determined once a sweeping transaction for the output is
* created, so it's possible for this to be 0 before this.
* @param requestedSatPerVbyte
* The requested fee rate, expressed in sat/vbyte, for this output.
* @param force
*
* Whether this input must be force-swept. This means that it is swept even
* if it has a negative yield.
*/
@SerialVersionUID(0L)
final case class PendingSweep(
outpoint: _root_.scala.Option[lnrpc.OutPoint] = _root_.scala.None,
witnessType: walletrpc.WitnessType = walletrpc.WitnessType.UNKNOWN_WITNESS,
amountSat: _root_.scala.Int = 0,
@scala.deprecated(message="Marked as deprecated in proto file", "") satPerByte: _root_.scala.Int = 0,
broadcastAttempts: _root_.scala.Int = 0,
nextBroadcastHeight: _root_.scala.Int = 0,
requestedConfTarget: _root_.scala.Int = 0,
@scala.deprecated(message="Marked as deprecated in proto file", "") requestedSatPerByte: _root_.scala.Int = 0,
satPerVbyte: _root_.scala.Long = 0L,
requestedSatPerVbyte: _root_.scala.Long = 0L,
force: _root_.scala.Boolean = false,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PendingSweep] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (outpoint.isDefined) {
val __value = outpoint.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = witnessType.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(2, __value)
}
};
{
val __value = amountSat
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(3, __value)
}
};
{
val __value = satPerByte
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(4, __value)
}
};
{
val __value = broadcastAttempts
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(5, __value)
}
};
{
val __value = nextBroadcastHeight
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(6, __value)
}
};
{
val __value = requestedConfTarget
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(8, __value)
}
};
{
val __value = requestedSatPerByte
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(9, __value)
}
};
{
val __value = satPerVbyte
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(10, __value)
}
};
{
val __value = requestedSatPerVbyte
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(11, __value)
}
};
{
val __value = force
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(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 = {
outpoint.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = witnessType.value
if (__v != 0) {
_output__.writeEnum(2, __v)
}
};
{
val __v = amountSat
if (__v != 0) {
_output__.writeUInt32(3, __v)
}
};
{
val __v = satPerByte
if (__v != 0) {
_output__.writeUInt32(4, __v)
}
};
{
val __v = broadcastAttempts
if (__v != 0) {
_output__.writeUInt32(5, __v)
}
};
{
val __v = nextBroadcastHeight
if (__v != 0) {
_output__.writeUInt32(6, __v)
}
};
{
val __v = force
if (__v != false) {
_output__.writeBool(7, __v)
}
};
{
val __v = requestedConfTarget
if (__v != 0) {
_output__.writeUInt32(8, __v)
}
};
{
val __v = requestedSatPerByte
if (__v != 0) {
_output__.writeUInt32(9, __v)
}
};
{
val __v = satPerVbyte
if (__v != 0L) {
_output__.writeUInt64(10, __v)
}
};
{
val __v = requestedSatPerVbyte
if (__v != 0L) {
_output__.writeUInt64(11, __v)
}
};
unknownFields.writeTo(_output__)
}
def getOutpoint: lnrpc.OutPoint = outpoint.getOrElse(lnrpc.OutPoint.defaultInstance)
def clearOutpoint: PendingSweep = copy(outpoint = _root_.scala.None)
def withOutpoint(__v: lnrpc.OutPoint): PendingSweep = copy(outpoint = Option(__v))
def withWitnessType(__v: walletrpc.WitnessType): PendingSweep = copy(witnessType = __v)
def withAmountSat(__v: _root_.scala.Int): PendingSweep = copy(amountSat = __v)
def withSatPerByte(__v: _root_.scala.Int): PendingSweep = copy(satPerByte = __v)
def withBroadcastAttempts(__v: _root_.scala.Int): PendingSweep = copy(broadcastAttempts = __v)
def withNextBroadcastHeight(__v: _root_.scala.Int): PendingSweep = copy(nextBroadcastHeight = __v)
def withRequestedConfTarget(__v: _root_.scala.Int): PendingSweep = copy(requestedConfTarget = __v)
def withRequestedSatPerByte(__v: _root_.scala.Int): PendingSweep = copy(requestedSatPerByte = __v)
def withSatPerVbyte(__v: _root_.scala.Long): PendingSweep = copy(satPerVbyte = __v)
def withRequestedSatPerVbyte(__v: _root_.scala.Long): PendingSweep = copy(requestedSatPerVbyte = __v)
def withForce(__v: _root_.scala.Boolean): PendingSweep = copy(force = __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 => outpoint.orNull
case 2 => {
val __t = witnessType.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 3 => {
val __t = amountSat
if (__t != 0) __t else null
}
case 4 => {
val __t = satPerByte
if (__t != 0) __t else null
}
case 5 => {
val __t = broadcastAttempts
if (__t != 0) __t else null
}
case 6 => {
val __t = nextBroadcastHeight
if (__t != 0) __t else null
}
case 8 => {
val __t = requestedConfTarget
if (__t != 0) __t else null
}
case 9 => {
val __t = requestedSatPerByte
if (__t != 0) __t else null
}
case 10 => {
val __t = satPerVbyte
if (__t != 0L) __t else null
}
case 11 => {
val __t = requestedSatPerVbyte
if (__t != 0L) __t else null
}
case 7 => {
val __t = force
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 => outpoint.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => _root_.scalapb.descriptors.PEnum(witnessType.scalaValueDescriptor)
case 3 => _root_.scalapb.descriptors.PInt(amountSat)
case 4 => _root_.scalapb.descriptors.PInt(satPerByte)
case 5 => _root_.scalapb.descriptors.PInt(broadcastAttempts)
case 6 => _root_.scalapb.descriptors.PInt(nextBroadcastHeight)
case 8 => _root_.scalapb.descriptors.PInt(requestedConfTarget)
case 9 => _root_.scalapb.descriptors.PInt(requestedSatPerByte)
case 10 => _root_.scalapb.descriptors.PLong(satPerVbyte)
case 11 => _root_.scalapb.descriptors.PLong(requestedSatPerVbyte)
case 7 => _root_.scalapb.descriptors.PBoolean(force)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: walletrpc.PendingSweep.type = walletrpc.PendingSweep
// @@protoc_insertion_point(GeneratedMessage[walletrpc.PendingSweep])
}
object PendingSweep extends scalapb.GeneratedMessageCompanion[walletrpc.PendingSweep] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[walletrpc.PendingSweep] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): walletrpc.PendingSweep = {
var __outpoint: _root_.scala.Option[lnrpc.OutPoint] = _root_.scala.None
var __witnessType: walletrpc.WitnessType = walletrpc.WitnessType.UNKNOWN_WITNESS
var __amountSat: _root_.scala.Int = 0
var __satPerByte: _root_.scala.Int = 0
var __broadcastAttempts: _root_.scala.Int = 0
var __nextBroadcastHeight: _root_.scala.Int = 0
var __requestedConfTarget: _root_.scala.Int = 0
var __requestedSatPerByte: _root_.scala.Int = 0
var __satPerVbyte: _root_.scala.Long = 0L
var __requestedSatPerVbyte: _root_.scala.Long = 0L
var __force: _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 10 =>
__outpoint = Option(__outpoint.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.OutPoint](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 16 =>
__witnessType = walletrpc.WitnessType.fromValue(_input__.readEnum())
case 24 =>
__amountSat = _input__.readUInt32()
case 32 =>
__satPerByte = _input__.readUInt32()
case 40 =>
__broadcastAttempts = _input__.readUInt32()
case 48 =>
__nextBroadcastHeight = _input__.readUInt32()
case 64 =>
__requestedConfTarget = _input__.readUInt32()
case 72 =>
__requestedSatPerByte = _input__.readUInt32()
case 80 =>
__satPerVbyte = _input__.readUInt64()
case 88 =>
__requestedSatPerVbyte = _input__.readUInt64()
case 56 =>
__force = _input__.readBool()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
walletrpc.PendingSweep(
outpoint = __outpoint,
witnessType = __witnessType,
amountSat = __amountSat,
satPerByte = __satPerByte,
broadcastAttempts = __broadcastAttempts,
nextBroadcastHeight = __nextBroadcastHeight,
requestedConfTarget = __requestedConfTarget,
requestedSatPerByte = __requestedSatPerByte,
satPerVbyte = __satPerVbyte,
requestedSatPerVbyte = __requestedSatPerVbyte,
force = __force,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[walletrpc.PendingSweep] = _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.")
walletrpc.PendingSweep(
outpoint = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[lnrpc.OutPoint]]),
witnessType = walletrpc.WitnessType.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(walletrpc.WitnessType.UNKNOWN_WITNESS.scalaValueDescriptor).number),
amountSat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Int]).getOrElse(0),
satPerByte = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Int]).getOrElse(0),
broadcastAttempts = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Int]).getOrElse(0),
nextBroadcastHeight = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Int]).getOrElse(0),
requestedConfTarget = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Int]).getOrElse(0),
requestedSatPerByte = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Int]).getOrElse(0),
satPerVbyte = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
requestedSatPerVbyte = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
force = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Boolean]).getOrElse(false)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = WalletkitProto.javaDescriptor.getMessageTypes().get(37)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = WalletkitProto.scalaDescriptor.messages(37)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = lnrpc.OutPoint
}
__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 2 => walletrpc.WitnessType
}
}
lazy val defaultInstance = walletrpc.PendingSweep(
outpoint = _root_.scala.None,
witnessType = walletrpc.WitnessType.UNKNOWN_WITNESS,
amountSat = 0,
satPerByte = 0,
broadcastAttempts = 0,
nextBroadcastHeight = 0,
requestedConfTarget = 0,
requestedSatPerByte = 0,
satPerVbyte = 0L,
requestedSatPerVbyte = 0L,
force = false
)
implicit class PendingSweepLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, walletrpc.PendingSweep]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, walletrpc.PendingSweep](_l) {
def outpoint: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.OutPoint] = field(_.getOutpoint)((c_, f_) => c_.copy(outpoint = Option(f_)))
def optionalOutpoint: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.OutPoint]] = field(_.outpoint)((c_, f_) => c_.copy(outpoint = f_))
def witnessType: _root_.scalapb.lenses.Lens[UpperPB, walletrpc.WitnessType] = field(_.witnessType)((c_, f_) => c_.copy(witnessType = f_))
def amountSat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.amountSat)((c_, f_) => c_.copy(amountSat = f_))
def satPerByte: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.satPerByte)((c_, f_) => c_.copy(satPerByte = f_))
def broadcastAttempts: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.broadcastAttempts)((c_, f_) => c_.copy(broadcastAttempts = f_))
def nextBroadcastHeight: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.nextBroadcastHeight)((c_, f_) => c_.copy(nextBroadcastHeight = f_))
def requestedConfTarget: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.requestedConfTarget)((c_, f_) => c_.copy(requestedConfTarget = f_))
def requestedSatPerByte: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.requestedSatPerByte)((c_, f_) => c_.copy(requestedSatPerByte = f_))
def satPerVbyte: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.satPerVbyte)((c_, f_) => c_.copy(satPerVbyte = f_))
def requestedSatPerVbyte: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.requestedSatPerVbyte)((c_, f_) => c_.copy(requestedSatPerVbyte = f_))
def force: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.force)((c_, f_) => c_.copy(force = f_))
}
final val OUTPOINT_FIELD_NUMBER = 1
final val WITNESS_TYPE_FIELD_NUMBER = 2
final val AMOUNT_SAT_FIELD_NUMBER = 3
final val SAT_PER_BYTE_FIELD_NUMBER = 4
final val BROADCAST_ATTEMPTS_FIELD_NUMBER = 5
final val NEXT_BROADCAST_HEIGHT_FIELD_NUMBER = 6
final val REQUESTED_CONF_TARGET_FIELD_NUMBER = 8
final val REQUESTED_SAT_PER_BYTE_FIELD_NUMBER = 9
final val SAT_PER_VBYTE_FIELD_NUMBER = 10
final val REQUESTED_SAT_PER_VBYTE_FIELD_NUMBER = 11
final val FORCE_FIELD_NUMBER = 7
def of(
outpoint: _root_.scala.Option[lnrpc.OutPoint],
witnessType: walletrpc.WitnessType,
amountSat: _root_.scala.Int,
satPerByte: _root_.scala.Int,
broadcastAttempts: _root_.scala.Int,
nextBroadcastHeight: _root_.scala.Int,
requestedConfTarget: _root_.scala.Int,
requestedSatPerByte: _root_.scala.Int,
satPerVbyte: _root_.scala.Long,
requestedSatPerVbyte: _root_.scala.Long,
force: _root_.scala.Boolean
): _root_.walletrpc.PendingSweep = _root_.walletrpc.PendingSweep(
outpoint,
witnessType,
amountSat,
satPerByte,
broadcastAttempts,
nextBroadcastHeight,
requestedConfTarget,
requestedSatPerByte,
satPerVbyte,
requestedSatPerVbyte,
force
)
// @@protoc_insertion_point(GeneratedMessageCompanion[walletrpc.PendingSweep])
}