Class ImmutableAstFlow

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

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

Use the builder to create immutable instances: ImmutableAstFlow.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
    • getSrc

      public AstFlow.AstFlowRoot getSrc()
      Specified by:
      getSrc in interface AstFlow
      Returns:
      The value of the src attribute
    • getAutocomplete

      public com.google.common.collect.ImmutableList<AstFlow.FlowAstAutocomplete> getAutocomplete()
      Specified by:
      getAutocomplete in interface AstFlow
      Returns:
      The value of the autocomplete attribute
    • withName

      public final ImmutableAstFlow 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 ImmutableAstFlow 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 ImmutableAstFlow 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 ImmutableAstFlow 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 ImmutableAstFlow 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 ImmutableAstFlow 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
    • withSrc

      public final ImmutableAstFlow withSrc(AstFlow.AstFlowRoot value)
      Copy the current immutable object by setting a value for the src attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for src
      Returns:
      A modified copy of the this object
    • withAutocomplete

      public final ImmutableAstFlow withAutocomplete(AstFlow.FlowAstAutocomplete... elements)
      Copy the current immutable object with elements that replace the content of autocomplete.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAutocomplete

      public final ImmutableAstFlow withAutocomplete(Iterable<? extends AstFlow.FlowAstAutocomplete> elements)
      Copy the current immutable object with elements that replace the content of autocomplete. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of autocomplete 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 ImmutableAstFlow 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, src, autocomplete.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableAstFlow.Builder builder()
      Creates a builder for ImmutableAstFlow.
       ImmutableAstFlow.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
          .src(io.resys.hdes.client.api.ast.AstFlow.AstFlowRoot) // required src
          .addAutocomplete|addAllAutocomplete(io.resys.hdes.client.api.ast.AstFlow.FlowAstAutocomplete) // autocomplete elements
          .build();
       
      Returns:
      A new ImmutableAstFlow builder