All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hederahashgraph.api.proto.java.StakingNodeInfo Maven / Gradle / Ivy

There is a newer version: 0.57.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: state/token/staking_node_info.proto

package com.hederahashgraph.api.proto.java;

/**
 * 
 **
 * Representation of a Hedera Token Service staking info entity in the network Merkle tree.
 * As with all network entities, staking info is per node and has a unique entity number represented as shard.realm.X.
 * 
* * Protobuf type {@code proto.StakingNodeInfo} */ public final class StakingNodeInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.StakingNodeInfo) StakingNodeInfoOrBuilder { private static final long serialVersionUID = 0L; // Use StakingNodeInfo.newBuilder() to construct. private StakingNodeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private StakingNodeInfo() { rewardSumHistory_ = emptyLongList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new StakingNodeInfo(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private StakingNodeInfo( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { nodeNumber_ = input.readInt64(); break; } case 16: { minStake_ = input.readInt64(); break; } case 24: { maxStake_ = input.readInt64(); break; } case 32: { stakeToReward_ = input.readInt64(); break; } case 40: { stakeToNotReward_ = input.readInt64(); break; } case 48: { stakeRewardStart_ = input.readInt64(); break; } case 56: { unclaimedStakeRewardStart_ = input.readInt64(); break; } case 64: { stake_ = input.readInt64(); break; } case 72: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { rewardSumHistory_ = newLongList(); mutable_bitField0_ |= 0x00000001; } rewardSumHistory_.addLong(input.readInt64()); break; } case 74: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { rewardSumHistory_ = newLongList(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { rewardSumHistory_.addLong(input.readInt64()); } input.popLimit(limit); break; } case 80: { weight_ = input.readInt32(); break; } case 88: { pendingRewards_ = input.readInt64(); break; } case 96: { deleted_ = input.readBool(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { rewardSumHistory_.makeImmutable(); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.StakingNodeInfoOuterClass.internal_static_proto_StakingNodeInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.StakingNodeInfoOuterClass.internal_static_proto_StakingNodeInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.StakingNodeInfo.class, com.hederahashgraph.api.proto.java.StakingNodeInfo.Builder.class); } public static final int NODE_NUMBER_FIELD_NUMBER = 1; private long nodeNumber_; /** *
   **
   * The unique entity number of the node. The shard and realm numbers are implied, based on the network
   * this entity came from.
   * 
* * int64 node_number = 1; * @return The nodeNumber. */ @java.lang.Override public long getNodeNumber() { return nodeNumber_; } public static final int MIN_STAKE_FIELD_NUMBER = 2; private long minStake_; /** *
   **
   * The minimum stake on this node that is required for this node to have a non-zero weight to
   * participate in the network consensus.
   * 
* * int64 min_stake = 2; * @return The minStake. */ @java.lang.Override public long getMinStake() { return minStake_; } public static final int MAX_STAKE_FIELD_NUMBER = 3; private long maxStake_; /** *
   **
   * The maximum stake on this node that is considered to calculate its weight to participate in the network consensus.
   * 
* * int64 max_stake = 3; * @return The maxStake. */ @java.lang.Override public long getMaxStake() { return maxStake_; } public static final int STAKE_TO_REWARD_FIELD_NUMBER = 4; private long stakeToReward_; /** *
   **
   * The sum of balances of all accounts staked to this node who have opted to receive rewards.
   * 
* * int64 stake_to_reward = 4; * @return The stakeToReward. */ @java.lang.Override public long getStakeToReward() { return stakeToReward_; } public static final int STAKE_TO_NOT_REWARD_FIELD_NUMBER = 5; private long stakeToNotReward_; /** *
   **
   * The sum of balances of all accounts staked to this node who have opted to decline rewards.
   * 
* * int64 stake_to_not_reward = 5; * @return The stakeToNotReward. */ @java.lang.Override public long getStakeToNotReward() { return stakeToNotReward_; } public static final int STAKE_REWARD_START_FIELD_NUMBER = 6; private long stakeRewardStart_; /** *
   **
   * The snapshot of stake_to_reward value at the beginning of the current staking period.
   * This is needed for calculating rewards for current staking period without considering changes to
   * stake_to_reward in the current staking period. It is reset at the beginning of every period.
   * 
* * int64 stake_reward_start = 6; * @return The stakeRewardStart. */ @java.lang.Override public long getStakeRewardStart() { return stakeRewardStart_; } public static final int UNCLAIMED_STAKE_REWARD_START_FIELD_NUMBER = 7; private long unclaimedStakeRewardStart_; /** *
   **
   * Tracks how much stake from stakeRewardStart will have unclaimed rewards due to accounts changing their staking
   * metadata in a way that disqualifies them for the current period; It is reset at the beginning of every period
   * 
* * int64 unclaimed_stake_reward_start = 7; * @return The unclaimedStakeRewardStart. */ @java.lang.Override public long getUnclaimedStakeRewardStart() { return unclaimedStakeRewardStart_; } public static final int STAKE_FIELD_NUMBER = 8; private long stake_; /** *
   **
   * The total amount of effective hbar staked to this node. This is sum of stake_to_reward and stake_to_not_reward.
   * If the sum is greater than max_stake, then the effective stake is max_stake.
   * If the sum is less than min_stake, then the effective stake is 0.
   * 
* * int64 stake = 8; * @return The stake. */ @java.lang.Override public long getStake() { return stake_; } public static final int REWARD_SUM_HISTORY_FIELD_NUMBER = 9; private com.google.protobuf.Internal.LongList rewardSumHistory_; /** *
   **
   * An running sum of reward rates per hbar for the last 365+1 staking periods. The first element is the
   * is the reward up to and including the last full period that finished before the present. Second element is
   * the reward up to and including the period before that
   * 
* * repeated int64 reward_sum_history = 9; * @return A list containing the rewardSumHistory. */ @java.lang.Override public java.util.List getRewardSumHistoryList() { return rewardSumHistory_; } /** *
   **
   * An running sum of reward rates per hbar for the last 365+1 staking periods. The first element is the
   * is the reward up to and including the last full period that finished before the present. Second element is
   * the reward up to and including the period before that
   * 
* * repeated int64 reward_sum_history = 9; * @return The count of rewardSumHistory. */ public int getRewardSumHistoryCount() { return rewardSumHistory_.size(); } /** *
   **
   * An running sum of reward rates per hbar for the last 365+1 staking periods. The first element is the
   * is the reward up to and including the last full period that finished before the present. Second element is
   * the reward up to and including the period before that
   * 
* * repeated int64 reward_sum_history = 9; * @param index The index of the element to return. * @return The rewardSumHistory at the given index. */ public long getRewardSumHistory(int index) { return rewardSumHistory_.getLong(index); } private int rewardSumHistoryMemoizedSerializedSize = -1; public static final int WEIGHT_FIELD_NUMBER = 10; private int weight_; /** *
   **
   * The consensus weight of this node in the network. This is computed based on the stake of this node
   * at midnight UTC of the current day. If the stake of this node is less than minStake, then the weight is 0.
   * Sum of all weights of nodes in the network should be less than 500.
   * If the stake of this node A is greater than minStake, then the weight of this node A is calculated as:
   * (node A stake * 500/ total stake of all nodes)
   * 
* * int32 weight = 10; * @return The weight. */ @java.lang.Override public int getWeight() { return weight_; } public static final int PENDING_REWARDS_FIELD_NUMBER = 11; private long pendingRewards_; /** *
   **
   * The total staking rewards in tinybars that COULD be collected by all accounts staking to the current node after the end
   * of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
   * When the current node is deleted, this amount will be subtracted from the total pending rewards of all accounts staking
   * to all nodes in the network in NetworkStakingRewards.
   * 
* * int64 pending_rewards = 11; * @return The pendingRewards. */ @java.lang.Override public long getPendingRewards() { return pendingRewards_; } public static final int DELETED_FIELD_NUMBER = 12; private boolean deleted_; /** *
   **
   * True if this node has been deleted from network.
   * 
* * bool deleted = 12; * @return The deleted. */ @java.lang.Override public boolean getDeleted() { return deleted_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (nodeNumber_ != 0L) { output.writeInt64(1, nodeNumber_); } if (minStake_ != 0L) { output.writeInt64(2, minStake_); } if (maxStake_ != 0L) { output.writeInt64(3, maxStake_); } if (stakeToReward_ != 0L) { output.writeInt64(4, stakeToReward_); } if (stakeToNotReward_ != 0L) { output.writeInt64(5, stakeToNotReward_); } if (stakeRewardStart_ != 0L) { output.writeInt64(6, stakeRewardStart_); } if (unclaimedStakeRewardStart_ != 0L) { output.writeInt64(7, unclaimedStakeRewardStart_); } if (stake_ != 0L) { output.writeInt64(8, stake_); } if (getRewardSumHistoryList().size() > 0) { output.writeUInt32NoTag(74); output.writeUInt32NoTag(rewardSumHistoryMemoizedSerializedSize); } for (int i = 0; i < rewardSumHistory_.size(); i++) { output.writeInt64NoTag(rewardSumHistory_.getLong(i)); } if (weight_ != 0) { output.writeInt32(10, weight_); } if (pendingRewards_ != 0L) { output.writeInt64(11, pendingRewards_); } if (deleted_ != false) { output.writeBool(12, deleted_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (nodeNumber_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, nodeNumber_); } if (minStake_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, minStake_); } if (maxStake_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, maxStake_); } if (stakeToReward_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, stakeToReward_); } if (stakeToNotReward_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, stakeToNotReward_); } if (stakeRewardStart_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(6, stakeRewardStart_); } if (unclaimedStakeRewardStart_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(7, unclaimedStakeRewardStart_); } if (stake_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(8, stake_); } { int dataSize = 0; for (int i = 0; i < rewardSumHistory_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeInt64SizeNoTag(rewardSumHistory_.getLong(i)); } size += dataSize; if (!getRewardSumHistoryList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(dataSize); } rewardSumHistoryMemoizedSerializedSize = dataSize; } if (weight_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(10, weight_); } if (pendingRewards_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(11, pendingRewards_); } if (deleted_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(12, deleted_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.hederahashgraph.api.proto.java.StakingNodeInfo)) { return super.equals(obj); } com.hederahashgraph.api.proto.java.StakingNodeInfo other = (com.hederahashgraph.api.proto.java.StakingNodeInfo) obj; if (getNodeNumber() != other.getNodeNumber()) return false; if (getMinStake() != other.getMinStake()) return false; if (getMaxStake() != other.getMaxStake()) return false; if (getStakeToReward() != other.getStakeToReward()) return false; if (getStakeToNotReward() != other.getStakeToNotReward()) return false; if (getStakeRewardStart() != other.getStakeRewardStart()) return false; if (getUnclaimedStakeRewardStart() != other.getUnclaimedStakeRewardStart()) return false; if (getStake() != other.getStake()) return false; if (!getRewardSumHistoryList() .equals(other.getRewardSumHistoryList())) return false; if (getWeight() != other.getWeight()) return false; if (getPendingRewards() != other.getPendingRewards()) return false; if (getDeleted() != other.getDeleted()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NODE_NUMBER_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getNodeNumber()); hash = (37 * hash) + MIN_STAKE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMinStake()); hash = (37 * hash) + MAX_STAKE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxStake()); hash = (37 * hash) + STAKE_TO_REWARD_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStakeToReward()); hash = (37 * hash) + STAKE_TO_NOT_REWARD_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStakeToNotReward()); hash = (37 * hash) + STAKE_REWARD_START_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStakeRewardStart()); hash = (37 * hash) + UNCLAIMED_STAKE_REWARD_START_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getUnclaimedStakeRewardStart()); hash = (37 * hash) + STAKE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStake()); if (getRewardSumHistoryCount() > 0) { hash = (37 * hash) + REWARD_SUM_HISTORY_FIELD_NUMBER; hash = (53 * hash) + getRewardSumHistoryList().hashCode(); } hash = (37 * hash) + WEIGHT_FIELD_NUMBER; hash = (53 * hash) + getWeight(); hash = (37 * hash) + PENDING_REWARDS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPendingRewards()); hash = (37 * hash) + DELETED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getDeleted()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.hederahashgraph.api.proto.java.StakingNodeInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   **
   * Representation of a Hedera Token Service staking info entity in the network Merkle tree.
   * As with all network entities, staking info is per node and has a unique entity number represented as shard.realm.X.
   * 
* * Protobuf type {@code proto.StakingNodeInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:proto.StakingNodeInfo) com.hederahashgraph.api.proto.java.StakingNodeInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.StakingNodeInfoOuterClass.internal_static_proto_StakingNodeInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.StakingNodeInfoOuterClass.internal_static_proto_StakingNodeInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.StakingNodeInfo.class, com.hederahashgraph.api.proto.java.StakingNodeInfo.Builder.class); } // Construct using com.hederahashgraph.api.proto.java.StakingNodeInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); nodeNumber_ = 0L; minStake_ = 0L; maxStake_ = 0L; stakeToReward_ = 0L; stakeToNotReward_ = 0L; stakeRewardStart_ = 0L; unclaimedStakeRewardStart_ = 0L; stake_ = 0L; rewardSumHistory_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000001); weight_ = 0; pendingRewards_ = 0L; deleted_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hederahashgraph.api.proto.java.StakingNodeInfoOuterClass.internal_static_proto_StakingNodeInfo_descriptor; } @java.lang.Override public com.hederahashgraph.api.proto.java.StakingNodeInfo getDefaultInstanceForType() { return com.hederahashgraph.api.proto.java.StakingNodeInfo.getDefaultInstance(); } @java.lang.Override public com.hederahashgraph.api.proto.java.StakingNodeInfo build() { com.hederahashgraph.api.proto.java.StakingNodeInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hederahashgraph.api.proto.java.StakingNodeInfo buildPartial() { com.hederahashgraph.api.proto.java.StakingNodeInfo result = new com.hederahashgraph.api.proto.java.StakingNodeInfo(this); int from_bitField0_ = bitField0_; result.nodeNumber_ = nodeNumber_; result.minStake_ = minStake_; result.maxStake_ = maxStake_; result.stakeToReward_ = stakeToReward_; result.stakeToNotReward_ = stakeToNotReward_; result.stakeRewardStart_ = stakeRewardStart_; result.unclaimedStakeRewardStart_ = unclaimedStakeRewardStart_; result.stake_ = stake_; if (((bitField0_ & 0x00000001) != 0)) { rewardSumHistory_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000001); } result.rewardSumHistory_ = rewardSumHistory_; result.weight_ = weight_; result.pendingRewards_ = pendingRewards_; result.deleted_ = deleted_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.hederahashgraph.api.proto.java.StakingNodeInfo) { return mergeFrom((com.hederahashgraph.api.proto.java.StakingNodeInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hederahashgraph.api.proto.java.StakingNodeInfo other) { if (other == com.hederahashgraph.api.proto.java.StakingNodeInfo.getDefaultInstance()) return this; if (other.getNodeNumber() != 0L) { setNodeNumber(other.getNodeNumber()); } if (other.getMinStake() != 0L) { setMinStake(other.getMinStake()); } if (other.getMaxStake() != 0L) { setMaxStake(other.getMaxStake()); } if (other.getStakeToReward() != 0L) { setStakeToReward(other.getStakeToReward()); } if (other.getStakeToNotReward() != 0L) { setStakeToNotReward(other.getStakeToNotReward()); } if (other.getStakeRewardStart() != 0L) { setStakeRewardStart(other.getStakeRewardStart()); } if (other.getUnclaimedStakeRewardStart() != 0L) { setUnclaimedStakeRewardStart(other.getUnclaimedStakeRewardStart()); } if (other.getStake() != 0L) { setStake(other.getStake()); } if (!other.rewardSumHistory_.isEmpty()) { if (rewardSumHistory_.isEmpty()) { rewardSumHistory_ = other.rewardSumHistory_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureRewardSumHistoryIsMutable(); rewardSumHistory_.addAll(other.rewardSumHistory_); } onChanged(); } if (other.getWeight() != 0) { setWeight(other.getWeight()); } if (other.getPendingRewards() != 0L) { setPendingRewards(other.getPendingRewards()); } if (other.getDeleted() != false) { setDeleted(other.getDeleted()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.hederahashgraph.api.proto.java.StakingNodeInfo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.hederahashgraph.api.proto.java.StakingNodeInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private long nodeNumber_ ; /** *
     **
     * The unique entity number of the node. The shard and realm numbers are implied, based on the network
     * this entity came from.
     * 
* * int64 node_number = 1; * @return The nodeNumber. */ @java.lang.Override public long getNodeNumber() { return nodeNumber_; } /** *
     **
     * The unique entity number of the node. The shard and realm numbers are implied, based on the network
     * this entity came from.
     * 
* * int64 node_number = 1; * @param value The nodeNumber to set. * @return This builder for chaining. */ public Builder setNodeNumber(long value) { nodeNumber_ = value; onChanged(); return this; } /** *
     **
     * The unique entity number of the node. The shard and realm numbers are implied, based on the network
     * this entity came from.
     * 
* * int64 node_number = 1; * @return This builder for chaining. */ public Builder clearNodeNumber() { nodeNumber_ = 0L; onChanged(); return this; } private long minStake_ ; /** *
     **
     * The minimum stake on this node that is required for this node to have a non-zero weight to
     * participate in the network consensus.
     * 
* * int64 min_stake = 2; * @return The minStake. */ @java.lang.Override public long getMinStake() { return minStake_; } /** *
     **
     * The minimum stake on this node that is required for this node to have a non-zero weight to
     * participate in the network consensus.
     * 
* * int64 min_stake = 2; * @param value The minStake to set. * @return This builder for chaining. */ public Builder setMinStake(long value) { minStake_ = value; onChanged(); return this; } /** *
     **
     * The minimum stake on this node that is required for this node to have a non-zero weight to
     * participate in the network consensus.
     * 
* * int64 min_stake = 2; * @return This builder for chaining. */ public Builder clearMinStake() { minStake_ = 0L; onChanged(); return this; } private long maxStake_ ; /** *
     **
     * The maximum stake on this node that is considered to calculate its weight to participate in the network consensus.
     * 
* * int64 max_stake = 3; * @return The maxStake. */ @java.lang.Override public long getMaxStake() { return maxStake_; } /** *
     **
     * The maximum stake on this node that is considered to calculate its weight to participate in the network consensus.
     * 
* * int64 max_stake = 3; * @param value The maxStake to set. * @return This builder for chaining. */ public Builder setMaxStake(long value) { maxStake_ = value; onChanged(); return this; } /** *
     **
     * The maximum stake on this node that is considered to calculate its weight to participate in the network consensus.
     * 
* * int64 max_stake = 3; * @return This builder for chaining. */ public Builder clearMaxStake() { maxStake_ = 0L; onChanged(); return this; } private long stakeToReward_ ; /** *
     **
     * The sum of balances of all accounts staked to this node who have opted to receive rewards.
     * 
* * int64 stake_to_reward = 4; * @return The stakeToReward. */ @java.lang.Override public long getStakeToReward() { return stakeToReward_; } /** *
     **
     * The sum of balances of all accounts staked to this node who have opted to receive rewards.
     * 
* * int64 stake_to_reward = 4; * @param value The stakeToReward to set. * @return This builder for chaining. */ public Builder setStakeToReward(long value) { stakeToReward_ = value; onChanged(); return this; } /** *
     **
     * The sum of balances of all accounts staked to this node who have opted to receive rewards.
     * 
* * int64 stake_to_reward = 4; * @return This builder for chaining. */ public Builder clearStakeToReward() { stakeToReward_ = 0L; onChanged(); return this; } private long stakeToNotReward_ ; /** *
     **
     * The sum of balances of all accounts staked to this node who have opted to decline rewards.
     * 
* * int64 stake_to_not_reward = 5; * @return The stakeToNotReward. */ @java.lang.Override public long getStakeToNotReward() { return stakeToNotReward_; } /** *
     **
     * The sum of balances of all accounts staked to this node who have opted to decline rewards.
     * 
* * int64 stake_to_not_reward = 5; * @param value The stakeToNotReward to set. * @return This builder for chaining. */ public Builder setStakeToNotReward(long value) { stakeToNotReward_ = value; onChanged(); return this; } /** *
     **
     * The sum of balances of all accounts staked to this node who have opted to decline rewards.
     * 
* * int64 stake_to_not_reward = 5; * @return This builder for chaining. */ public Builder clearStakeToNotReward() { stakeToNotReward_ = 0L; onChanged(); return this; } private long stakeRewardStart_ ; /** *
     **
     * The snapshot of stake_to_reward value at the beginning of the current staking period.
     * This is needed for calculating rewards for current staking period without considering changes to
     * stake_to_reward in the current staking period. It is reset at the beginning of every period.
     * 
* * int64 stake_reward_start = 6; * @return The stakeRewardStart. */ @java.lang.Override public long getStakeRewardStart() { return stakeRewardStart_; } /** *
     **
     * The snapshot of stake_to_reward value at the beginning of the current staking period.
     * This is needed for calculating rewards for current staking period without considering changes to
     * stake_to_reward in the current staking period. It is reset at the beginning of every period.
     * 
* * int64 stake_reward_start = 6; * @param value The stakeRewardStart to set. * @return This builder for chaining. */ public Builder setStakeRewardStart(long value) { stakeRewardStart_ = value; onChanged(); return this; } /** *
     **
     * The snapshot of stake_to_reward value at the beginning of the current staking period.
     * This is needed for calculating rewards for current staking period without considering changes to
     * stake_to_reward in the current staking period. It is reset at the beginning of every period.
     * 
* * int64 stake_reward_start = 6; * @return This builder for chaining. */ public Builder clearStakeRewardStart() { stakeRewardStart_ = 0L; onChanged(); return this; } private long unclaimedStakeRewardStart_ ; /** *
     **
     * Tracks how much stake from stakeRewardStart will have unclaimed rewards due to accounts changing their staking
     * metadata in a way that disqualifies them for the current period; It is reset at the beginning of every period
     * 
* * int64 unclaimed_stake_reward_start = 7; * @return The unclaimedStakeRewardStart. */ @java.lang.Override public long getUnclaimedStakeRewardStart() { return unclaimedStakeRewardStart_; } /** *
     **
     * Tracks how much stake from stakeRewardStart will have unclaimed rewards due to accounts changing their staking
     * metadata in a way that disqualifies them for the current period; It is reset at the beginning of every period
     * 
* * int64 unclaimed_stake_reward_start = 7; * @param value The unclaimedStakeRewardStart to set. * @return This builder for chaining. */ public Builder setUnclaimedStakeRewardStart(long value) { unclaimedStakeRewardStart_ = value; onChanged(); return this; } /** *
     **
     * Tracks how much stake from stakeRewardStart will have unclaimed rewards due to accounts changing their staking
     * metadata in a way that disqualifies them for the current period; It is reset at the beginning of every period
     * 
* * int64 unclaimed_stake_reward_start = 7; * @return This builder for chaining. */ public Builder clearUnclaimedStakeRewardStart() { unclaimedStakeRewardStart_ = 0L; onChanged(); return this; } private long stake_ ; /** *
     **
     * The total amount of effective hbar staked to this node. This is sum of stake_to_reward and stake_to_not_reward.
     * If the sum is greater than max_stake, then the effective stake is max_stake.
     * If the sum is less than min_stake, then the effective stake is 0.
     * 
* * int64 stake = 8; * @return The stake. */ @java.lang.Override public long getStake() { return stake_; } /** *
     **
     * The total amount of effective hbar staked to this node. This is sum of stake_to_reward and stake_to_not_reward.
     * If the sum is greater than max_stake, then the effective stake is max_stake.
     * If the sum is less than min_stake, then the effective stake is 0.
     * 
* * int64 stake = 8; * @param value The stake to set. * @return This builder for chaining. */ public Builder setStake(long value) { stake_ = value; onChanged(); return this; } /** *
     **
     * The total amount of effective hbar staked to this node. This is sum of stake_to_reward and stake_to_not_reward.
     * If the sum is greater than max_stake, then the effective stake is max_stake.
     * If the sum is less than min_stake, then the effective stake is 0.
     * 
* * int64 stake = 8; * @return This builder for chaining. */ public Builder clearStake() { stake_ = 0L; onChanged(); return this; } private com.google.protobuf.Internal.LongList rewardSumHistory_ = emptyLongList(); private void ensureRewardSumHistoryIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { rewardSumHistory_ = mutableCopy(rewardSumHistory_); bitField0_ |= 0x00000001; } } /** *
     **
     * An running sum of reward rates per hbar for the last 365+1 staking periods. The first element is the
     * is the reward up to and including the last full period that finished before the present. Second element is
     * the reward up to and including the period before that
     * 
* * repeated int64 reward_sum_history = 9; * @return A list containing the rewardSumHistory. */ public java.util.List getRewardSumHistoryList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(rewardSumHistory_) : rewardSumHistory_; } /** *
     **
     * An running sum of reward rates per hbar for the last 365+1 staking periods. The first element is the
     * is the reward up to and including the last full period that finished before the present. Second element is
     * the reward up to and including the period before that
     * 
* * repeated int64 reward_sum_history = 9; * @return The count of rewardSumHistory. */ public int getRewardSumHistoryCount() { return rewardSumHistory_.size(); } /** *
     **
     * An running sum of reward rates per hbar for the last 365+1 staking periods. The first element is the
     * is the reward up to and including the last full period that finished before the present. Second element is
     * the reward up to and including the period before that
     * 
* * repeated int64 reward_sum_history = 9; * @param index The index of the element to return. * @return The rewardSumHistory at the given index. */ public long getRewardSumHistory(int index) { return rewardSumHistory_.getLong(index); } /** *
     **
     * An running sum of reward rates per hbar for the last 365+1 staking periods. The first element is the
     * is the reward up to and including the last full period that finished before the present. Second element is
     * the reward up to and including the period before that
     * 
* * repeated int64 reward_sum_history = 9; * @param index The index to set the value at. * @param value The rewardSumHistory to set. * @return This builder for chaining. */ public Builder setRewardSumHistory( int index, long value) { ensureRewardSumHistoryIsMutable(); rewardSumHistory_.setLong(index, value); onChanged(); return this; } /** *
     **
     * An running sum of reward rates per hbar for the last 365+1 staking periods. The first element is the
     * is the reward up to and including the last full period that finished before the present. Second element is
     * the reward up to and including the period before that
     * 
* * repeated int64 reward_sum_history = 9; * @param value The rewardSumHistory to add. * @return This builder for chaining. */ public Builder addRewardSumHistory(long value) { ensureRewardSumHistoryIsMutable(); rewardSumHistory_.addLong(value); onChanged(); return this; } /** *
     **
     * An running sum of reward rates per hbar for the last 365+1 staking periods. The first element is the
     * is the reward up to and including the last full period that finished before the present. Second element is
     * the reward up to and including the period before that
     * 
* * repeated int64 reward_sum_history = 9; * @param values The rewardSumHistory to add. * @return This builder for chaining. */ public Builder addAllRewardSumHistory( java.lang.Iterable values) { ensureRewardSumHistoryIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, rewardSumHistory_); onChanged(); return this; } /** *
     **
     * An running sum of reward rates per hbar for the last 365+1 staking periods. The first element is the
     * is the reward up to and including the last full period that finished before the present. Second element is
     * the reward up to and including the period before that
     * 
* * repeated int64 reward_sum_history = 9; * @return This builder for chaining. */ public Builder clearRewardSumHistory() { rewardSumHistory_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private int weight_ ; /** *
     **
     * The consensus weight of this node in the network. This is computed based on the stake of this node
     * at midnight UTC of the current day. If the stake of this node is less than minStake, then the weight is 0.
     * Sum of all weights of nodes in the network should be less than 500.
     * If the stake of this node A is greater than minStake, then the weight of this node A is calculated as:
     * (node A stake * 500/ total stake of all nodes)
     * 
* * int32 weight = 10; * @return The weight. */ @java.lang.Override public int getWeight() { return weight_; } /** *
     **
     * The consensus weight of this node in the network. This is computed based on the stake of this node
     * at midnight UTC of the current day. If the stake of this node is less than minStake, then the weight is 0.
     * Sum of all weights of nodes in the network should be less than 500.
     * If the stake of this node A is greater than minStake, then the weight of this node A is calculated as:
     * (node A stake * 500/ total stake of all nodes)
     * 
* * int32 weight = 10; * @param value The weight to set. * @return This builder for chaining. */ public Builder setWeight(int value) { weight_ = value; onChanged(); return this; } /** *
     **
     * The consensus weight of this node in the network. This is computed based on the stake of this node
     * at midnight UTC of the current day. If the stake of this node is less than minStake, then the weight is 0.
     * Sum of all weights of nodes in the network should be less than 500.
     * If the stake of this node A is greater than minStake, then the weight of this node A is calculated as:
     * (node A stake * 500/ total stake of all nodes)
     * 
* * int32 weight = 10; * @return This builder for chaining. */ public Builder clearWeight() { weight_ = 0; onChanged(); return this; } private long pendingRewards_ ; /** *
     **
     * The total staking rewards in tinybars that COULD be collected by all accounts staking to the current node after the end
     * of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
     * When the current node is deleted, this amount will be subtracted from the total pending rewards of all accounts staking
     * to all nodes in the network in NetworkStakingRewards.
     * 
* * int64 pending_rewards = 11; * @return The pendingRewards. */ @java.lang.Override public long getPendingRewards() { return pendingRewards_; } /** *
     **
     * The total staking rewards in tinybars that COULD be collected by all accounts staking to the current node after the end
     * of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
     * When the current node is deleted, this amount will be subtracted from the total pending rewards of all accounts staking
     * to all nodes in the network in NetworkStakingRewards.
     * 
* * int64 pending_rewards = 11; * @param value The pendingRewards to set. * @return This builder for chaining. */ public Builder setPendingRewards(long value) { pendingRewards_ = value; onChanged(); return this; } /** *
     **
     * The total staking rewards in tinybars that COULD be collected by all accounts staking to the current node after the end
     * of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
     * When the current node is deleted, this amount will be subtracted from the total pending rewards of all accounts staking
     * to all nodes in the network in NetworkStakingRewards.
     * 
* * int64 pending_rewards = 11; * @return This builder for chaining. */ public Builder clearPendingRewards() { pendingRewards_ = 0L; onChanged(); return this; } private boolean deleted_ ; /** *
     **
     * True if this node has been deleted from network.
     * 
* * bool deleted = 12; * @return The deleted. */ @java.lang.Override public boolean getDeleted() { return deleted_; } /** *
     **
     * True if this node has been deleted from network.
     * 
* * bool deleted = 12; * @param value The deleted to set. * @return This builder for chaining. */ public Builder setDeleted(boolean value) { deleted_ = value; onChanged(); return this; } /** *
     **
     * True if this node has been deleted from network.
     * 
* * bool deleted = 12; * @return This builder for chaining. */ public Builder clearDeleted() { deleted_ = false; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:proto.StakingNodeInfo) } // @@protoc_insertion_point(class_scope:proto.StakingNodeInfo) private static final com.hederahashgraph.api.proto.java.StakingNodeInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.StakingNodeInfo(); } public static com.hederahashgraph.api.proto.java.StakingNodeInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public StakingNodeInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new StakingNodeInfo(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.hederahashgraph.api.proto.java.StakingNodeInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy