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

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

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

// Protobuf Java Version: 3.25.3
package com.hedera.hashgraph.sdk.proto;

/**
 * 
 **
 * 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(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.NetworkStakingRewardsOuterClass.internal_static_proto_NetworkStakingRewards_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.NetworkStakingRewardsOuterClass.internal_static_proto_NetworkStakingRewards_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.NetworkStakingRewards.class, com.hedera.hashgraph.sdk.proto.NetworkStakingRewards.Builder.class); } public static final int STAKING_REWARDS_ACTIVATED_FIELD_NUMBER = 1; private boolean stakingRewardsActivated_ = false; /** *
   **
   * 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_ = 0L; /** *
   **
   * 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_ = 0L; /** *
   **
   * 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_ = 0L; /** *
   **
   * 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_); } getUnknownFields().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 += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.hedera.hashgraph.sdk.proto.NetworkStakingRewards)) { return super.equals(obj); } com.hedera.hashgraph.sdk.proto.NetworkStakingRewards other = (com.hedera.hashgraph.sdk.proto.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 (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); 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) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.hedera.hashgraph.sdk.proto.NetworkStakingRewards parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.NetworkStakingRewards parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.NetworkStakingRewards parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.NetworkStakingRewards parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.NetworkStakingRewards parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.NetworkStakingRewards parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.NetworkStakingRewards parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.NetworkStakingRewards parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.NetworkStakingRewardsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.NetworkStakingRewardsOuterClass.internal_static_proto_NetworkStakingRewards_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.NetworkStakingRewardsOuterClass.internal_static_proto_NetworkStakingRewards_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.NetworkStakingRewards.class, com.hedera.hashgraph.sdk.proto.NetworkStakingRewards.Builder.class); } // Construct using com.hedera.hashgraph.sdk.proto.NetworkStakingRewards.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; stakingRewardsActivated_ = false; totalStakedRewardStart_ = 0L; totalStakedStart_ = 0L; pendingRewards_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hedera.hashgraph.sdk.proto.NetworkStakingRewardsOuterClass.internal_static_proto_NetworkStakingRewards_descriptor; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.NetworkStakingRewards getDefaultInstanceForType() { return com.hedera.hashgraph.sdk.proto.NetworkStakingRewards.getDefaultInstance(); } @java.lang.Override public com.hedera.hashgraph.sdk.proto.NetworkStakingRewards build() { com.hedera.hashgraph.sdk.proto.NetworkStakingRewards result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.NetworkStakingRewards buildPartial() { com.hedera.hashgraph.sdk.proto.NetworkStakingRewards result = new com.hedera.hashgraph.sdk.proto.NetworkStakingRewards(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.hedera.hashgraph.sdk.proto.NetworkStakingRewards result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.stakingRewardsActivated_ = stakingRewardsActivated_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.totalStakedRewardStart_ = totalStakedRewardStart_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.totalStakedStart_ = totalStakedStart_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.pendingRewards_ = pendingRewards_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.hedera.hashgraph.sdk.proto.NetworkStakingRewards) { return mergeFrom((com.hedera.hashgraph.sdk.proto.NetworkStakingRewards)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.NetworkStakingRewards other) { if (other == com.hedera.hashgraph.sdk.proto.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.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { stakingRewardsActivated_ = input.readBool(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { totalStakedRewardStart_ = input.readInt64(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { totalStakedStart_ = input.readInt64(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { pendingRewards_ = input.readInt64(); bitField0_ |= 0x00000008; break; } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private 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; bitField0_ |= 0x00000001; 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() { bitField0_ = (bitField0_ & ~0x00000001); 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; bitField0_ |= 0x00000002; 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() { bitField0_ = (bitField0_ & ~0x00000002); 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; bitField0_ |= 0x00000004; 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() { bitField0_ = (bitField0_ & ~0x00000004); 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; bitField0_ |= 0x00000008; 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() { bitField0_ = (bitField0_ & ~0x00000008); 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.hedera.hashgraph.sdk.proto.NetworkStakingRewards DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.NetworkStakingRewards(); } public static com.hedera.hashgraph.sdk.proto.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 { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.NetworkStakingRewards getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy