Class ImmutableAstBranch.Builder

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

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

      @CanIgnoreReturnValue public final ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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
    • created

      @CanIgnoreReturnValue public final ImmutableAstBranch.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
    • tagId

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

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