Package ai.shipeasy.admin.model
Class CreateKeyResponse
java.lang.Object
ai.shipeasy.admin.model.CreateKeyResponse
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class CreateKeyResponse
extends Object
The minted key. The plaintext `key` is returned **once**, here — it is stored hashed and can never be retrieved again.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumEnvironment the key is bound to (`prod` for `admin`/`ops`).static enumThe kind of key that was minted. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic CreateKeyResponseCreate an instance of CreateKeyResponse given an JSON stringgetEnv()Environment the key is bound to (`prod` for `admin`/`ops`).ISO-8601 expiry, or `null` if the key never expires.getId()Stable opaque key id (UUID).getKey()The plaintext API token (e.g.getType()The kind of key that was minted.inthashCode()voidvoidsetExpiresAt(String expiresAt) voidvoidvoidtoJson()Convert an instance of CreateKeyResponse to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_ENV
- See Also:
-
SERIALIZED_NAME_KEY
- See Also:
-
SERIALIZED_NAME_EXPIRES_AT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CreateKeyResponse
public CreateKeyResponse()
-
-
Method Details
-
id
-
getId
Stable opaque key id (UUID). Use it to revoke the key.- Returns:
- id
-
setId
-
type
-
getType
The kind of key that was minted.- Returns:
- type
-
setType
-
env
-
getEnv
Environment the key is bound to (`prod` for `admin`/`ops`).- Returns:
- env
-
setEnv
-
key
-
getKey
The plaintext API token (e.g. `sdk_server_…`). Returned once — store it now; it cannot be recovered.- Returns:
- key
-
setKey
-
expiresAt
-
getExpiresAt
ISO-8601 expiry, or `null` if the key never expires.- Returns:
- expiresAt
-
setExpiresAt
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to CreateKeyResponse
-
fromJson
Create an instance of CreateKeyResponse given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateKeyResponse
- Throws:
IOException- if the JSON string is invalid with respect to CreateKeyResponse
-
toJson
Convert an instance of CreateKeyResponse to an JSON string- Returns:
- JSON string
-