Class ImmutableAstServiceRef

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

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

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

See Also:
  • Method Details

    • getBodyType

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

      public String getRefValue()
      Specified by:
      getRefValue in interface AstService.AstServiceRef
      Returns:
      The value of the refValue attribute
    • withBodyType

      public final ImmutableAstServiceRef 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
    • withRefValue

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

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

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

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

      public static ImmutableAstServiceRef.Builder builder()
      Creates a builder for ImmutableAstServiceRef.
       ImmutableAstServiceRef.builder()
          .bodyType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // required bodyType
          .refValue(String) // required refValue
          .build();
       
      Returns:
      A new ImmutableAstServiceRef builder