com.hedera.hashgraph.sdk.proto.NetworkStakingRewards Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: network_staking_rewards.proto
// Protobuf Java Version: 3.25.4
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* Representation of a Hedera Token Service staking reward entity in the network Merkle tree.
* This consists of all the information needed to calculate the staking rewards for all nodes in the network. It is
* calculated at the beginning of each staking period for all nodes and is needed to have same values
* for reconnect.
*
* 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.NetworkStakingRewards}
*/
public final class NetworkStakingRewards extends
com.google.protobuf.GeneratedMessageLite<
NetworkStakingRewards, NetworkStakingRewards.Builder> implements
// @@protoc_insertion_point(message_implements:proto.NetworkStakingRewards)
NetworkStakingRewardsOrBuilder {
private NetworkStakingRewards() {
}
public static final int STAKING_REWARDS_ACTIVATED_FIELD_NUMBER = 1;
private boolean stakingRewardsActivated_;
/**
*
**
* Whether staking rewards are activated on the network. This is set to true when the balance of 0.0.800
* reaches minimum required balance.
*
*
* bool staking_rewards_activated = 1;
* @return The stakingRewardsActivated.
*/
@java.lang.Override
public boolean getStakingRewardsActivated() {
return stakingRewardsActivated_;
}
/**
*
**
* Whether staking rewards are activated on the network. This is set to true when the balance of 0.0.800
* reaches minimum required balance.
*
*
* bool staking_rewards_activated = 1;
* @param value The stakingRewardsActivated to set.
*/
private void setStakingRewardsActivated(boolean value) {
stakingRewardsActivated_ = value;
}
/**
*
**
* Whether staking rewards are activated on the network. This is set to true when the balance of 0.0.800
* reaches minimum required balance.
*
*
* bool staking_rewards_activated = 1;
*/
private void clearStakingRewardsActivated() {
stakingRewardsActivated_ = false;
}
public static final int TOTAL_STAKED_REWARD_START_FIELD_NUMBER = 2;
private long totalStakedRewardStart_;
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 total_staked_reward_start = 2;
* @return The totalStakedRewardStart.
*/
@java.lang.Override
public long getTotalStakedRewardStart() {
return totalStakedRewardStart_;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 total_staked_reward_start = 2;
* @param value The totalStakedRewardStart to set.
*/
private void setTotalStakedRewardStart(long value) {
totalStakedRewardStart_ = value;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 total_staked_reward_start = 2;
*/
private void clearTotalStakedRewardStart() {
totalStakedRewardStart_ = 0L;
}
public static final int TOTAL_STAKED_START_FIELD_NUMBER = 3;
private long totalStakedStart_;
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network, at the beginning of the new
* staking period.
*
*
* int64 total_staked_start = 3;
* @return The totalStakedStart.
*/
@java.lang.Override
public long getTotalStakedStart() {
return totalStakedStart_;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network, at the beginning of the new
* staking period.
*
*
* int64 total_staked_start = 3;
* @param value The totalStakedStart to set.
*/
private void setTotalStakedStart(long value) {
totalStakedStart_ = value;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network, at the beginning of the new
* staking period.
*
*
* int64 total_staked_start = 3;
*/
private void clearTotalStakedStart() {
totalStakedStart_ = 0L;
}
public static final int PENDING_REWARDS_FIELD_NUMBER = 4;
private long pendingRewards_;
/**
*
**
* The total staking rewards in tinybars that COULD be collected by all accounts staking to all nodes after the end
* of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
*
*
* int64 pending_rewards = 4;
* @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 all nodes after the end
* of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
*
*
* int64 pending_rewards = 4;
* @param value The pendingRewards to set.
*/
private void setPendingRewards(long value) {
pendingRewards_ = value;
}
/**
*
**
* The total staking rewards in tinybars that COULD be collected by all accounts staking to all nodes after the end
* of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
*
*
* int64 pending_rewards = 4;
*/
private void clearPendingRewards() {
pendingRewards_ = 0L;
}
public static com.hedera.hashgraph.sdk.proto.NetworkStakingRewards 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.NetworkStakingRewards 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.NetworkStakingRewards 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.NetworkStakingRewards 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.NetworkStakingRewards parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.NetworkStakingRewards 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.NetworkStakingRewards 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.NetworkStakingRewards 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.NetworkStakingRewards parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.NetworkStakingRewards 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.NetworkStakingRewards 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.NetworkStakingRewards 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.NetworkStakingRewards prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
**
* Representation of a Hedera Token Service staking reward entity in the network Merkle tree.
* This consists of all the information needed to calculate the staking rewards for all nodes in the network. It is
* calculated at the beginning of each staking period for all nodes and is needed to have same values
* for reconnect.
*
* 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.NetworkStakingRewards}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.hedera.hashgraph.sdk.proto.NetworkStakingRewards, Builder> implements
// @@protoc_insertion_point(builder_implements:proto.NetworkStakingRewards)
com.hedera.hashgraph.sdk.proto.NetworkStakingRewardsOrBuilder {
// Construct using com.hedera.hashgraph.sdk.proto.NetworkStakingRewards.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
**
* Whether staking rewards are activated on the network. This is set to true when the balance of 0.0.800
* reaches minimum required balance.
*
*
* bool staking_rewards_activated = 1;
* @return The stakingRewardsActivated.
*/
@java.lang.Override
public boolean getStakingRewardsActivated() {
return instance.getStakingRewardsActivated();
}
/**
*
**
* Whether staking rewards are activated on the network. This is set to true when the balance of 0.0.800
* reaches minimum required balance.
*
*
* bool staking_rewards_activated = 1;
* @param value The stakingRewardsActivated to set.
* @return This builder for chaining.
*/
public Builder setStakingRewardsActivated(boolean value) {
copyOnWrite();
instance.setStakingRewardsActivated(value);
return this;
}
/**
*
**
* Whether staking rewards are activated on the network. This is set to true when the balance of 0.0.800
* reaches minimum required balance.
*
*
* bool staking_rewards_activated = 1;
* @return This builder for chaining.
*/
public Builder clearStakingRewardsActivated() {
copyOnWrite();
instance.clearStakingRewardsActivated();
return this;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 total_staked_reward_start = 2;
* @return The totalStakedRewardStart.
*/
@java.lang.Override
public long getTotalStakedRewardStart() {
return instance.getTotalStakedRewardStart();
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 total_staked_reward_start = 2;
* @param value The totalStakedRewardStart to set.
* @return This builder for chaining.
*/
public Builder setTotalStakedRewardStart(long value) {
copyOnWrite();
instance.setTotalStakedRewardStart(value);
return this;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network with declineReward=false, at the
* beginning of the new staking period.
*
*
* int64 total_staked_reward_start = 2;
* @return This builder for chaining.
*/
public Builder clearTotalStakedRewardStart() {
copyOnWrite();
instance.clearTotalStakedRewardStart();
return this;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network, at the beginning of the new
* staking period.
*
*
* int64 total_staked_start = 3;
* @return The totalStakedStart.
*/
@java.lang.Override
public long getTotalStakedStart() {
return instance.getTotalStakedStart();
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network, at the beginning of the new
* staking period.
*
*
* int64 total_staked_start = 3;
* @param value The totalStakedStart to set.
* @return This builder for chaining.
*/
public Builder setTotalStakedStart(long value) {
copyOnWrite();
instance.setTotalStakedStart(value);
return this;
}
/**
*
**
* Total of (balance + stakedToMe) for all accounts staked to all nodes in the network, at the beginning of the new
* staking period.
*
*
* int64 total_staked_start = 3;
* @return This builder for chaining.
*/
public Builder clearTotalStakedStart() {
copyOnWrite();
instance.clearTotalStakedStart();
return this;
}
/**
*
**
* The total staking rewards in tinybars that COULD be collected by all accounts staking to all nodes after the end
* of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
*
*
* int64 pending_rewards = 4;
* @return The pendingRewards.
*/
@java.lang.Override
public long getPendingRewards() {
return instance.getPendingRewards();
}
/**
*
**
* The total staking rewards in tinybars that COULD be collected by all accounts staking to all nodes after the end
* of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
*
*
* int64 pending_rewards = 4;
* @param value The pendingRewards to set.
* @return This builder for chaining.
*/
public Builder setPendingRewards(long value) {
copyOnWrite();
instance.setPendingRewards(value);
return this;
}
/**
*
**
* The total staking rewards in tinybars that COULD be collected by all accounts staking to all nodes after the end
* of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
*
*
* int64 pending_rewards = 4;
* @return This builder for chaining.
*/
public Builder clearPendingRewards() {
copyOnWrite();
instance.clearPendingRewards();
return this;
}
// @@protoc_insertion_point(builder_scope:proto.NetworkStakingRewards)
}
@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.NetworkStakingRewards();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"stakingRewardsActivated_",
"totalStakedRewardStart_",
"totalStakedStart_",
"pendingRewards_",
};
java.lang.String info =
"\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\u0007\u0002\u0002" +
"\u0003\u0002\u0004\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.NetworkStakingRewards.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.NetworkStakingRewards)
private static final com.hedera.hashgraph.sdk.proto.NetworkStakingRewards DEFAULT_INSTANCE;
static {
NetworkStakingRewards defaultInstance = new NetworkStakingRewards();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
NetworkStakingRewards.class, defaultInstance);
}
public static com.hedera.hashgraph.sdk.proto.NetworkStakingRewards getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}