Class ImmutableProgramAssociation

java.lang.Object
io.resys.hdes.client.api.programs.ImmutableProgramAssociation
All Implemented Interfaces:
ProgramEnvir.ProgramAssociation

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

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

  • Method Details

    • getId

      public Optional<String> getId()
      Specified by:
      getId in interface ProgramEnvir.ProgramAssociation
      Returns:
      The value of the id attribute
    • getRef

      public String getRef()
      Specified by:
      getRef in interface ProgramEnvir.ProgramAssociation
      Returns:
      The value of the ref attribute
    • getRefType

      public AstBody.AstBodyType getRefType()
      Specified by:
      getRefType in interface ProgramEnvir.ProgramAssociation
      Returns:
      The value of the refType attribute
    • getRefStatus

      public ProgramEnvir.ProgramStatus getRefStatus()
      Specified by:
      getRefStatus in interface ProgramEnvir.ProgramAssociation
      Returns:
      The value of the refStatus attribute
    • getOwner

      public Boolean getOwner()
      Specified by:
      getOwner in interface ProgramEnvir.ProgramAssociation
      Returns:
      The value of the owner attribute
    • withId

      public final ImmutableProgramAssociation withId(String value)
      Copy the current immutable object by setting a present value for the optional id attribute.
      Parameters:
      value - The value for id
      Returns:
      A modified copy of this object
    • withId

      public final ImmutableProgramAssociation withId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the id attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for id
      Returns:
      A modified copy of this object
    • withRef

      public final ImmutableProgramAssociation withRef(String value)
      Copy the current immutable object by setting a value for the ref attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for ref
      Returns:
      A modified copy of the this object
    • withRefType

      public final ImmutableProgramAssociation withRefType(AstBody.AstBodyType value)
      Copy the current immutable object by setting a value for the refType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for refType
      Returns:
      A modified copy of the this object
    • withRefStatus

      public final ImmutableProgramAssociation withRefStatus(ProgramEnvir.ProgramStatus value)
      Copy the current immutable object by setting a value for the refStatus attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for refStatus
      Returns:
      A modified copy of the this object
    • withOwner

      public final ImmutableProgramAssociation withOwner(Boolean value)
      Copy the current immutable object by setting a value for the owner attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for owner
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableProgramAssociation 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: id, ref, refType, refStatus, owner.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Creates an immutable copy of a ProgramEnvir.ProgramAssociation 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 ProgramAssociation instance
    • builder

      public static ImmutableProgramAssociation.Builder builder()
      Creates a builder for ImmutableProgramAssociation.
       ImmutableProgramAssociation.builder()
          .id(String) // optional id
          .ref(String) // required ref
          .refType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // required refType
          .refStatus(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramStatus) // required refStatus
          .owner(Boolean) // required owner
          .build();
       
      Returns:
      A new ImmutableProgramAssociation builder