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

com.hedera.hashgraph.sdk.proto.StakingInfo Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: basic_types.proto

package com.hedera.hashgraph.sdk.proto;

/**
 * 
 **
 * Staking metadata for an account or a contract returned in CryptoGetInfo or ContractGetInfo queries
 * 
* * Protobuf type {@code proto.StakingInfo} */ public final class StakingInfo extends com.google.protobuf.GeneratedMessageLite< StakingInfo, StakingInfo.Builder> implements // @@protoc_insertion_point(message_implements:proto.StakingInfo) StakingInfoOrBuilder { private StakingInfo() { } private int stakedIdCase_ = 0; private java.lang.Object stakedId_; public enum StakedIdCase { STAKED_ACCOUNT_ID(5), STAKED_NODE_ID(6), STAKEDID_NOT_SET(0); private final int value; private StakedIdCase(int value) { this.value = value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static StakedIdCase valueOf(int value) { return forNumber(value); } public static StakedIdCase forNumber(int value) { switch (value) { case 5: return STAKED_ACCOUNT_ID; case 6: return STAKED_NODE_ID; case 0: return STAKEDID_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; @java.lang.Override public StakedIdCase getStakedIdCase() { return StakedIdCase.forNumber( stakedIdCase_); } private void clearStakedId() { stakedIdCase_ = 0; stakedId_ = null; } public static final int DECLINE_REWARD_FIELD_NUMBER = 1; private boolean declineReward_; /** *
   **
   * If true, this account or contract declined to receive a staking reward.
   * 
* * bool decline_reward = 1; * @return The declineReward. */ @java.lang.Override public boolean getDeclineReward() { return declineReward_; } /** *
   **
   * If true, this account or contract declined to receive a staking reward.
   * 
* * bool decline_reward = 1; * @param value The declineReward to set. */ private void setDeclineReward(boolean value) { declineReward_ = value; } /** *
   **
   * If true, this account or contract declined to receive a staking reward.
   * 
* * bool decline_reward = 1; */ private void clearDeclineReward() { declineReward_ = false; } public static final int STAKE_PERIOD_START_FIELD_NUMBER = 2; private com.hedera.hashgraph.sdk.proto.Timestamp stakePeriodStart_; /** *
   **
   * The staking period during which either the staking settings for this account or contract changed (such as starting
   * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
   * is not currently staked to a node, then this field is not set.
   * 
* * .proto.Timestamp stake_period_start = 2; */ @java.lang.Override public boolean hasStakePeriodStart() { return stakePeriodStart_ != null; } /** *
   **
   * The staking period during which either the staking settings for this account or contract changed (such as starting
   * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
   * is not currently staked to a node, then this field is not set.
   * 
* * .proto.Timestamp stake_period_start = 2; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.Timestamp getStakePeriodStart() { return stakePeriodStart_ == null ? com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance() : stakePeriodStart_; } /** *
   **
   * The staking period during which either the staking settings for this account or contract changed (such as starting
   * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
   * is not currently staked to a node, then this field is not set.
   * 
* * .proto.Timestamp stake_period_start = 2; */ private void setStakePeriodStart(com.hedera.hashgraph.sdk.proto.Timestamp value) { value.getClass(); stakePeriodStart_ = value; } /** *
   **
   * The staking period during which either the staking settings for this account or contract changed (such as starting
   * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
   * is not currently staked to a node, then this field is not set.
   * 
* * .proto.Timestamp stake_period_start = 2; */ @java.lang.SuppressWarnings({"ReferenceEquality"}) private void mergeStakePeriodStart(com.hedera.hashgraph.sdk.proto.Timestamp value) { value.getClass(); if (stakePeriodStart_ != null && stakePeriodStart_ != com.hedera.hashgraph.sdk.proto.Timestamp.getDefaultInstance()) { stakePeriodStart_ = com.hedera.hashgraph.sdk.proto.Timestamp.newBuilder(stakePeriodStart_).mergeFrom(value).buildPartial(); } else { stakePeriodStart_ = value; } } /** *
   **
   * The staking period during which either the staking settings for this account or contract changed (such as starting
   * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
   * is not currently staked to a node, then this field is not set.
   * 
* * .proto.Timestamp stake_period_start = 2; */ private void clearStakePeriodStart() { stakePeriodStart_ = null; } public static final int PENDING_REWARD_FIELD_NUMBER = 3; private long pendingReward_; /** *
   **
   * The amount in tinybars that will be received in the next reward situation.
   * 
* * int64 pending_reward = 3; * @return The pendingReward. */ @java.lang.Override public long getPendingReward() { return pendingReward_; } /** *
   **
   * The amount in tinybars that will be received in the next reward situation.
   * 
* * int64 pending_reward = 3; * @param value The pendingReward to set. */ private void setPendingReward(long value) { pendingReward_ = value; } /** *
   **
   * The amount in tinybars that will be received in the next reward situation.
   * 
* * int64 pending_reward = 3; */ private void clearPendingReward() { pendingReward_ = 0L; } public static final int STAKED_TO_ME_FIELD_NUMBER = 4; private long stakedToMe_; /** *
   **
   * The total of balance of all accounts staked to this account or contract.
   * 
* * int64 staked_to_me = 4; * @return The stakedToMe. */ @java.lang.Override public long getStakedToMe() { return stakedToMe_; } /** *
   **
   * The total of balance of all accounts staked to this account or contract.
   * 
* * int64 staked_to_me = 4; * @param value The stakedToMe to set. */ private void setStakedToMe(long value) { stakedToMe_ = value; } /** *
   **
   * The total of balance of all accounts staked to this account or contract.
   * 
* * int64 staked_to_me = 4; */ private void clearStakedToMe() { stakedToMe_ = 0L; } public static final int STAKED_ACCOUNT_ID_FIELD_NUMBER = 5; /** *
   **
   * The account to which this account or contract is staking.
   * 
* * .proto.AccountID staked_account_id = 5; */ @java.lang.Override public boolean hasStakedAccountId() { return stakedIdCase_ == 5; } /** *
   **
   * The account to which this account or contract is staking.
   * 
* * .proto.AccountID staked_account_id = 5; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.AccountID getStakedAccountId() { if (stakedIdCase_ == 5) { return (com.hedera.hashgraph.sdk.proto.AccountID) stakedId_; } return com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance(); } /** *
   **
   * The account to which this account or contract is staking.
   * 
* * .proto.AccountID staked_account_id = 5; */ private void setStakedAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) { value.getClass(); stakedId_ = value; stakedIdCase_ = 5; } /** *
   **
   * The account to which this account or contract is staking.
   * 
* * .proto.AccountID staked_account_id = 5; */ private void mergeStakedAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) { value.getClass(); if (stakedIdCase_ == 5 && stakedId_ != com.hedera.hashgraph.sdk.proto.AccountID.getDefaultInstance()) { stakedId_ = com.hedera.hashgraph.sdk.proto.AccountID.newBuilder((com.hedera.hashgraph.sdk.proto.AccountID) stakedId_) .mergeFrom(value).buildPartial(); } else { stakedId_ = value; } stakedIdCase_ = 5; } /** *
   **
   * The account to which this account or contract is staking.
   * 
* * .proto.AccountID staked_account_id = 5; */ private void clearStakedAccountId() { if (stakedIdCase_ == 5) { stakedIdCase_ = 0; stakedId_ = null; } } public static final int STAKED_NODE_ID_FIELD_NUMBER = 6; /** *
   **
   * The ID of the node this account or contract is staked to.
   * 
* * int64 staked_node_id = 6; * @return Whether the stakedNodeId field is set. */ @java.lang.Override public boolean hasStakedNodeId() { return stakedIdCase_ == 6; } /** *
   **
   * The ID of the node this account or contract is staked to.
   * 
* * int64 staked_node_id = 6; * @return The stakedNodeId. */ @java.lang.Override public long getStakedNodeId() { if (stakedIdCase_ == 6) { return (java.lang.Long) stakedId_; } return 0L; } /** *
   **
   * The ID of the node this account or contract is staked to.
   * 
* * int64 staked_node_id = 6; * @param value The stakedNodeId to set. */ private void setStakedNodeId(long value) { stakedIdCase_ = 6; stakedId_ = value; } /** *
   **
   * The ID of the node this account or contract is staked to.
   * 
* * int64 staked_node_id = 6; */ private void clearStakedNodeId() { if (stakedIdCase_ == 6) { stakedIdCase_ = 0; stakedId_ = null; } } public static com.hedera.hashgraph.sdk.proto.StakingInfo 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.StakingInfo 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.StakingInfo 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.StakingInfo 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.StakingInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.StakingInfo 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.StakingInfo 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.StakingInfo 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.StakingInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.StakingInfo 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.StakingInfo 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.StakingInfo 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.StakingInfo prototype) { return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } /** *
   **
   * Staking metadata for an account or a contract returned in CryptoGetInfo or ContractGetInfo queries
   * 
* * Protobuf type {@code proto.StakingInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< com.hedera.hashgraph.sdk.proto.StakingInfo, Builder> implements // @@protoc_insertion_point(builder_implements:proto.StakingInfo) com.hedera.hashgraph.sdk.proto.StakingInfoOrBuilder { // Construct using com.hedera.hashgraph.sdk.proto.StakingInfo.newBuilder() private Builder() { super(DEFAULT_INSTANCE); } @java.lang.Override public StakedIdCase getStakedIdCase() { return instance.getStakedIdCase(); } public Builder clearStakedId() { copyOnWrite(); instance.clearStakedId(); return this; } /** *
     **
     * If true, this account or contract declined to receive a staking reward.
     * 
* * bool decline_reward = 1; * @return The declineReward. */ @java.lang.Override public boolean getDeclineReward() { return instance.getDeclineReward(); } /** *
     **
     * If true, this account or contract declined to receive a staking reward.
     * 
* * bool decline_reward = 1; * @param value The declineReward to set. * @return This builder for chaining. */ public Builder setDeclineReward(boolean value) { copyOnWrite(); instance.setDeclineReward(value); return this; } /** *
     **
     * If true, this account or contract declined to receive a staking reward.
     * 
* * bool decline_reward = 1; * @return This builder for chaining. */ public Builder clearDeclineReward() { copyOnWrite(); instance.clearDeclineReward(); return this; } /** *
     **
     * The staking period during which either the staking settings for this account or contract changed (such as starting
     * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
     * is not currently staked to a node, then this field is not set.
     * 
* * .proto.Timestamp stake_period_start = 2; */ @java.lang.Override public boolean hasStakePeriodStart() { return instance.hasStakePeriodStart(); } /** *
     **
     * The staking period during which either the staking settings for this account or contract changed (such as starting
     * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
     * is not currently staked to a node, then this field is not set.
     * 
* * .proto.Timestamp stake_period_start = 2; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.Timestamp getStakePeriodStart() { return instance.getStakePeriodStart(); } /** *
     **
     * The staking period during which either the staking settings for this account or contract changed (such as starting
     * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
     * is not currently staked to a node, then this field is not set.
     * 
* * .proto.Timestamp stake_period_start = 2; */ public Builder setStakePeriodStart(com.hedera.hashgraph.sdk.proto.Timestamp value) { copyOnWrite(); instance.setStakePeriodStart(value); return this; } /** *
     **
     * The staking period during which either the staking settings for this account or contract changed (such as starting
     * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
     * is not currently staked to a node, then this field is not set.
     * 
* * .proto.Timestamp stake_period_start = 2; */ public Builder setStakePeriodStart( com.hedera.hashgraph.sdk.proto.Timestamp.Builder builderForValue) { copyOnWrite(); instance.setStakePeriodStart(builderForValue.build()); return this; } /** *
     **
     * The staking period during which either the staking settings for this account or contract changed (such as starting
     * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
     * is not currently staked to a node, then this field is not set.
     * 
* * .proto.Timestamp stake_period_start = 2; */ public Builder mergeStakePeriodStart(com.hedera.hashgraph.sdk.proto.Timestamp value) { copyOnWrite(); instance.mergeStakePeriodStart(value); return this; } /** *
     **
     * The staking period during which either the staking settings for this account or contract changed (such as starting
     * staking or changing staked_node_id) or the most recent reward was earned, whichever is later. If this account or contract
     * is not currently staked to a node, then this field is not set.
     * 
* * .proto.Timestamp stake_period_start = 2; */ public Builder clearStakePeriodStart() { copyOnWrite(); instance.clearStakePeriodStart(); return this; } /** *
     **
     * The amount in tinybars that will be received in the next reward situation.
     * 
* * int64 pending_reward = 3; * @return The pendingReward. */ @java.lang.Override public long getPendingReward() { return instance.getPendingReward(); } /** *
     **
     * The amount in tinybars that will be received in the next reward situation.
     * 
* * int64 pending_reward = 3; * @param value The pendingReward to set. * @return This builder for chaining. */ public Builder setPendingReward(long value) { copyOnWrite(); instance.setPendingReward(value); return this; } /** *
     **
     * The amount in tinybars that will be received in the next reward situation.
     * 
* * int64 pending_reward = 3; * @return This builder for chaining. */ public Builder clearPendingReward() { copyOnWrite(); instance.clearPendingReward(); return this; } /** *
     **
     * The total of balance of all accounts staked to this account or contract.
     * 
* * int64 staked_to_me = 4; * @return The stakedToMe. */ @java.lang.Override public long getStakedToMe() { return instance.getStakedToMe(); } /** *
     **
     * The total of balance of all accounts staked to this account or contract.
     * 
* * int64 staked_to_me = 4; * @param value The stakedToMe to set. * @return This builder for chaining. */ public Builder setStakedToMe(long value) { copyOnWrite(); instance.setStakedToMe(value); return this; } /** *
     **
     * The total of balance of all accounts staked to this account or contract.
     * 
* * int64 staked_to_me = 4; * @return This builder for chaining. */ public Builder clearStakedToMe() { copyOnWrite(); instance.clearStakedToMe(); return this; } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ @java.lang.Override public boolean hasStakedAccountId() { return instance.hasStakedAccountId(); } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.AccountID getStakedAccountId() { return instance.getStakedAccountId(); } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ public Builder setStakedAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) { copyOnWrite(); instance.setStakedAccountId(value); return this; } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ public Builder setStakedAccountId( com.hedera.hashgraph.sdk.proto.AccountID.Builder builderForValue) { copyOnWrite(); instance.setStakedAccountId(builderForValue.build()); return this; } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ public Builder mergeStakedAccountId(com.hedera.hashgraph.sdk.proto.AccountID value) { copyOnWrite(); instance.mergeStakedAccountId(value); return this; } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ public Builder clearStakedAccountId() { copyOnWrite(); instance.clearStakedAccountId(); return this; } /** *
     **
     * The ID of the node this account or contract is staked to.
     * 
* * int64 staked_node_id = 6; * @return Whether the stakedNodeId field is set. */ @java.lang.Override public boolean hasStakedNodeId() { return instance.hasStakedNodeId(); } /** *
     **
     * The ID of the node this account or contract is staked to.
     * 
* * int64 staked_node_id = 6; * @return The stakedNodeId. */ @java.lang.Override public long getStakedNodeId() { return instance.getStakedNodeId(); } /** *
     **
     * The ID of the node this account or contract is staked to.
     * 
* * int64 staked_node_id = 6; * @param value The stakedNodeId to set. * @return This builder for chaining. */ public Builder setStakedNodeId(long value) { copyOnWrite(); instance.setStakedNodeId(value); return this; } /** *
     **
     * The ID of the node this account or contract is staked to.
     * 
* * int64 staked_node_id = 6; * @return This builder for chaining. */ public Builder clearStakedNodeId() { copyOnWrite(); instance.clearStakedNodeId(); return this; } // @@protoc_insertion_point(builder_scope:proto.StakingInfo) } @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.StakingInfo(); } case NEW_BUILDER: { return new Builder(); } case BUILD_MESSAGE_INFO: { java.lang.Object[] objects = new java.lang.Object[] { "stakedId_", "stakedIdCase_", "declineReward_", "stakePeriodStart_", "pendingReward_", "stakedToMe_", com.hedera.hashgraph.sdk.proto.AccountID.class, }; java.lang.String info = "\u0000\u0006\u0001\u0000\u0001\u0006\u0006\u0000\u0000\u0000\u0001\u0007\u0002\t" + "\u0003\u0002\u0004\u0002\u0005<\u0000\u00065\u0000"; 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.StakingInfo.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.StakingInfo) private static final com.hedera.hashgraph.sdk.proto.StakingInfo DEFAULT_INSTANCE; static { StakingInfo defaultInstance = new StakingInfo(); // New instances are implicitly immutable so no need to make // immutable. DEFAULT_INSTANCE = defaultInstance; com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( StakingInfo.class, defaultInstance); } public static com.hedera.hashgraph.sdk.proto.StakingInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { return DEFAULT_INSTANCE.getParserForType(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy