Class SpendLimit.Builder
-
- All Implemented Interfaces:
public final class SpendLimit.BuilderA builder for SpendLimit.
-
-
Method Summary
Modifier and Type Method Description final SpendLimit.Builderid(String id)Unique tagged ID of the spend limit ( spl_...).final SpendLimit.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final SpendLimit.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 SpendLimit.Builderamount(Optional<String> amount)Alias for calling Builder.amount with amount.orElse(null).final SpendLimit.Builderamount(JsonField<String> amount)Sets Builder.amount to an arbitrary JSON value. final SpendLimit.BuildercreatedAt(OffsetDateTime createdAt)RFC 3339 datetime at which the spend limit was created. final SpendLimit.BuildercreatedAt(JsonField<OffsetDateTime> createdAt)Sets Builder.createdAt to an arbitrary JSON value. final SpendLimit.Buildercurrency(String currency)ISO 4217 code of the organization's billing currency; the unit for amount.final SpendLimit.Buildercurrency(JsonField<String> currency)Sets Builder.currency to an arbitrary JSON value. final SpendLimit.BuilderisEnabled(Boolean isEnabled)Read-only. final SpendLimit.BuilderisEnabled(JsonField<Boolean> isEnabled)Sets Builder.isEnabled to an arbitrary JSON value. final SpendLimit.Builderperiod(SpendLimitPeriod period)Length of the window the limit resets over. final SpendLimit.Builderperiod(JsonField<SpendLimitPeriod> period)Sets Builder.period to an arbitrary JSON value. final SpendLimit.Builderscope(SpendLimit.Scope scope)What the limit applies to. final SpendLimit.Builderscope(JsonField<SpendLimit.Scope> scope)Sets Builder.scope to an arbitrary JSON value. final SpendLimit.Builderscope(SpendLimitUserScope user)Alias for calling scope with Scope.ofUser(user).final SpendLimit.Builderscope(SpendLimitSeatTierScope seatTier)Alias for calling scope with Scope.ofSeatTier(seatTier).final SpendLimit.Builderscope(SpendLimitRbacGroupScope rbacGroup)Alias for calling scope with Scope.ofRbacGroup(rbacGroup).final SpendLimit.Builderscope(SpendLimitOrganizationServiceScope organizationService)Alias for calling scope with Scope.ofOrganizationService(organizationService).final SpendLimit.Builderscope(SpendLimitOrganizationScope organization)Alias for calling scope with Scope.ofOrganization(organization).final SpendLimit.Builderscope(SpendLimitWorkspaceScope workspace)Alias for calling scope with Scope.ofWorkspace(workspace).final SpendLimit.Builderscope(SpendLimitUsageTierScope usageTier)Alias for calling scope with Scope.ofUsageTier(usageTier).final SpendLimit.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final SpendLimit.BuilderupdatedAt(OffsetDateTime updatedAt)RFC 3339 datetime at which the spend limit was last modified. final SpendLimit.BuilderupdatedAt(JsonField<OffsetDateTime> updatedAt)Sets Builder.updatedAt to an arbitrary JSON value. final SpendLimit.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final SpendLimit.BuilderuserScope(String userId)Alias for calling scope with the following: SpendLimitUserScope.builder() .userId(userId) .build()final SpendLimit.BuilderseatTierScope(String seatTier)Alias for calling scope with the following: SpendLimitSeatTierScope.builder() .seatTier(seatTier) .build()final SpendLimit.BuilderrbacGroupScope(String rbacGroupId)Alias for calling scope with the following: SpendLimitRbacGroupScope.builder() .rbacGroupId(rbacGroupId) .build()final SpendLimit.BuilderorganizationServiceScope(String service)Alias for calling scope with the following: SpendLimitOrganizationServiceScope.builder() .service(service) .build()final SpendLimit.BuilderworkspaceScope(String workspaceId)Alias for calling scope with the following: SpendLimitWorkspaceScope.builder() .workspaceId(workspaceId) .build()final SpendLimit.BuilderputAdditionalProperty(String key, JsonValue value)final SpendLimit.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final SpendLimit.BuilderremoveAdditionalProperty(String key)final SpendLimit.BuilderremoveAllAdditionalProperties(Set<String> keys)final SpendLimitbuild()Returns an immutable instance of SpendLimit. -
-
Method Detail
-
id
final SpendLimit.Builder id(String id)
Unique tagged ID of the spend limit (
spl_...).
-
id
final SpendLimit.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 SpendLimit.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 SpendLimit.Builder amount(Optional<String> amount)
Alias for calling Builder.amount with
amount.orElse(null).
-
amount
final SpendLimit.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 SpendLimit.Builder createdAt(OffsetDateTime createdAt)
RFC 3339 datetime at which the spend limit was created.
-
createdAt
final SpendLimit.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 SpendLimit.Builder currency(String currency)
ISO 4217 code of the organization's billing currency; the unit for
amount.
-
currency
final SpendLimit.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 SpendLimit.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 SpendLimit.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 SpendLimit.Builder period(SpendLimitPeriod period)
Length of the window the limit resets over.
amountcaps spend within each period.
-
period
final SpendLimit.Builder period(JsonField<SpendLimitPeriod> period)
Sets Builder.period to an arbitrary JSON value.
You should usually call Builder.period with a well-typed SpendLimitPeriod value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
scope
final SpendLimit.Builder scope(SpendLimit.Scope scope)
What the limit applies to. A tagged union on
type; each variant carries the identifier for its scope.
-
scope
final SpendLimit.Builder scope(JsonField<SpendLimit.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 SpendLimit.Builder scope(SpendLimitUserScope user)
Alias for calling scope with
Scope.ofUser(user).
-
scope
final SpendLimit.Builder scope(SpendLimitSeatTierScope seatTier)
Alias for calling scope with
Scope.ofSeatTier(seatTier).
-
scope
final SpendLimit.Builder scope(SpendLimitRbacGroupScope rbacGroup)
Alias for calling scope with
Scope.ofRbacGroup(rbacGroup).
-
scope
final SpendLimit.Builder scope(SpendLimitOrganizationServiceScope organizationService)
Alias for calling scope with
Scope.ofOrganizationService(organizationService).
-
scope
final SpendLimit.Builder scope(SpendLimitOrganizationScope organization)
Alias for calling scope with
Scope.ofOrganization(organization).
-
scope
final SpendLimit.Builder scope(SpendLimitWorkspaceScope workspace)
Alias for calling scope with
Scope.ofWorkspace(workspace).
-
scope
final SpendLimit.Builder scope(SpendLimitUsageTierScope usageTier)
Alias for calling scope with
Scope.ofUsageTier(usageTier).
-
type
final SpendLimit.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 SpendLimit.Builder updatedAt(OffsetDateTime updatedAt)
RFC 3339 datetime at which the spend limit was last modified.
-
updatedAt
final SpendLimit.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 SpendLimit.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
userScope
final SpendLimit.Builder userScope(String userId)
Alias for calling scope with the following:
SpendLimitUserScope.builder() .userId(userId) .build()
-
seatTierScope
final SpendLimit.Builder seatTierScope(String seatTier)
Alias for calling scope with the following:
SpendLimitSeatTierScope.builder() .seatTier(seatTier) .build()
-
rbacGroupScope
final SpendLimit.Builder rbacGroupScope(String rbacGroupId)
Alias for calling scope with the following:
SpendLimitRbacGroupScope.builder() .rbacGroupId(rbacGroupId) .build()
-
organizationServiceScope
final SpendLimit.Builder organizationServiceScope(String service)
Alias for calling scope with the following:
SpendLimitOrganizationServiceScope.builder() .service(service) .build()
-
workspaceScope
final SpendLimit.Builder workspaceScope(String workspaceId)
Alias for calling scope with the following:
SpendLimitWorkspaceScope.builder() .workspaceId(workspaceId) .build()
-
putAdditionalProperty
final SpendLimit.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final SpendLimit.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final SpendLimit.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final SpendLimit.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final SpendLimit build()
Returns an immutable instance of SpendLimit.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .amount() .createdAt() .currency() .isEnabled() .period() .scope() .updatedAt()
-
-
-
-