Record Class NuggetAdminCapabilities

java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetAdminCapabilities
Record Components:
available - whether the provider can evaluate this public contract
protocolVersion - supported public protocol version
jsonFormatName - supported JSON format name
jsonFormatVersion - supported JSON format version
capabilities - supported operation capabilities in stable public order
operationKinds - supported operation families in stable public order
maxPageLimit - maximum accepted page limit
maxMetadataEntries - maximum retained safe metadata entries
collectedAt - collection timestamp
metadata - safe metadata in schema-visible order

public record NuggetAdminCapabilities(boolean available, int protocolVersion, String jsonFormatName, int jsonFormatVersion, List<NuggetCapability> capabilities, List<NuggetAdminOperationKind> operationKinds, int maxPageLimit, int maxMetadataEntries, Instant collectedAt, Map<String,String> metadata) extends Record
Public capability result for the Phase 7.8 admin contract.

Capability presence means only that a nugget or provider can evaluate the operation family. It is not admission, authorization, or a guarantee that a particular caller may execute a mutating operation. Implementations should report available() as false when the selected provider is an older implementation that cannot evaluate the public contract.

Instances are immutable and thread-safe.

  • Field Details

    • PAYLOAD_TYPE

      public static final String PAYLOAD_TYPE
      Stable payload type id for capability result envelopes.
      See Also:
    • MAX_CAPABILITIES

      public static final int MAX_CAPABILITIES
      Maximum supported capability entries.
      See Also:
    • MAX_OPERATION_KINDS

      public static final int MAX_OPERATION_KINDS
      Maximum supported operation family entries.
      See Also:
  • Constructor Details

  • Method Details

    • unavailable

      public static NuggetAdminCapabilities unavailable()
      Returns an unavailable capability result for older providers.
      Returns:
      unavailable capability result
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • available

      public boolean available()
      Returns the value of the available record component.
      Returns:
      the value of the available record component
    • protocolVersion

      public int protocolVersion()
      Returns the value of the protocolVersion record component.
      Returns:
      the value of the protocolVersion record component
    • jsonFormatName

      public String jsonFormatName()
      Returns the value of the jsonFormatName record component.
      Returns:
      the value of the jsonFormatName record component
    • jsonFormatVersion

      public int jsonFormatVersion()
      Returns the value of the jsonFormatVersion record component.
      Returns:
      the value of the jsonFormatVersion record component
    • capabilities

      public List<NuggetCapability> capabilities()
      Returns the value of the capabilities record component.
      Returns:
      the value of the capabilities record component
    • operationKinds

      public List<NuggetAdminOperationKind> operationKinds()
      Returns the value of the operationKinds record component.
      Returns:
      the value of the operationKinds record component
    • maxPageLimit

      public int maxPageLimit()
      Returns the value of the maxPageLimit record component.
      Returns:
      the value of the maxPageLimit record component
    • maxMetadataEntries

      public int maxMetadataEntries()
      Returns the value of the maxMetadataEntries record component.
      Returns:
      the value of the maxMetadataEntries record component
    • collectedAt

      public Instant collectedAt()
      Returns the value of the collectedAt record component.
      Returns:
      the value of the collectedAt record component
    • metadata

      public Map<String,String> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component