Class UserProfileEnforcementActionBan.Builder
-
- All Implemented Interfaces:
public final class UserProfileEnforcementActionBan.BuilderA builder for UserProfileEnforcementActionBan.
-
-
Method Summary
-
-
Method Detail
-
id
final UserProfileEnforcementActionBan.Builder id(String id)
The action's ID (
enac_...), stable while the action is open.
-
id
final UserProfileEnforcementActionBan.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.
-
action
final UserProfileEnforcementActionBan.Builder action(UserProfileEnforcementActionNextStep action)
Always
null: the end user cannot clear a ban.
-
action
final UserProfileEnforcementActionBan.Builder action(Optional<UserProfileEnforcementActionNextStep> action)
Alias for calling Builder.action with
action.orElse(null).
-
action
final UserProfileEnforcementActionBan.Builder action(JsonField<UserProfileEnforcementActionNextStep> action)
Sets Builder.action to an arbitrary JSON value.
You should usually call Builder.action with a well-typed UserProfileEnforcementActionNextStep value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
expiresAt
final UserProfileEnforcementActionBan.Builder expiresAt(OffsetDateTime expiresAt)
Always
null: a ban has no end date.
-
expiresAt
final UserProfileEnforcementActionBan.Builder expiresAt(Optional<OffsetDateTime> expiresAt)
Alias for calling Builder.expiresAt with
expiresAt.orElse(null).
-
expiresAt
final UserProfileEnforcementActionBan.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.
-
openedAt
final UserProfileEnforcementActionBan.Builder openedAt(OffsetDateTime openedAt)
When Anthropic opened the action, in RFC 3339 format.
-
openedAt
final UserProfileEnforcementActionBan.Builder openedAt(JsonField<OffsetDateTime> openedAt)
Sets Builder.openedAt to an arbitrary JSON value.
You should usually call Builder.openedAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
reason
final UserProfileEnforcementActionBan.Builder reason(UserProfileEnforcementActionReason reason)
Why Anthropic placed the limit:
unsupported_region,fraud_or_abuse,high_harm,usage_policy_violation,account_compromiseorunspecified.
-
reason
final UserProfileEnforcementActionBan.Builder reason(JsonField<UserProfileEnforcementActionReason> reason)
Sets Builder.reason to an arbitrary JSON value.
You should usually call Builder.reason with a well-typed UserProfileEnforcementActionReason value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final UserProfileEnforcementActionBan.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("ban")This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final UserProfileEnforcementActionBan.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final UserProfileEnforcementActionBan.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final UserProfileEnforcementActionBan.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final UserProfileEnforcementActionBan.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final UserProfileEnforcementActionBan.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final UserProfileEnforcementActionBan build()
Returns an immutable instance of UserProfileEnforcementActionBan.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .action() .expiresAt() .openedAt() .reason()
-
-
-
-