Package io.resys.hdes.client.api.ast
Class ImmutableAstDecision.Builder
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstDecision.Builder
- Enclosing class:
- ImmutableAstDecision
Builds instances of type
ImmutableAstDecision.
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 TypeMethodDescriptionaddAllHeaderTypes(Iterable<String> elements) Adds elements toheaderTypeslist.addAllMessages(Iterable<? extends AstBody.AstCommandMessage> elements) Adds elements tomessageslist.addAllRows(Iterable<? extends AstDecision.AstDecisionRow> elements) Adds elements torowslist.addHeaderTypes(String element) Adds one element toheaderTypeslist.addHeaderTypes(String... elements) Adds elements toheaderTypeslist.addMessages(AstBody.AstCommandMessage element) Adds one element tomessageslist.addMessages(AstBody.AstCommandMessage... elements) Adds elements tomessageslist.addRows(AstDecision.AstDecisionRow element) Adds one element torowslist.addRows(AstDecision.AstDecisionRow... elements) Adds elements torowslist.bodyType(AstBody.AstBodyType bodyType) Initializes the value for thebodyTypeattribute.build()Builds a newImmutableAstDecision.description(String description) Initializes the value for thedescriptionattribute.Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstBodyinstance.from(AstDecision instance) Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstDecisioninstance.headerExpressions(Map<TypeDef.ValueType, ? extends List<String>> entries) Sets or replaces all mappings from the specified map as entries for theheaderExpressionsmap.headers(AstBody.Headers headers) Initializes the value for theheadersattribute.headerTypes(Iterable<String> elements) Sets or replaces all elements forheaderTypeslist.hitPolicy(AstDecision.HitPolicy hitPolicy) Initializes the value for thehitPolicyattribute.messages(Iterable<? extends AstBody.AstCommandMessage> elements) Sets or replaces all elements formessageslist.Initializes the value for thenameattribute.putAllHeaderExpressions(Map<TypeDef.ValueType, ? extends List<String>> entries) Put all mappings from the specified map as entries toheaderExpressionsmap.putHeaderExpressions(TypeDef.ValueType key, List<String> value) Put one entry to theheaderExpressionsmap.putHeaderExpressions(Map.Entry<TypeDef.ValueType, ? extends List<String>> entry) Put one entry to theheaderExpressionsmap.rows(Iterable<? extends AstDecision.AstDecisionRow> elements) Sets or replaces all elements forrowslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstDecisioninstance.- 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 ImmutableAstDecision.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
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder bodyType(AstBody.AstBodyType bodyType) Initializes the value for thebodyTypeattribute.- Parameters:
bodyType- The value for bodyType- Returns:
thisbuilder for use in a chained invocation
-
addMessages
@CanIgnoreReturnValue public final ImmutableAstDecision.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 ImmutableAstDecision.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 ImmutableAstDecision.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 ImmutableAstDecision.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
-
addHeaderTypes
Adds one element toheaderTypeslist.- Parameters:
element- A headerTypes element- Returns:
thisbuilder for use in a chained invocation
-
addHeaderTypes
Adds elements toheaderTypeslist.- Parameters:
elements- An array of headerTypes elements- Returns:
thisbuilder for use in a chained invocation
-
headerTypes
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder headerTypes(Iterable<String> elements) Sets or replaces all elements forheaderTypeslist.- Parameters:
elements- An iterable of headerTypes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllHeaderTypes
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder addAllHeaderTypes(Iterable<String> elements) Adds elements toheaderTypeslist.- Parameters:
elements- An iterable of headerTypes elements- Returns:
thisbuilder for use in a chained invocation
-
putHeaderExpressions
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder putHeaderExpressions(TypeDef.ValueType key, List<String> value) Put one entry to theheaderExpressionsmap.- Parameters:
key- The key in the headerExpressions mapvalue- The associated value in the headerExpressions map- Returns:
thisbuilder for use in a chained invocation
-
putHeaderExpressions
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder putHeaderExpressions(Map.Entry<TypeDef.ValueType, ? extends List<String>> entry) Put one entry to theheaderExpressionsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
headerExpressions
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder headerExpressions(Map<TypeDef.ValueType, ? extends List<String>> entries) Sets or replaces all mappings from the specified map as entries for theheaderExpressionsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the headerExpressions map- Returns:
thisbuilder for use in a chained invocation
-
putAllHeaderExpressions
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder putAllHeaderExpressions(Map<TypeDef.ValueType, ? extends List<String>> entries) Put all mappings from the specified map as entries toheaderExpressionsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the headerExpressions map- Returns:
thisbuilder for use in a chained invocation
-
hitPolicy
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder hitPolicy(AstDecision.HitPolicy hitPolicy) Initializes the value for thehitPolicyattribute.- Parameters:
hitPolicy- The value for hitPolicy- Returns:
thisbuilder for use in a chained invocation
-
addRows
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder addRows(AstDecision.AstDecisionRow element) Adds one element torowslist.- Parameters:
element- A rows element- Returns:
thisbuilder for use in a chained invocation
-
addRows
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder addRows(AstDecision.AstDecisionRow... elements) Adds elements torowslist.- Parameters:
elements- An array of rows elements- Returns:
thisbuilder for use in a chained invocation
-
rows
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder rows(Iterable<? extends AstDecision.AstDecisionRow> elements) Sets or replaces all elements forrowslist.- Parameters:
elements- An iterable of rows elements- Returns:
thisbuilder for use in a chained invocation
-
addAllRows
@CanIgnoreReturnValue public final ImmutableAstDecision.Builder addAllRows(Iterable<? extends AstDecision.AstDecisionRow> elements) Adds elements torowslist.- Parameters:
elements- An iterable of rows elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableAstDecision.- Returns:
- An immutable instance of AstDecision
- Throws:
IllegalStateException- if any required attributes are missing
-