Class ImmutableAstService.Builder

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

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

      @CanIgnoreReturnValue public final ImmutableAstService.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
    • name

      @CanIgnoreReturnValue public final ImmutableAstService.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
    • description

      @CanIgnoreReturnValue public final ImmutableAstService.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 ImmutableAstService.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 ImmutableAstService.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 ImmutableAstService.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 ImmutableAstService.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 ImmutableAstService.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 ImmutableAstService.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
    • beanType

      @CanIgnoreReturnValue public final ImmutableAstService.Builder beanType(Class<? extends AstService.ServiceExecutorType> beanType)
      Initializes the value for the beanType attribute.
      Parameters:
      beanType - The value for beanType
      Returns:
      this builder for use in a chained invocation
    • value

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

      @CanIgnoreReturnValue public final ImmutableAstService.Builder typeDef0(@Nullable TypeDef typeDef0)
      Initializes the value for the typeDef0 attribute.
      Parameters:
      typeDef0 - The value for typeDef0 (can be null)
      Returns:
      this builder for use in a chained invocation
    • typeDef1

      @CanIgnoreReturnValue public final ImmutableAstService.Builder typeDef1(@Nullable TypeDef typeDef1)
      Initializes the value for the typeDef1 attribute.
      Parameters:
      typeDef1 - The value for typeDef1 (can be null)
      Returns:
      this builder for use in a chained invocation
    • returnDef1

      @CanIgnoreReturnValue public final ImmutableAstService.Builder returnDef1(@Nullable TypeDef returnDef1)
      Initializes the value for the returnDef1 attribute.
      Parameters:
      returnDef1 - The value for returnDef1 (can be null)
      Returns:
      this builder for use in a chained invocation
    • addRefs

      @CanIgnoreReturnValue public final ImmutableAstService.Builder addRefs(AstService.AstServiceRef element)
      Adds one element to refs list.
      Parameters:
      element - A refs element
      Returns:
      this builder for use in a chained invocation
    • addRefs

      @CanIgnoreReturnValue public final ImmutableAstService.Builder addRefs(AstService.AstServiceRef... elements)
      Adds elements to refs list.
      Parameters:
      elements - An array of refs elements
      Returns:
      this builder for use in a chained invocation
    • refs

      @CanIgnoreReturnValue public final ImmutableAstService.Builder refs(Iterable<? extends AstService.AstServiceRef> elements)
      Sets or replaces all elements for refs list.
      Parameters:
      elements - An iterable of refs elements
      Returns:
      this builder for use in a chained invocation
    • addAllRefs

      @CanIgnoreReturnValue public final ImmutableAstService.Builder addAllRefs(Iterable<? extends AstService.AstServiceRef> elements)
      Adds elements to refs list.
      Parameters:
      elements - An iterable of refs elements
      Returns:
      this builder for use in a chained invocation
    • executorType

      @CanIgnoreReturnValue public final ImmutableAstService.Builder executorType(AstService.AstServiceType executorType)
      Initializes the value for the executorType attribute.
      Parameters:
      executorType - The value for executorType
      Returns:
      this builder for use in a chained invocation
    • build

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