Class ImmutableServiceProgram

java.lang.Object
io.resys.hdes.client.api.programs.ImmutableServiceProgram
All Implemented Interfaces:
Program, ServiceProgram, Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableServiceProgram extends Object implements ServiceProgram
Immutable implementation of ServiceProgram.

Use the builder to create immutable instances: ImmutableServiceProgram.builder().

See Also:
  • Method Details

    • getExecutorType

      public AstService.AstServiceType getExecutorType()
      Specified by:
      getExecutorType in interface ServiceProgram
      Returns:
      The value of the executorType attribute
    • getBean

      Specified by:
      getBean in interface ServiceProgram
      Returns:
      The value of the bean attribute
    • getTypeDef0

      @Nullable public TypeDef getTypeDef0()
      Specified by:
      getTypeDef0 in interface ServiceProgram
      Returns:
      The value of the typeDef0 attribute
    • getTypeDef1

      @Nullable public TypeDef getTypeDef1()
      Specified by:
      getTypeDef1 in interface ServiceProgram
      Returns:
      The value of the typeDef1 attribute
    • withExecutorType

      public final ImmutableServiceProgram withExecutorType(AstService.AstServiceType value)
      Copy the current immutable object by setting a value for the executorType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for executorType
      Returns:
      A modified copy of the this object
    • withBean

      Copy the current immutable object by setting a value for the bean attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for bean
      Returns:
      A modified copy of the this object
    • withTypeDef0

      public final ImmutableServiceProgram withTypeDef0(@Nullable TypeDef value)
      Copy the current immutable object by setting a value for the typeDef0 attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for typeDef0 (can be null)
      Returns:
      A modified copy of the this object
    • withTypeDef1

      public final ImmutableServiceProgram withTypeDef1(@Nullable TypeDef value)
      Copy the current immutable object by setting a value for the typeDef1 attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for typeDef1 (can be null)
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableServiceProgram that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: executorType, bean, typeDef0, typeDef1.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ServiceProgram with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableServiceProgram copyOf(ServiceProgram instance)
      Creates an immutable copy of a ServiceProgram value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable ServiceProgram instance
    • builder

      public static ImmutableServiceProgram.Builder builder()
      Creates a builder for ImmutableServiceProgram.
       ImmutableServiceProgram.builder()
          .executorType(io.resys.hdes.client.api.ast.AstService.AstServiceType) // required executorType
          .bean(io.resys.hdes.client.api.ast.AstService.ServiceExecutorType) // required bean
          .typeDef0(io.resys.hdes.client.api.ast.TypeDef | null) // nullable typeDef0
          .typeDef1(io.resys.hdes.client.api.ast.TypeDef | null) // nullable typeDef1
          .build();
       
      Returns:
      A new ImmutableServiceProgram builder