Class BetaApiKey
-
- All Implemented Interfaces:
public final class BetaApiKey
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaApiKey.BuilderA builder for BetaApiKey.
public final classBetaApiKey.PrincipalThe principal the API key acts as (a User or a Service Account), or
nullif the API key is not bound to a principal.public final classBetaApiKey.ScopeWhere the API key belongs: its Workspace (
{"type": "workspace", "workspace_id": "wrkspc_..."}, with the Workspace's real ID even when it is the organization's default Workspace), or the organization ({"type": "organization"}) for a principal-bound API key that has no Workspace.public final classBetaApiKey.StatusStatus of the API key.
-
Method Summary
Modifier and Type Method Description final Stringid()ID of the API key. final OffsetDateTimecreatedAt()RFC 3339 datetime string indicating when the API Key was created. final Optional<BetaApiKeyCreatedBy>createdBy()The ID and type of the actor that created the API key, or nullwhen the creator is not recorded (legacy, workload-identity-federated, or system-created keys).final Optional<OffsetDateTime>expiresAt()RFC 3339 datetime string indicating when the API Key expires, or nullif it never expires.final Stringname()Name of the API key. final Optional<String>partialKeyHint()Partially redacted hint for the API key. final Optional<BetaApiKey.Principal>principal()The principal the API key acts as (a User or a Service Account), or nullif the API key is not bound to a principal.final BetaApiKey.Scopescope()Where the API key belongs: its Workspace ( {"type": "workspace", "workspace_id": "wrkspc_..."}, with the Workspace's real ID even when it is the organization's default Workspace), or the organization ({"type": "organization"}) for a principal-bound API key that has no Workspace.final BetaApiKey.Statusstatus()Status of the API key. final JsonValue_type()Object type. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<OffsetDateTime>_createdAt()Returns the raw JSON value of createdAt. final JsonField<BetaApiKeyCreatedBy>_createdBy()Returns the raw JSON value of createdBy. final JsonField<OffsetDateTime>_expiresAt()Returns the raw JSON value of expiresAt. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<String>_partialKeyHint()Returns the raw JSON value of partialKeyHint. final JsonField<BetaApiKey.Principal>_principal()Returns the raw JSON value of principal. final JsonField<BetaApiKey.Scope>_scope()Returns the raw JSON value of scope. final JsonField<BetaApiKey.Status>_status()Returns the raw JSON value of status. final Map<String, JsonValue>_additionalProperties()final BetaApiKey.BuildertoBuilder()final BetaApiKeyvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaApiKey.Builderbuilder()Returns a mutable builder for constructing an instance of BetaApiKey. -
-
Method Detail
-
createdAt
final OffsetDateTime createdAt()
RFC 3339 datetime string indicating when the API Key was created.
-
createdBy
final Optional<BetaApiKeyCreatedBy> createdBy()
The ID and type of the actor that created the API key, or
nullwhen the creator is not recorded (legacy, workload-identity-federated, or system-created keys).
-
expiresAt
final Optional<OffsetDateTime> expiresAt()
RFC 3339 datetime string indicating when the API Key expires, or
nullif it never expires.
-
partialKeyHint
final Optional<String> partialKeyHint()
Partially redacted hint for the API key.
-
principal
final Optional<BetaApiKey.Principal> principal()
The principal the API key acts as (a User or a Service Account), or
nullif the API key is not bound to a principal.
-
scope
final BetaApiKey.Scope scope()
Where the API key belongs: its Workspace (
{"type": "workspace", "workspace_id": "wrkspc_..."}, with the Workspace's real ID even when it is the organization's default Workspace), or the organization ({"type": "organization"}) for a principal-bound API key that has no Workspace.
-
status
final BetaApiKey.Status status()
Status of the API key.
-
_type
final JsonValue _type()
Object type.
For API Keys, this is always
"api_key".Expected to always return the following:
JsonValue.from("api_key")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_createdAt
final JsonField<OffsetDateTime> _createdAt()
Returns the raw JSON value of createdAt.
Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.
-
_createdBy
final JsonField<BetaApiKeyCreatedBy> _createdBy()
Returns the raw JSON value of createdBy.
Unlike createdBy, this method doesn't throw if the JSON field has an unexpected type.
-
_expiresAt
final JsonField<OffsetDateTime> _expiresAt()
Returns the raw JSON value of expiresAt.
Unlike expiresAt, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_partialKeyHint
final JsonField<String> _partialKeyHint()
Returns the raw JSON value of partialKeyHint.
Unlike partialKeyHint, this method doesn't throw if the JSON field has an unexpected type.
-
_principal
final JsonField<BetaApiKey.Principal> _principal()
Returns the raw JSON value of principal.
Unlike principal, this method doesn't throw if the JSON field has an unexpected type.
-
_scope
final JsonField<BetaApiKey.Scope> _scope()
Returns the raw JSON value of scope.
Unlike scope, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<BetaApiKey.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaApiKey.Builder toBuilder()
-
validate
final BetaApiKey validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaApiKey.Builder builder()
Returns a mutable builder for constructing an instance of BetaApiKey.
The following fields are required:
.id() .createdAt() .createdBy() .expiresAt() .name() .partialKeyHint() .principal() .scope() .status()
-
-
-
-