Class BetaApiKey.Builder
-
- All Implemented Interfaces:
public final class BetaApiKey.BuilderA builder for BetaApiKey.
-
-
Method Summary
Modifier and Type Method Description final BetaApiKey.Builderid(String id)ID of the API key. final BetaApiKey.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final BetaApiKey.BuildercreatedAt(OffsetDateTime createdAt)RFC 3339 datetime string indicating when the API Key was created. final BetaApiKey.BuildercreatedAt(JsonField<OffsetDateTime> createdAt)Sets Builder.createdAt to an arbitrary JSON value. final BetaApiKey.BuildercreatedBy(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 BetaApiKey.BuildercreatedBy(Optional<BetaApiKeyCreatedBy> createdBy)Alias for calling Builder.createdBy with createdBy.orElse(null).final BetaApiKey.BuildercreatedBy(JsonField<BetaApiKeyCreatedBy> createdBy)Sets Builder.createdBy to an arbitrary JSON value. final BetaApiKey.BuilderexpiresAt(OffsetDateTime expiresAt)RFC 3339 datetime string indicating when the API Key expires, or nullif it never expires.final BetaApiKey.BuilderexpiresAt(Optional<OffsetDateTime> expiresAt)Alias for calling Builder.expiresAt with expiresAt.orElse(null).final BetaApiKey.BuilderexpiresAt(JsonField<OffsetDateTime> expiresAt)Sets Builder.expiresAt to an arbitrary JSON value. final BetaApiKey.Buildername(String name)Name of the API key. final BetaApiKey.Buildername(JsonField<String> name)Sets Builder.name to an arbitrary JSON value. final BetaApiKey.BuilderpartialKeyHint(String partialKeyHint)Partially redacted hint for the API key. final BetaApiKey.BuilderpartialKeyHint(Optional<String> partialKeyHint)Alias for calling Builder.partialKeyHint with partialKeyHint.orElse(null).final BetaApiKey.BuilderpartialKeyHint(JsonField<String> partialKeyHint)Sets Builder.partialKeyHint to an arbitrary JSON value. final BetaApiKey.Builderprincipal(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.Builderprincipal(Optional<BetaApiKey.Principal> principal)Alias for calling Builder.principal with principal.orElse(null).final BetaApiKey.Builderprincipal(JsonField<BetaApiKey.Principal> principal)Sets Builder.principal to an arbitrary JSON value. final BetaApiKey.Builderprincipal(BetaApiKeyUserActor userActor)Alias for calling principal with Principal.ofUserActor(userActor).final BetaApiKey.Builderprincipal(BetaApiKeyServiceAccountActor serviceAccountActor)Alias for calling principal with Principal.ofServiceAccountActor(serviceAccountActor).final BetaApiKey.Builderscope(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.final BetaApiKey.Builderscope(JsonField<BetaApiKey.Scope> scope)Sets Builder.scope to an arbitrary JSON value. final BetaApiKey.Builderscope(BetaApiKeyOrganizationScope organization)Alias for calling scope with Scope.ofOrganization(organization).final BetaApiKey.Builderscope(BetaApiKeyWorkspaceScope workspace)Alias for calling scope with Scope.ofWorkspace(workspace).final BetaApiKey.Builderstatus(BetaApiKey.Status status)Status of the API key. final BetaApiKey.Builderstatus(JsonField<BetaApiKey.Status> status)Sets Builder.status to an arbitrary JSON value. final BetaApiKey.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final BetaApiKey.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final BetaApiKey.BuilderuserActorPrincipal(String userId)Alias for calling principal with the following: BetaApiKeyUserActor.builder() .userId(userId) .build()final BetaApiKey.BuilderserviceAccountActorPrincipal(String serviceAccountId)Alias for calling principal with the following: BetaApiKeyServiceAccountActor.builder() .serviceAccountId(serviceAccountId) .build()final BetaApiKey.BuilderworkspaceScope(String workspaceId)Alias for calling scope with the following: BetaApiKeyWorkspaceScope.builder() .workspaceId(workspaceId) .build()final BetaApiKey.BuilderputAdditionalProperty(String key, JsonValue value)final BetaApiKey.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final BetaApiKey.BuilderremoveAdditionalProperty(String key)final BetaApiKey.BuilderremoveAllAdditionalProperties(Set<String> keys)final BetaApiKeybuild()Returns an immutable instance of BetaApiKey. -
-
Method Detail
-
id
final BetaApiKey.Builder id(String id)
ID of the API key.
-
id
final BetaApiKey.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
createdAt
final BetaApiKey.Builder createdAt(OffsetDateTime createdAt)
RFC 3339 datetime string indicating when the API Key was created.
-
createdAt
final BetaApiKey.Builder createdAt(JsonField<OffsetDateTime> createdAt)
Sets Builder.createdAt to an arbitrary JSON value.
You should usually call Builder.createdAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
createdBy
final BetaApiKey.Builder createdBy(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).
-
createdBy
final BetaApiKey.Builder createdBy(Optional<BetaApiKeyCreatedBy> createdBy)
Alias for calling Builder.createdBy with
createdBy.orElse(null).
-
createdBy
final BetaApiKey.Builder createdBy(JsonField<BetaApiKeyCreatedBy> createdBy)
Sets Builder.createdBy to an arbitrary JSON value.
You should usually call Builder.createdBy with a well-typed BetaApiKeyCreatedBy value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
expiresAt
final BetaApiKey.Builder expiresAt(OffsetDateTime expiresAt)
RFC 3339 datetime string indicating when the API Key expires, or
nullif it never expires.
-
expiresAt
final BetaApiKey.Builder expiresAt(Optional<OffsetDateTime> expiresAt)
Alias for calling Builder.expiresAt with
expiresAt.orElse(null).
-
expiresAt
final BetaApiKey.Builder expiresAt(JsonField<OffsetDateTime> expiresAt)
Sets Builder.expiresAt to an arbitrary JSON value.
You should usually call Builder.expiresAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
name
final BetaApiKey.Builder name(String name)
Name of the API key.
-
name
final BetaApiKey.Builder name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value.
You should usually call Builder.name with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
partialKeyHint
final BetaApiKey.Builder partialKeyHint(String partialKeyHint)
Partially redacted hint for the API key.
-
partialKeyHint
final BetaApiKey.Builder partialKeyHint(Optional<String> partialKeyHint)
Alias for calling Builder.partialKeyHint with
partialKeyHint.orElse(null).
-
partialKeyHint
final BetaApiKey.Builder partialKeyHint(JsonField<String> partialKeyHint)
Sets Builder.partialKeyHint to an arbitrary JSON value.
You should usually call Builder.partialKeyHint with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
principal
final BetaApiKey.Builder principal(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.
-
principal
final BetaApiKey.Builder principal(Optional<BetaApiKey.Principal> principal)
Alias for calling Builder.principal with
principal.orElse(null).
-
principal
final BetaApiKey.Builder principal(JsonField<BetaApiKey.Principal> principal)
Sets Builder.principal to an arbitrary JSON value.
You should usually call Builder.principal with a well-typed Principal value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
principal
final BetaApiKey.Builder principal(BetaApiKeyUserActor userActor)
Alias for calling principal with
Principal.ofUserActor(userActor).
-
principal
final BetaApiKey.Builder principal(BetaApiKeyServiceAccountActor serviceAccountActor)
Alias for calling principal with
Principal.ofServiceAccountActor(serviceAccountActor).
-
scope
final BetaApiKey.Builder scope(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.
-
scope
final BetaApiKey.Builder scope(JsonField<BetaApiKey.Scope> scope)
Sets Builder.scope to an arbitrary JSON value.
You should usually call Builder.scope with a well-typed Scope value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
scope
final BetaApiKey.Builder scope(BetaApiKeyOrganizationScope organization)
Alias for calling scope with
Scope.ofOrganization(organization).
-
scope
final BetaApiKey.Builder scope(BetaApiKeyWorkspaceScope workspace)
Alias for calling scope with
Scope.ofWorkspace(workspace).
-
status
final BetaApiKey.Builder status(BetaApiKey.Status status)
Status of the API key.
-
status
final BetaApiKey.Builder status(JsonField<BetaApiKey.Status> status)
Sets Builder.status to an arbitrary JSON value.
You should usually call Builder.status with a well-typed Status value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final BetaApiKey.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("api_key")This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaApiKey.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
userActorPrincipal
final BetaApiKey.Builder userActorPrincipal(String userId)
Alias for calling principal with the following:
BetaApiKeyUserActor.builder() .userId(userId) .build()
-
serviceAccountActorPrincipal
final BetaApiKey.Builder serviceAccountActorPrincipal(String serviceAccountId)
Alias for calling principal with the following:
BetaApiKeyServiceAccountActor.builder() .serviceAccountId(serviceAccountId) .build()
-
workspaceScope
final BetaApiKey.Builder workspaceScope(String workspaceId)
Alias for calling scope with the following:
BetaApiKeyWorkspaceScope.builder() .workspaceId(workspaceId) .build()
-
putAdditionalProperty
final BetaApiKey.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaApiKey.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaApiKey.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaApiKey.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaApiKey build()
Returns an immutable instance of BetaApiKey.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .createdAt() .createdBy() .expiresAt() .name() .partialKeyHint() .principal() .scope() .status()
-
-
-
-