Package io.resys.hdes.client.api.ast
Class ImmutableAstBranch.Builder
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstBranch.Builder
- Enclosing class:
- ImmutableAstBranch
Builds instances of type
ImmutableAstBranch.
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 TypeMethodDescriptionaddAllMessages(Iterable<? extends AstBody.AstCommandMessage> elements) Adds elements tomessageslist.addMessages(AstBody.AstCommandMessage element) Adds one element tomessageslist.addMessages(AstBody.AstCommandMessage... elements) Adds elements tomessageslist.bodyType(AstBody.AstBodyType bodyType) Initializes the value for thebodyTypeattribute.build()Builds a newImmutableAstBranch.created(LocalDateTime created) Initializes the value for thecreatedattribute.description(String description) Initializes the value for thedescriptionattribute.Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstBodyinstance.Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstBranchinstance.headers(AstBody.Headers headers) Initializes the value for theheadersattribute.messages(Iterable<? extends AstBody.AstCommandMessage> elements) Sets or replaces all elements formessageslist.Initializes the value for thenameattribute.Initializes the value for thetagIdattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstBranchinstance.- 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
-
description
@CanIgnoreReturnValue public final ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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 ImmutableAstBranch.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
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
created
Initializes the value for thecreatedattribute.- Parameters:
created- The value for created- Returns:
thisbuilder for use in a chained invocation
-
tagId
Initializes the value for thetagIdattribute.- Parameters:
tagId- The value for tagId- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableAstBranch.- Returns:
- An immutable instance of AstBranch
- Throws:
IllegalStateException- if any required attributes are missing
-