Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// 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.
*
**
* 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.
*
**
* 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;
}
}