Package io.resys.hdes.client.api.ast
Class ImmutableAstBranch
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstBranch
- All Implemented Interfaces:
AstBody,AstBranch,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableAstBranch
extends Object
implements AstBranch
Immutable implementation of
AstBranch.
Use the builder to create immutable instances:
ImmutableAstBranch.builder().
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.resys.hdes.client.api.ast.AstBody
AstBody.AstBodyType, AstBody.AstCommandMessage, AstBody.AstCommandRange, AstBody.AstSource, AstBody.CommandMessageType, AstBody.Headers -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableAstBranch.Builderbuilder()Creates a builder forImmutableAstBranch.static ImmutableAstBranchCreates an immutable copy of aAstBranchvalue.booleanThis instance is equal to all instances ofImmutableAstBranchthat have equal attribute values.com.google.common.collect.ImmutableList<AstBody.AstCommandMessage>getName()getTagId()inthashCode()Computes a hash code from attributes:description,headers,bodyType,messages,name,created,tagId.toString()Prints the immutable valueAstBranchwith attribute values.final ImmutableAstBranchwithBodyType(AstBody.AstBodyType value) Copy the current immutable object by setting a value for thebodyTypeattribute.final ImmutableAstBranchwithCreated(LocalDateTime value) Copy the current immutable object by setting a value for thecreatedattribute.final ImmutableAstBranchwithDescription(String value) Copy the current immutable object by setting a value for thedescriptionattribute.final ImmutableAstBranchwithHeaders(AstBody.Headers value) Copy the current immutable object by setting a value for theheadersattribute.final ImmutableAstBranchwithMessages(AstBody.AstCommandMessage... elements) Copy the current immutable object with elements that replace the content ofmessages.final ImmutableAstBranchwithMessages(Iterable<? extends AstBody.AstCommandMessage> elements) Copy the current immutable object with elements that replace the content ofmessages.final ImmutableAstBranchCopy the current immutable object by setting a value for thenameattribute.final ImmutableAstBranchCopy the current immutable object by setting a value for thetagIdattribute.
-
Method Details
-
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
-
getName
-
getCreated
- Specified by:
getCreatedin interfaceAstBranch- Returns:
- The value of the
createdattribute
-
getTagId
-
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 ImmutableAstBranch 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
-
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
-
withCreated
Copy the current immutable object by setting a value for thecreatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for created- Returns:
- A modified copy of the
thisobject
-
withTagId
Copy the current immutable object by setting a value for thetagIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tagId- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableAstBranchthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:description,headers,bodyType,messages,name,created,tagId. -
toString
Prints the immutable valueAstBranchwith attribute values. -
copyOf
Creates an immutable copy of aAstBranchvalue. 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 AstBranch instance
-
builder
Creates a builder forImmutableAstBranch.ImmutableAstBranch.builder() .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 .name(String) // requiredname.created(java.time.LocalDateTime) // requiredcreated.tagId(String) // requiredtagId.build();- Returns:
- A new ImmutableAstBranch builder
-