Class StakingInfo.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<StakingInfo,StakingInfo.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<StakingInfo,StakingInfo.Builder>
com.hedera.hashgraph.sdk.proto.StakingInfo.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, StakingInfoOrBuilder, Cloneable
Enclosing class:
StakingInfo

public static final class StakingInfo.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<StakingInfo,StakingInfo.Builder> implements StakingInfoOrBuilder
 *
 Staking information for an account or a contract.

 This is used for responses returned from `CryptoGetInfo` or
 `ContractGetInfo` queries.
 
Protobuf type proto.StakingInfo
  • Method Details

    • getStakedIdCase

      public StakingInfo.StakedIdCase getStakedIdCase()
      Specified by:
      getStakedIdCase in interface StakingInfoOrBuilder
    • clearStakedId

      public StakingInfo.Builder clearStakedId()
    • getDeclineReward

      public boolean getDeclineReward()
       *
       A flag indicating that the holder of this account has chosen to decline
       staking rewards.
       
      bool decline_reward = 1;
      Specified by:
      getDeclineReward in interface StakingInfoOrBuilder
      Returns:
      The declineReward.
    • setDeclineReward

      public StakingInfo.Builder setDeclineReward(boolean value)
       *
       A flag indicating that the holder of this account has chosen to decline
       staking rewards.
       
      bool decline_reward = 1;
      Parameters:
      value - The declineReward to set.
      Returns:
      This builder for chaining.
    • clearDeclineReward

      public StakingInfo.Builder clearDeclineReward()
       *
       A flag indicating that the holder of this account has chosen to decline
       staking rewards.
       
      bool decline_reward = 1;
      Returns:
      This builder for chaining.
    • hasStakePeriodStart

      public boolean hasStakePeriodStart()
       *
       A `Timestamp` of the start time for the latest active staking period.
       <p>
       This MUST be a period during which either the staking settings for this
       account or contract changed or the account or contract received staking
       rewards, whichever is later. Examples of a change in staking settings
       include starting staking or changing the staked_node_id.<br/>
       If this account or contract is not currently staked to a node, then this
       field SHALL NOT be set.
       
      .proto.Timestamp stake_period_start = 2;
      Specified by:
      hasStakePeriodStart in interface StakingInfoOrBuilder
      Returns:
      Whether the stakePeriodStart field is set.
    • getStakePeriodStart

      public Timestamp getStakePeriodStart()
       *
       A `Timestamp` of the start time for the latest active staking period.
       <p>
       This MUST be a period during which either the staking settings for this
       account or contract changed or the account or contract received staking
       rewards, whichever is later. Examples of a change in staking settings
       include starting staking or changing the staked_node_id.<br/>
       If this account or contract is not currently staked to a node, then this
       field SHALL NOT be set.
       
      .proto.Timestamp stake_period_start = 2;
      Specified by:
      getStakePeriodStart in interface StakingInfoOrBuilder
      Returns:
      The stakePeriodStart.
    • setStakePeriodStart

      public StakingInfo.Builder setStakePeriodStart(Timestamp value)
       *
       A `Timestamp` of the start time for the latest active staking period.
       <p>
       This MUST be a period during which either the staking settings for this
       account or contract changed or the account or contract received staking
       rewards, whichever is later. Examples of a change in staking settings
       include starting staking or changing the staked_node_id.<br/>
       If this account or contract is not currently staked to a node, then this
       field SHALL NOT be set.
       
      .proto.Timestamp stake_period_start = 2;
    • setStakePeriodStart

      public StakingInfo.Builder setStakePeriodStart(Timestamp.Builder builderForValue)
       *
       A `Timestamp` of the start time for the latest active staking period.
       <p>
       This MUST be a period during which either the staking settings for this
       account or contract changed or the account or contract received staking
       rewards, whichever is later. Examples of a change in staking settings
       include starting staking or changing the staked_node_id.<br/>
       If this account or contract is not currently staked to a node, then this
       field SHALL NOT be set.
       
      .proto.Timestamp stake_period_start = 2;
    • mergeStakePeriodStart

      public StakingInfo.Builder mergeStakePeriodStart(Timestamp value)
       *
       A `Timestamp` of the start time for the latest active staking period.
       <p>
       This MUST be a period during which either the staking settings for this
       account or contract changed or the account or contract received staking
       rewards, whichever is later. Examples of a change in staking settings
       include starting staking or changing the staked_node_id.<br/>
       If this account or contract is not currently staked to a node, then this
       field SHALL NOT be set.
       
      .proto.Timestamp stake_period_start = 2;
    • clearStakePeriodStart

      public StakingInfo.Builder clearStakePeriodStart()
       *
       A `Timestamp` of the start time for the latest active staking period.
       <p>
       This MUST be a period during which either the staking settings for this
       account or contract changed or the account or contract received staking
       rewards, whichever is later. Examples of a change in staking settings
       include starting staking or changing the staked_node_id.<br/>
       If this account or contract is not currently staked to a node, then this
       field SHALL NOT be set.
       
      .proto.Timestamp stake_period_start = 2;
    • getPendingReward

      public long getPendingReward()
       *
       An amount, in tinybar, to be received in the next reward payout.<br/>
       Rewards are not paid out immediately; for efficiency reasons rewards are
       only paid out as part of another transaction involving that account.
       
      int64 pending_reward = 3;
      Specified by:
      getPendingReward in interface StakingInfoOrBuilder
      Returns:
      The pendingReward.
    • setPendingReward

      public StakingInfo.Builder setPendingReward(long value)
       *
       An amount, in tinybar, to be received in the next reward payout.<br/>
       Rewards are not paid out immediately; for efficiency reasons rewards are
       only paid out as part of another transaction involving that account.
       
      int64 pending_reward = 3;
      Parameters:
      value - The pendingReward to set.
      Returns:
      This builder for chaining.
    • clearPendingReward

      public StakingInfo.Builder clearPendingReward()
       *
       An amount, in tinybar, to be received in the next reward payout.<br/>
       Rewards are not paid out immediately; for efficiency reasons rewards are
       only paid out as part of another transaction involving that account.
       
      int64 pending_reward = 3;
      Returns:
      This builder for chaining.
    • getStakedToMe

      public long getStakedToMe()
       *
       A proxy-staked balance.<br/>
       The total HBAR balance of all accounts that delegate staking to this
       account or contract.
       
      int64 staked_to_me = 4;
      Specified by:
      getStakedToMe in interface StakingInfoOrBuilder
      Returns:
      The stakedToMe.
    • setStakedToMe

      public StakingInfo.Builder setStakedToMe(long value)
       *
       A proxy-staked balance.<br/>
       The total HBAR balance of all accounts that delegate staking to this
       account or contract.
       
      int64 staked_to_me = 4;
      Parameters:
      value - The stakedToMe to set.
      Returns:
      This builder for chaining.
    • clearStakedToMe

      public StakingInfo.Builder clearStakedToMe()
       *
       A proxy-staked balance.<br/>
       The total HBAR balance of all accounts that delegate staking to this
       account or contract.
       
      int64 staked_to_me = 4;
      Returns:
      This builder for chaining.
    • hasStakedAccountId

      public boolean hasStakedAccountId()
       *
       A delegated stake.
       <p>
       This account delegates to the indicated account for staking purposes.
       
      .proto.AccountID staked_account_id = 5;
      Specified by:
      hasStakedAccountId in interface StakingInfoOrBuilder
      Returns:
      Whether the stakedAccountId field is set.
    • getStakedAccountId

      public AccountID getStakedAccountId()
       *
       A delegated stake.
       <p>
       This account delegates to the indicated account for staking purposes.
       
      .proto.AccountID staked_account_id = 5;
      Specified by:
      getStakedAccountId in interface StakingInfoOrBuilder
      Returns:
      The stakedAccountId.
    • setStakedAccountId

      public StakingInfo.Builder setStakedAccountId(AccountID value)
       *
       A delegated stake.
       <p>
       This account delegates to the indicated account for staking purposes.
       
      .proto.AccountID staked_account_id = 5;
    • setStakedAccountId

      public StakingInfo.Builder setStakedAccountId(AccountID.Builder builderForValue)
       *
       A delegated stake.
       <p>
       This account delegates to the indicated account for staking purposes.
       
      .proto.AccountID staked_account_id = 5;
    • mergeStakedAccountId

      public StakingInfo.Builder mergeStakedAccountId(AccountID value)
       *
       A delegated stake.
       <p>
       This account delegates to the indicated account for staking purposes.
       
      .proto.AccountID staked_account_id = 5;
    • clearStakedAccountId

      public StakingInfo.Builder clearStakedAccountId()
       *
       A delegated stake.
       <p>
       This account delegates to the indicated account for staking purposes.
       
      .proto.AccountID staked_account_id = 5;
    • hasStakedNodeId

      public boolean hasStakedNodeId()
       *
       A direct stake.
       <p>
       This accounts stakes its balance to the designated node.
       
      int64 staked_node_id = 6;
      Specified by:
      hasStakedNodeId in interface StakingInfoOrBuilder
      Returns:
      Whether the stakedNodeId field is set.
    • getStakedNodeId

      public long getStakedNodeId()
       *
       A direct stake.
       <p>
       This accounts stakes its balance to the designated node.
       
      int64 staked_node_id = 6;
      Specified by:
      getStakedNodeId in interface StakingInfoOrBuilder
      Returns:
      The stakedNodeId.
    • setStakedNodeId

      public StakingInfo.Builder setStakedNodeId(long value)
       *
       A direct stake.
       <p>
       This accounts stakes its balance to the designated node.
       
      int64 staked_node_id = 6;
      Parameters:
      value - The stakedNodeId to set.
      Returns:
      This builder for chaining.
    • clearStakedNodeId

      public StakingInfo.Builder clearStakedNodeId()
       *
       A direct stake.
       <p>
       This accounts stakes its balance to the designated node.
       
      int64 staked_node_id = 6;
      Returns:
      This builder for chaining.