Package io.resys.hdes.client.api.ast
Class ImmutableAstDecision
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstDecision
- All Implemented Interfaces:
AstBody,AstDecision,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableAstDecision
extends Object
implements AstDecision
Immutable implementation of
AstDecision.
Use the builder to create immutable instances:
ImmutableAstDecision.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableAstDecision.Nested classes/interfaces inherited from interface io.resys.hdes.client.api.ast.AstBody
AstBody.AstBodyType, AstBody.AstCommandMessage, AstBody.AstCommandRange, AstBody.AstSource, AstBody.CommandMessageType, AstBody.HeadersNested classes/interfaces inherited from interface io.resys.hdes.client.api.ast.AstDecision
AstDecision.AstDecisionCell, AstDecision.AstDecisionRow, AstDecision.ColumnExpressionType, AstDecision.HitPolicy -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableAstDecision.Builderbuilder()Creates a builder forImmutableAstDecision.static ImmutableAstDecisioncopyOf(AstDecision instance) Creates an immutable copy of aAstDecisionvalue.booleanThis instance is equal to all instances ofImmutableAstDecisionthat have equal attribute values.com.google.common.collect.ImmutableMap<TypeDef.ValueType,List<String>> com.google.common.collect.ImmutableList<String>com.google.common.collect.ImmutableList<AstBody.AstCommandMessage>getName()com.google.common.collect.ImmutableList<AstDecision.AstDecisionRow>getRows()inthashCode()Computes a hash code from attributes:name,description,headers,bodyType,messages,headerTypes,headerExpressions,hitPolicy,rows.toString()Prints the immutable valueAstDecisionwith attribute values.final ImmutableAstDecisionwithBodyType(AstBody.AstBodyType value) Copy the current immutable object by setting a value for thebodyTypeattribute.final ImmutableAstDecisionwithDescription(String value) Copy the current immutable object by setting a value for thedescriptionattribute.final ImmutableAstDecisionwithHeaderExpressions(Map<TypeDef.ValueType, ? extends List<String>> entries) Copy the current immutable object by replacing theheaderExpressionsmap with the specified map.final ImmutableAstDecisionwithHeaders(AstBody.Headers value) Copy the current immutable object by setting a value for theheadersattribute.final ImmutableAstDecisionwithHeaderTypes(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofheaderTypes.final ImmutableAstDecisionwithHeaderTypes(String... elements) Copy the current immutable object with elements that replace the content ofheaderTypes.final ImmutableAstDecisionCopy the current immutable object by setting a value for thehitPolicyattribute.final ImmutableAstDecisionwithMessages(AstBody.AstCommandMessage... elements) Copy the current immutable object with elements that replace the content ofmessages.final ImmutableAstDecisionwithMessages(Iterable<? extends AstBody.AstCommandMessage> elements) Copy the current immutable object with elements that replace the content ofmessages.final ImmutableAstDecisionCopy the current immutable object by setting a value for thenameattribute.final ImmutableAstDecisionwithRows(AstDecision.AstDecisionRow... elements) Copy the current immutable object with elements that replace the content ofrows.final ImmutableAstDecisionwithRows(Iterable<? extends AstDecision.AstDecisionRow> elements) Copy the current immutable object with elements that replace the content ofrows.
-
Method Details
-
getName
-
getDescription
- Specified by:
getDescriptionin interfaceAstBody- Returns:
- The value of the
descriptionattribute
-
getHeaders
- Specified by:
getHeadersin interfaceAstBody- Returns:
- The value of the
headersattribute
-
getBodyType
- Specified by:
getBodyTypein interfaceAstBody- Returns:
- The value of the
bodyTypeattribute
-
getMessages
- Specified by:
getMessagesin interfaceAstBody- Returns:
- The value of the
messagesattribute
-
getHeaderTypes
- Specified by:
getHeaderTypesin interfaceAstDecision- Returns:
- The value of the
headerTypesattribute
-
getHeaderExpressions
public com.google.common.collect.ImmutableMap<TypeDef.ValueType,List<String>> getHeaderExpressions()- Specified by:
getHeaderExpressionsin interfaceAstDecision- Returns:
- The value of the
headerExpressionsattribute
-
getHitPolicy
- Specified by:
getHitPolicyin interfaceAstDecision- Returns:
- The value of the
hitPolicyattribute
-
getRows
- Specified by:
getRowsin interfaceAstDecision- Returns:
- The value of the
rowsattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withDescription
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description (can benull)- Returns:
- A modified copy of the
thisobject
-
withHeaders
Copy the current immutable object by setting a value for theheadersattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for headers- Returns:
- A modified copy of the
thisobject
-
withBodyType
Copy the current immutable object by setting a value for thebodyTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bodyType- Returns:
- A modified copy of the
thisobject
-
withMessages
Copy the current immutable object with elements that replace the content ofmessages.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMessages
public final ImmutableAstDecision withMessages(Iterable<? extends AstBody.AstCommandMessage> elements) Copy the current immutable object with elements that replace the content ofmessages. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of messages elements to set- Returns:
- A modified copy of
thisobject
-
withHeaderTypes
Copy the current immutable object with elements that replace the content ofheaderTypes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withHeaderTypes
Copy the current immutable object with elements that replace the content ofheaderTypes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of headerTypes elements to set- Returns:
- A modified copy of
thisobject
-
withHeaderExpressions
public final ImmutableAstDecision withHeaderExpressions(Map<TypeDef.ValueType, ? extends List<String>> entries) Copy the current immutable object by replacing theheaderExpressionsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the headerExpressions map- Returns:
- A modified copy of
thisobject
-
withHitPolicy
Copy the current immutable object by setting a value for thehitPolicyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hitPolicy- Returns:
- A modified copy of the
thisobject
-
withRows
Copy the current immutable object with elements that replace the content ofrows.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRows
Copy the current immutable object with elements that replace the content ofrows. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of rows elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableAstDecisionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,description,headers,bodyType,messages,headerTypes,headerExpressions,hitPolicy,rows. -
toString
Prints the immutable valueAstDecisionwith attribute values. -
copyOf
Creates an immutable copy of aAstDecisionvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable AstDecision instance
-
builder
Creates a builder forImmutableAstDecision.ImmutableAstDecision.builder() .name(String) // requiredname.description(String | null) // nullabledescription.headers(io.resys.hdes.client.api.ast.AstBody.Headers) // requiredheaders.bodyType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // requiredbodyType.addMessages|addAllMessages(io.resys.hdes.client.api.ast.AstBody.AstCommandMessage) //messageselements .addHeaderTypes|addAllHeaderTypes(String) //headerTypeselements .putHeaderExpressions|putAllHeaderExpressions(io.resys.hdes.client.api.ast.TypeDef.ValueType => List<String>) //headerExpressionsmappings .hitPolicy(io.resys.hdes.client.api.ast.AstDecision.HitPolicy) // requiredhitPolicy.addRows|addAllRows(io.resys.hdes.client.api.ast.AstDecision.AstDecisionRow) //rowselements .build();- Returns:
- A new ImmutableAstDecision builder
-