Record Class NuggetAdminTarget
java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetAdminTarget
- Record Components:
nuggetId- stable nugget identityruntimeId- stable runtime identitygeneration- target generation, or0for explicitly documented current/unknown matchingendpointIdentity- optional safe endpoint identity metadataproviderIdentity- optional safe provider identity metadata
public record NuggetAdminTarget(String nuggetId, String runtimeId, long generation, String endpointIdentity, String providerIdentity)
extends Record
Public target identity for an admin request.
The authoritative target fields are nuggetId(),
runtimeId(), and generation(). Display names, endpoint
names, provider identifiers, and CLI prompt text are only metadata and must
not be used as authority for mutation, authorization, or stale-target
acceptance. A generation of 0 means "current or unknown" only for
operations that explicitly document that weaker match. Mutating operations
should use an exact positive generation whenever the provider can supply
one.
Instances are immutable and thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionNuggetAdminTarget(String nuggetId, String runtimeId, long generation, String endpointIdentity, String providerIdentity) Creates a validated target identity. -
Method Summary
Modifier and TypeMethodDescriptionstatic NuggetAdminTargetCreates a target for the current or unknown generation.Returns the value of theendpointIdentityrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thegenerationrecord component.final inthashCode()Returns a hash code value for this object.nuggetId()Returns the value of thenuggetIdrecord component.Returns the value of theproviderIdentityrecord component.Returns the value of theruntimeIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NuggetAdminTarget
-
-
Method Details
-
current
Creates a target for the current or unknown generation.- Parameters:
nuggetId- stable nugget identityruntimeId- stable runtime identity- Returns:
- target with generation
0
-
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. -
nuggetId
-
runtimeId
-
generation
public long generation()Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-
endpointIdentity
Returns the value of theendpointIdentityrecord component.- Returns:
- the value of the
endpointIdentityrecord component
-
providerIdentity
Returns the value of theproviderIdentityrecord component.- Returns:
- the value of the
providerIdentityrecord component
-