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 contractprotocolVersion- supported public protocol versionjsonFormatName- supported JSON format namejsonFormatVersion- supported JSON format versioncapabilities- supported operation capabilities in stable public orderoperationKinds- supported operation families in stable public ordermaxPageLimit- maximum accepted page limitmaxMetadataEntries- maximum retained safe metadata entriescollectedAt- collection timestampmetadata- 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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum supported capability entries.static final intMaximum supported operation family entries.static final StringStable payload type id for capability result envelopes. -
Constructor Summary
ConstructorsConstructorDescriptionNuggetAdminCapabilities(boolean available, int protocolVersion, String jsonFormatName, int jsonFormatVersion, List<NuggetCapability> capabilities, List<NuggetAdminOperationKind> operationKinds, int maxPageLimit, int maxMetadataEntries, Instant collectedAt, Map<String, String> metadata) Creates immutable capability metadata. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theavailablerecord component.Returns the value of thecapabilitiesrecord component.Returns the value of thecollectedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thejsonFormatNamerecord component.intReturns the value of thejsonFormatVersionrecord component.intReturns the value of themaxMetadataEntriesrecord component.intReturns the value of themaxPageLimitrecord component.metadata()Returns the value of themetadatarecord component.Returns the value of theoperationKindsrecord component.intReturns the value of theprotocolVersionrecord component.final StringtoString()Returns a string representation of this record class.static NuggetAdminCapabilitiesReturns an unavailable capability result for older providers.
-
Field Details
-
PAYLOAD_TYPE
Stable payload type id for capability result envelopes.- See Also:
-
MAX_CAPABILITIES
public static final int MAX_CAPABILITIESMaximum supported capability entries.- See Also:
-
MAX_OPERATION_KINDS
public static final int MAX_OPERATION_KINDSMaximum supported operation family entries.- See Also:
-
-
Constructor Details
-
NuggetAdminCapabilities
public 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) Creates immutable capability metadata.
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
available
-
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
jsonFormatName
Returns the value of thejsonFormatNamerecord component.- Returns:
- the value of the
jsonFormatNamerecord component
-
jsonFormatVersion
public int jsonFormatVersion()Returns the value of thejsonFormatVersionrecord component.- Returns:
- the value of the
jsonFormatVersionrecord component
-
capabilities
Returns the value of thecapabilitiesrecord component.- Returns:
- the value of the
capabilitiesrecord component
-
operationKinds
Returns the value of theoperationKindsrecord component.- Returns:
- the value of the
operationKindsrecord component
-
maxPageLimit
public int maxPageLimit()Returns the value of themaxPageLimitrecord component.- Returns:
- the value of the
maxPageLimitrecord component
-
maxMetadataEntries
public int maxMetadataEntries()Returns the value of themaxMetadataEntriesrecord component.- Returns:
- the value of the
maxMetadataEntriesrecord component
-
collectedAt
Returns the value of thecollectedAtrecord component.- Returns:
- the value of the
collectedAtrecord component
-
metadata