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

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

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

package com.hederahashgraph.api.proto.java;

/**
 * 
 **
 * Representation of a Hedera Token Service staking reward entity in the network Merkle tree.
 * This consists of all the information needed to calculate the staking rewards for all nodes in the network. It is
 * calculated at the beginning of each staking period for all nodes and is needed to have same values
 * for reconnect.
 * As with all network entities, staking info is per node and has a unique entity number represented as shard.realm.X.
 * 
* * Protobuf type {@code proto.NetworkStakingRewards} */ public final class NetworkStakingRewards extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.NetworkStakingRewards) NetworkStakingRewardsOrBuilder { private static final long serialVersionUID = 0L; // Use NetworkStakingRewards.newBuilder() to construct. private NetworkStakingRewards(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private NetworkStakingRewards() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new NetworkStakingRewards(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private NetworkStakingRewards( 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: { stakingRewardsActivated_ = input.readBool(); break; } case 16: { totalStakedRewardStart_ = input.readInt64(); break; } case 24: { totalStakedStart_ = input.readInt64(); break; } case 32: { pendingRewards_ = input.readInt64(); 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.NetworkStakingRewardsOuterClass.internal_static_proto_NetworkStakingRewards_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.NetworkStakingRewardsOuterClass.internal_static_proto_NetworkStakingRewards_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.NetworkStakingRewards.class, com.hederahashgraph.api.proto.java.NetworkStakingRewards.Builder.class); } public static final int STAKING_REWARDS_ACTIVATED_FIELD_NUMBER = 1; private boolean stakingRewardsActivated_; /** *
   **
   * Whether staking rewards are activated on the network. This is set to true when the balance of 0.0.800
   * reaches minimum required balance.
   * 
* * bool staking_rewards_activated = 1; * @return The stakingRewardsActivated. */ @java.lang.Override public boolean getStakingRewardsActivated() { return stakingRewardsActivated_; } public static final int TOTAL_STAKED_REWARD_START_FIELD_NUMBER = 2; private long totalStakedRewardStart_; /** *
   **
   * Total of (balance + stakedToMe) for all accounts staked to all nodes in the network with declineReward=false, at the
   * beginning of the new staking period.
   * 
* * int64 total_staked_reward_start = 2; * @return The totalStakedRewardStart. */ @java.lang.Override public long getTotalStakedRewardStart() { return totalStakedRewardStart_; } public static final int TOTAL_STAKED_START_FIELD_NUMBER = 3; private long totalStakedStart_; /** *
   **
   * Total of (balance + stakedToMe) for all accounts staked to all nodes in the network, at the beginning of the new
   * staking period.
   * 
* * int64 total_staked_start = 3; * @return The totalStakedStart. */ @java.lang.Override public long getTotalStakedStart() { return totalStakedStart_; } public static final int PENDING_REWARDS_FIELD_NUMBER = 4; private long pendingRewards_; /** *
   **
   * The total staking rewards in tinybars that COULD be collected by all accounts staking to all nodes after the end
   * of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
   * 
* * int64 pending_rewards = 4; * @return The pendingRewards. */ @java.lang.Override public long getPendingRewards() { return pendingRewards_; } 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 (stakingRewardsActivated_ != false) { output.writeBool(1, stakingRewardsActivated_); } if (totalStakedRewardStart_ != 0L) { output.writeInt64(2, totalStakedRewardStart_); } if (totalStakedStart_ != 0L) { output.writeInt64(3, totalStakedStart_); } if (pendingRewards_ != 0L) { output.writeInt64(4, pendingRewards_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (stakingRewardsActivated_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(1, stakingRewardsActivated_); } if (totalStakedRewardStart_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, totalStakedRewardStart_); } if (totalStakedStart_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, totalStakedStart_); } if (pendingRewards_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, pendingRewards_); } 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.NetworkStakingRewards)) { return super.equals(obj); } com.hederahashgraph.api.proto.java.NetworkStakingRewards other = (com.hederahashgraph.api.proto.java.NetworkStakingRewards) obj; if (getStakingRewardsActivated() != other.getStakingRewardsActivated()) return false; if (getTotalStakedRewardStart() != other.getTotalStakedRewardStart()) return false; if (getTotalStakedStart() != other.getTotalStakedStart()) return false; if (getPendingRewards() != other.getPendingRewards()) return false; 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) + STAKING_REWARDS_ACTIVATED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getStakingRewardsActivated()); hash = (37 * hash) + TOTAL_STAKED_REWARD_START_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTotalStakedRewardStart()); hash = (37 * hash) + TOTAL_STAKED_START_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTotalStakedStart()); hash = (37 * hash) + PENDING_REWARDS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPendingRewards()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.hederahashgraph.api.proto.java.NetworkStakingRewards parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.NetworkStakingRewards 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.NetworkStakingRewards parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.NetworkStakingRewards 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.NetworkStakingRewards parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.NetworkStakingRewards 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.NetworkStakingRewards parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.NetworkStakingRewards 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.NetworkStakingRewards parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.NetworkStakingRewards 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.NetworkStakingRewards 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.NetworkStakingRewards 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.NetworkStakingRewards 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; } /** *
   **
   * Representation of a Hedera Token Service staking reward entity in the network Merkle tree.
   * This consists of all the information needed to calculate the staking rewards for all nodes in the network. It is
   * calculated at the beginning of each staking period for all nodes and is needed to have same values
   * for reconnect.
   * As with all network entities, staking info is per node and has a unique entity number represented as shard.realm.X.
   * 
* * Protobuf type {@code proto.NetworkStakingRewards} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:proto.NetworkStakingRewards) com.hederahashgraph.api.proto.java.NetworkStakingRewardsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.NetworkStakingRewardsOuterClass.internal_static_proto_NetworkStakingRewards_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.NetworkStakingRewardsOuterClass.internal_static_proto_NetworkStakingRewards_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.NetworkStakingRewards.class, com.hederahashgraph.api.proto.java.NetworkStakingRewards.Builder.class); } // Construct using com.hederahashgraph.api.proto.java.NetworkStakingRewards.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(); stakingRewardsActivated_ = false; totalStakedRewardStart_ = 0L; totalStakedStart_ = 0L; pendingRewards_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hederahashgraph.api.proto.java.NetworkStakingRewardsOuterClass.internal_static_proto_NetworkStakingRewards_descriptor; } @java.lang.Override public com.hederahashgraph.api.proto.java.NetworkStakingRewards getDefaultInstanceForType() { return com.hederahashgraph.api.proto.java.NetworkStakingRewards.getDefaultInstance(); } @java.lang.Override public com.hederahashgraph.api.proto.java.NetworkStakingRewards build() { com.hederahashgraph.api.proto.java.NetworkStakingRewards result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hederahashgraph.api.proto.java.NetworkStakingRewards buildPartial() { com.hederahashgraph.api.proto.java.NetworkStakingRewards result = new com.hederahashgraph.api.proto.java.NetworkStakingRewards(this); result.stakingRewardsActivated_ = stakingRewardsActivated_; result.totalStakedRewardStart_ = totalStakedRewardStart_; result.totalStakedStart_ = totalStakedStart_; result.pendingRewards_ = pendingRewards_; 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.NetworkStakingRewards) { return mergeFrom((com.hederahashgraph.api.proto.java.NetworkStakingRewards)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hederahashgraph.api.proto.java.NetworkStakingRewards other) { if (other == com.hederahashgraph.api.proto.java.NetworkStakingRewards.getDefaultInstance()) return this; if (other.getStakingRewardsActivated() != false) { setStakingRewardsActivated(other.getStakingRewardsActivated()); } if (other.getTotalStakedRewardStart() != 0L) { setTotalStakedRewardStart(other.getTotalStakedRewardStart()); } if (other.getTotalStakedStart() != 0L) { setTotalStakedStart(other.getTotalStakedStart()); } if (other.getPendingRewards() != 0L) { setPendingRewards(other.getPendingRewards()); } 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.NetworkStakingRewards parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.hederahashgraph.api.proto.java.NetworkStakingRewards) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private boolean stakingRewardsActivated_ ; /** *
     **
     * Whether staking rewards are activated on the network. This is set to true when the balance of 0.0.800
     * reaches minimum required balance.
     * 
* * bool staking_rewards_activated = 1; * @return The stakingRewardsActivated. */ @java.lang.Override public boolean getStakingRewardsActivated() { return stakingRewardsActivated_; } /** *
     **
     * Whether staking rewards are activated on the network. This is set to true when the balance of 0.0.800
     * reaches minimum required balance.
     * 
* * bool staking_rewards_activated = 1; * @param value The stakingRewardsActivated to set. * @return This builder for chaining. */ public Builder setStakingRewardsActivated(boolean value) { stakingRewardsActivated_ = value; onChanged(); return this; } /** *
     **
     * Whether staking rewards are activated on the network. This is set to true when the balance of 0.0.800
     * reaches minimum required balance.
     * 
* * bool staking_rewards_activated = 1; * @return This builder for chaining. */ public Builder clearStakingRewardsActivated() { stakingRewardsActivated_ = false; onChanged(); return this; } private long totalStakedRewardStart_ ; /** *
     **
     * Total of (balance + stakedToMe) for all accounts staked to all nodes in the network with declineReward=false, at the
     * beginning of the new staking period.
     * 
* * int64 total_staked_reward_start = 2; * @return The totalStakedRewardStart. */ @java.lang.Override public long getTotalStakedRewardStart() { return totalStakedRewardStart_; } /** *
     **
     * Total of (balance + stakedToMe) for all accounts staked to all nodes in the network with declineReward=false, at the
     * beginning of the new staking period.
     * 
* * int64 total_staked_reward_start = 2; * @param value The totalStakedRewardStart to set. * @return This builder for chaining. */ public Builder setTotalStakedRewardStart(long value) { totalStakedRewardStart_ = value; onChanged(); return this; } /** *
     **
     * Total of (balance + stakedToMe) for all accounts staked to all nodes in the network with declineReward=false, at the
     * beginning of the new staking period.
     * 
* * int64 total_staked_reward_start = 2; * @return This builder for chaining. */ public Builder clearTotalStakedRewardStart() { totalStakedRewardStart_ = 0L; onChanged(); return this; } private long totalStakedStart_ ; /** *
     **
     * Total of (balance + stakedToMe) for all accounts staked to all nodes in the network, at the beginning of the new
     * staking period.
     * 
* * int64 total_staked_start = 3; * @return The totalStakedStart. */ @java.lang.Override public long getTotalStakedStart() { return totalStakedStart_; } /** *
     **
     * Total of (balance + stakedToMe) for all accounts staked to all nodes in the network, at the beginning of the new
     * staking period.
     * 
* * int64 total_staked_start = 3; * @param value The totalStakedStart to set. * @return This builder for chaining. */ public Builder setTotalStakedStart(long value) { totalStakedStart_ = value; onChanged(); return this; } /** *
     **
     * Total of (balance + stakedToMe) for all accounts staked to all nodes in the network, at the beginning of the new
     * staking period.
     * 
* * int64 total_staked_start = 3; * @return This builder for chaining. */ public Builder clearTotalStakedStart() { totalStakedStart_ = 0L; onChanged(); return this; } private long pendingRewards_ ; /** *
     **
     * The total staking rewards in tinybars that COULD be collected by all accounts staking to all nodes after the end
     * of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
     * 
* * int64 pending_rewards = 4; * @return The pendingRewards. */ @java.lang.Override public long getPendingRewards() { return pendingRewards_; } /** *
     **
     * The total staking rewards in tinybars that COULD be collected by all accounts staking to all nodes after the end
     * of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
     * 
* * int64 pending_rewards = 4; * @param value The pendingRewards to set. * @return This builder for chaining. */ public Builder setPendingRewards(long value) { pendingRewards_ = value; onChanged(); return this; } /** *
     **
     * The total staking rewards in tinybars that COULD be collected by all accounts staking to all nodes after the end
     * of this staking period; assuming that no account "renounces" its rewards by, for example, setting declineReward=true.
     * 
* * int64 pending_rewards = 4; * @return This builder for chaining. */ public Builder clearPendingRewards() { pendingRewards_ = 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.NetworkStakingRewards) } // @@protoc_insertion_point(class_scope:proto.NetworkStakingRewards) private static final com.hederahashgraph.api.proto.java.NetworkStakingRewards DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.NetworkStakingRewards(); } public static com.hederahashgraph.api.proto.java.NetworkStakingRewards getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public NetworkStakingRewards parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new NetworkStakingRewards(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.NetworkStakingRewards getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy