Package io.digiexpress.eveli.envir.api
Class ImmutableEveliDeployment.Builder
java.lang.Object
io.digiexpress.eveli.envir.api.ImmutableEveliDeployment.Builder
- Enclosing class:
- ImmutableEveliDeployment
Builds instances of type
ImmutableEveliDeployment.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableEveliDeployment.createdAt(OffsetDateTime createdAt) Initializes the value for thecreatedAtattribute.Initializes the value for thecreatedByattribute.description(String description) Initializes the value for thedescriptionattribute.errors(io.vertx.core.json.JsonObject errors) Initializes the value for theerrorsattribute.Initializes the value for theexternalattribute.externalId(String externalId) Initializes the value for theexternalIdattribute.from(EveliEnvirClient.EveliDeployment instance) Fill a builder with attribute values from the providedEveliDeploymentinstance.Initializes the value for theidattribute.Initializes the value for thenameattribute.sources(EveliEnvirClient.EveliSources sources) Initializes the value for thesourcesattribute.startsAt(OffsetDateTime startsAt) Initializes the value for thestartsAtattribute.Initializes the value for thestatusattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableEveliDeployment.Builder from(EveliEnvirClient.EveliDeployment instance) Fill a builder with attribute values from the providedEveliDeploymentinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
externalId
@CanIgnoreReturnValue public final ImmutableEveliDeployment.Builder externalId(@Nullable String externalId) Initializes the value for theexternalIdattribute.- Parameters:
externalId- The value for externalId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
createdBy
Initializes the value for thecreatedByattribute.- Parameters:
createdBy- The value for createdBy- Returns:
thisbuilder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutableEveliDeployment.Builder createdAt(OffsetDateTime createdAt) Initializes the value for thecreatedAtattribute.- Parameters:
createdAt- The value for createdAt- Returns:
thisbuilder for use in a chained invocation
-
startsAt
@CanIgnoreReturnValue public final ImmutableEveliDeployment.Builder startsAt(OffsetDateTime startsAt) Initializes the value for thestartsAtattribute.- Parameters:
startsAt- The value for startsAt- Returns:
thisbuilder for use in a chained invocation
-
description
Initializes the value for thedescriptionattribute.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
errors
@CanIgnoreReturnValue public final ImmutableEveliDeployment.Builder errors(@Nullable io.vertx.core.json.JsonObject errors) Initializes the value for theerrorsattribute.- Parameters:
errors- The value for errors (can benull)- Returns:
thisbuilder for use in a chained invocation
-
status
@CanIgnoreReturnValue public final ImmutableEveliDeployment.Builder status(EveliEnvirClient.EveliDeploymentStatus status) Initializes the value for thestatusattribute.- Parameters:
status- The value for status- Returns:
thisbuilder for use in a chained invocation
-
external
@CanIgnoreReturnValue public final ImmutableEveliDeployment.Builder external(@Nullable Boolean external) Initializes the value for theexternalattribute.- Parameters:
external- The value for external (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sources
@CanIgnoreReturnValue public final ImmutableEveliDeployment.Builder sources(@Nullable EveliEnvirClient.EveliSources sources) Initializes the value for thesourcesattribute.- Parameters:
sources- The value for sources (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableEveliDeployment.- Returns:
- An immutable instance of EveliDeployment
- Throws:
IllegalStateException- if any required attributes are missing
-