Class SourcesAllowance.Builder
java.lang.Object
co.yellowdog.platform.model.builders.ValidatedBuilder<SourcesAllowance>
co.yellowdog.platform.model.SourcesAllowance.Builder
- Enclosing class:
SourcesAllowance
A builder that can be used to build a new SourcesAllowance.
-
Method Summary
Modifier and TypeMethodDescriptionallowedHours(int allowedHours) boostHours(Integer boostHours) Builds the object without enforcing validation constraints.credentialName(String credentialName) description(String description) effectiveFrom(Instant effectiveFrom) effectiveUntil(Instant effectiveUntil) hardLimitGraceMinutes(Integer hardLimitGraceMinutes) instanceType(String instanceType) instanceTypes(Collection<? extends String> instanceTypes) limitEnforcement(AllowanceLimitEnforcement limitEnforcement) monitoredStatus(InstanceStatus monitoredStatus) monitoredStatuses(Collection<? extends InstanceStatus> monitoredStatuses) provider(CloudProvider provider) regions(Collection<? extends String> regions) resetInterval(Integer resetInterval) resetType(AllowanceResetType resetType) sourceCreatedFromId(String sourceCreatedFromId) toString()Methods inherited from class ValidatedBuilder
build, validateModifier and TypeMethodDescriptionbuild()Builds and validates the object.Set<jakarta.validation.ConstraintViolation<SourcesAllowance>> validate()Performs validation based on the current builder properties and returns the ConstraintViolations without throwing.
-
Method Details
-
description
- Returns:
this.
-
effectiveFrom
- Returns:
this.
-
effectiveUntil
- Returns:
this.
-
allowedHours
- Returns:
this.
-
boostHours
- Returns:
this.
-
resetType
- Returns:
this.
-
resetInterval
- Returns:
this.
-
limitEnforcement
- Returns:
this.
-
hardLimitGraceMinutes
- Returns:
this.
-
monitoredStatus
-
monitoredStatuses
public SourcesAllowance.Builder monitoredStatuses(Collection<? extends InstanceStatus> monitoredStatuses) -
clearMonitoredStatuses
-
sourceCreatedFromId
- Returns:
this.
-
provider
- Returns:
this.
-
region
-
regions
-
clearRegions
-
instanceType
-
instanceTypes
-
clearInstanceTypes
-
credentialName
- Returns:
this.
-
buildUnchecked
Description copied from class:ValidatedBuilderBuilds the object without enforcing validation constraints. Use this when the object is validated later, for example as part of an enclosing object built withValidatedBuilder.build(), or when it does not need to be valid on its own.- Overrides:
buildUncheckedin classValidatedBuilder<SourcesAllowance>- Returns:
- the object being built
-
toString
-