Class ImmutableAstTag.Builder

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

@NotThreadSafe public static final class ImmutableAstTag.Builder extends Object
Builds instances of type ImmutableAstTag. 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 ImmutableAstTag.Builder from(AstTag instance)
      Fill a builder with attribute values from the provided io.resys.hdes.client.api.ast.AstTag instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder from(AstBody instance)
      Fill a builder with attribute values from the provided io.resys.hdes.client.api.ast.AstBody instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • description

      @CanIgnoreReturnValue public final ImmutableAstTag.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
    • headers

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder headers(AstBody.Headers headers)
      Initializes the value for the headers attribute.
      Parameters:
      headers - The value for headers
      Returns:
      this builder for use in a chained invocation
    • bodyType

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder bodyType(AstBody.AstBodyType bodyType)
      Initializes the value for the bodyType attribute.
      Parameters:
      bodyType - The value for bodyType
      Returns:
      this builder for use in a chained invocation
    • addMessages

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder addMessages(AstBody.AstCommandMessage element)
      Adds one element to messages list.
      Parameters:
      element - A messages element
      Returns:
      this builder for use in a chained invocation
    • addMessages

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder addMessages(AstBody.AstCommandMessage... elements)
      Adds elements to messages list.
      Parameters:
      elements - An array of messages elements
      Returns:
      this builder for use in a chained invocation
    • messages

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder messages(Iterable<? extends AstBody.AstCommandMessage> elements)
      Sets or replaces all elements for messages list.
      Parameters:
      elements - An iterable of messages elements
      Returns:
      this builder for use in a chained invocation
    • addAllMessages

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder addAllMessages(Iterable<? extends AstBody.AstCommandMessage> elements)
      Adds elements to messages list.
      Parameters:
      elements - An iterable of messages elements
      Returns:
      this builder for use in a chained invocation
    • name

      @CanIgnoreReturnValue public final ImmutableAstTag.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
    • commitId

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

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder created(LocalDateTime created)
      Initializes the value for the created attribute.
      Parameters:
      created - The value for created
      Returns:
      this builder for use in a chained invocation
    • addValues

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder addValues(AstTag.AstTagValue element)
      Adds one element to values list.
      Parameters:
      element - A values element
      Returns:
      this builder for use in a chained invocation
    • addValues

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder addValues(AstTag.AstTagValue... elements)
      Adds elements to values list.
      Parameters:
      elements - An array of values elements
      Returns:
      this builder for use in a chained invocation
    • values

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder values(Iterable<? extends AstTag.AstTagValue> elements)
      Sets or replaces all elements for values list.
      Parameters:
      elements - An iterable of values elements
      Returns:
      this builder for use in a chained invocation
    • addAllValues

      @CanIgnoreReturnValue public final ImmutableAstTag.Builder addAllValues(Iterable<? extends AstTag.AstTagValue> elements)
      Adds elements to values list.
      Parameters:
      elements - An iterable of values elements
      Returns:
      this builder for use in a chained invocation
    • build

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