Class BetaUserProfile.Builder
-
- All Implemented Interfaces:
public final class BetaUserProfile.BuilderA builder for BetaUserProfile.
-
-
Method Summary
Modifier and Type Method Description final BetaUserProfile.Builderid(String id)Unique identifier for this user profile, prefixed uprof_.final BetaUserProfile.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final BetaUserProfile.BuildercreatedAt(OffsetDateTime createdAt)When this user profile was created, in RFC 3339 format. final BetaUserProfile.BuildercreatedAt(JsonField<OffsetDateTime> createdAt)Sets Builder.createdAt to an arbitrary JSON value. final BetaUserProfile.Buildermetadata(BetaUserProfile.Metadata metadata)Arbitrary key-value metadata. final BetaUserProfile.Buildermetadata(JsonField<BetaUserProfile.Metadata> metadata)Sets Builder.metadata to an arbitrary JSON value. final BetaUserProfile.Buildername(String name)Real-world name of the entity this profile represents (company or individual). final BetaUserProfile.Buildername(Optional<String> name)Alias for calling Builder.name with name.orElse(null).final BetaUserProfile.Buildername(JsonField<String> name)Sets Builder.name to an arbitrary JSON value. final BetaUserProfile.BuildertrustGrants(BetaUserProfile.TrustGrants trustGrants)Trust grants for this profile, keyed by grant name. final BetaUserProfile.BuildertrustGrants(JsonField<BetaUserProfile.TrustGrants> trustGrants)Sets Builder.trustGrants to an arbitrary JSON value. final BetaUserProfile.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final BetaUserProfile.BuilderupdatedAt(OffsetDateTime updatedAt)When this user profile was last modified, in RFC 3339 format. final BetaUserProfile.BuilderupdatedAt(JsonField<OffsetDateTime> updatedAt)Sets Builder.updatedAt to an arbitrary JSON value. final BetaUserProfile.BuilderaccessType(BetaUserProfile.AccessType accessType)How the platform uses the API for this entity: application(default) orpassthrough.final BetaUserProfile.BuilderaccessType(JsonField<BetaUserProfile.AccessType> accessType)Sets Builder.accessType to an arbitrary JSON value. final BetaUserProfile.BuilderexternalId(String externalId)Platform's own identifier for this user. final BetaUserProfile.BuilderexternalId(Optional<String> externalId)Alias for calling Builder.externalId with externalId.orElse(null).final BetaUserProfile.BuilderexternalId(JsonField<String> externalId)Sets Builder.externalId to an arbitrary JSON value. final BetaUserProfile.BuilderexternalUserDetails(BetaUserProfileExternalUserDetails externalUserDetails)Details about the entity this profile represents, as the platform states them; not verified by Anthropic. final BetaUserProfile.BuilderexternalUserDetails(JsonField<BetaUserProfileExternalUserDetails> externalUserDetails)Sets Builder.externalUserDetails to an arbitrary JSON value. final BetaUserProfile.BuilderexternalUserOnboardedAt(OffsetDateTime externalUserOnboardedAt)When the entity this profile represents opened its account with the platform, as stated by the platform, in RFC 3339 format (UTC). final BetaUserProfile.BuilderexternalUserOnboardedAt(Optional<OffsetDateTime> externalUserOnboardedAt)Alias for calling Builder.externalUserOnboardedAt with externalUserOnboardedAt.orElse(null).final BetaUserProfile.BuilderexternalUserOnboardedAt(JsonField<OffsetDateTime> externalUserOnboardedAt)Sets Builder.externalUserOnboardedAt to an arbitrary JSON value. final BetaUserProfile.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final BetaUserProfile.BuilderputAdditionalProperty(String key, JsonValue value)final BetaUserProfile.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final BetaUserProfile.BuilderremoveAdditionalProperty(String key)final BetaUserProfile.BuilderremoveAllAdditionalProperties(Set<String> keys)final BetaUserProfilebuild()Returns an immutable instance of BetaUserProfile. -
-
Method Detail
-
id
final BetaUserProfile.Builder id(String id)
Unique identifier for this user profile, prefixed
uprof_.
-
id
final BetaUserProfile.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 BetaUserProfile.Builder createdAt(OffsetDateTime createdAt)
When this user profile was created, in RFC 3339 format.
-
createdAt
final BetaUserProfile.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.
-
metadata
final BetaUserProfile.Builder metadata(BetaUserProfile.Metadata metadata)
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
-
metadata
final BetaUserProfile.Builder metadata(JsonField<BetaUserProfile.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
name
final BetaUserProfile.Builder name(String name)
Real-world name of the entity this profile represents (company or individual). For a company the platform resells Claude access to (
access_typepassthrough) this is that company's name.nulluntil the platform supplies one.
-
name
final BetaUserProfile.Builder name(Optional<String> name)
Alias for calling Builder.name with
name.orElse(null).
-
name
final BetaUserProfile.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.
-
trustGrants
final BetaUserProfile.Builder trustGrants(BetaUserProfile.TrustGrants trustGrants)
Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
-
trustGrants
final BetaUserProfile.Builder trustGrants(JsonField<BetaUserProfile.TrustGrants> trustGrants)
Sets Builder.trustGrants to an arbitrary JSON value.
You should usually call Builder.trustGrants with a well-typed TrustGrants value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final BetaUserProfile.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("user_profile")This method is primarily for setting the field to an undocumented or not yet supported value.
-
updatedAt
final BetaUserProfile.Builder updatedAt(OffsetDateTime updatedAt)
When this user profile was last modified, in RFC 3339 format. It normally also updates shortly after Anthropic gives the profile an approval or withdraws one. Other changes to the statuses that Anthropic reports do not always update it, so read the status itself rather than watching this timestamp.
-
updatedAt
final BetaUserProfile.Builder updatedAt(JsonField<OffsetDateTime> updatedAt)
Sets Builder.updatedAt to an arbitrary JSON value.
You should usually call Builder.updatedAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
accessType
final BetaUserProfile.Builder accessType(BetaUserProfile.AccessType accessType)
How the platform uses the API for this entity:
application(default) orpassthrough. Absent under the legacyuser-profiles-2026-03-24beta header.
-
accessType
final BetaUserProfile.Builder accessType(JsonField<BetaUserProfile.AccessType> accessType)
Sets Builder.accessType to an arbitrary JSON value.
You should usually call Builder.accessType with a well-typed AccessType value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
externalId
final BetaUserProfile.Builder externalId(String externalId)
Platform's own identifier for this user. Not enforced unique. Legacy field, present only under the
user-profiles-2026-03-24anduser-profiles-2026-08-18beta headers; without one of them, the value isexternal_user_details.reference_id.
-
externalId
final BetaUserProfile.Builder externalId(Optional<String> externalId)
Alias for calling Builder.externalId with
externalId.orElse(null).
-
externalId
final BetaUserProfile.Builder externalId(JsonField<String> externalId)
Sets Builder.externalId to an arbitrary JSON value.
You should usually call Builder.externalId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
externalUserDetails
final BetaUserProfile.Builder externalUserDetails(BetaUserProfileExternalUserDetails externalUserDetails)
Details about the entity this profile represents, as the platform states them; not verified by Anthropic. Every field is present,
nulluntil the platform supplies a value. Absent under the legacyuser-profiles-2026-03-24anduser-profiles-2026-08-18beta headers, which servereference_idas the top-levelexternal_idand, underuser-profiles-2026-08-18,onboarded_atasexternal_user_onboarded_at.
-
externalUserDetails
final BetaUserProfile.Builder externalUserDetails(JsonField<BetaUserProfileExternalUserDetails> externalUserDetails)
Sets Builder.externalUserDetails to an arbitrary JSON value.
You should usually call Builder.externalUserDetails with a well-typed BetaUserProfileExternalUserDetails value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
externalUserOnboardedAt
final BetaUserProfile.Builder externalUserOnboardedAt(OffsetDateTime externalUserOnboardedAt)
When the entity this profile represents opened its account with the platform, as stated by the platform, in RFC 3339 format (UTC).
nulluntil the platform supplies one. Legacy field, present only under theuser-profiles-2026-08-18beta header; without a legacy header, the value isexternal_user_details.onboarded_at.
-
externalUserOnboardedAt
final BetaUserProfile.Builder externalUserOnboardedAt(Optional<OffsetDateTime> externalUserOnboardedAt)
Alias for calling Builder.externalUserOnboardedAt with
externalUserOnboardedAt.orElse(null).
-
externalUserOnboardedAt
final BetaUserProfile.Builder externalUserOnboardedAt(JsonField<OffsetDateTime> externalUserOnboardedAt)
Sets Builder.externalUserOnboardedAt to an arbitrary JSON value.
You should usually call Builder.externalUserOnboardedAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaUserProfile.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaUserProfile.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaUserProfile.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaUserProfile.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaUserProfile.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaUserProfile build()
Returns an immutable instance of BetaUserProfile.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .createdAt() .metadata() .name() .trustGrants() .updatedAt()
-
-
-
-