Class RosterEntry.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<RosterEntry,RosterEntry.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<RosterEntry,RosterEntry.Builder>
com.hedera.hashgraph.sdk.proto.RosterEntry.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, RosterEntryOrBuilder, Cloneable
Enclosing class:
RosterEntry

public static final class RosterEntry.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<RosterEntry,RosterEntry.Builder> implements RosterEntryOrBuilder
 *
 A single roster entry in the network state.

 Each roster entry SHALL encapsulate the elements required
 to manage node participation in the Threshold Signature Scheme (TSS).<br/>
 All fields are REQUIRED.
 
Protobuf type com.hedera.hapi.node.state.roster.RosterEntry
  • Method Details

    • getNodeId

      public long getNodeId()
       *
       A consensus node identifier.
       <p>
       Node identifiers SHALL be unique _within_ a ledger,
       and MUST NOT be repeated _between_ shards and realms.
       
      uint64 node_id = 1;
      Specified by:
      getNodeId in interface RosterEntryOrBuilder
      Returns:
      The nodeId.
    • setNodeId

      public RosterEntry.Builder setNodeId(long value)
       *
       A consensus node identifier.
       <p>
       Node identifiers SHALL be unique _within_ a ledger,
       and MUST NOT be repeated _between_ shards and realms.
       
      uint64 node_id = 1;
      Parameters:
      value - The nodeId to set.
      Returns:
      This builder for chaining.
    • clearNodeId

      public RosterEntry.Builder clearNodeId()
       *
       A consensus node identifier.
       <p>
       Node identifiers SHALL be unique _within_ a ledger,
       and MUST NOT be repeated _between_ shards and realms.
       
      uint64 node_id = 1;
      Returns:
      This builder for chaining.
    • getWeight

      public long getWeight()
       *
       A consensus weight.
       <p>
       Each node SHALL have a weight of zero or more in consensus calculations.<br/>
       The sum of the weights of all nodes in the roster SHALL form the total weight of the system,
       and each node's individual weight SHALL be proportional to that sum.<br/>
       
      uint64 weight = 2;
      Specified by:
      getWeight in interface RosterEntryOrBuilder
      Returns:
      The weight.
    • setWeight

      public RosterEntry.Builder setWeight(long value)
       *
       A consensus weight.
       <p>
       Each node SHALL have a weight of zero or more in consensus calculations.<br/>
       The sum of the weights of all nodes in the roster SHALL form the total weight of the system,
       and each node's individual weight SHALL be proportional to that sum.<br/>
       
      uint64 weight = 2;
      Parameters:
      value - The weight to set.
      Returns:
      This builder for chaining.
    • clearWeight

      public RosterEntry.Builder clearWeight()
       *
       A consensus weight.
       <p>
       Each node SHALL have a weight of zero or more in consensus calculations.<br/>
       The sum of the weights of all nodes in the roster SHALL form the total weight of the system,
       and each node's individual weight SHALL be proportional to that sum.<br/>
       
      uint64 weight = 2;
      Returns:
      This builder for chaining.
    • getGossipCaCertificate

      public com.google.protobuf.ByteString getGossipCaCertificate()
       *
       An RSA public certificate used for signing gossip events.
       <p>
       This value SHALL be a certificate of a type permitted for gossip
       signatures.<br/>
       This value SHALL be the DER encoding of the certificate presented.<br/>
       This field is REQUIRED and MUST NOT be empty.
       
      bytes gossip_ca_certificate = 3;
      Specified by:
      getGossipCaCertificate in interface RosterEntryOrBuilder
      Returns:
      The gossipCaCertificate.
    • setGossipCaCertificate

      public RosterEntry.Builder setGossipCaCertificate(com.google.protobuf.ByteString value)
       *
       An RSA public certificate used for signing gossip events.
       <p>
       This value SHALL be a certificate of a type permitted for gossip
       signatures.<br/>
       This value SHALL be the DER encoding of the certificate presented.<br/>
       This field is REQUIRED and MUST NOT be empty.
       
      bytes gossip_ca_certificate = 3;
      Parameters:
      value - The gossipCaCertificate to set.
      Returns:
      This builder for chaining.
    • clearGossipCaCertificate

      public RosterEntry.Builder clearGossipCaCertificate()
       *
       An RSA public certificate used for signing gossip events.
       <p>
       This value SHALL be a certificate of a type permitted for gossip
       signatures.<br/>
       This value SHALL be the DER encoding of the certificate presented.<br/>
       This field is REQUIRED and MUST NOT be empty.
       
      bytes gossip_ca_certificate = 3;
      Returns:
      This builder for chaining.
    • getGossipEndpointList

      public List<ServiceEndpoint> getGossipEndpointList()
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
      Specified by:
      getGossipEndpointList in interface RosterEntryOrBuilder
    • getGossipEndpointCount

      public int getGossipEndpointCount()
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
      Specified by:
      getGossipEndpointCount in interface RosterEntryOrBuilder
    • getGossipEndpoint

      public ServiceEndpoint getGossipEndpoint(int index)
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
      Specified by:
      getGossipEndpoint in interface RosterEntryOrBuilder
    • setGossipEndpoint

      public RosterEntry.Builder setGossipEndpoint(int index, ServiceEndpoint value)
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
    • setGossipEndpoint

      public RosterEntry.Builder setGossipEndpoint(int index, ServiceEndpoint.Builder builderForValue)
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
    • addGossipEndpoint

      public RosterEntry.Builder addGossipEndpoint(ServiceEndpoint value)
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
    • addGossipEndpoint

      public RosterEntry.Builder addGossipEndpoint(int index, ServiceEndpoint value)
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
    • addGossipEndpoint

      public RosterEntry.Builder addGossipEndpoint(ServiceEndpoint.Builder builderForValue)
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
    • addGossipEndpoint

      public RosterEntry.Builder addGossipEndpoint(int index, ServiceEndpoint.Builder builderForValue)
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
    • addAllGossipEndpoint

      public RosterEntry.Builder addAllGossipEndpoint(Iterable<? extends ServiceEndpoint> values)
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
    • clearGossipEndpoint

      public RosterEntry.Builder clearGossipEndpoint()
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;
    • removeGossipEndpoint

      public RosterEntry.Builder removeGossipEndpoint(int index)
       *
       A list of service endpoints for gossip.
       <p>
       These endpoints SHALL represent the published endpoints to which other
       consensus nodes may _gossip_ transactions.<br/>
       If the network configuration value `gossipFqdnRestricted` is set, then
       all endpoints in this list SHALL supply only IP address.<br/>
       If the network configuration value `gossipFqdnRestricted` is _not_ set,
       then endpoints in this list MAY supply either IP address or FQDN, but
       SHALL NOT supply both values for the same endpoint.<br/>
       This list SHALL NOT be empty.<br/>
       
      repeated .proto.ServiceEndpoint gossip_endpoint = 5;