com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-full Show documentation
Show all versions of sdk-full Show documentation
Hedera™ Hashgraph SDK for Java
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: node_stake_update.proto
// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* Updates the staking info at the end of staking period to indicate new staking period has started.
*
*
* Protobuf type {@code proto.NodeStakeUpdateTransactionBody}
*/
public final class NodeStakeUpdateTransactionBody extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.NodeStakeUpdateTransactionBody)
NodeStakeUpdateTransactionBodyOrBuilder {
private static final long serialVersionUID = 0L;
// Use NodeStakeUpdateTransactionBody.newBuilder() to construct.
private NodeStakeUpdateTransactionBody(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NodeStakeUpdateTransactionBody() {
nodeStake_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new NodeStakeUpdateTransactionBody();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.NodeStakeUpdate.internal_static_proto_NodeStakeUpdateTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.NodeStakeUpdate.internal_static_proto_NodeStakeUpdateTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody.class, com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody.Builder.class);
}
private int bitField0_;
public static final int END_OF_STAKING_PERIOD_FIELD_NUMBER = 1;
private com.hedera.hashgraph.sdk.proto.Timestamp endOfStakingPeriod_;
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
* @return Whether the endOfStakingPeriod field is set.
*/
@java.lang.Override
public boolean hasEndOfStakingPeriod() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
* @return The endOfStakingPeriod.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Timestamp getEndOfStakingPeriod() {
return endOfStakingPeriod_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : endOfStakingPeriod_;
}
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getEndOfStakingPeriodOrBuilder() {
return endOfStakingPeriod_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : endOfStakingPeriod_;
}
public static final int NODE_STAKE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List nodeStake_;
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
@java.lang.Override
public java.util.List getNodeStakeList() {
return nodeStake_;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
@java.lang.Override
public java.util.List extends com.hedera.hashgraph.sdk.proto.NodeStakeOrBuilder>
getNodeStakeOrBuilderList() {
return nodeStake_;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
@java.lang.Override
public int getNodeStakeCount() {
return nodeStake_.size();
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.NodeStake getNodeStake(int index) {
return nodeStake_.get(index);
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.NodeStakeOrBuilder getNodeStakeOrBuilder(
int index) {
return nodeStake_.get(index);
}
public static final int MAX_STAKING_REWARD_RATE_PER_HBAR_FIELD_NUMBER = 3;
private long maxStakingRewardRatePerHbar_ = 0L;
/**
*
**
* The maximum reward rate, in tinybars per whole hbar, that any account could receive in this
* staking period.
*
*
* int64 max_staking_reward_rate_per_hbar = 3;
* @return The maxStakingRewardRatePerHbar.
*/
@java.lang.Override
public long getMaxStakingRewardRatePerHbar() {
return maxStakingRewardRatePerHbar_;
}
public static final int NODE_REWARD_FEE_FRACTION_FIELD_NUMBER = 4;
private com.hedera.hashgraph.sdk.proto.Fraction nodeRewardFeeFraction_;
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
* @return Whether the nodeRewardFeeFraction field is set.
*/
@java.lang.Override
public boolean hasNodeRewardFeeFraction() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
* @return The nodeRewardFeeFraction.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Fraction getNodeRewardFeeFraction() {
return nodeRewardFeeFraction_ == null ? com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : nodeRewardFeeFraction_;
}
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.FractionOrBuilder getNodeRewardFeeFractionOrBuilder() {
return nodeRewardFeeFraction_ == null ? com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : nodeRewardFeeFraction_;
}
public static final int STAKING_PERIODS_STORED_FIELD_NUMBER = 5;
private long stakingPeriodsStored_ = 0L;
/**
*
**
* The maximum number of trailing periods for which a user can collect rewards. For example, if this
* is 365 with a UTC calendar day period, then users must collect rewards at least once per calendar
* year to avoid missing any value.
*
*
* int64 staking_periods_stored = 5;
* @return The stakingPeriodsStored.
*/
@java.lang.Override
public long getStakingPeriodsStored() {
return stakingPeriodsStored_;
}
public static final int STAKING_PERIOD_FIELD_NUMBER = 6;
private long stakingPeriod_ = 0L;
/**
*
**
* The number of minutes in a staking period. Note for the special case of 1440 minutes, periods are
* treated as UTC calendar days, rather than repeating 1440 minute periods left-aligned at the epoch.
*
*
* int64 staking_period = 6;
* @return The stakingPeriod.
*/
@java.lang.Override
public long getStakingPeriod() {
return stakingPeriod_;
}
public static final int STAKING_REWARD_FEE_FRACTION_FIELD_NUMBER = 7;
private com.hedera.hashgraph.sdk.proto.Fraction stakingRewardFeeFraction_;
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
* @return Whether the stakingRewardFeeFraction field is set.
*/
@java.lang.Override
public boolean hasStakingRewardFeeFraction() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
* @return The stakingRewardFeeFraction.
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.Fraction getStakingRewardFeeFraction() {
return stakingRewardFeeFraction_ == null ? com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : stakingRewardFeeFraction_;
}
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.FractionOrBuilder getStakingRewardFeeFractionOrBuilder() {
return stakingRewardFeeFraction_ == null ? com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : stakingRewardFeeFraction_;
}
public static final int STAKING_START_THRESHOLD_FIELD_NUMBER = 8;
private long stakingStartThreshold_ = 0L;
/**
*
**
* The minimum balance of staking reward account 0.0.800 required to active rewards.
*
*
* int64 staking_start_threshold = 8;
* @return The stakingStartThreshold.
*/
@java.lang.Override
public long getStakingStartThreshold() {
return stakingStartThreshold_;
}
public static final int STAKING_REWARD_RATE_FIELD_NUMBER = 9;
private long stakingRewardRate_ = 0L;
/**
*
**
* (DEPRECATED) The maximum total number of tinybars to be distributed as staking rewards in the
* ending period. Please consult the max_total_reward field instead.
*
*
* int64 staking_reward_rate = 9 [deprecated = true];
* @deprecated proto.NodeStakeUpdateTransactionBody.staking_reward_rate is deprecated.
* See node_stake_update.proto;l=83
* @return The stakingRewardRate.
*/
@java.lang.Override
@java.lang.Deprecated public long getStakingRewardRate() {
return stakingRewardRate_;
}
public static final int RESERVED_STAKING_REWARDS_FIELD_NUMBER = 10;
private long reservedStakingRewards_ = 0L;
/**
*
**
* The amount of the staking reward funds (account 0.0.800) reserved to pay pending rewards that
* have been earned but not collected.
*
*
* int64 reserved_staking_rewards = 10;
* @return The reservedStakingRewards.
*/
@java.lang.Override
public long getReservedStakingRewards() {
return reservedStakingRewards_;
}
public static final int UNRESERVED_STAKING_REWARD_BALANCE_FIELD_NUMBER = 11;
private long unreservedStakingRewardBalance_ = 0L;
/**
*
**
* The unreserved balance of account 0.0.800 at the close of the just-ending period; this value is
* used to compute the HIP-782 balance ratio.
*
*
* int64 unreserved_staking_reward_balance = 11;
* @return The unreservedStakingRewardBalance.
*/
@java.lang.Override
public long getUnreservedStakingRewardBalance() {
return unreservedStakingRewardBalance_;
}
public static final int REWARD_BALANCE_THRESHOLD_FIELD_NUMBER = 12;
private long rewardBalanceThreshold_ = 0L;
/**
*
**
* The unreserved tinybar balance of account 0.0.800 required to achieve the maximum per-hbar reward
* rate in any period; please see HIP-782 for details.
*
*
* int64 reward_balance_threshold = 12;
* @return The rewardBalanceThreshold.
*/
@java.lang.Override
public long getRewardBalanceThreshold() {
return rewardBalanceThreshold_;
}
public static final int MAX_STAKE_REWARDED_FIELD_NUMBER = 13;
private long maxStakeRewarded_ = 0L;
/**
*
**
* The maximum amount of tinybar that can be staked for reward while still achieving the maximum
* per-hbar reward rate in any period; please see HIP-782 for details.
*
*
* int64 max_stake_rewarded = 13;
* @return The maxStakeRewarded.
*/
@java.lang.Override
public long getMaxStakeRewarded() {
return maxStakeRewarded_;
}
public static final int MAX_TOTAL_REWARD_FIELD_NUMBER = 14;
private long maxTotalReward_ = 0L;
/**
*
**
* The maximum total tinybars that could be paid as staking rewards in the ending period, after
* applying the settings for the 0.0.800 balance threshold and the maximum stake rewarded. This
* field replaces the deprecated field staking_reward_rate. It is only for convenience, since a
* mirror node could also calculate its value by iterating the node_stake list and summing
* stake_rewarded fields; then multiplying this sum by the max_staking_reward_rate_per_hbar.
*
*
* int64 max_total_reward = 14;
* @return The maxTotalReward.
*/
@java.lang.Override
public long getMaxTotalReward() {
return maxTotalReward_;
}
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 {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getEndOfStakingPeriod());
}
for (int i = 0; i < nodeStake_.size(); i++) {
output.writeMessage(2, nodeStake_.get(i));
}
if (maxStakingRewardRatePerHbar_ != 0L) {
output.writeInt64(3, maxStakingRewardRatePerHbar_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getNodeRewardFeeFraction());
}
if (stakingPeriodsStored_ != 0L) {
output.writeInt64(5, stakingPeriodsStored_);
}
if (stakingPeriod_ != 0L) {
output.writeInt64(6, stakingPeriod_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(7, getStakingRewardFeeFraction());
}
if (stakingStartThreshold_ != 0L) {
output.writeInt64(8, stakingStartThreshold_);
}
if (stakingRewardRate_ != 0L) {
output.writeInt64(9, stakingRewardRate_);
}
if (reservedStakingRewards_ != 0L) {
output.writeInt64(10, reservedStakingRewards_);
}
if (unreservedStakingRewardBalance_ != 0L) {
output.writeInt64(11, unreservedStakingRewardBalance_);
}
if (rewardBalanceThreshold_ != 0L) {
output.writeInt64(12, rewardBalanceThreshold_);
}
if (maxStakeRewarded_ != 0L) {
output.writeInt64(13, maxStakeRewarded_);
}
if (maxTotalReward_ != 0L) {
output.writeInt64(14, maxTotalReward_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getEndOfStakingPeriod());
}
for (int i = 0; i < nodeStake_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, nodeStake_.get(i));
}
if (maxStakingRewardRatePerHbar_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, maxStakingRewardRatePerHbar_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getNodeRewardFeeFraction());
}
if (stakingPeriodsStored_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, stakingPeriodsStored_);
}
if (stakingPeriod_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, stakingPeriod_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getStakingRewardFeeFraction());
}
if (stakingStartThreshold_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(8, stakingStartThreshold_);
}
if (stakingRewardRate_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(9, stakingRewardRate_);
}
if (reservedStakingRewards_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(10, reservedStakingRewards_);
}
if (unreservedStakingRewardBalance_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(11, unreservedStakingRewardBalance_);
}
if (rewardBalanceThreshold_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(12, rewardBalanceThreshold_);
}
if (maxStakeRewarded_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(13, maxStakeRewarded_);
}
if (maxTotalReward_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(14, maxTotalReward_);
}
size += getUnknownFields().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.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody other = (com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody) obj;
if (hasEndOfStakingPeriod() != other.hasEndOfStakingPeriod()) return false;
if (hasEndOfStakingPeriod()) {
if (!getEndOfStakingPeriod()
.equals(other.getEndOfStakingPeriod())) return false;
}
if (!getNodeStakeList()
.equals(other.getNodeStakeList())) return false;
if (getMaxStakingRewardRatePerHbar()
!= other.getMaxStakingRewardRatePerHbar()) return false;
if (hasNodeRewardFeeFraction() != other.hasNodeRewardFeeFraction()) return false;
if (hasNodeRewardFeeFraction()) {
if (!getNodeRewardFeeFraction()
.equals(other.getNodeRewardFeeFraction())) return false;
}
if (getStakingPeriodsStored()
!= other.getStakingPeriodsStored()) return false;
if (getStakingPeriod()
!= other.getStakingPeriod()) return false;
if (hasStakingRewardFeeFraction() != other.hasStakingRewardFeeFraction()) return false;
if (hasStakingRewardFeeFraction()) {
if (!getStakingRewardFeeFraction()
.equals(other.getStakingRewardFeeFraction())) return false;
}
if (getStakingStartThreshold()
!= other.getStakingStartThreshold()) return false;
if (getStakingRewardRate()
!= other.getStakingRewardRate()) return false;
if (getReservedStakingRewards()
!= other.getReservedStakingRewards()) return false;
if (getUnreservedStakingRewardBalance()
!= other.getUnreservedStakingRewardBalance()) return false;
if (getRewardBalanceThreshold()
!= other.getRewardBalanceThreshold()) return false;
if (getMaxStakeRewarded()
!= other.getMaxStakeRewarded()) return false;
if (getMaxTotalReward()
!= other.getMaxTotalReward()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasEndOfStakingPeriod()) {
hash = (37 * hash) + END_OF_STAKING_PERIOD_FIELD_NUMBER;
hash = (53 * hash) + getEndOfStakingPeriod().hashCode();
}
if (getNodeStakeCount() > 0) {
hash = (37 * hash) + NODE_STAKE_FIELD_NUMBER;
hash = (53 * hash) + getNodeStakeList().hashCode();
}
hash = (37 * hash) + MAX_STAKING_REWARD_RATE_PER_HBAR_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxStakingRewardRatePerHbar());
if (hasNodeRewardFeeFraction()) {
hash = (37 * hash) + NODE_REWARD_FEE_FRACTION_FIELD_NUMBER;
hash = (53 * hash) + getNodeRewardFeeFraction().hashCode();
}
hash = (37 * hash) + STAKING_PERIODS_STORED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStakingPeriodsStored());
hash = (37 * hash) + STAKING_PERIOD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStakingPeriod());
if (hasStakingRewardFeeFraction()) {
hash = (37 * hash) + STAKING_REWARD_FEE_FRACTION_FIELD_NUMBER;
hash = (53 * hash) + getStakingRewardFeeFraction().hashCode();
}
hash = (37 * hash) + STAKING_START_THRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStakingStartThreshold());
hash = (37 * hash) + STAKING_REWARD_RATE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStakingRewardRate());
hash = (37 * hash) + RESERVED_STAKING_REWARDS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getReservedStakingRewards());
hash = (37 * hash) + UNRESERVED_STAKING_REWARD_BALANCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getUnreservedStakingRewardBalance());
hash = (37 * hash) + REWARD_BALANCE_THRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRewardBalanceThreshold());
hash = (37 * hash) + MAX_STAKE_REWARDED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxStakeRewarded());
hash = (37 * hash) + MAX_TOTAL_REWARD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxTotalReward());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody 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.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody 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.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody 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.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody 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;
}
/**
*
**
* Updates the staking info at the end of staking period to indicate new staking period has started.
*
*
* Protobuf type {@code proto.NodeStakeUpdateTransactionBody}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.NodeStakeUpdateTransactionBody)
com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBodyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.NodeStakeUpdate.internal_static_proto_NodeStakeUpdateTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.NodeStakeUpdate.internal_static_proto_NodeStakeUpdateTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody.class, com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getEndOfStakingPeriodFieldBuilder();
getNodeStakeFieldBuilder();
getNodeRewardFeeFractionFieldBuilder();
getStakingRewardFeeFractionFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
endOfStakingPeriod_ = null;
if (endOfStakingPeriodBuilder_ != null) {
endOfStakingPeriodBuilder_.dispose();
endOfStakingPeriodBuilder_ = null;
}
if (nodeStakeBuilder_ == null) {
nodeStake_ = java.util.Collections.emptyList();
} else {
nodeStake_ = null;
nodeStakeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
maxStakingRewardRatePerHbar_ = 0L;
nodeRewardFeeFraction_ = null;
if (nodeRewardFeeFractionBuilder_ != null) {
nodeRewardFeeFractionBuilder_.dispose();
nodeRewardFeeFractionBuilder_ = null;
}
stakingPeriodsStored_ = 0L;
stakingPeriod_ = 0L;
stakingRewardFeeFraction_ = null;
if (stakingRewardFeeFractionBuilder_ != null) {
stakingRewardFeeFractionBuilder_.dispose();
stakingRewardFeeFractionBuilder_ = null;
}
stakingStartThreshold_ = 0L;
stakingRewardRate_ = 0L;
reservedStakingRewards_ = 0L;
unreservedStakingRewardBalance_ = 0L;
rewardBalanceThreshold_ = 0L;
maxStakeRewarded_ = 0L;
maxTotalReward_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.NodeStakeUpdate.internal_static_proto_NodeStakeUpdateTransactionBody_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody build() {
com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody buildPartial() {
com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody result = new com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody result) {
if (nodeStakeBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
nodeStake_ = java.util.Collections.unmodifiableList(nodeStake_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.nodeStake_ = nodeStake_;
} else {
result.nodeStake_ = nodeStakeBuilder_.build();
}
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.endOfStakingPeriod_ = endOfStakingPeriodBuilder_ == null
? endOfStakingPeriod_
: endOfStakingPeriodBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.maxStakingRewardRatePerHbar_ = maxStakingRewardRatePerHbar_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.nodeRewardFeeFraction_ = nodeRewardFeeFractionBuilder_ == null
? nodeRewardFeeFraction_
: nodeRewardFeeFractionBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.stakingPeriodsStored_ = stakingPeriodsStored_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.stakingPeriod_ = stakingPeriod_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.stakingRewardFeeFraction_ = stakingRewardFeeFractionBuilder_ == null
? stakingRewardFeeFraction_
: stakingRewardFeeFractionBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.stakingStartThreshold_ = stakingStartThreshold_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.stakingRewardRate_ = stakingRewardRate_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.reservedStakingRewards_ = reservedStakingRewards_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.unreservedStakingRewardBalance_ = unreservedStakingRewardBalance_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.rewardBalanceThreshold_ = rewardBalanceThreshold_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.maxStakeRewarded_ = maxStakeRewarded_;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.maxTotalReward_ = maxTotalReward_;
}
result.bitField0_ |= to_bitField0_;
}
@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.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody other) {
if (other == com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody.getDefaultInstance()) return this;
if (other.hasEndOfStakingPeriod()) {
mergeEndOfStakingPeriod(other.getEndOfStakingPeriod());
}
if (nodeStakeBuilder_ == null) {
if (!other.nodeStake_.isEmpty()) {
if (nodeStake_.isEmpty()) {
nodeStake_ = other.nodeStake_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureNodeStakeIsMutable();
nodeStake_.addAll(other.nodeStake_);
}
onChanged();
}
} else {
if (!other.nodeStake_.isEmpty()) {
if (nodeStakeBuilder_.isEmpty()) {
nodeStakeBuilder_.dispose();
nodeStakeBuilder_ = null;
nodeStake_ = other.nodeStake_;
bitField0_ = (bitField0_ & ~0x00000002);
nodeStakeBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getNodeStakeFieldBuilder() : null;
} else {
nodeStakeBuilder_.addAllMessages(other.nodeStake_);
}
}
}
if (other.getMaxStakingRewardRatePerHbar() != 0L) {
setMaxStakingRewardRatePerHbar(other.getMaxStakingRewardRatePerHbar());
}
if (other.hasNodeRewardFeeFraction()) {
mergeNodeRewardFeeFraction(other.getNodeRewardFeeFraction());
}
if (other.getStakingPeriodsStored() != 0L) {
setStakingPeriodsStored(other.getStakingPeriodsStored());
}
if (other.getStakingPeriod() != 0L) {
setStakingPeriod(other.getStakingPeriod());
}
if (other.hasStakingRewardFeeFraction()) {
mergeStakingRewardFeeFraction(other.getStakingRewardFeeFraction());
}
if (other.getStakingStartThreshold() != 0L) {
setStakingStartThreshold(other.getStakingStartThreshold());
}
if (other.getStakingRewardRate() != 0L) {
setStakingRewardRate(other.getStakingRewardRate());
}
if (other.getReservedStakingRewards() != 0L) {
setReservedStakingRewards(other.getReservedStakingRewards());
}
if (other.getUnreservedStakingRewardBalance() != 0L) {
setUnreservedStakingRewardBalance(other.getUnreservedStakingRewardBalance());
}
if (other.getRewardBalanceThreshold() != 0L) {
setRewardBalanceThreshold(other.getRewardBalanceThreshold());
}
if (other.getMaxStakeRewarded() != 0L) {
setMaxStakeRewarded(other.getMaxStakeRewarded());
}
if (other.getMaxTotalReward() != 0L) {
setMaxTotalReward(other.getMaxTotalReward());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getEndOfStakingPeriodFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.hedera.hashgraph.sdk.proto.NodeStake m =
input.readMessage(
com.hedera.hashgraph.sdk.proto.NodeStake.parser(),
extensionRegistry);
if (nodeStakeBuilder_ == null) {
ensureNodeStakeIsMutable();
nodeStake_.add(m);
} else {
nodeStakeBuilder_.addMessage(m);
}
break;
} // case 18
case 24: {
maxStakingRewardRatePerHbar_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34: {
input.readMessage(
getNodeRewardFeeFractionFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 40: {
stakingPeriodsStored_ = input.readInt64();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48: {
stakingPeriod_ = input.readInt64();
bitField0_ |= 0x00000020;
break;
} // case 48
case 58: {
input.readMessage(
getStakingRewardFeeFractionFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 64: {
stakingStartThreshold_ = input.readInt64();
bitField0_ |= 0x00000080;
break;
} // case 64
case 72: {
stakingRewardRate_ = input.readInt64();
bitField0_ |= 0x00000100;
break;
} // case 72
case 80: {
reservedStakingRewards_ = input.readInt64();
bitField0_ |= 0x00000200;
break;
} // case 80
case 88: {
unreservedStakingRewardBalance_ = input.readInt64();
bitField0_ |= 0x00000400;
break;
} // case 88
case 96: {
rewardBalanceThreshold_ = input.readInt64();
bitField0_ |= 0x00000800;
break;
} // case 96
case 104: {
maxStakeRewarded_ = input.readInt64();
bitField0_ |= 0x00001000;
break;
} // case 104
case 112: {
maxTotalReward_ = input.readInt64();
bitField0_ |= 0x00002000;
break;
} // case 112
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.hedera.hashgraph.sdk.proto.Timestamp endOfStakingPeriod_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder> endOfStakingPeriodBuilder_;
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
* @return Whether the endOfStakingPeriod field is set.
*/
public boolean hasEndOfStakingPeriod() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
* @return The endOfStakingPeriod.
*/
public com.hedera.hashgraph.sdk.proto.Timestamp getEndOfStakingPeriod() {
if (endOfStakingPeriodBuilder_ == null) {
return endOfStakingPeriod_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : endOfStakingPeriod_;
} else {
return endOfStakingPeriodBuilder_.getMessage();
}
}
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
*/
public Builder setEndOfStakingPeriod(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (endOfStakingPeriodBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
endOfStakingPeriod_ = value;
} else {
endOfStakingPeriodBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
*/
public Builder setEndOfStakingPeriod(
com.hedera.hashgraph.sdk.proto.Timestamp.Builder builderForValue) {
if (endOfStakingPeriodBuilder_ == null) {
endOfStakingPeriod_ = builderForValue.build();
} else {
endOfStakingPeriodBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
*/
public Builder mergeEndOfStakingPeriod(com.hedera.hashgraph.sdk.proto.Timestamp value) {
if (endOfStakingPeriodBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
endOfStakingPeriod_ != null &&
endOfStakingPeriod_ != com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance()) {
getEndOfStakingPeriodBuilder().mergeFrom(value);
} else {
endOfStakingPeriod_ = value;
}
} else {
endOfStakingPeriodBuilder_.mergeFrom(value);
}
if (endOfStakingPeriod_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
*/
public Builder clearEndOfStakingPeriod() {
bitField0_ = (bitField0_ & ~0x00000001);
endOfStakingPeriod_ = null;
if (endOfStakingPeriodBuilder_ != null) {
endOfStakingPeriodBuilder_.dispose();
endOfStakingPeriodBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
*/
public com.hedera.hashgraph.sdk.proto.Timestamp.Builder getEndOfStakingPeriodBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getEndOfStakingPeriodFieldBuilder().getBuilder();
}
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
*/
public com.hedera.hashgraph.sdk.proto.TimestampOrBuilder getEndOfStakingPeriodOrBuilder() {
if (endOfStakingPeriodBuilder_ != null) {
return endOfStakingPeriodBuilder_.getMessageOrBuilder();
} else {
return endOfStakingPeriod_ == null ?
com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : endOfStakingPeriod_;
}
}
/**
*
**
* Time and date of the end of the staking period that is ending
*
*
* .proto.Timestamp end_of_staking_period = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>
getEndOfStakingPeriodFieldBuilder() {
if (endOfStakingPeriodBuilder_ == null) {
endOfStakingPeriodBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Timestamp, com.hedera.hashgraph.sdk.proto.Timestamp.Builder, com.hedera.hashgraph.sdk.proto.TimestampOrBuilder>(
getEndOfStakingPeriod(),
getParentForChildren(),
isClean());
endOfStakingPeriod_ = null;
}
return endOfStakingPeriodBuilder_;
}
private java.util.List nodeStake_ =
java.util.Collections.emptyList();
private void ensureNodeStakeIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
nodeStake_ = new java.util.ArrayList(nodeStake_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.NodeStake, com.hedera.hashgraph.sdk.proto.NodeStake.Builder, com.hedera.hashgraph.sdk.proto.NodeStakeOrBuilder> nodeStakeBuilder_;
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public java.util.List getNodeStakeList() {
if (nodeStakeBuilder_ == null) {
return java.util.Collections.unmodifiableList(nodeStake_);
} else {
return nodeStakeBuilder_.getMessageList();
}
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public int getNodeStakeCount() {
if (nodeStakeBuilder_ == null) {
return nodeStake_.size();
} else {
return nodeStakeBuilder_.getCount();
}
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public com.hedera.hashgraph.sdk.proto.NodeStake getNodeStake(int index) {
if (nodeStakeBuilder_ == null) {
return nodeStake_.get(index);
} else {
return nodeStakeBuilder_.getMessage(index);
}
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public Builder setNodeStake(
int index, com.hedera.hashgraph.sdk.proto.NodeStake value) {
if (nodeStakeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodeStakeIsMutable();
nodeStake_.set(index, value);
onChanged();
} else {
nodeStakeBuilder_.setMessage(index, value);
}
return this;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public Builder setNodeStake(
int index, com.hedera.hashgraph.sdk.proto.NodeStake.Builder builderForValue) {
if (nodeStakeBuilder_ == null) {
ensureNodeStakeIsMutable();
nodeStake_.set(index, builderForValue.build());
onChanged();
} else {
nodeStakeBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public Builder addNodeStake(com.hedera.hashgraph.sdk.proto.NodeStake value) {
if (nodeStakeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodeStakeIsMutable();
nodeStake_.add(value);
onChanged();
} else {
nodeStakeBuilder_.addMessage(value);
}
return this;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public Builder addNodeStake(
int index, com.hedera.hashgraph.sdk.proto.NodeStake value) {
if (nodeStakeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodeStakeIsMutable();
nodeStake_.add(index, value);
onChanged();
} else {
nodeStakeBuilder_.addMessage(index, value);
}
return this;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public Builder addNodeStake(
com.hedera.hashgraph.sdk.proto.NodeStake.Builder builderForValue) {
if (nodeStakeBuilder_ == null) {
ensureNodeStakeIsMutable();
nodeStake_.add(builderForValue.build());
onChanged();
} else {
nodeStakeBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public Builder addNodeStake(
int index, com.hedera.hashgraph.sdk.proto.NodeStake.Builder builderForValue) {
if (nodeStakeBuilder_ == null) {
ensureNodeStakeIsMutable();
nodeStake_.add(index, builderForValue.build());
onChanged();
} else {
nodeStakeBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public Builder addAllNodeStake(
java.lang.Iterable extends com.hedera.hashgraph.sdk.proto.NodeStake> values) {
if (nodeStakeBuilder_ == null) {
ensureNodeStakeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, nodeStake_);
onChanged();
} else {
nodeStakeBuilder_.addAllMessages(values);
}
return this;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public Builder clearNodeStake() {
if (nodeStakeBuilder_ == null) {
nodeStake_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
nodeStakeBuilder_.clear();
}
return this;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public Builder removeNodeStake(int index) {
if (nodeStakeBuilder_ == null) {
ensureNodeStakeIsMutable();
nodeStake_.remove(index);
onChanged();
} else {
nodeStakeBuilder_.remove(index);
}
return this;
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public com.hedera.hashgraph.sdk.proto.NodeStake.Builder getNodeStakeBuilder(
int index) {
return getNodeStakeFieldBuilder().getBuilder(index);
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public com.hedera.hashgraph.sdk.proto.NodeStakeOrBuilder getNodeStakeOrBuilder(
int index) {
if (nodeStakeBuilder_ == null) {
return nodeStake_.get(index); } else {
return nodeStakeBuilder_.getMessageOrBuilder(index);
}
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public java.util.List extends com.hedera.hashgraph.sdk.proto.NodeStakeOrBuilder>
getNodeStakeOrBuilderList() {
if (nodeStakeBuilder_ != null) {
return nodeStakeBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(nodeStake_);
}
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public com.hedera.hashgraph.sdk.proto.NodeStake.Builder addNodeStakeBuilder() {
return getNodeStakeFieldBuilder().addBuilder(
com.hedera.hashgraph.sdk.proto.NodeStake.getDefaultInstance());
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public com.hedera.hashgraph.sdk.proto.NodeStake.Builder addNodeStakeBuilder(
int index) {
return getNodeStakeFieldBuilder().addBuilder(
index, com.hedera.hashgraph.sdk.proto.NodeStake.getDefaultInstance());
}
/**
*
**
* Staking info of each node at the beginning of the new staking period
*
*
* repeated .proto.NodeStake node_stake = 2;
*/
public java.util.List
getNodeStakeBuilderList() {
return getNodeStakeFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.NodeStake, com.hedera.hashgraph.sdk.proto.NodeStake.Builder, com.hedera.hashgraph.sdk.proto.NodeStakeOrBuilder>
getNodeStakeFieldBuilder() {
if (nodeStakeBuilder_ == null) {
nodeStakeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.NodeStake, com.hedera.hashgraph.sdk.proto.NodeStake.Builder, com.hedera.hashgraph.sdk.proto.NodeStakeOrBuilder>(
nodeStake_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
nodeStake_ = null;
}
return nodeStakeBuilder_;
}
private long maxStakingRewardRatePerHbar_ ;
/**
*
**
* The maximum reward rate, in tinybars per whole hbar, that any account could receive in this
* staking period.
*
*
* int64 max_staking_reward_rate_per_hbar = 3;
* @return The maxStakingRewardRatePerHbar.
*/
@java.lang.Override
public long getMaxStakingRewardRatePerHbar() {
return maxStakingRewardRatePerHbar_;
}
/**
*
**
* The maximum reward rate, in tinybars per whole hbar, that any account could receive in this
* staking period.
*
*
* int64 max_staking_reward_rate_per_hbar = 3;
* @param value The maxStakingRewardRatePerHbar to set.
* @return This builder for chaining.
*/
public Builder setMaxStakingRewardRatePerHbar(long value) {
maxStakingRewardRatePerHbar_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
**
* The maximum reward rate, in tinybars per whole hbar, that any account could receive in this
* staking period.
*
*
* int64 max_staking_reward_rate_per_hbar = 3;
* @return This builder for chaining.
*/
public Builder clearMaxStakingRewardRatePerHbar() {
bitField0_ = (bitField0_ & ~0x00000004);
maxStakingRewardRatePerHbar_ = 0L;
onChanged();
return this;
}
private com.hedera.hashgraph.sdk.proto.Fraction nodeRewardFeeFraction_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder> nodeRewardFeeFractionBuilder_;
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
* @return Whether the nodeRewardFeeFraction field is set.
*/
public boolean hasNodeRewardFeeFraction() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
* @return The nodeRewardFeeFraction.
*/
public com.hedera.hashgraph.sdk.proto.Fraction getNodeRewardFeeFraction() {
if (nodeRewardFeeFractionBuilder_ == null) {
return nodeRewardFeeFraction_ == null ? com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : nodeRewardFeeFraction_;
} else {
return nodeRewardFeeFractionBuilder_.getMessage();
}
}
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
*/
public Builder setNodeRewardFeeFraction(com.hedera.hashgraph.sdk.proto.Fraction value) {
if (nodeRewardFeeFractionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
nodeRewardFeeFraction_ = value;
} else {
nodeRewardFeeFractionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
*/
public Builder setNodeRewardFeeFraction(
com.hedera.hashgraph.sdk.proto.Fraction.Builder builderForValue) {
if (nodeRewardFeeFractionBuilder_ == null) {
nodeRewardFeeFraction_ = builderForValue.build();
} else {
nodeRewardFeeFractionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
*/
public Builder mergeNodeRewardFeeFraction(com.hedera.hashgraph.sdk.proto.Fraction value) {
if (nodeRewardFeeFractionBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
nodeRewardFeeFraction_ != null &&
nodeRewardFeeFraction_ != com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance()) {
getNodeRewardFeeFractionBuilder().mergeFrom(value);
} else {
nodeRewardFeeFraction_ = value;
}
} else {
nodeRewardFeeFractionBuilder_.mergeFrom(value);
}
if (nodeRewardFeeFraction_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
*/
public Builder clearNodeRewardFeeFraction() {
bitField0_ = (bitField0_ & ~0x00000008);
nodeRewardFeeFraction_ = null;
if (nodeRewardFeeFractionBuilder_ != null) {
nodeRewardFeeFractionBuilder_.dispose();
nodeRewardFeeFractionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
*/
public com.hedera.hashgraph.sdk.proto.Fraction.Builder getNodeRewardFeeFractionBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getNodeRewardFeeFractionFieldBuilder().getBuilder();
}
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
*/
public com.hedera.hashgraph.sdk.proto.FractionOrBuilder getNodeRewardFeeFractionOrBuilder() {
if (nodeRewardFeeFractionBuilder_ != null) {
return nodeRewardFeeFractionBuilder_.getMessageOrBuilder();
} else {
return nodeRewardFeeFraction_ == null ?
com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : nodeRewardFeeFraction_;
}
}
/**
*
**
* The fraction of the network and service fees paid to the node reward account 0.0.801.
*
*
* .proto.Fraction node_reward_fee_fraction = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder>
getNodeRewardFeeFractionFieldBuilder() {
if (nodeRewardFeeFractionBuilder_ == null) {
nodeRewardFeeFractionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder>(
getNodeRewardFeeFraction(),
getParentForChildren(),
isClean());
nodeRewardFeeFraction_ = null;
}
return nodeRewardFeeFractionBuilder_;
}
private long stakingPeriodsStored_ ;
/**
*
**
* The maximum number of trailing periods for which a user can collect rewards. For example, if this
* is 365 with a UTC calendar day period, then users must collect rewards at least once per calendar
* year to avoid missing any value.
*
*
* int64 staking_periods_stored = 5;
* @return The stakingPeriodsStored.
*/
@java.lang.Override
public long getStakingPeriodsStored() {
return stakingPeriodsStored_;
}
/**
*
**
* The maximum number of trailing periods for which a user can collect rewards. For example, if this
* is 365 with a UTC calendar day period, then users must collect rewards at least once per calendar
* year to avoid missing any value.
*
*
* int64 staking_periods_stored = 5;
* @param value The stakingPeriodsStored to set.
* @return This builder for chaining.
*/
public Builder setStakingPeriodsStored(long value) {
stakingPeriodsStored_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
**
* The maximum number of trailing periods for which a user can collect rewards. For example, if this
* is 365 with a UTC calendar day period, then users must collect rewards at least once per calendar
* year to avoid missing any value.
*
*
* int64 staking_periods_stored = 5;
* @return This builder for chaining.
*/
public Builder clearStakingPeriodsStored() {
bitField0_ = (bitField0_ & ~0x00000010);
stakingPeriodsStored_ = 0L;
onChanged();
return this;
}
private long stakingPeriod_ ;
/**
*
**
* The number of minutes in a staking period. Note for the special case of 1440 minutes, periods are
* treated as UTC calendar days, rather than repeating 1440 minute periods left-aligned at the epoch.
*
*
* int64 staking_period = 6;
* @return The stakingPeriod.
*/
@java.lang.Override
public long getStakingPeriod() {
return stakingPeriod_;
}
/**
*
**
* The number of minutes in a staking period. Note for the special case of 1440 minutes, periods are
* treated as UTC calendar days, rather than repeating 1440 minute periods left-aligned at the epoch.
*
*
* int64 staking_period = 6;
* @param value The stakingPeriod to set.
* @return This builder for chaining.
*/
public Builder setStakingPeriod(long value) {
stakingPeriod_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
**
* The number of minutes in a staking period. Note for the special case of 1440 minutes, periods are
* treated as UTC calendar days, rather than repeating 1440 minute periods left-aligned at the epoch.
*
*
* int64 staking_period = 6;
* @return This builder for chaining.
*/
public Builder clearStakingPeriod() {
bitField0_ = (bitField0_ & ~0x00000020);
stakingPeriod_ = 0L;
onChanged();
return this;
}
private com.hedera.hashgraph.sdk.proto.Fraction stakingRewardFeeFraction_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder> stakingRewardFeeFractionBuilder_;
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
* @return Whether the stakingRewardFeeFraction field is set.
*/
public boolean hasStakingRewardFeeFraction() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
* @return The stakingRewardFeeFraction.
*/
public com.hedera.hashgraph.sdk.proto.Fraction getStakingRewardFeeFraction() {
if (stakingRewardFeeFractionBuilder_ == null) {
return stakingRewardFeeFraction_ == null ? com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : stakingRewardFeeFraction_;
} else {
return stakingRewardFeeFractionBuilder_.getMessage();
}
}
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
*/
public Builder setStakingRewardFeeFraction(com.hedera.hashgraph.sdk.proto.Fraction value) {
if (stakingRewardFeeFractionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
stakingRewardFeeFraction_ = value;
} else {
stakingRewardFeeFractionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
*/
public Builder setStakingRewardFeeFraction(
com.hedera.hashgraph.sdk.proto.Fraction.Builder builderForValue) {
if (stakingRewardFeeFractionBuilder_ == null) {
stakingRewardFeeFraction_ = builderForValue.build();
} else {
stakingRewardFeeFractionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
*/
public Builder mergeStakingRewardFeeFraction(com.hedera.hashgraph.sdk.proto.Fraction value) {
if (stakingRewardFeeFractionBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
stakingRewardFeeFraction_ != null &&
stakingRewardFeeFraction_ != com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance()) {
getStakingRewardFeeFractionBuilder().mergeFrom(value);
} else {
stakingRewardFeeFraction_ = value;
}
} else {
stakingRewardFeeFractionBuilder_.mergeFrom(value);
}
if (stakingRewardFeeFraction_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
*/
public Builder clearStakingRewardFeeFraction() {
bitField0_ = (bitField0_ & ~0x00000040);
stakingRewardFeeFraction_ = null;
if (stakingRewardFeeFractionBuilder_ != null) {
stakingRewardFeeFractionBuilder_.dispose();
stakingRewardFeeFractionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
*/
public com.hedera.hashgraph.sdk.proto.Fraction.Builder getStakingRewardFeeFractionBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getStakingRewardFeeFractionFieldBuilder().getBuilder();
}
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
*/
public com.hedera.hashgraph.sdk.proto.FractionOrBuilder getStakingRewardFeeFractionOrBuilder() {
if (stakingRewardFeeFractionBuilder_ != null) {
return stakingRewardFeeFractionBuilder_.getMessageOrBuilder();
} else {
return stakingRewardFeeFraction_ == null ?
com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : stakingRewardFeeFraction_;
}
}
/**
*
**
* The fraction of the network and service fees paid to the staking reward account 0.0.800.
*
*
* .proto.Fraction staking_reward_fee_fraction = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder>
getStakingRewardFeeFractionFieldBuilder() {
if (stakingRewardFeeFractionBuilder_ == null) {
stakingRewardFeeFractionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder>(
getStakingRewardFeeFraction(),
getParentForChildren(),
isClean());
stakingRewardFeeFraction_ = null;
}
return stakingRewardFeeFractionBuilder_;
}
private long stakingStartThreshold_ ;
/**
*
**
* The minimum balance of staking reward account 0.0.800 required to active rewards.
*
*
* int64 staking_start_threshold = 8;
* @return The stakingStartThreshold.
*/
@java.lang.Override
public long getStakingStartThreshold() {
return stakingStartThreshold_;
}
/**
*
**
* The minimum balance of staking reward account 0.0.800 required to active rewards.
*
*
* int64 staking_start_threshold = 8;
* @param value The stakingStartThreshold to set.
* @return This builder for chaining.
*/
public Builder setStakingStartThreshold(long value) {
stakingStartThreshold_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
**
* The minimum balance of staking reward account 0.0.800 required to active rewards.
*
*
* int64 staking_start_threshold = 8;
* @return This builder for chaining.
*/
public Builder clearStakingStartThreshold() {
bitField0_ = (bitField0_ & ~0x00000080);
stakingStartThreshold_ = 0L;
onChanged();
return this;
}
private long stakingRewardRate_ ;
/**
*
**
* (DEPRECATED) The maximum total number of tinybars to be distributed as staking rewards in the
* ending period. Please consult the max_total_reward field instead.
*
*
* int64 staking_reward_rate = 9 [deprecated = true];
* @deprecated proto.NodeStakeUpdateTransactionBody.staking_reward_rate is deprecated.
* See node_stake_update.proto;l=83
* @return The stakingRewardRate.
*/
@java.lang.Override
@java.lang.Deprecated public long getStakingRewardRate() {
return stakingRewardRate_;
}
/**
*
**
* (DEPRECATED) The maximum total number of tinybars to be distributed as staking rewards in the
* ending period. Please consult the max_total_reward field instead.
*
*
* int64 staking_reward_rate = 9 [deprecated = true];
* @deprecated proto.NodeStakeUpdateTransactionBody.staking_reward_rate is deprecated.
* See node_stake_update.proto;l=83
* @param value The stakingRewardRate to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setStakingRewardRate(long value) {
stakingRewardRate_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
**
* (DEPRECATED) The maximum total number of tinybars to be distributed as staking rewards in the
* ending period. Please consult the max_total_reward field instead.
*
*
* int64 staking_reward_rate = 9 [deprecated = true];
* @deprecated proto.NodeStakeUpdateTransactionBody.staking_reward_rate is deprecated.
* See node_stake_update.proto;l=83
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearStakingRewardRate() {
bitField0_ = (bitField0_ & ~0x00000100);
stakingRewardRate_ = 0L;
onChanged();
return this;
}
private long reservedStakingRewards_ ;
/**
*
**
* The amount of the staking reward funds (account 0.0.800) reserved to pay pending rewards that
* have been earned but not collected.
*
*
* int64 reserved_staking_rewards = 10;
* @return The reservedStakingRewards.
*/
@java.lang.Override
public long getReservedStakingRewards() {
return reservedStakingRewards_;
}
/**
*
**
* The amount of the staking reward funds (account 0.0.800) reserved to pay pending rewards that
* have been earned but not collected.
*
*
* int64 reserved_staking_rewards = 10;
* @param value The reservedStakingRewards to set.
* @return This builder for chaining.
*/
public Builder setReservedStakingRewards(long value) {
reservedStakingRewards_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
**
* The amount of the staking reward funds (account 0.0.800) reserved to pay pending rewards that
* have been earned but not collected.
*
*
* int64 reserved_staking_rewards = 10;
* @return This builder for chaining.
*/
public Builder clearReservedStakingRewards() {
bitField0_ = (bitField0_ & ~0x00000200);
reservedStakingRewards_ = 0L;
onChanged();
return this;
}
private long unreservedStakingRewardBalance_ ;
/**
*
**
* The unreserved balance of account 0.0.800 at the close of the just-ending period; this value is
* used to compute the HIP-782 balance ratio.
*
*
* int64 unreserved_staking_reward_balance = 11;
* @return The unreservedStakingRewardBalance.
*/
@java.lang.Override
public long getUnreservedStakingRewardBalance() {
return unreservedStakingRewardBalance_;
}
/**
*
**
* The unreserved balance of account 0.0.800 at the close of the just-ending period; this value is
* used to compute the HIP-782 balance ratio.
*
*
* int64 unreserved_staking_reward_balance = 11;
* @param value The unreservedStakingRewardBalance to set.
* @return This builder for chaining.
*/
public Builder setUnreservedStakingRewardBalance(long value) {
unreservedStakingRewardBalance_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
**
* The unreserved balance of account 0.0.800 at the close of the just-ending period; this value is
* used to compute the HIP-782 balance ratio.
*
*
* int64 unreserved_staking_reward_balance = 11;
* @return This builder for chaining.
*/
public Builder clearUnreservedStakingRewardBalance() {
bitField0_ = (bitField0_ & ~0x00000400);
unreservedStakingRewardBalance_ = 0L;
onChanged();
return this;
}
private long rewardBalanceThreshold_ ;
/**
*
**
* The unreserved tinybar balance of account 0.0.800 required to achieve the maximum per-hbar reward
* rate in any period; please see HIP-782 for details.
*
*
* int64 reward_balance_threshold = 12;
* @return The rewardBalanceThreshold.
*/
@java.lang.Override
public long getRewardBalanceThreshold() {
return rewardBalanceThreshold_;
}
/**
*
**
* The unreserved tinybar balance of account 0.0.800 required to achieve the maximum per-hbar reward
* rate in any period; please see HIP-782 for details.
*
*
* int64 reward_balance_threshold = 12;
* @param value The rewardBalanceThreshold to set.
* @return This builder for chaining.
*/
public Builder setRewardBalanceThreshold(long value) {
rewardBalanceThreshold_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
**
* The unreserved tinybar balance of account 0.0.800 required to achieve the maximum per-hbar reward
* rate in any period; please see HIP-782 for details.
*
*
* int64 reward_balance_threshold = 12;
* @return This builder for chaining.
*/
public Builder clearRewardBalanceThreshold() {
bitField0_ = (bitField0_ & ~0x00000800);
rewardBalanceThreshold_ = 0L;
onChanged();
return this;
}
private long maxStakeRewarded_ ;
/**
*
**
* The maximum amount of tinybar that can be staked for reward while still achieving the maximum
* per-hbar reward rate in any period; please see HIP-782 for details.
*
*
* int64 max_stake_rewarded = 13;
* @return The maxStakeRewarded.
*/
@java.lang.Override
public long getMaxStakeRewarded() {
return maxStakeRewarded_;
}
/**
*
**
* The maximum amount of tinybar that can be staked for reward while still achieving the maximum
* per-hbar reward rate in any period; please see HIP-782 for details.
*
*
* int64 max_stake_rewarded = 13;
* @param value The maxStakeRewarded to set.
* @return This builder for chaining.
*/
public Builder setMaxStakeRewarded(long value) {
maxStakeRewarded_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
**
* The maximum amount of tinybar that can be staked for reward while still achieving the maximum
* per-hbar reward rate in any period; please see HIP-782 for details.
*
*
* int64 max_stake_rewarded = 13;
* @return This builder for chaining.
*/
public Builder clearMaxStakeRewarded() {
bitField0_ = (bitField0_ & ~0x00001000);
maxStakeRewarded_ = 0L;
onChanged();
return this;
}
private long maxTotalReward_ ;
/**
*
**
* The maximum total tinybars that could be paid as staking rewards in the ending period, after
* applying the settings for the 0.0.800 balance threshold and the maximum stake rewarded. This
* field replaces the deprecated field staking_reward_rate. It is only for convenience, since a
* mirror node could also calculate its value by iterating the node_stake list and summing
* stake_rewarded fields; then multiplying this sum by the max_staking_reward_rate_per_hbar.
*
*
* int64 max_total_reward = 14;
* @return The maxTotalReward.
*/
@java.lang.Override
public long getMaxTotalReward() {
return maxTotalReward_;
}
/**
*
**
* The maximum total tinybars that could be paid as staking rewards in the ending period, after
* applying the settings for the 0.0.800 balance threshold and the maximum stake rewarded. This
* field replaces the deprecated field staking_reward_rate. It is only for convenience, since a
* mirror node could also calculate its value by iterating the node_stake list and summing
* stake_rewarded fields; then multiplying this sum by the max_staking_reward_rate_per_hbar.
*
*
* int64 max_total_reward = 14;
* @param value The maxTotalReward to set.
* @return This builder for chaining.
*/
public Builder setMaxTotalReward(long value) {
maxTotalReward_ = value;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
**
* The maximum total tinybars that could be paid as staking rewards in the ending period, after
* applying the settings for the 0.0.800 balance threshold and the maximum stake rewarded. This
* field replaces the deprecated field staking_reward_rate. It is only for convenience, since a
* mirror node could also calculate its value by iterating the node_stake list and summing
* stake_rewarded fields; then multiplying this sum by the max_staking_reward_rate_per_hbar.
*
*
* int64 max_total_reward = 14;
* @return This builder for chaining.
*/
public Builder clearMaxTotalReward() {
bitField0_ = (bitField0_ & ~0x00002000);
maxTotalReward_ = 0L;
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.NodeStakeUpdateTransactionBody)
}
// @@protoc_insertion_point(class_scope:proto.NodeStakeUpdateTransactionBody)
private static final com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody();
}
public static com.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public NodeStakeUpdateTransactionBody parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.hedera.hashgraph.sdk.proto.NodeStakeUpdateTransactionBody getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}