Package dev.dokimos.server.dto.v1
Record Class CreateApiKeyRequest
java.lang.Object
java.lang.Record
dev.dokimos.server.dto.v1.CreateApiKeyRequest
- Record Components:
name- human-readable label for the key (required)role- privilege level granted to callers presenting the key (required)tenantId- tenant the key is scoped to, or null for an unscoped key
public record CreateApiKeyRequest(@NotBlank String name, @NotNull Role role, String tenantId)
extends Record
Request to mint a scoped API key. The server generates the raw key, hashes it, and stores only the
hash; the raw key is returned exactly once in the response.
-
Constructor Summary
ConstructorsConstructorDescriptionCreateApiKeyRequest(@NotBlank String name, @NotNull Role role, String tenantId) Creates an instance of aCreateApiKeyRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotBlank Stringname()Returns the value of thenamerecord component.@NotNull Rolerole()Returns the value of therolerecord component.tenantId()Returns the value of thetenantIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
tenantId
Returns the value of thetenantIdrecord component.- Returns:
- the value of the
tenantIdrecord component
-