Class BetaSpendLimit.Builder
-
- All Implemented Interfaces:
public final class BetaSpendLimit.BuilderA builder for BetaSpendLimit.
-
-
Method Summary
Modifier and Type Method Description final BetaSpendLimit.Builderid(String id)Unique tagged ID of the spend limit ( spl_...).final BetaSpendLimit.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final BetaSpendLimit.Builderamount(String amount)Limit amount as a non-negative integer decimal string in the minor unit of currency(cents for USD): "50000" is $500.00.final BetaSpendLimit.Builderamount(Optional<String> amount)Alias for calling Builder.amount with amount.orElse(null).final BetaSpendLimit.Builderamount(JsonField<String> amount)Sets Builder.amount to an arbitrary JSON value. final BetaSpendLimit.BuildercreatedAt(OffsetDateTime createdAt)RFC 3339 datetime at which the spend limit was created. final BetaSpendLimit.BuildercreatedAt(JsonField<OffsetDateTime> createdAt)Sets Builder.createdAt to an arbitrary JSON value. final BetaSpendLimit.Buildercurrency(String currency)ISO 4217 code of the organization's billing currency; the unit for amount.final BetaSpendLimit.Buildercurrency(JsonField<String> currency)Sets Builder.currency to an arbitrary JSON value. final BetaSpendLimit.BuilderisEnabled(Boolean isEnabled)Read-only. final BetaSpendLimit.BuilderisEnabled(JsonField<Boolean> isEnabled)Sets Builder.isEnabled to an arbitrary JSON value. final BetaSpendLimit.Builderperiod(BetaSpendLimitPeriod period)Length of the window the limit resets over. final BetaSpendLimit.Builderperiod(JsonField<BetaSpendLimitPeriod> period)Sets Builder.period to an arbitrary JSON value. final BetaSpendLimit.Builderscope(BetaSpendLimit.Scope scope)What the limit applies to. final BetaSpendLimit.Builderscope(JsonField<BetaSpendLimit.Scope> scope)Sets Builder.scope to an arbitrary JSON value. final BetaSpendLimit.Builderscope(BetaSpendLimitUserScope user)Alias for calling scope with Scope.ofUser(user).final BetaSpendLimit.Builderscope(BetaSpendLimitSeatTierScope seatTier)Alias for calling scope with Scope.ofSeatTier(seatTier).final BetaSpendLimit.Builderscope(BetaSpendLimitRbacGroupScope rbacGroup)Alias for calling scope with Scope.ofRbacGroup(rbacGroup).final BetaSpendLimit.Builderscope(BetaSpendLimitOrganizationServiceScope organizationService)Alias for calling scope with Scope.ofOrganizationService(organizationService).final BetaSpendLimit.Builderscope(BetaSpendLimitOrganizationScope organization)Alias for calling scope with Scope.ofOrganization(organization).final BetaSpendLimit.Builderscope(BetaSpendLimitWorkspaceScope workspace)Alias for calling scope with Scope.ofWorkspace(workspace).final BetaSpendLimit.Builderscope(BetaSpendLimitUsageTierScope usageTier)Alias for calling scope with Scope.ofUsageTier(usageTier).final BetaSpendLimit.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final BetaSpendLimit.BuilderupdatedAt(OffsetDateTime updatedAt)RFC 3339 datetime at which the spend limit was last modified. final BetaSpendLimit.BuilderupdatedAt(JsonField<OffsetDateTime> updatedAt)Sets Builder.updatedAt to an arbitrary JSON value. final BetaSpendLimit.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final BetaSpendLimit.BuilderuserScope(String userId)Alias for calling scope with the following: BetaSpendLimitUserScope.builder() .userId(userId) .build()final BetaSpendLimit.BuilderseatTierScope(String seatTier)Alias for calling scope with the following: BetaSpendLimitSeatTierScope.builder() .seatTier(seatTier) .build()final BetaSpendLimit.BuilderrbacGroupScope(String rbacGroupId)Alias for calling scope with the following: BetaSpendLimitRbacGroupScope.builder() .rbacGroupId(rbacGroupId) .build()final BetaSpendLimit.BuilderorganizationServiceScope(String service)Alias for calling scope with the following: BetaSpendLimitOrganizationServiceScope.builder() .service(service) .build()final BetaSpendLimit.BuilderworkspaceScope(String workspaceId)Alias for calling scope with the following: BetaSpendLimitWorkspaceScope.builder() .workspaceId(workspaceId) .build()final BetaSpendLimit.BuilderputAdditionalProperty(String key, JsonValue value)final BetaSpendLimit.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final BetaSpendLimit.BuilderremoveAdditionalProperty(String key)final BetaSpendLimit.BuilderremoveAllAdditionalProperties(Set<String> keys)final BetaSpendLimitbuild()Returns an immutable instance of BetaSpendLimit. -
-
Method Detail
-
id
final BetaSpendLimit.Builder id(String id)
Unique tagged ID of the spend limit (
spl_...).
-
id
final BetaSpendLimit.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
amount
final BetaSpendLimit.Builder amount(String amount)
Limit amount as a non-negative integer decimal string in the minor unit of
currency(cents for USD): "50000" is $500.00.nullmeans no numeric cap is configured at this scope — see the effective report for whether a limit applies.
-
amount
final BetaSpendLimit.Builder amount(Optional<String> amount)
Alias for calling Builder.amount with
amount.orElse(null).
-
amount
final BetaSpendLimit.Builder amount(JsonField<String> amount)
Sets Builder.amount to an arbitrary JSON value.
You should usually call Builder.amount with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
createdAt
final BetaSpendLimit.Builder createdAt(OffsetDateTime createdAt)
RFC 3339 datetime at which the spend limit was created.
-
createdAt
final BetaSpendLimit.Builder createdAt(JsonField<OffsetDateTime> createdAt)
Sets Builder.createdAt to an arbitrary JSON value.
You should usually call Builder.createdAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
currency
final BetaSpendLimit.Builder currency(String currency)
ISO 4217 code of the organization's billing currency; the unit for
amount.
-
currency
final BetaSpendLimit.Builder currency(JsonField<String> currency)
Sets Builder.currency to an arbitrary JSON value.
You should usually call Builder.currency with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
isEnabled
final BetaSpendLimit.Builder isEnabled(Boolean isEnabled)
Read-only.
falsewhen extra usage is switched off for this organization (organizationlimit);amountis kept and applies again when it's switched back on. Alwaystruefor other limits.
-
isEnabled
final BetaSpendLimit.Builder isEnabled(JsonField<Boolean> isEnabled)
Sets Builder.isEnabled to an arbitrary JSON value.
You should usually call Builder.isEnabled with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
period
final BetaSpendLimit.Builder period(BetaSpendLimitPeriod period)
Length of the window the limit resets over.
amountcaps spend within each period.
-
period
final BetaSpendLimit.Builder period(JsonField<BetaSpendLimitPeriod> period)
Sets Builder.period to an arbitrary JSON value.
You should usually call Builder.period with a well-typed BetaSpendLimitPeriod value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
scope
final BetaSpendLimit.Builder scope(BetaSpendLimit.Scope scope)
What the limit applies to. A tagged union on
type; each variant carries the identifier for its scope.
-
scope
final BetaSpendLimit.Builder scope(JsonField<BetaSpendLimit.Scope> scope)
Sets Builder.scope to an arbitrary JSON value.
You should usually call Builder.scope with a well-typed Scope value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
scope
final BetaSpendLimit.Builder scope(BetaSpendLimitUserScope user)
Alias for calling scope with
Scope.ofUser(user).
-
scope
final BetaSpendLimit.Builder scope(BetaSpendLimitSeatTierScope seatTier)
Alias for calling scope with
Scope.ofSeatTier(seatTier).
-
scope
final BetaSpendLimit.Builder scope(BetaSpendLimitRbacGroupScope rbacGroup)
Alias for calling scope with
Scope.ofRbacGroup(rbacGroup).
-
scope
final BetaSpendLimit.Builder scope(BetaSpendLimitOrganizationServiceScope organizationService)
Alias for calling scope with
Scope.ofOrganizationService(organizationService).
-
scope
final BetaSpendLimit.Builder scope(BetaSpendLimitOrganizationScope organization)
Alias for calling scope with
Scope.ofOrganization(organization).
-
scope
final BetaSpendLimit.Builder scope(BetaSpendLimitWorkspaceScope workspace)
Alias for calling scope with
Scope.ofWorkspace(workspace).
-
scope
final BetaSpendLimit.Builder scope(BetaSpendLimitUsageTierScope usageTier)
Alias for calling scope with
Scope.ofUsageTier(usageTier).
-
type
final BetaSpendLimit.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("spend_limit")This method is primarily for setting the field to an undocumented or not yet supported value.
-
updatedAt
final BetaSpendLimit.Builder updatedAt(OffsetDateTime updatedAt)
RFC 3339 datetime at which the spend limit was last modified.
-
updatedAt
final BetaSpendLimit.Builder updatedAt(JsonField<OffsetDateTime> updatedAt)
Sets Builder.updatedAt to an arbitrary JSON value.
You should usually call Builder.updatedAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaSpendLimit.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
userScope
final BetaSpendLimit.Builder userScope(String userId)
Alias for calling scope with the following:
BetaSpendLimitUserScope.builder() .userId(userId) .build()
-
seatTierScope
final BetaSpendLimit.Builder seatTierScope(String seatTier)
Alias for calling scope with the following:
BetaSpendLimitSeatTierScope.builder() .seatTier(seatTier) .build()
-
rbacGroupScope
final BetaSpendLimit.Builder rbacGroupScope(String rbacGroupId)
Alias for calling scope with the following:
BetaSpendLimitRbacGroupScope.builder() .rbacGroupId(rbacGroupId) .build()
-
organizationServiceScope
final BetaSpendLimit.Builder organizationServiceScope(String service)
Alias for calling scope with the following:
BetaSpendLimitOrganizationServiceScope.builder() .service(service) .build()
-
workspaceScope
final BetaSpendLimit.Builder workspaceScope(String workspaceId)
Alias for calling scope with the following:
BetaSpendLimitWorkspaceScope.builder() .workspaceId(workspaceId) .build()
-
putAdditionalProperty
final BetaSpendLimit.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaSpendLimit.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaSpendLimit.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaSpendLimit.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaSpendLimit build()
Returns an immutable instance of BetaSpendLimit.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .amount() .createdAt() .currency() .isEnabled() .period() .scope() .updatedAt()
-
-
-
-