Package io.resys.hdes.client.api.ast
Class ImmutableAstFlow.Builder
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstFlow.Builder
- Enclosing class:
- ImmutableAstFlow
Builds instances of type
ImmutableAstFlow.
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 Summary
Modifier and TypeMethodDescriptionfinal ImmutableAstFlow.BuilderaddAllAutocomplete(Iterable<? extends AstFlow.FlowAstAutocomplete> elements) Adds elements toautocompletelist.final ImmutableAstFlow.BuilderaddAllMessages(Iterable<? extends AstBody.AstCommandMessage> elements) Adds elements tomessageslist.final ImmutableAstFlow.BuilderAdds one element toautocompletelist.final ImmutableAstFlow.BuilderaddAutocomplete(AstFlow.FlowAstAutocomplete... elements) Adds elements toautocompletelist.final ImmutableAstFlow.BuilderaddMessages(AstBody.AstCommandMessage element) Adds one element tomessageslist.final ImmutableAstFlow.BuilderaddMessages(AstBody.AstCommandMessage... elements) Adds elements tomessageslist.final ImmutableAstFlow.Builderautocomplete(Iterable<? extends AstFlow.FlowAstAutocomplete> elements) Sets or replaces all elements forautocompletelist.final ImmutableAstFlow.BuilderbodyType(AstBody.AstBodyType bodyType) Initializes the value for thebodyTypeattribute.build()Builds a newImmutableAstFlow.final ImmutableAstFlow.Builderdescription(String description) Initializes the value for thedescriptionattribute.final ImmutableAstFlow.BuilderFill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstBodyinstance.final ImmutableAstFlow.BuilderFill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstFlowinstance.final ImmutableAstFlow.Builderheaders(AstBody.Headers headers) Initializes the value for theheadersattribute.final ImmutableAstFlow.Buildermessages(Iterable<? extends AstBody.AstCommandMessage> elements) Sets or replaces all elements formessageslist.final ImmutableAstFlow.BuilderInitializes the value for thenameattribute.final ImmutableAstFlow.Buildersrc(AstFlow.AstFlowRoot src) Initializes the value for thesrcattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstFlowinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstBodyinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableAstFlow.Builder description(@Nullable String description) Initializes the value for thedescriptionattribute.- Parameters:
description- The value for description (can benull)- Returns:
thisbuilder for use in a chained invocation
-
headers
Initializes the value for theheadersattribute.- Parameters:
headers- The value for headers- Returns:
thisbuilder for use in a chained invocation
-
bodyType
Initializes the value for thebodyTypeattribute.- Parameters:
bodyType- The value for bodyType- Returns:
thisbuilder for use in a chained invocation
-
addMessages
@CanIgnoreReturnValue public final ImmutableAstFlow.Builder addMessages(AstBody.AstCommandMessage element) Adds one element tomessageslist.- Parameters:
element- A messages element- Returns:
thisbuilder for use in a chained invocation
-
addMessages
@CanIgnoreReturnValue public final ImmutableAstFlow.Builder addMessages(AstBody.AstCommandMessage... elements) Adds elements tomessageslist.- Parameters:
elements- An array of messages elements- Returns:
thisbuilder for use in a chained invocation
-
messages
@CanIgnoreReturnValue public final ImmutableAstFlow.Builder messages(Iterable<? extends AstBody.AstCommandMessage> elements) Sets or replaces all elements formessageslist.- Parameters:
elements- An iterable of messages elements- Returns:
thisbuilder for use in a chained invocation
-
addAllMessages
@CanIgnoreReturnValue public final ImmutableAstFlow.Builder addAllMessages(Iterable<? extends AstBody.AstCommandMessage> elements) Adds elements tomessageslist.- Parameters:
elements- An iterable of messages elements- Returns:
thisbuilder for use in a chained invocation
-
src
Initializes the value for thesrcattribute.- Parameters:
src- The value for src- Returns:
thisbuilder for use in a chained invocation
-
addAutocomplete
@CanIgnoreReturnValue public final ImmutableAstFlow.Builder addAutocomplete(AstFlow.FlowAstAutocomplete element) Adds one element toautocompletelist.- Parameters:
element- A autocomplete element- Returns:
thisbuilder for use in a chained invocation
-
addAutocomplete
@CanIgnoreReturnValue public final ImmutableAstFlow.Builder addAutocomplete(AstFlow.FlowAstAutocomplete... elements) Adds elements toautocompletelist.- Parameters:
elements- An array of autocomplete elements- Returns:
thisbuilder for use in a chained invocation
-
autocomplete
@CanIgnoreReturnValue public final ImmutableAstFlow.Builder autocomplete(Iterable<? extends AstFlow.FlowAstAutocomplete> elements) Sets or replaces all elements forautocompletelist.- Parameters:
elements- An iterable of autocomplete elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAutocomplete
@CanIgnoreReturnValue public final ImmutableAstFlow.Builder addAllAutocomplete(Iterable<? extends AstFlow.FlowAstAutocomplete> elements) Adds elements toautocompletelist.- Parameters:
elements- An iterable of autocomplete elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableAstFlow.- Returns:
- An immutable instance of AstFlow
- Throws:
IllegalStateException- if any required attributes are missing
-