Class ImmutableServiceProgram.Builder

java.lang.Object
io.resys.hdes.client.api.programs.ImmutableServiceProgram.Builder
Enclosing class:
ImmutableServiceProgram

@NotThreadSafe public static final class ImmutableServiceProgram.Builder extends Object
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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableServiceProgram.Builder from(ServiceProgram instance)
      Fill a builder with attribute values from the provided ServiceProgram instance. 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:
      this builder for use in a chained invocation
    • executorType

      @CanIgnoreReturnValue public final ImmutableServiceProgram.Builder executorType(AstService.AstServiceType executorType)
      Initializes the value for the executorType attribute.
      Parameters:
      executorType - The value for executorType
      Returns:
      this builder for use in a chained invocation
    • bean

      @CanIgnoreReturnValue public final ImmutableServiceProgram.Builder bean(AstService.ServiceExecutorType bean)
      Initializes the value for the bean attribute.
      Parameters:
      bean - The value for bean
      Returns:
      this builder for use in a chained invocation
    • typeDef0

      @CanIgnoreReturnValue public final ImmutableServiceProgram.Builder typeDef0(@Nullable TypeDef typeDef0)
      Initializes the value for the typeDef0 attribute.
      Parameters:
      typeDef0 - The value for typeDef0 (can be null)
      Returns:
      this builder for use in a chained invocation
    • typeDef1

      @CanIgnoreReturnValue public final ImmutableServiceProgram.Builder typeDef1(@Nullable TypeDef typeDef1)
      Initializes the value for the typeDef1 attribute.
      Parameters:
      typeDef1 - The value for typeDef1 (can be null)
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableServiceProgram build()
      Returns:
      An immutable instance of ServiceProgram
      Throws:
      IllegalStateException - if any required attributes are missing