Module com.hedera.hashgraph.sdk
Class GossipEvent.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<GossipEvent,GossipEvent.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<GossipEvent,GossipEvent.Builder>
com.hedera.hapi.platform.event.legacy.GossipEvent.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,GossipEventOrBuilder,Cloneable
- Enclosing class:
GossipEvent
public static final class GossipEvent.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<GossipEvent,GossipEvent.Builder>
implements GossipEventOrBuilder
* An event that is sent and received via gossipProtobuf type
com.hedera.hapi.platform.event.GossipEvent-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllEventTransaction(Iterable<? extends EventTransaction> values) Deprecated.addAllTransactions(Iterable<? extends com.google.protobuf.ByteString> values) * A list of serialized transactions.addEventTransaction(int index, EventTransaction value) Deprecated.addEventTransaction(int index, EventTransaction.Builder builderForValue) Deprecated.Deprecated.addEventTransaction(EventTransaction.Builder builderForValue) Deprecated.addTransactions(com.google.protobuf.ByteString value) * A list of serialized transactions.* The core event dataDeprecated.* A node signature on the event hash.<br/> The signature SHALL be created with the SHA384withRSA algorithm.<br/> The signature MUST verify using the public key belonging to the `event_creator`.<br/> The `event_creator` public key SHALL be read from the address book that corresponds to the event's birth round.<br/> The signed event hash SHALL be a SHA-384 hash.<br/> The signed event hash SHALL have the following inputs, in the specified order:<br/> 1.* A list of serialized transactions.* The core event datagetEventTransaction(int index) Deprecated.intDeprecated.Deprecated.com.google.protobuf.ByteString* A node signature on the event hash.<br/> The signature SHALL be created with the SHA384withRSA algorithm.<br/> The signature MUST verify using the public key belonging to the `event_creator`.<br/> The `event_creator` public key SHALL be read from the address book that corresponds to the event's birth round.<br/> The signed event hash SHALL be a SHA-384 hash.<br/> The signed event hash SHALL have the following inputs, in the specified order:<br/> 1.com.google.protobuf.ByteStringgetTransactions(int index) * A list of serialized transactions.int* A list of serialized transactions.List<com.google.protobuf.ByteString> * A list of serialized transactions.boolean* The core event datamergeEventCore(EventCore value) * The core event dataremoveEventTransaction(int index) Deprecated.setEventCore(EventCore value) * The core event datasetEventCore(EventCore.Builder builderForValue) * The core event datasetEventTransaction(int index, EventTransaction value) Deprecated.setEventTransaction(int index, EventTransaction.Builder builderForValue) Deprecated.setSignature(com.google.protobuf.ByteString value) * A node signature on the event hash.<br/> The signature SHALL be created with the SHA384withRSA algorithm.<br/> The signature MUST verify using the public key belonging to the `event_creator`.<br/> The `event_creator` public key SHALL be read from the address book that corresponds to the event's birth round.<br/> The signed event hash SHALL be a SHA-384 hash.<br/> The signed event hash SHALL have the following inputs, in the specified order:<br/> 1.setTransactions(int index, com.google.protobuf.ByteString value) * A list of serialized transactions.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
hasEventCore
public boolean hasEventCore()* The core event data
.com.hedera.hapi.platform.event.EventCore event_core = 1;- Specified by:
hasEventCorein interfaceGossipEventOrBuilder- Returns:
- Whether the eventCore field is set.
-
getEventCore
* The core event data
.com.hedera.hapi.platform.event.EventCore event_core = 1;- Specified by:
getEventCorein interfaceGossipEventOrBuilder- Returns:
- The eventCore.
-
setEventCore
* The core event data
.com.hedera.hapi.platform.event.EventCore event_core = 1; -
setEventCore
* The core event data
.com.hedera.hapi.platform.event.EventCore event_core = 1; -
mergeEventCore
* The core event data
.com.hedera.hapi.platform.event.EventCore event_core = 1; -
clearEventCore
* The core event data
.com.hedera.hapi.platform.event.EventCore event_core = 1; -
getSignature
public com.google.protobuf.ByteString getSignature()* A node signature on the event hash.<br/> The signature SHALL be created with the SHA384withRSA algorithm.<br/> The signature MUST verify using the public key belonging to the `event_creator`.<br/> The `event_creator` public key SHALL be read from the address book that corresponds to the event's birth round.<br/> The signed event hash SHALL be a SHA-384 hash.<br/> The signed event hash SHALL have the following inputs, in the specified order:<br/> 1. The bytes of the `event_core` field<br/> 2. The SHA-384 hash of each individual `EventTransaction`, in the order the transaction appear in the `event_transaction` field
bytes signature = 2;- Specified by:
getSignaturein interfaceGossipEventOrBuilder- Returns:
- The signature.
-
setSignature
* A node signature on the event hash.<br/> The signature SHALL be created with the SHA384withRSA algorithm.<br/> The signature MUST verify using the public key belonging to the `event_creator`.<br/> The `event_creator` public key SHALL be read from the address book that corresponds to the event's birth round.<br/> The signed event hash SHALL be a SHA-384 hash.<br/> The signed event hash SHALL have the following inputs, in the specified order:<br/> 1. The bytes of the `event_core` field<br/> 2. The SHA-384 hash of each individual `EventTransaction`, in the order the transaction appear in the `event_transaction` field
bytes signature = 2;- Parameters:
value- The signature to set.- Returns:
- This builder for chaining.
-
clearSignature
* A node signature on the event hash.<br/> The signature SHALL be created with the SHA384withRSA algorithm.<br/> The signature MUST verify using the public key belonging to the `event_creator`.<br/> The `event_creator` public key SHALL be read from the address book that corresponds to the event's birth round.<br/> The signed event hash SHALL be a SHA-384 hash.<br/> The signed event hash SHALL have the following inputs, in the specified order:<br/> 1. The bytes of the `event_core` field<br/> 2. The SHA-384 hash of each individual `EventTransaction`, in the order the transaction appear in the `event_transaction` field
bytes signature = 2;- Returns:
- This builder for chaining.
-
getEventTransactionList
Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true];- Specified by:
getEventTransactionListin interfaceGossipEventOrBuilder
-
getEventTransactionCount
Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true];- Specified by:
getEventTransactionCountin interfaceGossipEventOrBuilder
-
getEventTransaction
Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true];- Specified by:
getEventTransactionin interfaceGossipEventOrBuilder
-
setEventTransaction
Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true]; -
setEventTransaction
@Deprecated public GossipEvent.Builder setEventTransaction(int index, EventTransaction.Builder builderForValue) Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true]; -
addEventTransaction
Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true]; -
addEventTransaction
Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true]; -
addEventTransaction
@Deprecated public GossipEvent.Builder addEventTransaction(EventTransaction.Builder builderForValue) Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true]; -
addEventTransaction
@Deprecated public GossipEvent.Builder addEventTransaction(int index, EventTransaction.Builder builderForValue) Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true]; -
addAllEventTransaction
@Deprecated public GossipEvent.Builder addAllEventTransaction(Iterable<? extends EventTransaction> values) Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true]; -
clearEventTransaction
Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true]; -
removeEventTransaction
Deprecated.* The event transaction. <p> This field MAY contain zero transactions.<br/> This field MUST NOT exceed `maxTransactionCountPerEvent` entries, initially `245760`.<br/> This total size of this field MUST NOT exceed `maxTransactionBytesPerEvent`, initially `245760` bytes.<br/> Deprecated in favor of the `transaction` field. The idea is to clean the design of event transactions.<br/> This is transitional state until 'transaction' field is fully adopted.
repeated .com.hedera.hapi.platform.event.EventTransaction event_transaction = 3 [deprecated = true]; -
getTransactionsList
* A list of serialized transactions. <p> This field MAY contain zero transactions.<br/> Each transaction in this list SHALL be presented exactly as it was supplied to the consensus algorithm.<br/> This field MUST contain one entry for each transaction included in this gossip event.
repeated bytes transactions = 4;- Specified by:
getTransactionsListin interfaceGossipEventOrBuilder- Returns:
- A list containing the transactions.
-
getTransactionsCount
public int getTransactionsCount()* A list of serialized transactions. <p> This field MAY contain zero transactions.<br/> Each transaction in this list SHALL be presented exactly as it was supplied to the consensus algorithm.<br/> This field MUST contain one entry for each transaction included in this gossip event.
repeated bytes transactions = 4;- Specified by:
getTransactionsCountin interfaceGossipEventOrBuilder- Returns:
- The count of transactions.
-
getTransactions
public com.google.protobuf.ByteString getTransactions(int index) * A list of serialized transactions. <p> This field MAY contain zero transactions.<br/> Each transaction in this list SHALL be presented exactly as it was supplied to the consensus algorithm.<br/> This field MUST contain one entry for each transaction included in this gossip event.
repeated bytes transactions = 4;- Specified by:
getTransactionsin interfaceGossipEventOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The transactions at the given index.
-
setTransactions
* A list of serialized transactions. <p> This field MAY contain zero transactions.<br/> Each transaction in this list SHALL be presented exactly as it was supplied to the consensus algorithm.<br/> This field MUST contain one entry for each transaction included in this gossip event.
repeated bytes transactions = 4;- Parameters:
value- The transactions to set.- Returns:
- This builder for chaining.
-
addTransactions
* A list of serialized transactions. <p> This field MAY contain zero transactions.<br/> Each transaction in this list SHALL be presented exactly as it was supplied to the consensus algorithm.<br/> This field MUST contain one entry for each transaction included in this gossip event.
repeated bytes transactions = 4;- Parameters:
value- The transactions to add.- Returns:
- This builder for chaining.
-
addAllTransactions
public GossipEvent.Builder addAllTransactions(Iterable<? extends com.google.protobuf.ByteString> values) * A list of serialized transactions. <p> This field MAY contain zero transactions.<br/> Each transaction in this list SHALL be presented exactly as it was supplied to the consensus algorithm.<br/> This field MUST contain one entry for each transaction included in this gossip event.
repeated bytes transactions = 4;- Parameters:
values- The transactions to add.- Returns:
- This builder for chaining.
-
clearTransactions
* A list of serialized transactions. <p> This field MAY contain zero transactions.<br/> Each transaction in this list SHALL be presented exactly as it was supplied to the consensus algorithm.<br/> This field MUST contain one entry for each transaction included in this gossip event.
repeated bytes transactions = 4;- Returns:
- This builder for chaining.
-