Class BetaSpendSummary.Source
-
- All Implemented Interfaces:
public final class BetaSpendSummary.Source
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaSpendSummary.Source.VisitorAn interface that defines how to map each variant of Source to a value of type T.
public final classBetaSpendSummary.Source.Type
-
Method Summary
Modifier and Type Method Description final Optional<BetaSpendLimitUserScope>user()Scope selecting a single member of the organization. final Optional<BetaSpendLimitSeatTierScope>seatTier()final Optional<BetaSpendLimitRbacGroupScope>rbacGroup()final Optional<BetaSpendLimitOrganizationServiceScope>organizationService()final Optional<BetaSpendLimitOrganizationScope>organization()final Optional<BetaSpendLimitWorkspaceScope>workspace()Scope selecting one workspace of a Claude Console organization. final Optional<BetaSpendLimitUsageTierScope>usageTier()Scope of the monthly spend cap Anthropic sets for a Claude Console organization from its usage tier, or a higher cap Anthropic granted the organization. final Optional<JsonValue>_json()final BetaSpendSummary.Source.Typetype()final BooleanisUser()final BooleanisSeatTier()final BooleanisRbacGroup()final BooleanisOrganizationService()final BooleanisOrganization()final BooleanisWorkspace()final BooleanisUsageTier()final BetaSpendLimitUserScopeasUser()Scope selecting a single member of the organization. final BetaSpendLimitSeatTierScopeasSeatTier()final BetaSpendLimitRbacGroupScopeasRbacGroup()final BetaSpendLimitOrganizationServiceScopeasOrganizationService()final BetaSpendLimitOrganizationScopeasOrganization()final BetaSpendLimitWorkspaceScopeasWorkspace()Scope selecting one workspace of a Claude Console organization. final BetaSpendLimitUsageTierScopeasUsageTier()Scope of the monthly spend cap Anthropic sets for a Claude Console organization from its usage tier, or a higher cap Anthropic granted the organization. final <T extends Any> Taccept(BetaSpendSummary.Source.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaSpendSummary.Sourcevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaSpendSummary.SourceofUser(BetaSpendLimitUserScope user)Scope selecting a single member of the organization. final static BetaSpendSummary.SourceofUser(String userId)Returns an immutable instance of Source whose ofUser variant is built from the given required userId. final static BetaSpendSummary.SourceofSeatTier(BetaSpendLimitSeatTierScope seatTier)final static BetaSpendSummary.SourceofSeatTier(String seatTier)Returns an immutable instance of Source whose ofSeatTier variant is built from the given required seatTier. final static BetaSpendSummary.SourceofRbacGroup(BetaSpendLimitRbacGroupScope rbacGroup)final static BetaSpendSummary.SourceofRbacGroup(String rbacGroupId)Returns an immutable instance of Source whose ofRbacGroup variant is built from the given required rbacGroupId. final static BetaSpendSummary.SourceofOrganizationService(BetaSpendLimitOrganizationServiceScope organizationService)final static BetaSpendSummary.SourceofOrganizationService(String service)Returns an immutable instance of Source whose ofOrganizationService variant is built from the given required service. final static BetaSpendSummary.SourceofOrganization(BetaSpendLimitOrganizationScope organization)final static BetaSpendSummary.SourceofWorkspace(BetaSpendLimitWorkspaceScope workspace)Scope selecting one workspace of a Claude Console organization. final static BetaSpendSummary.SourceofWorkspace(String workspaceId)Returns an immutable instance of Source whose ofWorkspace variant is built from the given required workspaceId. final static BetaSpendSummary.SourceofUsageTier(BetaSpendLimitUsageTierScope usageTier)Scope of the monthly spend cap Anthropic sets for a Claude Console organization from its usage tier, or a higher cap Anthropic granted the organization. -
-
Method Detail
-
user
final Optional<BetaSpendLimitUserScope> user()
Scope selecting a single member of the organization.
-
seatTier
final Optional<BetaSpendLimitSeatTierScope> seatTier()
-
rbacGroup
final Optional<BetaSpendLimitRbacGroupScope> rbacGroup()
-
organizationService
final Optional<BetaSpendLimitOrganizationServiceScope> organizationService()
-
organization
final Optional<BetaSpendLimitOrganizationScope> organization()
-
workspace
final Optional<BetaSpendLimitWorkspaceScope> workspace()
Scope selecting one workspace of a Claude Console organization.
-
usageTier
final Optional<BetaSpendLimitUsageTierScope> usageTier()
Scope of the monthly spend cap Anthropic sets for a Claude Console organization from its usage tier, or a higher cap Anthropic granted the organization. Read-only; its
created_atandupdated_atare the organization's creation time, soamountcan change whileupdated_atstays the same.
-
type
final BetaSpendSummary.Source.Type type()
-
isSeatTier
final Boolean isSeatTier()
-
isRbacGroup
final Boolean isRbacGroup()
-
isOrganizationService
final Boolean isOrganizationService()
-
isOrganization
final Boolean isOrganization()
-
isWorkspace
final Boolean isWorkspace()
-
isUsageTier
final Boolean isUsageTier()
-
asUser
final BetaSpendLimitUserScope asUser()
Scope selecting a single member of the organization.
-
asSeatTier
final BetaSpendLimitSeatTierScope asSeatTier()
-
asRbacGroup
final BetaSpendLimitRbacGroupScope asRbacGroup()
-
asOrganizationService
final BetaSpendLimitOrganizationServiceScope asOrganizationService()
-
asOrganization
final BetaSpendLimitOrganizationScope asOrganization()
-
asWorkspace
final BetaSpendLimitWorkspaceScope asWorkspace()
Scope selecting one workspace of a Claude Console organization.
-
asUsageTier
final BetaSpendLimitUsageTierScope asUsageTier()
Scope of the monthly spend cap Anthropic sets for a Claude Console organization from its usage tier, or a higher cap Anthropic granted the organization. Read-only; its
created_atandupdated_atare the organization's creation time, soamountcan change whileupdated_atstays the same.
-
accept
final <T extends Any> T accept(BetaSpendSummary.Source.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 = source.accept(new Source.Visitor<Optional<String>>() { @Override public Optional<String> visitUser(BetaSpendLimitUserScope user) { return Optional.of(user.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaSpendSummary.Source 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 BetaSpendSummary.Source ofUser(BetaSpendLimitUserScope user)
Scope selecting a single member of the organization.
-
ofUser
final static BetaSpendSummary.Source ofUser(String userId)
Returns an immutable instance of Source whose ofUser variant is built from the given required userId.
-
ofSeatTier
final static BetaSpendSummary.Source ofSeatTier(BetaSpendLimitSeatTierScope seatTier)
-
ofSeatTier
final static BetaSpendSummary.Source ofSeatTier(String seatTier)
Returns an immutable instance of Source whose ofSeatTier variant is built from the given required seatTier.
-
ofRbacGroup
final static BetaSpendSummary.Source ofRbacGroup(BetaSpendLimitRbacGroupScope rbacGroup)
-
ofRbacGroup
final static BetaSpendSummary.Source ofRbacGroup(String rbacGroupId)
Returns an immutable instance of Source whose ofRbacGroup variant is built from the given required rbacGroupId.
-
ofOrganizationService
final static BetaSpendSummary.Source ofOrganizationService(BetaSpendLimitOrganizationServiceScope organizationService)
-
ofOrganizationService
final static BetaSpendSummary.Source ofOrganizationService(String service)
Returns an immutable instance of Source whose ofOrganizationService variant is built from the given required service.
-
ofOrganization
final static BetaSpendSummary.Source ofOrganization(BetaSpendLimitOrganizationScope organization)
-
ofWorkspace
final static BetaSpendSummary.Source ofWorkspace(BetaSpendLimitWorkspaceScope workspace)
Scope selecting one workspace of a Claude Console organization.
-
ofWorkspace
final static BetaSpendSummary.Source ofWorkspace(String workspaceId)
Returns an immutable instance of Source whose ofWorkspace variant is built from the given required workspaceId.
-
ofUsageTier
final static BetaSpendSummary.Source ofUsageTier(BetaSpendLimitUsageTierScope usageTier)
Scope of the monthly spend cap Anthropic sets for a Claude Console organization from its usage tier, or a higher cap Anthropic granted the organization. Read-only; its
created_atandupdated_atare the organization's creation time, soamountcan change whileupdated_atstays the same.
-
-
-
-