Class ImmutableCreateEntity

java.lang.Object
io.resys.hdes.client.api.ImmutableCreateEntity
All Implemented Interfaces:
HdesComposer.CreateEntity

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

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

  • Method Details

    • getName

      @Nullable public String getName()
      Specified by:
      getName in interface HdesComposer.CreateEntity
      Returns:
      The value of the name attribute
    • getDesc

      @Nullable public String getDesc()
      Specified by:
      getDesc in interface HdesComposer.CreateEntity
      Returns:
      The value of the desc attribute
    • getType

      public AstBody.AstBodyType getType()
      Specified by:
      getType in interface HdesComposer.CreateEntity
      Returns:
      The value of the type attribute
    • getBody

      public com.google.common.collect.ImmutableList<AstCommand> getBody()
      Specified by:
      getBody in interface HdesComposer.CreateEntity
      Returns:
      The value of the body attribute
    • withName

      public final ImmutableCreateEntity withName(@Nullable String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name (can be null)
      Returns:
      A modified copy of the this object
    • withDesc

      public final ImmutableCreateEntity withDesc(@Nullable String value)
      Copy the current immutable object by setting a value for the desc attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for desc (can be null)
      Returns:
      A modified copy of the this object
    • withType

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

      public final ImmutableCreateEntity withBody(AstCommand... elements)
      Copy the current immutable object with elements that replace the content of body.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withBody

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableCreateEntity 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: name, desc, type, body.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableCreateEntity copyOf(HdesComposer.CreateEntity instance)
      Creates an immutable copy of a HdesComposer.CreateEntity 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 CreateEntity instance
    • builder

      public static ImmutableCreateEntity.Builder builder()
      Creates a builder for ImmutableCreateEntity.
       ImmutableCreateEntity.builder()
          .name(String | null) // nullable name
          .desc(String | null) // nullable desc
          .type(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // required type
          .addBody|addAllBody(io.resys.hdes.client.api.ast.AstCommand) // body elements
          .build();
       
      Returns:
      A new ImmutableCreateEntity builder