Class ImmutableTypeDef

java.lang.Object
io.resys.hdes.client.api.ast.TypeDef
io.resys.hdes.client.api.ast.ImmutableTypeDef
All Implemented Interfaces:
Serializable, Comparable<TypeDef>

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTypeDef extends TypeDef
Immutable implementation of TypeDef.

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

See Also:
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in class TypeDef
      Returns:
      The value of the id attribute
    • getName

      public String getName()
      Specified by:
      getName in class TypeDef
      Returns:
      The value of the name attribute
    • getOrder

      public Integer getOrder()
      Specified by:
      getOrder in class TypeDef
      Returns:
      The value of the order attribute
    • getData

      public Boolean getData()
      Specified by:
      getData in class TypeDef
      Returns:
      The value of the data attribute
    • getDirection

      public TypeDef.Direction getDirection()
      Specified by:
      getDirection in class TypeDef
      Returns:
      The value of the direction attribute
    • getValueType

      public TypeDef.ValueType getValueType()
      Specified by:
      getValueType in class TypeDef
      Returns:
      The value of the valueType attribute
    • isRequired

      public boolean isRequired()
      Specified by:
      isRequired in class TypeDef
      Returns:
      The value of the isRequired attribute
    • getProperties

      public Collection<TypeDef> getProperties()
      Specified by:
      getProperties in class TypeDef
      Returns:
      The value of the properties attribute
    • getExtRef

      @Nullable public String getExtRef()
      Specified by:
      getExtRef in class TypeDef
      Returns:
      The value of the extRef attribute
    • getScript

      @Nullable public String getScript()
      Specified by:
      getScript in class TypeDef
      Returns:
      The value of the script attribute
    • getBeanType

      @Nullable public Class<?> getBeanType()
      Specified by:
      getBeanType in class TypeDef
      Returns:
      The value of the beanType attribute
    • getDescription

      @Nullable public String getDescription()
      Specified by:
      getDescription in class TypeDef
      Returns:
      The value of the description attribute
    • getValues

      @Nullable public String getValues()
      Specified by:
      getValues in class TypeDef
      Returns:
      The value of the values attribute
    • getRef

      @Nullable public String getRef()
      Specified by:
      getRef in class TypeDef
      Returns:
      The value of the ref attribute
    • getValueSet

      @Nullable public com.google.common.collect.ImmutableList<String> getValueSet()
      Specified by:
      getValueSet in class TypeDef
      Returns:
      The value of the valueSet attribute
    • getDeserializer

      public TypeDef.Deserializer getDeserializer()
      Specified by:
      getDeserializer in class TypeDef
      Returns:
      The value of the deserializer attribute
    • getSerializer

      public TypeDef.Serializer getSerializer()
      Specified by:
      getSerializer in class TypeDef
      Returns:
      The value of the serializer attribute
    • withId

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

      public final ImmutableTypeDef 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
    • withOrder

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

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

      public final ImmutableTypeDef withDirection(TypeDef.Direction value)
      Copy the current immutable object by setting a value for the direction attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for direction
      Returns:
      A modified copy of the this object
    • withValueType

      public final ImmutableTypeDef withValueType(TypeDef.ValueType value)
      Copy the current immutable object by setting a value for the valueType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for valueType
      Returns:
      A modified copy of the this object
    • withIsRequired

      public final ImmutableTypeDef withIsRequired(boolean value)
      Copy the current immutable object by setting a value for the isRequired attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isRequired
      Returns:
      A modified copy of the this object
    • withProperties

      public final ImmutableTypeDef withProperties(Collection<TypeDef> value)
      Copy the current immutable object by setting a value for the properties attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for properties
      Returns:
      A modified copy of the this object
    • withExtRef

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

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

      public final ImmutableTypeDef withBeanType(@Nullable Class<?> 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 (can be null)
      Returns:
      A modified copy of the this object
    • withDescription

      public final ImmutableTypeDef 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
    • withValues

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

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

      public final ImmutableTypeDef withValueSet(@Nullable String... elements)
      Copy the current immutable object with elements that replace the content of valueSet.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withValueSet

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

      public final ImmutableTypeDef withDeserializer(TypeDef.Deserializer value)
      Copy the current immutable object by setting a value for the deserializer attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for deserializer
      Returns:
      A modified copy of the this object
    • withSerializer

      public final ImmutableTypeDef withSerializer(TypeDef.Serializer value)
      Copy the current immutable object by setting a value for the serializer attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for serializer
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableTypeDef 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: id, name, order, data, direction, valueType, isRequired, properties, extRef, script, beanType, description, values, ref, valueSet, deserializer, serializer.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableTypeDef.Builder builder()
      Creates a builder for ImmutableTypeDef.
       ImmutableTypeDef.builder()
          .id(String) // required id
          .name(String) // required name
          .order(Integer) // required order
          .data(Boolean) // required data
          .direction(io.resys.hdes.client.api.ast.TypeDef.Direction) // required direction
          .valueType(io.resys.hdes.client.api.ast.TypeDef.ValueType) // required valueType
          .isRequired(boolean) // required isRequired
          .properties(Collection&lt;io.resys.hdes.client.api.ast.TypeDef&gt;) // required properties
          .extRef(String | null) // nullable extRef
          .script(String | null) // nullable script
          .beanType(Class&lt;?&gt; | null) // nullable beanType
          .description(String | null) // nullable description
          .values(String | null) // nullable values
          .ref(String | null) // nullable ref
          .valueSet(List&lt;String&gt; | null) // nullable valueSet
          .deserializer(io.resys.hdes.client.api.ast.TypeDef.Deserializer) // required deserializer
          .serializer(io.resys.hdes.client.api.ast.TypeDef.Serializer) // required serializer
          .build();
       
      Returns:
      A new ImmutableTypeDef builder