Record Class RoleTemplateCatalog.Assignment
java.lang.Object
java.lang.Record
zeroecho.pki.server.RoleTemplateCatalog.Assignment
- Record Components:
assignmentId- stable assignment identifierprincipalId- grantee principaltemplateId- exact template identifiertemplateVersion- exact template versionscope- non-wildcard realm and optional subscopesexpiresAt- optional mandatory assignment expiryenabled- whether the assignment participates in authorization
- Enclosing class:
RoleTemplateCatalog
-
Constructor Summary
ConstructorsConstructorDescriptionAssignment(String assignmentId, String principalId, String templateId, int templateVersion, Permission.Scope scope, boolean enabled) Creates an assignment without an expiry for existing embedded callers.Assignment(String assignmentId, String principalId, String templateId, int templateVersion, Permission.Scope scope, Optional<Instant> expiresAt, boolean enabled) Validates the exact scoped assignment. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassignmentIdrecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theprincipalIdrecord component.scope()Returns the value of thescoperecord component.Returns the value of thetemplateIdrecord component.intReturns the value of thetemplateVersionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Assignment
-
Assignment
public Assignment(String assignmentId, String principalId, String templateId, int templateVersion, Permission.Scope scope, boolean enabled) Creates an assignment without an expiry for existing embedded callers.- Parameters:
assignmentId- stable assignment identifierprincipalId- grantee principaltemplateId- exact template identifiertemplateVersion- exact template versionscope- non-wildcard realm and optional subscopesenabled- whether the assignment participates in authorization
-
-
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. -
assignmentId
Returns the value of theassignmentIdrecord component.- Returns:
- the value of the
assignmentIdrecord component
-
principalId
Returns the value of theprincipalIdrecord component.- Returns:
- the value of the
principalIdrecord component
-
templateId
Returns the value of thetemplateIdrecord component.- Returns:
- the value of the
templateIdrecord component
-
templateVersion
public int templateVersion()Returns the value of thetemplateVersionrecord component.- Returns:
- the value of the
templateVersionrecord component
-
scope
-
expiresAt
-
enabled
-