Class SpendLimitIncreaseRequestResolvedBy
-
- All Implemented Interfaces:
public final class SpendLimitIncreaseRequestResolvedByWho approved or denied the increase request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceSpendLimitIncreaseRequestResolvedBy.VisitorAn interface that defines how to map each variant of SpendLimitIncreaseRequestResolvedBy to a value of type T.
public final classSpendLimitIncreaseRequestResolvedBy.Type
-
Method Summary
Modifier and Type Method Description final Optional<SpendLimitUserActor>userActor()A user within the organization. final Optional<SpendLimitScopedApiKeyActor>scopedApiKeyActor()A scoped Admin API key acting on behalf of the organization. final Optional<JsonValue>_json()final SpendLimitIncreaseRequestResolvedBy.Typetype()final BooleanisUserActor()final BooleanisScopedApiKeyActor()final SpendLimitUserActorasUserActor()A user within the organization. final SpendLimitScopedApiKeyActorasScopedApiKeyActor()A scoped Admin API key acting on behalf of the organization. final <T extends Any> Taccept(SpendLimitIncreaseRequestResolvedBy.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final SpendLimitIncreaseRequestResolvedByvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static SpendLimitIncreaseRequestResolvedByofUserActor(SpendLimitUserActor userActor)A user within the organization. final static SpendLimitIncreaseRequestResolvedByofScopedApiKeyActor(SpendLimitScopedApiKeyActor scopedApiKeyActor)A scoped Admin API key acting on behalf of the organization. final static SpendLimitIncreaseRequestResolvedByofScopedApiKeyActor(String scopedApiKeyId)Returns an immutable instance of SpendLimitIncreaseRequestResolvedBy whose ofScopedApiKeyActor variant is built from the given required scopedApiKeyId. -
-
Method Detail
-
userActor
final Optional<SpendLimitUserActor> userActor()
A user within the organization.
nameandemail_addressare null when the underlying account is unavailable or has been deleted;deletedis true only for deleted accounts.
-
scopedApiKeyActor
final Optional<SpendLimitScopedApiKeyActor> scopedApiKeyActor()
A scoped Admin API key acting on behalf of the organization.
-
type
final SpendLimitIncreaseRequestResolvedBy.Type type()
-
isUserActor
final Boolean isUserActor()
-
isScopedApiKeyActor
final Boolean isScopedApiKeyActor()
-
asUserActor
final SpendLimitUserActor asUserActor()
A user within the organization.
nameandemail_addressare null when the underlying account is unavailable or has been deleted;deletedis true only for deleted accounts.
-
asScopedApiKeyActor
final SpendLimitScopedApiKeyActor asScopedApiKeyActor()
A scoped Admin API key acting on behalf of the organization.
-
accept
final <T extends Any> T accept(SpendLimitIncreaseRequestResolvedBy.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 = spendLimitIncreaseRequestResolvedBy.accept(new SpendLimitIncreaseRequestResolvedBy.Visitor<Optional<String>>() { @Override public Optional<String> visitUserActor(SpendLimitUserActor userActor) { return Optional.of(userActor.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final SpendLimitIncreaseRequestResolvedBy 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.
-
ofUserActor
final static SpendLimitIncreaseRequestResolvedBy ofUserActor(SpendLimitUserActor userActor)
A user within the organization.
nameandemail_addressare null when the underlying account is unavailable or has been deleted;deletedis true only for deleted accounts.
-
ofScopedApiKeyActor
final static SpendLimitIncreaseRequestResolvedBy ofScopedApiKeyActor(SpendLimitScopedApiKeyActor scopedApiKeyActor)
A scoped Admin API key acting on behalf of the organization.
-
ofScopedApiKeyActor
final static SpendLimitIncreaseRequestResolvedBy ofScopedApiKeyActor(String scopedApiKeyId)
Returns an immutable instance of SpendLimitIncreaseRequestResolvedBy whose ofScopedApiKeyActor variant is built from the given required scopedApiKeyId.
-
-
-
-