Class BetaSpendLimitIncreaseRequestActor
-
- All Implemented Interfaces:
public final class BetaSpendLimitIncreaseRequestActorWho submitted the increase request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaSpendLimitIncreaseRequestActor.VisitorAn interface that defines how to map each variant of BetaSpendLimitIncreaseRequestActor to a value of type T.
public final classBetaSpendLimitIncreaseRequestActor.Type
-
Method Summary
Modifier and Type Method Description final Optional<BetaSpendLimitUserActor>user()A user within the organization. final Optional<BetaSpendLimitScopedApiKeyActor>scopedApiKey()A scoped Admin API key acting on behalf of the organization. final Optional<JsonValue>_json()final BetaSpendLimitIncreaseRequestActor.Typetype()final BooleanisUser()final BooleanisScopedApiKey()final BetaSpendLimitUserActorasUser()A user within the organization. final BetaSpendLimitScopedApiKeyActorasScopedApiKey()A scoped Admin API key acting on behalf of the organization. final <T extends Any> Taccept(BetaSpendLimitIncreaseRequestActor.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaSpendLimitIncreaseRequestActorvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaSpendLimitIncreaseRequestActorofUser(BetaSpendLimitUserActor user)A user within the organization. final static BetaSpendLimitIncreaseRequestActorofScopedApiKey(BetaSpendLimitScopedApiKeyActor scopedApiKey)A scoped Admin API key acting on behalf of the organization. final static BetaSpendLimitIncreaseRequestActorofScopedApiKey(String scopedApiKeyId)Returns an immutable instance of BetaSpendLimitIncreaseRequestActor whose ofScopedApiKey variant is built from the given required scopedApiKeyId. -
-
Method Detail
-
user
final Optional<BetaSpendLimitUserActor> user()
A user within the organization.
nameandemail_addressare null when the underlying account is unavailable or has been deleted;deletedis true only for deleted accounts.
-
scopedApiKey
final Optional<BetaSpendLimitScopedApiKeyActor> scopedApiKey()
A scoped Admin API key acting on behalf of the organization.
-
type
final BetaSpendLimitIncreaseRequestActor.Type type()
-
isScopedApiKey
final Boolean isScopedApiKey()
-
asUser
final BetaSpendLimitUserActor asUser()
A user within the organization.
nameandemail_addressare null when the underlying account is unavailable or has been deleted;deletedis true only for deleted accounts.
-
asScopedApiKey
final BetaSpendLimitScopedApiKeyActor asScopedApiKey()
A scoped Admin API key acting on behalf of the organization.
-
accept
final <T extends Any> T accept(BetaSpendLimitIncreaseRequestActor.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 = betaSpendLimitIncreaseRequestActor.accept(new BetaSpendLimitIncreaseRequestActor.Visitor<Optional<String>>() { @Override public Optional<String> visitUser(BetaSpendLimitUserActor user) { return Optional.of(user.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaSpendLimitIncreaseRequestActor 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.
-
ofUser
final static BetaSpendLimitIncreaseRequestActor ofUser(BetaSpendLimitUserActor user)
A user within the organization.
nameandemail_addressare null when the underlying account is unavailable or has been deleted;deletedis true only for deleted accounts.
-
ofScopedApiKey
final static BetaSpendLimitIncreaseRequestActor ofScopedApiKey(BetaSpendLimitScopedApiKeyActor scopedApiKey)
A scoped Admin API key acting on behalf of the organization.
-
ofScopedApiKey
final static BetaSpendLimitIncreaseRequestActor ofScopedApiKey(String scopedApiKeyId)
Returns an immutable instance of BetaSpendLimitIncreaseRequestActor whose ofScopedApiKey variant is built from the given required scopedApiKeyId.
-
-
-
-