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