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

com.hederahashgraph.api.proto.java.StakingInfo Maven / Gradle / Ivy

There is a newer version: 0.54.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: basic_types.proto

package com.hederahashgraph.api.proto.java;

/**
 * 
 **
 * 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.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.StakingInfo) StakingInfoOrBuilder { private static final long serialVersionUID = 0L; // Use StakingInfo.newBuilder() to construct. private StakingInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private StakingInfo() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new StakingInfo(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private StakingInfo( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { declineReward_ = input.readBool(); break; } case 18: { com.hederahashgraph.api.proto.java.Timestamp.Builder subBuilder = null; if (stakePeriodStart_ != null) { subBuilder = stakePeriodStart_.toBuilder(); } stakePeriodStart_ = input.readMessage(com.hederahashgraph.api.proto.java.Timestamp.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(stakePeriodStart_); stakePeriodStart_ = subBuilder.buildPartial(); } break; } case 24: { pendingReward_ = input.readInt64(); break; } case 32: { stakedToMe_ = input.readInt64(); break; } case 42: { com.hederahashgraph.api.proto.java.AccountID.Builder subBuilder = null; if (stakedIdCase_ == 5) { subBuilder = ((com.hederahashgraph.api.proto.java.AccountID) stakedId_).toBuilder(); } stakedId_ = input.readMessage(com.hederahashgraph.api.proto.java.AccountID.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.hederahashgraph.api.proto.java.AccountID) stakedId_); stakedId_ = subBuilder.buildPartial(); } stakedIdCase_ = 5; break; } case 48: { stakedId_ = input.readInt64(); stakedIdCase_ = 6; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_StakingInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_StakingInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.StakingInfo.class, com.hederahashgraph.api.proto.java.StakingInfo.Builder.class); } private int stakedIdCase_ = 0; private java.lang.Object stakedId_; public enum StakedIdCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { STAKED_ACCOUNT_ID(5), STAKED_NODE_ID(6), STAKEDID_NOT_SET(0); private final int value; private StakedIdCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @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; } }; public StakedIdCase getStakedIdCase() { return StakedIdCase.forNumber( stakedIdCase_); } 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_; } public static final int STAKE_PERIOD_START_FIELD_NUMBER = 2; private com.hederahashgraph.api.proto.java.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; * @return Whether the stakePeriodStart field is set. */ @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; * @return The stakePeriodStart. */ @java.lang.Override public com.hederahashgraph.api.proto.java.Timestamp getStakePeriodStart() { return stakePeriodStart_ == null ? com.hederahashgraph.api.proto.java.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; */ @java.lang.Override public com.hederahashgraph.api.proto.java.TimestampOrBuilder getStakePeriodStartOrBuilder() { return getStakePeriodStart(); } 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_; } 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_; } 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; * @return Whether the stakedAccountId field is set. */ @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; * @return The stakedAccountId. */ @java.lang.Override public com.hederahashgraph.api.proto.java.AccountID getStakedAccountId() { if (stakedIdCase_ == 5) { return (com.hederahashgraph.api.proto.java.AccountID) stakedId_; } return com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance(); } /** *
   **
   * The account to which this account or contract is staking.
   * 
* * .proto.AccountID staked_account_id = 5; */ @java.lang.Override public com.hederahashgraph.api.proto.java.AccountIDOrBuilder getStakedAccountIdOrBuilder() { if (stakedIdCase_ == 5) { return (com.hederahashgraph.api.proto.java.AccountID) stakedId_; } return com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance(); } 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; } 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 (declineReward_ != false) { output.writeBool(1, declineReward_); } if (stakePeriodStart_ != null) { output.writeMessage(2, getStakePeriodStart()); } if (pendingReward_ != 0L) { output.writeInt64(3, pendingReward_); } if (stakedToMe_ != 0L) { output.writeInt64(4, stakedToMe_); } if (stakedIdCase_ == 5) { output.writeMessage(5, (com.hederahashgraph.api.proto.java.AccountID) stakedId_); } if (stakedIdCase_ == 6) { output.writeInt64( 6, (long)((java.lang.Long) stakedId_)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (declineReward_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(1, declineReward_); } if (stakePeriodStart_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getStakePeriodStart()); } if (pendingReward_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, pendingReward_); } if (stakedToMe_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, stakedToMe_); } if (stakedIdCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (com.hederahashgraph.api.proto.java.AccountID) stakedId_); } if (stakedIdCase_ == 6) { size += com.google.protobuf.CodedOutputStream .computeInt64Size( 6, (long)((java.lang.Long) stakedId_)); } size += unknownFields.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.hederahashgraph.api.proto.java.StakingInfo)) { return super.equals(obj); } com.hederahashgraph.api.proto.java.StakingInfo other = (com.hederahashgraph.api.proto.java.StakingInfo) obj; if (getDeclineReward() != other.getDeclineReward()) return false; if (hasStakePeriodStart() != other.hasStakePeriodStart()) return false; if (hasStakePeriodStart()) { if (!getStakePeriodStart() .equals(other.getStakePeriodStart())) return false; } if (getPendingReward() != other.getPendingReward()) return false; if (getStakedToMe() != other.getStakedToMe()) return false; if (!getStakedIdCase().equals(other.getStakedIdCase())) return false; switch (stakedIdCase_) { case 5: if (!getStakedAccountId() .equals(other.getStakedAccountId())) return false; break; case 6: if (getStakedNodeId() != other.getStakedNodeId()) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DECLINE_REWARD_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getDeclineReward()); if (hasStakePeriodStart()) { hash = (37 * hash) + STAKE_PERIOD_START_FIELD_NUMBER; hash = (53 * hash) + getStakePeriodStart().hashCode(); } hash = (37 * hash) + PENDING_REWARD_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPendingReward()); hash = (37 * hash) + STAKED_TO_ME_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStakedToMe()); switch (stakedIdCase_) { case 5: hash = (37 * hash) + STAKED_ACCOUNT_ID_FIELD_NUMBER; hash = (53 * hash) + getStakedAccountId().hashCode(); break; case 6: hash = (37 * hash) + STAKED_NODE_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStakedNodeId()); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.hederahashgraph.api.proto.java.StakingInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.StakingInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.StakingInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.StakingInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.StakingInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.StakingInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.StakingInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.StakingInfo 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.hederahashgraph.api.proto.java.StakingInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.StakingInfo 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.hederahashgraph.api.proto.java.StakingInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.StakingInfo 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.hederahashgraph.api.proto.java.StakingInfo 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; } /** *
   **
   * 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.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:proto.StakingInfo) com.hederahashgraph.api.proto.java.StakingInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_StakingInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_StakingInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.StakingInfo.class, com.hederahashgraph.api.proto.java.StakingInfo.Builder.class); } // Construct using com.hederahashgraph.api.proto.java.StakingInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); declineReward_ = false; if (stakePeriodStartBuilder_ == null) { stakePeriodStart_ = null; } else { stakePeriodStart_ = null; stakePeriodStartBuilder_ = null; } pendingReward_ = 0L; stakedToMe_ = 0L; stakedIdCase_ = 0; stakedId_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_StakingInfo_descriptor; } @java.lang.Override public com.hederahashgraph.api.proto.java.StakingInfo getDefaultInstanceForType() { return com.hederahashgraph.api.proto.java.StakingInfo.getDefaultInstance(); } @java.lang.Override public com.hederahashgraph.api.proto.java.StakingInfo build() { com.hederahashgraph.api.proto.java.StakingInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hederahashgraph.api.proto.java.StakingInfo buildPartial() { com.hederahashgraph.api.proto.java.StakingInfo result = new com.hederahashgraph.api.proto.java.StakingInfo(this); result.declineReward_ = declineReward_; if (stakePeriodStartBuilder_ == null) { result.stakePeriodStart_ = stakePeriodStart_; } else { result.stakePeriodStart_ = stakePeriodStartBuilder_.build(); } result.pendingReward_ = pendingReward_; result.stakedToMe_ = stakedToMe_; if (stakedIdCase_ == 5) { if (stakedAccountIdBuilder_ == null) { result.stakedId_ = stakedId_; } else { result.stakedId_ = stakedAccountIdBuilder_.build(); } } if (stakedIdCase_ == 6) { result.stakedId_ = stakedId_; } result.stakedIdCase_ = stakedIdCase_; onBuilt(); return result; } @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.hederahashgraph.api.proto.java.StakingInfo) { return mergeFrom((com.hederahashgraph.api.proto.java.StakingInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hederahashgraph.api.proto.java.StakingInfo other) { if (other == com.hederahashgraph.api.proto.java.StakingInfo.getDefaultInstance()) return this; if (other.getDeclineReward() != false) { setDeclineReward(other.getDeclineReward()); } if (other.hasStakePeriodStart()) { mergeStakePeriodStart(other.getStakePeriodStart()); } if (other.getPendingReward() != 0L) { setPendingReward(other.getPendingReward()); } if (other.getStakedToMe() != 0L) { setStakedToMe(other.getStakedToMe()); } switch (other.getStakedIdCase()) { case STAKED_ACCOUNT_ID: { mergeStakedAccountId(other.getStakedAccountId()); break; } case STAKED_NODE_ID: { setStakedNodeId(other.getStakedNodeId()); break; } case STAKEDID_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); 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 { com.hederahashgraph.api.proto.java.StakingInfo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.hederahashgraph.api.proto.java.StakingInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int stakedIdCase_ = 0; private java.lang.Object stakedId_; public StakedIdCase getStakedIdCase() { return StakedIdCase.forNumber( stakedIdCase_); } public Builder clearStakedId() { stakedIdCase_ = 0; stakedId_ = null; onChanged(); return this; } 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. * @return This builder for chaining. */ public Builder setDeclineReward(boolean value) { declineReward_ = value; onChanged(); 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() { declineReward_ = false; onChanged(); return this; } private com.hederahashgraph.api.proto.java.Timestamp stakePeriodStart_; private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.Timestamp, com.hederahashgraph.api.proto.java.Timestamp.Builder, com.hederahashgraph.api.proto.java.TimestampOrBuilder> stakePeriodStartBuilder_; /** *
     **
     * 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; * @return Whether the stakePeriodStart field is set. */ public boolean hasStakePeriodStart() { return stakePeriodStartBuilder_ != null || 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; * @return The stakePeriodStart. */ public com.hederahashgraph.api.proto.java.Timestamp getStakePeriodStart() { if (stakePeriodStartBuilder_ == null) { return stakePeriodStart_ == null ? com.hederahashgraph.api.proto.java.Timestamp.getDefaultInstance() : stakePeriodStart_; } else { return stakePeriodStartBuilder_.getMessage(); } } /** *
     **
     * 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.hederahashgraph.api.proto.java.Timestamp value) { if (stakePeriodStartBuilder_ == null) { if (value == null) { throw new NullPointerException(); } stakePeriodStart_ = value; onChanged(); } else { stakePeriodStartBuilder_.setMessage(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.hederahashgraph.api.proto.java.Timestamp.Builder builderForValue) { if (stakePeriodStartBuilder_ == null) { stakePeriodStart_ = builderForValue.build(); onChanged(); } else { stakePeriodStartBuilder_.setMessage(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.hederahashgraph.api.proto.java.Timestamp value) { if (stakePeriodStartBuilder_ == null) { if (stakePeriodStart_ != null) { stakePeriodStart_ = com.hederahashgraph.api.proto.java.Timestamp.newBuilder(stakePeriodStart_).mergeFrom(value).buildPartial(); } else { stakePeriodStart_ = value; } onChanged(); } else { stakePeriodStartBuilder_.mergeFrom(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() { if (stakePeriodStartBuilder_ == null) { stakePeriodStart_ = null; onChanged(); } else { stakePeriodStart_ = null; stakePeriodStartBuilder_ = null; } 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 com.hederahashgraph.api.proto.java.Timestamp.Builder getStakePeriodStartBuilder() { onChanged(); return getStakePeriodStartFieldBuilder().getBuilder(); } /** *
     **
     * 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 com.hederahashgraph.api.proto.java.TimestampOrBuilder getStakePeriodStartOrBuilder() { if (stakePeriodStartBuilder_ != null) { return stakePeriodStartBuilder_.getMessageOrBuilder(); } else { return stakePeriodStart_ == null ? com.hederahashgraph.api.proto.java.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 com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.Timestamp, com.hederahashgraph.api.proto.java.Timestamp.Builder, com.hederahashgraph.api.proto.java.TimestampOrBuilder> getStakePeriodStartFieldBuilder() { if (stakePeriodStartBuilder_ == null) { stakePeriodStartBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.Timestamp, com.hederahashgraph.api.proto.java.Timestamp.Builder, com.hederahashgraph.api.proto.java.TimestampOrBuilder>( getStakePeriodStart(), getParentForChildren(), isClean()); stakePeriodStart_ = null; } return stakePeriodStartBuilder_; } 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. * @return This builder for chaining. */ public Builder setPendingReward(long value) { pendingReward_ = value; onChanged(); 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() { pendingReward_ = 0L; onChanged(); return this; } 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. * @return This builder for chaining. */ public Builder setStakedToMe(long value) { stakedToMe_ = value; onChanged(); 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() { stakedToMe_ = 0L; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder> stakedAccountIdBuilder_; /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; * @return Whether the stakedAccountId field is set. */ @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; * @return The stakedAccountId. */ @java.lang.Override public com.hederahashgraph.api.proto.java.AccountID getStakedAccountId() { if (stakedAccountIdBuilder_ == null) { if (stakedIdCase_ == 5) { return (com.hederahashgraph.api.proto.java.AccountID) stakedId_; } return com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance(); } else { if (stakedIdCase_ == 5) { return stakedAccountIdBuilder_.getMessage(); } return com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance(); } } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ public Builder setStakedAccountId(com.hederahashgraph.api.proto.java.AccountID value) { if (stakedAccountIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } stakedId_ = value; onChanged(); } else { stakedAccountIdBuilder_.setMessage(value); } stakedIdCase_ = 5; return this; } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ public Builder setStakedAccountId( com.hederahashgraph.api.proto.java.AccountID.Builder builderForValue) { if (stakedAccountIdBuilder_ == null) { stakedId_ = builderForValue.build(); onChanged(); } else { stakedAccountIdBuilder_.setMessage(builderForValue.build()); } stakedIdCase_ = 5; return this; } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ public Builder mergeStakedAccountId(com.hederahashgraph.api.proto.java.AccountID value) { if (stakedAccountIdBuilder_ == null) { if (stakedIdCase_ == 5 && stakedId_ != com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance()) { stakedId_ = com.hederahashgraph.api.proto.java.AccountID.newBuilder((com.hederahashgraph.api.proto.java.AccountID) stakedId_) .mergeFrom(value).buildPartial(); } else { stakedId_ = value; } onChanged(); } else { if (stakedIdCase_ == 5) { stakedAccountIdBuilder_.mergeFrom(value); } stakedAccountIdBuilder_.setMessage(value); } stakedIdCase_ = 5; return this; } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ public Builder clearStakedAccountId() { if (stakedAccountIdBuilder_ == null) { if (stakedIdCase_ == 5) { stakedIdCase_ = 0; stakedId_ = null; onChanged(); } } else { if (stakedIdCase_ == 5) { stakedIdCase_ = 0; stakedId_ = null; } stakedAccountIdBuilder_.clear(); } return this; } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ public com.hederahashgraph.api.proto.java.AccountID.Builder getStakedAccountIdBuilder() { return getStakedAccountIdFieldBuilder().getBuilder(); } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ @java.lang.Override public com.hederahashgraph.api.proto.java.AccountIDOrBuilder getStakedAccountIdOrBuilder() { if ((stakedIdCase_ == 5) && (stakedAccountIdBuilder_ != null)) { return stakedAccountIdBuilder_.getMessageOrBuilder(); } else { if (stakedIdCase_ == 5) { return (com.hederahashgraph.api.proto.java.AccountID) stakedId_; } return com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance(); } } /** *
     **
     * The account to which this account or contract is staking.
     * 
* * .proto.AccountID staked_account_id = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder> getStakedAccountIdFieldBuilder() { if (stakedAccountIdBuilder_ == null) { if (!(stakedIdCase_ == 5)) { stakedId_ = com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance(); } stakedAccountIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder>( (com.hederahashgraph.api.proto.java.AccountID) stakedId_, getParentForChildren(), isClean()); stakedId_ = null; } stakedIdCase_ = 5; onChanged();; return stakedAccountIdBuilder_; } /** *
     **
     * The ID of the node this account or contract is staked to.
     * 
* * int64 staked_node_id = 6; * @return Whether the stakedNodeId field is set. */ 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. */ 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. * @return This builder for chaining. */ public Builder setStakedNodeId(long value) { stakedIdCase_ = 6; stakedId_ = value; onChanged(); 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() { if (stakedIdCase_ == 6) { stakedIdCase_ = 0; stakedId_ = null; 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.StakingInfo) } // @@protoc_insertion_point(class_scope:proto.StakingInfo) private static final com.hederahashgraph.api.proto.java.StakingInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.StakingInfo(); } public static com.hederahashgraph.api.proto.java.StakingInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public StakingInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new StakingInfo(input, extensionRegistry); } }; 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.hederahashgraph.api.proto.java.StakingInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy