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 gossip
 
Protobuf type com.hedera.hapi.platform.event.GossipEvent
  • Method Details

    • hasEventCore

      public boolean hasEventCore()
       *
       The core event data
       
      .com.hedera.hapi.platform.event.EventCore event_core = 1;
      Specified by:
      hasEventCore in interface GossipEventOrBuilder
      Returns:
      Whether the eventCore field is set.
    • getEventCore

      public EventCore getEventCore()
       *
       The core event data
       
      .com.hedera.hapi.platform.event.EventCore event_core = 1;
      Specified by:
      getEventCore in interface GossipEventOrBuilder
      Returns:
      The eventCore.
    • setEventCore

      public GossipEvent.Builder setEventCore(EventCore value)
       *
       The core event data
       
      .com.hedera.hapi.platform.event.EventCore event_core = 1;
    • setEventCore

      public GossipEvent.Builder setEventCore(EventCore.Builder builderForValue)
       *
       The core event data
       
      .com.hedera.hapi.platform.event.EventCore event_core = 1;
    • mergeEventCore

      public GossipEvent.Builder mergeEventCore(EventCore value)
       *
       The core event data
       
      .com.hedera.hapi.platform.event.EventCore event_core = 1;
    • clearEventCore

      public GossipEvent.Builder 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:
      getSignature in interface GossipEventOrBuilder
      Returns:
      The signature.
    • setSignature

      public GossipEvent.Builder 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. 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

      public GossipEvent.Builder 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 public List<EventTransaction> 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:
      getEventTransactionList in interface GossipEventOrBuilder
    • getEventTransactionCount

      @Deprecated public int 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:
      getEventTransactionCount in interface GossipEventOrBuilder
    • getEventTransaction

      @Deprecated public EventTransaction getEventTransaction(int index)
      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:
      getEventTransaction in interface GossipEventOrBuilder
    • setEventTransaction

      @Deprecated public GossipEvent.Builder setEventTransaction(int index, EventTransaction value)
      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 public GossipEvent.Builder addEventTransaction(EventTransaction value)
      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 value)
      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 public GossipEvent.Builder 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 public GossipEvent.Builder removeEventTransaction(int index)
      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

      public List<com.google.protobuf.ByteString> 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:
      getTransactionsList in interface GossipEventOrBuilder
      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:
      getTransactionsCount in interface GossipEventOrBuilder
      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:
      getTransactions in interface GossipEventOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The transactions at the given index.
    • setTransactions

      public GossipEvent.Builder setTransactions(int index, com.google.protobuf.ByteString value)
       *
       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

      public GossipEvent.Builder addTransactions(com.google.protobuf.ByteString value)
       *
       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

      public GossipEvent.Builder 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.