Class BetaUserProfileAction
-
- All Implemented Interfaces:
public final class BetaUserProfileActionThe action that the person who opens the URL takes, discriminated by
type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaUserProfileAction.VisitorAn interface that defines how to map each variant of BetaUserProfileAction to a value of type T.
public final classBetaUserProfileAction.Type
-
Method Summary
Modifier and Type Method Description final Optional<BetaUserProfileEnrollEndUserAction>enrollEndUser()The end-user that the profile represents enrolls in a program. final Optional<JsonValue>_json()final BetaUserProfileAction.Typetype()final BooleanisEnrollEndUser()final BetaUserProfileEnrollEndUserActionasEnrollEndUser()The end-user that the profile represents enrolls in a program. final <T extends Any> Taccept(BetaUserProfileAction.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaUserProfileActionvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaUserProfileActionofEnrollEndUser(BetaUserProfileEnrollEndUserAction enrollEndUser)The end-user that the profile represents enrolls in a program. -
-
Method Detail
-
enrollEndUser
final Optional<BetaUserProfileEnrollEndUserAction> enrollEndUser()
The end-user that the profile represents enrolls in a program.
-
type
final BetaUserProfileAction.Type type()
-
isEnrollEndUser
final Boolean isEnrollEndUser()
-
asEnrollEndUser
final BetaUserProfileEnrollEndUserAction asEnrollEndUser()
The end-user that the profile represents enrolls in a program.
-
accept
final <T extends Any> T accept(BetaUserProfileAction.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.anthropic.core.JsonValue; import java.util.Optional; Optional<String> result = betaUserProfileAction.accept(new BetaUserProfileAction.Visitor<Optional<String>>() { @Override public Optional<String> visitEnrollEndUser(BetaUserProfileEnrollEndUserAction enrollEndUser) { return Optional.of(enrollEndUser.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaUserProfileAction 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.
-
ofEnrollEndUser
final static BetaUserProfileAction ofEnrollEndUser(BetaUserProfileEnrollEndUserAction enrollEndUser)
The end-user that the profile represents enrolls in a program.
-
-
-
-