Class ImmutableAstTag

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

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

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

See Also:
  • Method Details

    • 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
    • getName

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

      @Nullable public String getCommitId()
      Specified by:
      getCommitId in interface AstTag
      Returns:
      The value of the commitId attribute
    • getCreated

      public LocalDateTime getCreated()
      Specified by:
      getCreated in interface AstTag
      Returns:
      The value of the created attribute
    • getValues

      public com.google.common.collect.ImmutableList<AstTag.AstTagValue> getValues()
      Specified by:
      getValues in interface AstTag
      Returns:
      The value of the values attribute
    • withDescription

      public final ImmutableAstTag 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 ImmutableAstTag 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 ImmutableAstTag 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 ImmutableAstTag 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 ImmutableAstTag 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
    • withName

      public final ImmutableAstTag 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
    • withCommitId

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

      public final ImmutableAstTag withCreated(LocalDateTime value)
      Copy the current immutable object by setting a value for the created attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for created
      Returns:
      A modified copy of the this object
    • withValues

      public final ImmutableAstTag withValues(AstTag.AstTagValue... elements)
      Copy the current immutable object with elements that replace the content of values.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withValues

      public final ImmutableAstTag withValues(Iterable<? extends AstTag.AstTagValue> elements)
      Copy the current immutable object with elements that replace the content of values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of values 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 ImmutableAstTag 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: description, headers, bodyType, messages, name, commitId, created, values.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableAstTag.Builder builder()
      Creates a builder for ImmutableAstTag.
       ImmutableAstTag.builder()
          .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
          .name(String) // required name
          .commitId(String | null) // nullable commitId
          .created(java.time.LocalDateTime) // required created
          .addValues|addAllValues(io.resys.hdes.client.api.ast.AstTag.AstTagValue) // values elements
          .build();
       
      Returns:
      A new ImmutableAstTag builder