Record Class NuggetAdminOperationKind.PayloadBinding

java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetAdminOperationKind.PayloadBinding
Record Components:
payloadClass - exact public DTO class accepted by the binding
payloadType - stable public payload type token used in command envelopes and JSON fixtures
schemaVariantId - stable JSON Schema variant reference for documentation and conformance tests
Enclosing class:
NuggetAdminOperationKind

public static record NuggetAdminOperationKind.PayloadBinding(Class<?> payloadClass, String payloadType, String schemaVariantId) extends Record
Exact payload binding for one operation-family request or result DTO.

The binding uses exact class identity deliberately. It does not accept subclasses, provider implementation DTOs, CLI-private models, maps, arrays, collections, generic JSON nodes, or string command payloads. The schema variant id is documentation/test metadata; production code does not load or validate JSON Schema.

  • Constructor Details

    • PayloadBinding

      public PayloadBinding(Class<?> payloadClass, String payloadType, String schemaVariantId)
      Creates immutable binding metadata.
  • Method Details

    • publicContractValidationCovered

      public boolean publicContractValidationCovered()
      Returns whether the exact payload class is covered by the Java public contract normalizer used by command envelopes.

      This method is intended for contract tests and future binding reviews. A binding without normalizer coverage is not safe to admit because type-correct DTO instances could retain data outside the bounded JSON and semantic contract.

      Returns:
      true when command envelopes can normalize this payload class before retaining it
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • payloadClass

      public Class<?> payloadClass()
      Returns the value of the payloadClass record component.
      Returns:
      the value of the payloadClass record component
    • payloadType

      public String payloadType()
      Returns the value of the payloadType record component.
      Returns:
      the value of the payloadType record component
    • schemaVariantId

      public String schemaVariantId()
      Returns the value of the schemaVariantId record component.
      Returns:
      the value of the schemaVariantId record component