com.hedera.hashgraph.sdk.proto.NodeStake Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: node_stake_update.proto
// Protobuf Java Version: 3.25.4
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* Staking info for each node at the end of a staking period.
*
*
* Protobuf type {@code proto.NodeStake}
*/
public final class NodeStake extends
com.google.protobuf.GeneratedMessageLite<
NodeStake, NodeStake.Builder> implements
// @@protoc_insertion_point(message_implements:proto.NodeStake)
NodeStakeOrBuilder {
private NodeStake() {
}
public static final int MAX_STAKE_FIELD_NUMBER = 1;
private long maxStake_;
/**
*
**
* The maximum stake (rewarded or not rewarded) this node can have as consensus weight. If its stake to
* reward is above this maximum at the start of a period, then accounts staking to the node in that
* period will be rewarded at a lower rate scaled by (maxStake / stakeRewardStart).
*
*
* int64 max_stake = 1;
* @return The maxStake.
*/
@java.lang.Override
public long getMaxStake() {
return maxStake_;
}
/**
*
**
* The maximum stake (rewarded or not rewarded) this node can have as consensus weight. If its stake to
* reward is above this maximum at the start of a period, then accounts staking to the node in that
* period will be rewarded at a lower rate scaled by (maxStake / stakeRewardStart).
*
*
* int64 max_stake = 1;
* @param value The maxStake to set.
*/
private void setMaxStake(long value) {
maxStake_ = value;
}
/**
*
**
* The maximum stake (rewarded or not rewarded) this node can have as consensus weight. If its stake to
* reward is above this maximum at the start of a period, then accounts staking to the node in that
* period will be rewarded at a lower rate scaled by (maxStake / stakeRewardStart).
*
*
* int64 max_stake = 1;
*/
private void clearMaxStake() {
maxStake_ = 0L;
}
public static final int MIN_STAKE_FIELD_NUMBER = 2;
private long minStake_;
/**
*
**
* The minimum stake (rewarded or not rewarded) this node must reach before having non-zero consensus weight.
* If its total stake is below this minimum at the start of a period, then accounts staking to the node in
* that period will receive no rewards.
*
*
* int64 min_stake = 2;
* @return The minStake.
*/
@java.lang.Override
public long getMinStake() {
return minStake_;
}
/**
*
**
* The minimum stake (rewarded or not rewarded) this node must reach before having non-zero consensus weight.
* If its total stake is below this minimum at the start of a period, then accounts staking to the node in
* that period will receive no rewards.
*
*
* int64 min_stake = 2;
* @param value The minStake to set.
*/
private void setMinStake(long value) {
minStake_ = value;
}
/**
*
**
* The minimum stake (rewarded or not rewarded) this node must reach before having non-zero consensus weight.
* If its total stake is below this minimum at the start of a period, then accounts staking to the node in
* that period will receive no rewards.
*
*
* int64 min_stake = 2;
*/
private void clearMinStake() {
minStake_ = 0L;
}
public static final int NODE_ID_FIELD_NUMBER = 3;
private long nodeId_;
/**
*
**
* The id of this node.
*
*
* int64 node_id = 3;
* @return The nodeId.
*/
@java.lang.Override
public long getNodeId() {
return nodeId_;
}
/**
*
**
* The id of this node.
*
*
* int64 node_id = 3;
* @param value The nodeId to set.
*/
private void setNodeId(long value) {
nodeId_ = value;
}
/**
*
**
* The id of this node.
*
*
* int64 node_id = 3;
*/
private void clearNodeId() {
nodeId_ = 0L;
}
public static final int REWARD_RATE_FIELD_NUMBER = 4;
private long rewardRate_;
/**
*
**
* The reward rate _per whole hbar_ that was staked to this node with declineReward=false from the start of
* the staking period that is ending.
*
*
* int64 reward_rate = 4;
* @return The rewardRate.
*/
@java.lang.Override
public long getRewardRate() {
return rewardRate_;
}
/**
*
**
* The reward rate _per whole hbar_ that was staked to this node with declineReward=false from the start of
* the staking period that is ending.
*
*
* int64 reward_rate = 4;
* @param value The rewardRate to set.
*/
private void setRewardRate(long value) {
rewardRate_ = value;
}
/**
*
**
* The reward rate _per whole hbar_ that was staked to this node with declineReward=false from the start of
* the staking period that is ending.
*
*
* int64 reward_rate = 4;
*/
private void clearRewardRate() {
rewardRate_ = 0L;
}
public static final int STAKE_FIELD_NUMBER = 5;
private long stake_;
/**
*
**
* Consensus weight of this node for the new staking period.
*
*
* int64 stake = 5;
* @return The stake.
*/
@java.lang.Override
public long getStake() {
return stake_;
}
/**
*
**
* Consensus weight of this node for the new staking period.
*
*
* int64 stake = 5;
* @param value The stake to set.
*/
private void setStake(long value) {
stake_ = value;
}
/**
*
**
* Consensus weight of this node for the new staking period.
*
*
* int64 stake = 5;
*/
private void clearStake() {
stake_ = 0L;
}
public static final int STAKE_NOT_REWARDED_FIELD_NUMBER = 6;
private long stakeNotRewarded_;
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=true, at the
* beginning of the new staking period.
*
*
* int64 stake_not_rewarded = 6;
* @return The stakeNotRewarded.
*/
@java.lang.Override
public long getStakeNotRewarded() {
return stakeNotRewarded_;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=true, at the
* beginning of the new staking period.
*
*
* int64 stake_not_rewarded = 6;
* @param value The stakeNotRewarded to set.
*/
private void setStakeNotRewarded(long value) {
stakeNotRewarded_ = value;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=true, at the
* beginning of the new staking period.
*
*
* int64 stake_not_rewarded = 6;
*/
private void clearStakeNotRewarded() {
stakeNotRewarded_ = 0L;
}
public static final int STAKE_REWARDED_FIELD_NUMBER = 7;
private long stakeRewarded_;
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 stake_rewarded = 7;
* @return The stakeRewarded.
*/
@java.lang.Override
public long getStakeRewarded() {
return stakeRewarded_;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 stake_rewarded = 7;
* @param value The stakeRewarded to set.
*/
private void setStakeRewarded(long value) {
stakeRewarded_ = value;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 stake_rewarded = 7;
*/
private void clearStakeRewarded() {
stakeRewarded_ = 0L;
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.hedera.hashgraph.sdk.proto.NodeStake prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
**
* Staking info for each node at the end of a staking period.
*
*
* Protobuf type {@code proto.NodeStake}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.hedera.hashgraph.sdk.proto.NodeStake, Builder> implements
// @@protoc_insertion_point(builder_implements:proto.NodeStake)
com.hedera.hashgraph.sdk.proto.NodeStakeOrBuilder {
// Construct using com.hedera.hashgraph.sdk.proto.NodeStake.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
**
* The maximum stake (rewarded or not rewarded) this node can have as consensus weight. If its stake to
* reward is above this maximum at the start of a period, then accounts staking to the node in that
* period will be rewarded at a lower rate scaled by (maxStake / stakeRewardStart).
*
*
* int64 max_stake = 1;
* @return The maxStake.
*/
@java.lang.Override
public long getMaxStake() {
return instance.getMaxStake();
}
/**
*
**
* The maximum stake (rewarded or not rewarded) this node can have as consensus weight. If its stake to
* reward is above this maximum at the start of a period, then accounts staking to the node in that
* period will be rewarded at a lower rate scaled by (maxStake / stakeRewardStart).
*
*
* int64 max_stake = 1;
* @param value The maxStake to set.
* @return This builder for chaining.
*/
public Builder setMaxStake(long value) {
copyOnWrite();
instance.setMaxStake(value);
return this;
}
/**
*
**
* The maximum stake (rewarded or not rewarded) this node can have as consensus weight. If its stake to
* reward is above this maximum at the start of a period, then accounts staking to the node in that
* period will be rewarded at a lower rate scaled by (maxStake / stakeRewardStart).
*
*
* int64 max_stake = 1;
* @return This builder for chaining.
*/
public Builder clearMaxStake() {
copyOnWrite();
instance.clearMaxStake();
return this;
}
/**
*
**
* The minimum stake (rewarded or not rewarded) this node must reach before having non-zero consensus weight.
* If its total stake is below this minimum at the start of a period, then accounts staking to the node in
* that period will receive no rewards.
*
*
* int64 min_stake = 2;
* @return The minStake.
*/
@java.lang.Override
public long getMinStake() {
return instance.getMinStake();
}
/**
*
**
* The minimum stake (rewarded or not rewarded) this node must reach before having non-zero consensus weight.
* If its total stake is below this minimum at the start of a period, then accounts staking to the node in
* that period will receive no rewards.
*
*
* int64 min_stake = 2;
* @param value The minStake to set.
* @return This builder for chaining.
*/
public Builder setMinStake(long value) {
copyOnWrite();
instance.setMinStake(value);
return this;
}
/**
*
**
* The minimum stake (rewarded or not rewarded) this node must reach before having non-zero consensus weight.
* If its total stake is below this minimum at the start of a period, then accounts staking to the node in
* that period will receive no rewards.
*
*
* int64 min_stake = 2;
* @return This builder for chaining.
*/
public Builder clearMinStake() {
copyOnWrite();
instance.clearMinStake();
return this;
}
/**
*
**
* The id of this node.
*
*
* int64 node_id = 3;
* @return The nodeId.
*/
@java.lang.Override
public long getNodeId() {
return instance.getNodeId();
}
/**
*
**
* The id of this node.
*
*
* int64 node_id = 3;
* @param value The nodeId to set.
* @return This builder for chaining.
*/
public Builder setNodeId(long value) {
copyOnWrite();
instance.setNodeId(value);
return this;
}
/**
*
**
* The id of this node.
*
*
* int64 node_id = 3;
* @return This builder for chaining.
*/
public Builder clearNodeId() {
copyOnWrite();
instance.clearNodeId();
return this;
}
/**
*
**
* The reward rate _per whole hbar_ that was staked to this node with declineReward=false from the start of
* the staking period that is ending.
*
*
* int64 reward_rate = 4;
* @return The rewardRate.
*/
@java.lang.Override
public long getRewardRate() {
return instance.getRewardRate();
}
/**
*
**
* The reward rate _per whole hbar_ that was staked to this node with declineReward=false from the start of
* the staking period that is ending.
*
*
* int64 reward_rate = 4;
* @param value The rewardRate to set.
* @return This builder for chaining.
*/
public Builder setRewardRate(long value) {
copyOnWrite();
instance.setRewardRate(value);
return this;
}
/**
*
**
* The reward rate _per whole hbar_ that was staked to this node with declineReward=false from the start of
* the staking period that is ending.
*
*
* int64 reward_rate = 4;
* @return This builder for chaining.
*/
public Builder clearRewardRate() {
copyOnWrite();
instance.clearRewardRate();
return this;
}
/**
*
**
* Consensus weight of this node for the new staking period.
*
*
* int64 stake = 5;
* @return The stake.
*/
@java.lang.Override
public long getStake() {
return instance.getStake();
}
/**
*
**
* Consensus weight of this node for the new staking period.
*
*
* int64 stake = 5;
* @param value The stake to set.
* @return This builder for chaining.
*/
public Builder setStake(long value) {
copyOnWrite();
instance.setStake(value);
return this;
}
/**
*
**
* Consensus weight of this node for the new staking period.
*
*
* int64 stake = 5;
* @return This builder for chaining.
*/
public Builder clearStake() {
copyOnWrite();
instance.clearStake();
return this;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=true, at the
* beginning of the new staking period.
*
*
* int64 stake_not_rewarded = 6;
* @return The stakeNotRewarded.
*/
@java.lang.Override
public long getStakeNotRewarded() {
return instance.getStakeNotRewarded();
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=true, at the
* beginning of the new staking period.
*
*
* int64 stake_not_rewarded = 6;
* @param value The stakeNotRewarded to set.
* @return This builder for chaining.
*/
public Builder setStakeNotRewarded(long value) {
copyOnWrite();
instance.setStakeNotRewarded(value);
return this;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=true, at the
* beginning of the new staking period.
*
*
* int64 stake_not_rewarded = 6;
* @return This builder for chaining.
*/
public Builder clearStakeNotRewarded() {
copyOnWrite();
instance.clearStakeNotRewarded();
return this;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 stake_rewarded = 7;
* @return The stakeRewarded.
*/
@java.lang.Override
public long getStakeRewarded() {
return instance.getStakeRewarded();
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 stake_rewarded = 7;
* @param value The stakeRewarded to set.
* @return This builder for chaining.
*/
public Builder setStakeRewarded(long value) {
copyOnWrite();
instance.setStakeRewarded(value);
return this;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to this node with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 stake_rewarded = 7;
* @return This builder for chaining.
*/
public Builder clearStakeRewarded() {
copyOnWrite();
instance.clearStakeRewarded();
return this;
}
// @@protoc_insertion_point(builder_scope:proto.NodeStake)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.hedera.hashgraph.sdk.proto.NodeStake();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"maxStake_",
"minStake_",
"nodeId_",
"rewardRate_",
"stake_",
"stakeNotRewarded_",
"stakeRewarded_",
};
java.lang.String info =
"\u0000\u0007\u0000\u0000\u0001\u0007\u0007\u0000\u0000\u0000\u0001\u0002\u0002\u0002" +
"\u0003\u0002\u0004\u0002\u0005\u0002\u0006\u0002\u0007\u0002";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.hedera.hashgraph.sdk.proto.NodeStake.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:proto.NodeStake)
private static final com.hedera.hashgraph.sdk.proto.NodeStake DEFAULT_INSTANCE;
static {
NodeStake defaultInstance = new NodeStake();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
NodeStake.class, defaultInstance);
}
public static com.hedera.hashgraph.sdk.proto.NodeStake getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}