Class ImmutableComposerEntity<A extends AstBody>

java.lang.Object
io.resys.hdes.client.api.ImmutableComposerEntity<A>
All Implemented Interfaces:
HdesComposer.ComposerEntity<A>

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableComposerEntity<A extends AstBody> extends Object implements HdesComposer.ComposerEntity<A>
Immutable implementation of HdesComposer.ComposerEntity.

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

  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface HdesComposer.ComposerEntity<A extends AstBody>
      Returns:
      The value of the id attribute
    • getAst

      @Nullable public A getAst()
      Specified by:
      getAst in interface HdesComposer.ComposerEntity<A extends AstBody>
      Returns:
      The value of the ast attribute
    • getSource

      public AstBody.AstSource getSource()
      Specified by:
      getSource in interface HdesComposer.ComposerEntity<A extends AstBody>
      Returns:
      The value of the source attribute
    • getWarnings

      public com.google.common.collect.ImmutableList<ProgramEnvir.ProgramMessage> getWarnings()
      Specified by:
      getWarnings in interface HdesComposer.ComposerEntity<A extends AstBody>
      Returns:
      The value of the warnings attribute
    • getErrors

      public com.google.common.collect.ImmutableList<ProgramEnvir.ProgramMessage> getErrors()
      Specified by:
      getErrors in interface HdesComposer.ComposerEntity<A extends AstBody>
      Returns:
      The value of the errors attribute
    • getAssociations

      public com.google.common.collect.ImmutableList<ProgramEnvir.ProgramAssociation> getAssociations()
      Specified by:
      getAssociations in interface HdesComposer.ComposerEntity<A extends AstBody>
      Returns:
      The value of the associations attribute
    • getStatus

      public ProgramEnvir.ProgramStatus getStatus()
      Specified by:
      getStatus in interface HdesComposer.ComposerEntity<A extends AstBody>
      Returns:
      The value of the status attribute
    • withId

      public final ImmutableComposerEntity<A> withId(String value)
      Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id
      Returns:
      A modified copy of the this object
    • withAst

      public final ImmutableComposerEntity<A> withAst(@Nullable A value)
      Copy the current immutable object by setting a value for the ast attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for ast (can be null)
      Returns:
      A modified copy of the this object
    • withSource

      public final ImmutableComposerEntity<A> withSource(AstBody.AstSource value)
      Copy the current immutable object by setting a value for the source attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for source
      Returns:
      A modified copy of the this object
    • withWarnings

      public final ImmutableComposerEntity<A> withWarnings(ProgramEnvir.ProgramMessage... elements)
      Copy the current immutable object with elements that replace the content of warnings.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withWarnings

      public final ImmutableComposerEntity<A> withWarnings(Iterable<? extends ProgramEnvir.ProgramMessage> elements)
      Copy the current immutable object with elements that replace the content of warnings. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of warnings elements to set
      Returns:
      A modified copy of this object
    • withErrors

      public final ImmutableComposerEntity<A> withErrors(ProgramEnvir.ProgramMessage... elements)
      Copy the current immutable object with elements that replace the content of errors.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withErrors

      public final ImmutableComposerEntity<A> withErrors(Iterable<? extends ProgramEnvir.ProgramMessage> elements)
      Copy the current immutable object with elements that replace the content of errors. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of errors elements to set
      Returns:
      A modified copy of this object
    • withAssociations

      public final ImmutableComposerEntity<A> withAssociations(ProgramEnvir.ProgramAssociation... elements)
      Copy the current immutable object with elements that replace the content of associations.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAssociations

      public final ImmutableComposerEntity<A> withAssociations(Iterable<? extends ProgramEnvir.ProgramAssociation> elements)
      Copy the current immutable object with elements that replace the content of associations. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of associations elements to set
      Returns:
      A modified copy of this object
    • withStatus

      public final ImmutableComposerEntity<A> withStatus(ProgramEnvir.ProgramStatus value)
      Copy the current immutable object by setting a value for the status attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for status
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableComposerEntity 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, ast, source, warnings, errors, associations, status.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static <A extends AstBody> ImmutableComposerEntity<A> copyOf(HdesComposer.ComposerEntity<A> instance)
      Creates an immutable copy of a HdesComposer.ComposerEntity value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Type Parameters:
      A - generic parameter A
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable ComposerEntity instance
    • builder

      public static <A extends AstBody> ImmutableComposerEntity.Builder<A> builder()
      Creates a builder for ImmutableComposerEntity.
       ImmutableComposerEntity.&lt;A&gt;builder()
          .id(String) // required id
          .ast(A | null) // nullable ast
          .source(io.resys.hdes.client.api.ast.AstBody.AstSource) // required source
          .addWarnings|addAllWarnings(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramMessage) // warnings elements
          .addErrors|addAllErrors(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramMessage) // errors elements
          .addAssociations|addAllAssociations(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramAssociation) // associations elements
          .status(io.resys.hdes.client.api.programs.ProgramEnvir.ProgramStatus) // required status
          .build();
       
      Type Parameters:
      A - generic parameter A
      Returns:
      A new ImmutableComposerEntity builder