Class ImmutableTypeDef.Builder

java.lang.Object
io.resys.hdes.client.api.ast.ImmutableTypeDef.Builder
Enclosing class:
ImmutableTypeDef

@NotThreadSafe public static final class ImmutableTypeDef.Builder extends Object
Builds instances of type ImmutableTypeDef. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder from(TypeDef instance)
      Fill a builder with attribute values from the provided TypeDef instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • id

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder id(String id)
      Initializes the value for the id attribute.
      Parameters:
      id - The value for id
      Returns:
      this builder for use in a chained invocation
    • name

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder name(String name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • order

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder order(Integer order)
      Initializes the value for the order attribute.
      Parameters:
      order - The value for order
      Returns:
      this builder for use in a chained invocation
    • data

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder data(Boolean data)
      Initializes the value for the data attribute.
      Parameters:
      data - The value for data
      Returns:
      this builder for use in a chained invocation
    • direction

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder direction(TypeDef.Direction direction)
      Initializes the value for the direction attribute.
      Parameters:
      direction - The value for direction
      Returns:
      this builder for use in a chained invocation
    • valueType

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder valueType(TypeDef.ValueType valueType)
      Initializes the value for the valueType attribute.
      Parameters:
      valueType - The value for valueType
      Returns:
      this builder for use in a chained invocation
    • isRequired

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder isRequired(boolean isRequired)
      Initializes the value for the isRequired attribute.
      Parameters:
      isRequired - The value for isRequired
      Returns:
      this builder for use in a chained invocation
    • properties

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder properties(Collection<TypeDef> properties)
      Initializes the value for the properties attribute.
      Parameters:
      properties - The value for properties
      Returns:
      this builder for use in a chained invocation
    • extRef

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder extRef(@Nullable String extRef)
      Initializes the value for the extRef attribute.
      Parameters:
      extRef - The value for extRef (can be null)
      Returns:
      this builder for use in a chained invocation
    • script

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder script(@Nullable String script)
      Initializes the value for the script attribute.
      Parameters:
      script - The value for script (can be null)
      Returns:
      this builder for use in a chained invocation
    • beanType

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder beanType(@Nullable Class<?> beanType)
      Initializes the value for the beanType attribute.
      Parameters:
      beanType - The value for beanType (can be null)
      Returns:
      this builder for use in a chained invocation
    • description

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder description(@Nullable String description)
      Initializes the value for the description attribute.
      Parameters:
      description - The value for description (can be null)
      Returns:
      this builder for use in a chained invocation
    • values

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder values(@Nullable String values)
      Initializes the value for the values attribute.
      Parameters:
      values - The value for values (can be null)
      Returns:
      this builder for use in a chained invocation
    • ref

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder ref(@Nullable String ref)
      Initializes the value for the ref attribute.
      Parameters:
      ref - The value for ref (can be null)
      Returns:
      this builder for use in a chained invocation
    • addValueSet

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder addValueSet(String element)
      Adds one element to valueSet list.
      Parameters:
      element - A valueSet element
      Returns:
      this builder for use in a chained invocation
    • addValueSet

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder addValueSet(String... elements)
      Adds elements to valueSet list.
      Parameters:
      elements - An array of valueSet elements
      Returns:
      this builder for use in a chained invocation
    • valueSet

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder valueSet(@Nullable Iterable<String> elements)
      Sets or replaces all elements for valueSet list.
      Parameters:
      elements - An iterable of valueSet elements
      Returns:
      this builder for use in a chained invocation
    • addAllValueSet

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder addAllValueSet(Iterable<String> elements)
      Adds elements to valueSet list.
      Parameters:
      elements - An iterable of valueSet elements
      Returns:
      this builder for use in a chained invocation
    • deserializer

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder deserializer(TypeDef.Deserializer deserializer)
      Initializes the value for the deserializer attribute.
      Parameters:
      deserializer - The value for deserializer
      Returns:
      this builder for use in a chained invocation
    • serializer

      @CanIgnoreReturnValue public final ImmutableTypeDef.Builder serializer(TypeDef.Serializer serializer)
      Initializes the value for the serializer attribute.
      Parameters:
      serializer - The value for serializer
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableTypeDef build()
      Builds a new ImmutableTypeDef.
      Returns:
      An immutable instance of TypeDef
      Throws:
      IllegalStateException - if any required attributes are missing