walletrpc.ListSweepsResponse.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
@SerialVersionUID(0L)
final case class ListSweepsResponse(
sweeps: walletrpc.ListSweepsResponse.Sweeps = walletrpc.ListSweepsResponse.Sweeps.Empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ListSweepsResponse] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (sweeps.transactionDetails.isDefined) {
val __value = sweeps.transactionDetails.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (sweeps.transactionIds.isDefined) {
val __value = sweeps.transactionIds.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
__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 = {
sweeps.transactionDetails.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
sweeps.transactionIds.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getTransactionDetails: lnrpc.TransactionDetails = sweeps.transactionDetails.getOrElse(lnrpc.TransactionDetails.defaultInstance)
def withTransactionDetails(__v: lnrpc.TransactionDetails): ListSweepsResponse = copy(sweeps = walletrpc.ListSweepsResponse.Sweeps.TransactionDetails(__v))
def getTransactionIds: walletrpc.ListSweepsResponse.TransactionIDs = sweeps.transactionIds.getOrElse(walletrpc.ListSweepsResponse.TransactionIDs.defaultInstance)
def withTransactionIds(__v: walletrpc.ListSweepsResponse.TransactionIDs): ListSweepsResponse = copy(sweeps = walletrpc.ListSweepsResponse.Sweeps.TransactionIds(__v))
def clearSweeps: ListSweepsResponse = copy(sweeps = walletrpc.ListSweepsResponse.Sweeps.Empty)
def withSweeps(__v: walletrpc.ListSweepsResponse.Sweeps): ListSweepsResponse = copy(sweeps = __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 => sweeps.transactionDetails.orNull
case 2 => sweeps.transactionIds.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 => sweeps.transactionDetails.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => sweeps.transactionIds.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: walletrpc.ListSweepsResponse.type = walletrpc.ListSweepsResponse
// @@protoc_insertion_point(GeneratedMessage[walletrpc.ListSweepsResponse])
}
object ListSweepsResponse extends scalapb.GeneratedMessageCompanion[walletrpc.ListSweepsResponse] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[walletrpc.ListSweepsResponse] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): walletrpc.ListSweepsResponse = {
var __sweeps: walletrpc.ListSweepsResponse.Sweeps = walletrpc.ListSweepsResponse.Sweeps.Empty
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__sweeps = walletrpc.ListSweepsResponse.Sweeps.TransactionDetails(__sweeps.transactionDetails.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.TransactionDetails](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__sweeps = walletrpc.ListSweepsResponse.Sweeps.TransactionIds(__sweeps.transactionIds.fold(_root_.scalapb.LiteParser.readMessage[walletrpc.ListSweepsResponse.TransactionIDs](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
walletrpc.ListSweepsResponse(
sweeps = __sweeps,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[walletrpc.ListSweepsResponse] = _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.ListSweepsResponse(
sweeps = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[lnrpc.TransactionDetails]]).map(walletrpc.ListSweepsResponse.Sweeps.TransactionDetails(_))
.orElse[walletrpc.ListSweepsResponse.Sweeps](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[walletrpc.ListSweepsResponse.TransactionIDs]]).map(walletrpc.ListSweepsResponse.Sweeps.TransactionIds(_)))
.getOrElse(walletrpc.ListSweepsResponse.Sweeps.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = WalletkitProto.javaDescriptor.getMessageTypes().get(43)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = WalletkitProto.scalaDescriptor.messages(43)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = lnrpc.TransactionDetails
case 2 => __out = walletrpc.ListSweepsResponse.TransactionIDs
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.walletrpc.ListSweepsResponse.TransactionIDs
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = walletrpc.ListSweepsResponse(
sweeps = walletrpc.ListSweepsResponse.Sweeps.Empty
)
sealed trait Sweeps extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isTransactionDetails: _root_.scala.Boolean = false
def isTransactionIds: _root_.scala.Boolean = false
def transactionDetails: _root_.scala.Option[lnrpc.TransactionDetails] = _root_.scala.None
def transactionIds: _root_.scala.Option[walletrpc.ListSweepsResponse.TransactionIDs] = _root_.scala.None
}
object Sweeps {
@SerialVersionUID(0L)
case object Empty extends walletrpc.ListSweepsResponse.Sweeps {
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 TransactionDetails(value: lnrpc.TransactionDetails) extends walletrpc.ListSweepsResponse.Sweeps {
type ValueType = lnrpc.TransactionDetails
override def isTransactionDetails: _root_.scala.Boolean = true
override def transactionDetails: _root_.scala.Option[lnrpc.TransactionDetails] = Some(value)
override def number: _root_.scala.Int = 1
}
@SerialVersionUID(0L)
final case class TransactionIds(value: walletrpc.ListSweepsResponse.TransactionIDs) extends walletrpc.ListSweepsResponse.Sweeps {
type ValueType = walletrpc.ListSweepsResponse.TransactionIDs
override def isTransactionIds: _root_.scala.Boolean = true
override def transactionIds: _root_.scala.Option[walletrpc.ListSweepsResponse.TransactionIDs] = Some(value)
override def number: _root_.scala.Int = 2
}
}
/** @param transactionIds
*
* Reversed, hex-encoded string representing the transaction ids of the
* sweeps that our node has broadcast. Note that these transactions may
* not have confirmed yet, we record sweeps on broadcast, not confirmation.
*/
@SerialVersionUID(0L)
final case class TransactionIDs(
transactionIds: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[TransactionIDs] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
transactionIds.foreach { __item =>
val __value = __item
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __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 = {
transactionIds.foreach { __v =>
val __m = __v
_output__.writeString(1, __m)
};
unknownFields.writeTo(_output__)
}
def clearTransactionIds = copy(transactionIds = _root_.scala.Seq.empty)
def addTransactionIds(__vs: _root_.scala.Predef.String *): TransactionIDs = addAllTransactionIds(__vs)
def addAllTransactionIds(__vs: Iterable[_root_.scala.Predef.String]): TransactionIDs = copy(transactionIds = transactionIds ++ __vs)
def withTransactionIds(__v: _root_.scala.Seq[_root_.scala.Predef.String]): TransactionIDs = copy(transactionIds = __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 => transactionIds
}
}
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.PRepeated(transactionIds.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: walletrpc.ListSweepsResponse.TransactionIDs.type = walletrpc.ListSweepsResponse.TransactionIDs
// @@protoc_insertion_point(GeneratedMessage[walletrpc.ListSweepsResponse.TransactionIDs])
}
object TransactionIDs extends scalapb.GeneratedMessageCompanion[walletrpc.ListSweepsResponse.TransactionIDs] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[walletrpc.ListSweepsResponse.TransactionIDs] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): walletrpc.ListSweepsResponse.TransactionIDs = {
val __transactionIds: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String]
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__transactionIds += _input__.readStringRequireUtf8()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
walletrpc.ListSweepsResponse.TransactionIDs(
transactionIds = __transactionIds.result(),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[walletrpc.ListSweepsResponse.TransactionIDs] = _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.ListSweepsResponse.TransactionIDs(
transactionIds = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = walletrpc.ListSweepsResponse.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = walletrpc.ListSweepsResponse.scalaDescriptor.nestedMessages(0)
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 = walletrpc.ListSweepsResponse.TransactionIDs(
transactionIds = _root_.scala.Seq.empty
)
implicit class TransactionIDsLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, walletrpc.ListSweepsResponse.TransactionIDs]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, walletrpc.ListSweepsResponse.TransactionIDs](_l) {
def transactionIds: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.transactionIds)((c_, f_) => c_.copy(transactionIds = f_))
}
final val TRANSACTION_IDS_FIELD_NUMBER = 1
def of(
transactionIds: _root_.scala.Seq[_root_.scala.Predef.String]
): _root_.walletrpc.ListSweepsResponse.TransactionIDs = _root_.walletrpc.ListSweepsResponse.TransactionIDs(
transactionIds
)
// @@protoc_insertion_point(GeneratedMessageCompanion[walletrpc.ListSweepsResponse.TransactionIDs])
}
implicit class ListSweepsResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, walletrpc.ListSweepsResponse]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, walletrpc.ListSweepsResponse](_l) {
def transactionDetails: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.TransactionDetails] = field(_.getTransactionDetails)((c_, f_) => c_.copy(sweeps = walletrpc.ListSweepsResponse.Sweeps.TransactionDetails(f_)))
def transactionIds: _root_.scalapb.lenses.Lens[UpperPB, walletrpc.ListSweepsResponse.TransactionIDs] = field(_.getTransactionIds)((c_, f_) => c_.copy(sweeps = walletrpc.ListSweepsResponse.Sweeps.TransactionIds(f_)))
def sweeps: _root_.scalapb.lenses.Lens[UpperPB, walletrpc.ListSweepsResponse.Sweeps] = field(_.sweeps)((c_, f_) => c_.copy(sweeps = f_))
}
final val TRANSACTION_DETAILS_FIELD_NUMBER = 1
final val TRANSACTION_IDS_FIELD_NUMBER = 2
def of(
sweeps: walletrpc.ListSweepsResponse.Sweeps
): _root_.walletrpc.ListSweepsResponse = _root_.walletrpc.ListSweepsResponse(
sweeps
)
// @@protoc_insertion_point(GeneratedMessageCompanion[walletrpc.ListSweepsResponse])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy