routerrpc.PairData.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package routerrpc
/** @param failTime
* Time of last failure.
* @param failAmtSat
*
* Lowest amount that failed to forward rounded to whole sats. This may be
* set to zero if the failure is independent of amount.
* @param failAmtMsat
*
* Lowest amount that failed to forward in millisats. This may be
* set to zero if the failure is independent of amount.
* @param successTime
* Time of last success.
* @param successAmtSat
* Highest amount that we could successfully forward rounded to whole sats.
* @param successAmtMsat
* Highest amount that we could successfully forward in millisats.
*/
@SerialVersionUID(0L)
final case class PairData(
failTime: _root_.scala.Long = 0L,
failAmtSat: _root_.scala.Long = 0L,
failAmtMsat: _root_.scala.Long = 0L,
successTime: _root_.scala.Long = 0L,
successAmtSat: _root_.scala.Long = 0L,
successAmtMsat: _root_.scala.Long = 0L,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PairData] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = failTime
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(1, __value)
}
};
{
val __value = failAmtSat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(2, __value)
}
};
{
val __value = failAmtMsat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(4, __value)
}
};
{
val __value = successTime
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(5, __value)
}
};
{
val __value = successAmtSat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(6, __value)
}
};
{
val __value = successAmtMsat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(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 = failTime
if (__v != 0L) {
_output__.writeInt64(1, __v)
}
};
{
val __v = failAmtSat
if (__v != 0L) {
_output__.writeInt64(2, __v)
}
};
{
val __v = failAmtMsat
if (__v != 0L) {
_output__.writeInt64(4, __v)
}
};
{
val __v = successTime
if (__v != 0L) {
_output__.writeInt64(5, __v)
}
};
{
val __v = successAmtSat
if (__v != 0L) {
_output__.writeInt64(6, __v)
}
};
{
val __v = successAmtMsat
if (__v != 0L) {
_output__.writeInt64(7, __v)
}
};
unknownFields.writeTo(_output__)
}
def withFailTime(__v: _root_.scala.Long): PairData = copy(failTime = __v)
def withFailAmtSat(__v: _root_.scala.Long): PairData = copy(failAmtSat = __v)
def withFailAmtMsat(__v: _root_.scala.Long): PairData = copy(failAmtMsat = __v)
def withSuccessTime(__v: _root_.scala.Long): PairData = copy(successTime = __v)
def withSuccessAmtSat(__v: _root_.scala.Long): PairData = copy(successAmtSat = __v)
def withSuccessAmtMsat(__v: _root_.scala.Long): PairData = copy(successAmtMsat = __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 = failTime
if (__t != 0L) __t else null
}
case 2 => {
val __t = failAmtSat
if (__t != 0L) __t else null
}
case 4 => {
val __t = failAmtMsat
if (__t != 0L) __t else null
}
case 5 => {
val __t = successTime
if (__t != 0L) __t else null
}
case 6 => {
val __t = successAmtSat
if (__t != 0L) __t else null
}
case 7 => {
val __t = successAmtMsat
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.PLong(failTime)
case 2 => _root_.scalapb.descriptors.PLong(failAmtSat)
case 4 => _root_.scalapb.descriptors.PLong(failAmtMsat)
case 5 => _root_.scalapb.descriptors.PLong(successTime)
case 6 => _root_.scalapb.descriptors.PLong(successAmtSat)
case 7 => _root_.scalapb.descriptors.PLong(successAmtMsat)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: routerrpc.PairData.type = routerrpc.PairData
// @@protoc_insertion_point(GeneratedMessage[routerrpc.PairData])
}
object PairData extends scalapb.GeneratedMessageCompanion[routerrpc.PairData] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[routerrpc.PairData] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): routerrpc.PairData = {
var __failTime: _root_.scala.Long = 0L
var __failAmtSat: _root_.scala.Long = 0L
var __failAmtMsat: _root_.scala.Long = 0L
var __successTime: _root_.scala.Long = 0L
var __successAmtSat: _root_.scala.Long = 0L
var __successAmtMsat: _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 =>
__failTime = _input__.readInt64()
case 16 =>
__failAmtSat = _input__.readInt64()
case 32 =>
__failAmtMsat = _input__.readInt64()
case 40 =>
__successTime = _input__.readInt64()
case 48 =>
__successAmtSat = _input__.readInt64()
case 56 =>
__successAmtMsat = _input__.readInt64()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
routerrpc.PairData(
failTime = __failTime,
failAmtSat = __failAmtSat,
failAmtMsat = __failAmtMsat,
successTime = __successTime,
successAmtSat = __successAmtSat,
successAmtMsat = __successAmtMsat,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[routerrpc.PairData] = _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.")
routerrpc.PairData(
failTime = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
failAmtSat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
failAmtMsat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
successTime = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
successAmtSat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
successAmtMsat = __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 = RouterProto.javaDescriptor.getMessageTypes().get(14)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = RouterProto.scalaDescriptor.messages(14)
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 = routerrpc.PairData(
failTime = 0L,
failAmtSat = 0L,
failAmtMsat = 0L,
successTime = 0L,
successAmtSat = 0L,
successAmtMsat = 0L
)
implicit class PairDataLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, routerrpc.PairData]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, routerrpc.PairData](_l) {
def failTime: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.failTime)((c_, f_) => c_.copy(failTime = f_))
def failAmtSat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.failAmtSat)((c_, f_) => c_.copy(failAmtSat = f_))
def failAmtMsat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.failAmtMsat)((c_, f_) => c_.copy(failAmtMsat = f_))
def successTime: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.successTime)((c_, f_) => c_.copy(successTime = f_))
def successAmtSat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.successAmtSat)((c_, f_) => c_.copy(successAmtSat = f_))
def successAmtMsat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.successAmtMsat)((c_, f_) => c_.copy(successAmtMsat = f_))
}
final val FAIL_TIME_FIELD_NUMBER = 1
final val FAIL_AMT_SAT_FIELD_NUMBER = 2
final val FAIL_AMT_MSAT_FIELD_NUMBER = 4
final val SUCCESS_TIME_FIELD_NUMBER = 5
final val SUCCESS_AMT_SAT_FIELD_NUMBER = 6
final val SUCCESS_AMT_MSAT_FIELD_NUMBER = 7
def of(
failTime: _root_.scala.Long,
failAmtSat: _root_.scala.Long,
failAmtMsat: _root_.scala.Long,
successTime: _root_.scala.Long,
successAmtSat: _root_.scala.Long,
successAmtMsat: _root_.scala.Long
): _root_.routerrpc.PairData = _root_.routerrpc.PairData(
failTime,
failAmtSat,
failAmtMsat,
successTime,
successAmtSat,
successAmtMsat
)
// @@protoc_insertion_point(GeneratedMessageCompanion[routerrpc.PairData])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy