Class EventDescriptor.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<EventDescriptor,EventDescriptor.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<EventDescriptor,EventDescriptor.Builder>
com.hedera.hapi.platform.event.legacy.EventDescriptor.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, EventDescriptorOrBuilder, Cloneable
Enclosing class:
EventDescriptor

public static final class EventDescriptor.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<EventDescriptor,EventDescriptor.Builder> implements EventDescriptorOrBuilder
 *
 Unique identifier for an event.
 
Protobuf type com.hedera.hapi.platform.event.EventDescriptor
  • Field Summary

    Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    instance
  • Method Summary

    Modifier and Type
    Method
    Description
    * The birth round of the event.<br/> The birth round SHALL be the pending consensus round at the time the event is created.<br/> The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
    * The creator node identifier.<br/> This SHALL be the unique identifier for the node that created the event.<br/> This SHALL match the ID of the node as it appears in the address book.
    * The generation of the event.<br/> This value SHALL be **one greater** than the _maximum_ generation of all parents.<br/>
    * The hash of the event.<br/> The hash SHALL be a SHA-384 hash.<br/> The hash SHALL have the following inputs, in the specified order:<br/> 1.
    long
    * The birth round of the event.<br/> The birth round SHALL be the pending consensus round at the time the event is created.<br/> The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
    long
    * The creator node identifier.<br/> This SHALL be the unique identifier for the node that created the event.<br/> This SHALL match the ID of the node as it appears in the address book.
    long
    * The generation of the event.<br/> This value SHALL be **one greater** than the _maximum_ generation of all parents.<br/>
    com.google.protobuf.ByteString
    * The hash of the event.<br/> The hash SHALL be a SHA-384 hash.<br/> The hash SHALL have the following inputs, in the specified order:<br/> 1.
    setBirthRound(long value)
    * The birth round of the event.<br/> The birth round SHALL be the pending consensus round at the time the event is created.<br/> The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
    setCreatorNodeId(long value)
    * The creator node identifier.<br/> This SHALL be the unique identifier for the node that created the event.<br/> This SHALL match the ID of the node as it appears in the address book.
    setGeneration(long value)
    * The generation of the event.<br/> This value SHALL be **one greater** than the _maximum_ generation of all parents.<br/>
    setHash(com.google.protobuf.ByteString value)
    * The hash of the event.<br/> The hash SHALL be a SHA-384 hash.<br/> The hash SHALL have the following inputs, in the specified order:<br/> 1.

    Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Method Details

    • getHash

      public com.google.protobuf.ByteString getHash()
       *
       The hash of the event.<br/>
       The hash SHALL be a SHA-384 hash.<br/>
       The hash SHALL have the following inputs, in the specified order:<br/>
       1. The bytes of the `EventCore` protobuf<br/>
       2. The SHA-384 hash of each individual `EventTransaction`, in the order the transactions appear in the `event_transactions` field of the `GossipEvent` protobuf
       
      bytes hash = 1;
      Specified by:
      getHash in interface EventDescriptorOrBuilder
      Returns:
      The hash.
    • setHash

      public EventDescriptor.Builder setHash(com.google.protobuf.ByteString value)
       *
       The hash of the event.<br/>
       The hash SHALL be a SHA-384 hash.<br/>
       The hash SHALL have the following inputs, in the specified order:<br/>
       1. The bytes of the `EventCore` protobuf<br/>
       2. The SHA-384 hash of each individual `EventTransaction`, in the order the transactions appear in the `event_transactions` field of the `GossipEvent` protobuf
       
      bytes hash = 1;
      Parameters:
      value - The hash to set.
      Returns:
      This builder for chaining.
    • clearHash

      public EventDescriptor.Builder clearHash()
       *
       The hash of the event.<br/>
       The hash SHALL be a SHA-384 hash.<br/>
       The hash SHALL have the following inputs, in the specified order:<br/>
       1. The bytes of the `EventCore` protobuf<br/>
       2. The SHA-384 hash of each individual `EventTransaction`, in the order the transactions appear in the `event_transactions` field of the `GossipEvent` protobuf
       
      bytes hash = 1;
      Returns:
      This builder for chaining.
    • getCreatorNodeId

      public long getCreatorNodeId()
       *
       The creator node identifier.<br/>
       This SHALL be the unique identifier for the node that created the event.<br/>
       This SHALL match the ID of the node as it appears in the address book.
       
      int64 creator_node_id = 2;
      Specified by:
      getCreatorNodeId in interface EventDescriptorOrBuilder
      Returns:
      The creatorNodeId.
    • setCreatorNodeId

      public EventDescriptor.Builder setCreatorNodeId(long value)
       *
       The creator node identifier.<br/>
       This SHALL be the unique identifier for the node that created the event.<br/>
       This SHALL match the ID of the node as it appears in the address book.
       
      int64 creator_node_id = 2;
      Parameters:
      value - The creatorNodeId to set.
      Returns:
      This builder for chaining.
    • clearCreatorNodeId

      public EventDescriptor.Builder clearCreatorNodeId()
       *
       The creator node identifier.<br/>
       This SHALL be the unique identifier for the node that created the event.<br/>
       This SHALL match the ID of the node as it appears in the address book.
       
      int64 creator_node_id = 2;
      Returns:
      This builder for chaining.
    • getBirthRound

      public long getBirthRound()
       *
       The birth round of the event.<br/>
       The birth round SHALL be the pending consensus round at the time the event is created.<br/>
       The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
       
      int64 birth_round = 3;
      Specified by:
      getBirthRound in interface EventDescriptorOrBuilder
      Returns:
      The birthRound.
    • setBirthRound

      public EventDescriptor.Builder setBirthRound(long value)
       *
       The birth round of the event.<br/>
       The birth round SHALL be the pending consensus round at the time the event is created.<br/>
       The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
       
      int64 birth_round = 3;
      Parameters:
      value - The birthRound to set.
      Returns:
      This builder for chaining.
    • clearBirthRound

      public EventDescriptor.Builder clearBirthRound()
       *
       The birth round of the event.<br/>
       The birth round SHALL be the pending consensus round at the time the event is created.<br/>
       The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
       
      int64 birth_round = 3;
      Returns:
      This builder for chaining.
    • getGeneration

      public long getGeneration()
       *
       The generation of the event.<br/>
       This value SHALL be **one greater** than the _maximum_ generation of all parents.<br/>
       
      int64 generation = 17;
      Specified by:
      getGeneration in interface EventDescriptorOrBuilder
      Returns:
      The generation.
    • setGeneration

      public EventDescriptor.Builder setGeneration(long value)
       *
       The generation of the event.<br/>
       This value SHALL be **one greater** than the _maximum_ generation of all parents.<br/>
       
      int64 generation = 17;
      Parameters:
      value - The generation to set.
      Returns:
      This builder for chaining.
    • clearGeneration

      public EventDescriptor.Builder clearGeneration()
       *
       The generation of the event.<br/>
       This value SHALL be **one greater** than the _maximum_ generation of all parents.<br/>
       
      int64 generation = 17;
      Returns:
      This builder for chaining.