Class SpendLimitIncreaseRequestActor
-
- All Implemented Interfaces:
public final class SpendLimitIncreaseRequestActorWho submitted the increase request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceSpendLimitIncreaseRequestActor.VisitorAn interface that defines how to map each variant of SpendLimitIncreaseRequestActor to a value of type T.
public final classSpendLimitIncreaseRequestActor.Type
-
Method Summary
Modifier and Type Method Description final Optional<SpendLimitUserActor>user()A user within the organization. final Optional<SpendLimitScopedApiKeyActor>scopedApiKey()A scoped Admin API key acting on behalf of the organization. final Optional<JsonValue>_json()final SpendLimitIncreaseRequestActor.Typetype()final BooleanisUser()final BooleanisScopedApiKey()final SpendLimitUserActorasUser()A user within the organization. final SpendLimitScopedApiKeyActorasScopedApiKey()A scoped Admin API key acting on behalf of the organization. final <T extends Any> Taccept(SpendLimitIncreaseRequestActor.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final SpendLimitIncreaseRequestActorvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static SpendLimitIncreaseRequestActorofUser(SpendLimitUserActor user)A user within the organization. final static SpendLimitIncreaseRequestActorofScopedApiKey(SpendLimitScopedApiKeyActor scopedApiKey)A scoped Admin API key acting on behalf of the organization. final static SpendLimitIncreaseRequestActorofScopedApiKey(String scopedApiKeyId)Returns an immutable instance of SpendLimitIncreaseRequestActor whose ofScopedApiKey variant is built from the given required scopedApiKeyId. -
-
Method Detail
-
user
final Optional<SpendLimitUserActor> 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<SpendLimitScopedApiKeyActor> scopedApiKey()
A scoped Admin API key acting on behalf of the organization.
-
type
final SpendLimitIncreaseRequestActor.Type type()
-
isScopedApiKey
final Boolean isScopedApiKey()
-
asUser
final SpendLimitUserActor 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 SpendLimitScopedApiKeyActor asScopedApiKey()
A scoped Admin API key acting on behalf of the organization.
-
accept
final <T extends Any> T accept(SpendLimitIncreaseRequestActor.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 = spendLimitIncreaseRequestActor.accept(new SpendLimitIncreaseRequestActor.Visitor<Optional<String>>() { @Override public Optional<String> visitUser(SpendLimitUserActor user) { return Optional.of(user.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final SpendLimitIncreaseRequestActor 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 SpendLimitIncreaseRequestActor ofUser(SpendLimitUserActor 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 SpendLimitIncreaseRequestActor ofScopedApiKey(SpendLimitScopedApiKeyActor scopedApiKey)
A scoped Admin API key acting on behalf of the organization.
-
ofScopedApiKey
final static SpendLimitIncreaseRequestActor ofScopedApiKey(String scopedApiKeyId)
Returns an immutable instance of SpendLimitIncreaseRequestActor whose ofScopedApiKey variant is built from the given required scopedApiKeyId.
-
-
-
-