Class ImmutableAstDecision

java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstDecision
All Implemented Interfaces:
AstBody, AstDecision, Serializable

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

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

See Also:
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface AstBody
      Returns:
      The value of the name attribute
    • getDescription

      @Nullable public String getDescription()
      Specified by:
      getDescription in interface AstBody
      Returns:
      The value of the description attribute
    • getHeaders

      public AstBody.Headers getHeaders()
      Specified by:
      getHeaders in interface AstBody
      Returns:
      The value of the headers attribute
    • getBodyType

      public AstBody.AstBodyType getBodyType()
      Specified by:
      getBodyType in interface AstBody
      Returns:
      The value of the bodyType attribute
    • getMessages

      public com.google.common.collect.ImmutableList<AstBody.AstCommandMessage> getMessages()
      Specified by:
      getMessages in interface AstBody
      Returns:
      The value of the messages attribute
    • getHeaderTypes

      public com.google.common.collect.ImmutableList<String> getHeaderTypes()
      Specified by:
      getHeaderTypes in interface AstDecision
      Returns:
      The value of the headerTypes attribute
    • getHeaderExpressions

      public com.google.common.collect.ImmutableMap<TypeDef.ValueType,List<String>> getHeaderExpressions()
      Specified by:
      getHeaderExpressions in interface AstDecision
      Returns:
      The value of the headerExpressions attribute
    • getHitPolicy

      public AstDecision.HitPolicy getHitPolicy()
      Specified by:
      getHitPolicy in interface AstDecision
      Returns:
      The value of the hitPolicy attribute
    • getRows

      public com.google.common.collect.ImmutableList<AstDecision.AstDecisionRow> getRows()
      Specified by:
      getRows in interface AstDecision
      Returns:
      The value of the rows attribute
    • withName

      public final ImmutableAstDecision withName(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
      Returns:
      A modified copy of the this object
    • withDescription

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

      public final ImmutableAstDecision withHeaders(AstBody.Headers value)
      Copy the current immutable object by setting a value for the headers attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for headers
      Returns:
      A modified copy of the this object
    • withBodyType

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

      public final ImmutableAstDecision withMessages(AstBody.AstCommandMessage... elements)
      Copy the current immutable object with elements that replace the content of messages.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withMessages

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

      public final ImmutableAstDecision withHeaderTypes(String... elements)
      Copy the current immutable object with elements that replace the content of headerTypes.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withHeaderTypes

      public final ImmutableAstDecision withHeaderTypes(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of headerTypes. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of headerTypes elements to set
      Returns:
      A modified copy of this object
    • withHeaderExpressions

      public final ImmutableAstDecision withHeaderExpressions(Map<TypeDef.ValueType,? extends List<String>> entries)
      Copy the current immutable object by replacing the headerExpressions map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the headerExpressions map
      Returns:
      A modified copy of this object
    • withHitPolicy

      public final ImmutableAstDecision withHitPolicy(AstDecision.HitPolicy value)
      Copy the current immutable object by setting a value for the hitPolicy attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for hitPolicy
      Returns:
      A modified copy of the this object
    • withRows

      public final ImmutableAstDecision withRows(AstDecision.AstDecisionRow... elements)
      Copy the current immutable object with elements that replace the content of rows.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRows

      public final ImmutableAstDecision withRows(Iterable<? extends AstDecision.AstDecisionRow> elements)
      Copy the current immutable object with elements that replace the content of rows. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of rows 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 ImmutableAstDecision 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, description, headers, bodyType, messages, headerTypes, headerExpressions, hitPolicy, rows.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableAstDecision copyOf(AstDecision instance)
      Creates an immutable copy of a AstDecision 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 AstDecision instance
    • builder

      public static ImmutableAstDecision.Builder builder()
      Creates a builder for ImmutableAstDecision.
       ImmutableAstDecision.builder()
          .name(String) // required name
          .description(String | null) // nullable description
          .headers(io.resys.hdes.client.api.ast.AstBody.Headers) // required headers
          .bodyType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // required bodyType
          .addMessages|addAllMessages(io.resys.hdes.client.api.ast.AstBody.AstCommandMessage) // messages elements
          .addHeaderTypes|addAllHeaderTypes(String) // headerTypes elements
          .putHeaderExpressions|putAllHeaderExpressions(io.resys.hdes.client.api.ast.TypeDef.ValueType => List&lt;String&gt;) // headerExpressions mappings
          .hitPolicy(io.resys.hdes.client.api.ast.AstDecision.HitPolicy) // required hitPolicy
          .addRows|addAllRows(io.resys.hdes.client.api.ast.AstDecision.AstDecisionRow) // rows elements
          .build();
       
      Returns:
      A new ImmutableAstDecision builder