Class ImmutableServiceProgram.Builder
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableServiceProgram.Builder
- Enclosing class:
- ImmutableServiceProgram
Builds instances of type
ImmutableServiceProgram.
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 TypeMethodDescriptionInitializes the value for thebeanattribute.build()Builds a newImmutableServiceProgram.executorType(AstService.AstServiceType executorType) Initializes the value for theexecutorTypeattribute.from(ServiceProgram instance) Fill a builder with attribute values from the providedServicePrograminstance.Initializes the value for thetypeDef0attribute.Initializes the value for thetypeDef1attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedServicePrograminstance. 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
-
executorType
@CanIgnoreReturnValue public final ImmutableServiceProgram.Builder executorType(AstService.AstServiceType executorType) Initializes the value for theexecutorTypeattribute.- Parameters:
executorType- The value for executorType- Returns:
thisbuilder for use in a chained invocation
-
bean
@CanIgnoreReturnValue public final ImmutableServiceProgram.Builder bean(AstService.ServiceExecutorType bean) Initializes the value for thebeanattribute.- Parameters:
bean- The value for bean- Returns:
thisbuilder for use in a chained invocation
-
typeDef0
@CanIgnoreReturnValue public final ImmutableServiceProgram.Builder typeDef0(@Nullable TypeDef typeDef0) Initializes the value for thetypeDef0attribute.- Parameters:
typeDef0- The value for typeDef0 (can benull)- Returns:
thisbuilder for use in a chained invocation
-
typeDef1
@CanIgnoreReturnValue public final ImmutableServiceProgram.Builder typeDef1(@Nullable TypeDef typeDef1) Initializes the value for thetypeDef1attribute.- Parameters:
typeDef1- The value for typeDef1 (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableServiceProgram.- Returns:
- An immutable instance of ServiceProgram
- Throws:
IllegalStateException- if any required attributes are missing
-