Class ImmutableAstService

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

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

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

      public Class<? extends AstService.ServiceExecutorType> getBeanType()
      Specified by:
      getBeanType in interface AstService
      Returns:
      The value of the beanType attribute
    • getValue

      public String getValue()
      Specified by:
      getValue in interface AstService
      Returns:
      The value of the value attribute
    • getTypeDef0

      @Nullable public TypeDef getTypeDef0()
      Specified by:
      getTypeDef0 in interface AstService
      Returns:
      The value of the typeDef0 attribute
    • getTypeDef1

      @Nullable public TypeDef getTypeDef1()
      Specified by:
      getTypeDef1 in interface AstService
      Returns:
      The value of the typeDef1 attribute
    • getReturnDef1

      @Nullable public TypeDef getReturnDef1()
      Specified by:
      getReturnDef1 in interface AstService
      Returns:
      The value of the returnDef1 attribute
    • getRefs

      public com.google.common.collect.ImmutableList<AstService.AstServiceRef> getRefs()
      Specified by:
      getRefs in interface AstService
      Returns:
      The value of the refs attribute
    • getExecutorType

      public AstService.AstServiceType getExecutorType()
      Specified by:
      getExecutorType in interface AstService
      Returns:
      The value of the executorType attribute
    • withName

      public final ImmutableAstService 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 ImmutableAstService 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 ImmutableAstService 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 ImmutableAstService 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 ImmutableAstService 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 ImmutableAstService 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
    • withBeanType

      public final ImmutableAstService withBeanType(Class<? extends AstService.ServiceExecutorType> value)
      Copy the current immutable object by setting a value for the beanType attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for beanType
      Returns:
      A modified copy of the this object
    • withValue

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

      public final ImmutableAstService withTypeDef0(@Nullable TypeDef value)
      Copy the current immutable object by setting a value for the typeDef0 attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for typeDef0 (can be null)
      Returns:
      A modified copy of the this object
    • withTypeDef1

      public final ImmutableAstService withTypeDef1(@Nullable TypeDef value)
      Copy the current immutable object by setting a value for the typeDef1 attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for typeDef1 (can be null)
      Returns:
      A modified copy of the this object
    • withReturnDef1

      public final ImmutableAstService withReturnDef1(@Nullable TypeDef value)
      Copy the current immutable object by setting a value for the returnDef1 attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for returnDef1 (can be null)
      Returns:
      A modified copy of the this object
    • withRefs

      public final ImmutableAstService withRefs(AstService.AstServiceRef... elements)
      Copy the current immutable object with elements that replace the content of refs.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRefs

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

      public final ImmutableAstService withExecutorType(AstService.AstServiceType value)
      Copy the current immutable object by setting a value for the executorType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for executorType
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableAstService 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, beanType, value, typeDef0, typeDef1, returnDef1, refs, executorType.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableAstService.Builder builder()
      Creates a builder for ImmutableAstService.
       ImmutableAstService.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
          .beanType(Class&lt;? extends io.resys.hdes.client.api.ast.AstService.ServiceExecutorType&gt;) // required beanType
          .value(String) // required value
          .typeDef0(io.resys.hdes.client.api.ast.TypeDef | null) // nullable typeDef0
          .typeDef1(io.resys.hdes.client.api.ast.TypeDef | null) // nullable typeDef1
          .returnDef1(io.resys.hdes.client.api.ast.TypeDef | null) // nullable returnDef1
          .addRefs|addAllRefs(io.resys.hdes.client.api.ast.AstService.AstServiceRef) // refs elements
          .executorType(io.resys.hdes.client.api.ast.AstService.AstServiceType) // required executorType
          .build();
       
      Returns:
      A new ImmutableAstService builder