Package io.resys.hdes.client.api.ast
Class ImmutableAstTag.Builder
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstTag.Builder
- Enclosing class:
- ImmutableAstTag
Builds instances of type
ImmutableAstTag.
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 ImmutableAstTag.BuilderaddAllMessages(Iterable<? extends AstBody.AstCommandMessage> elements) Adds elements tomessageslist.final ImmutableAstTag.BuilderaddAllValues(Iterable<? extends AstTag.AstTagValue> elements) Adds elements tovalueslist.final ImmutableAstTag.BuilderaddMessages(AstBody.AstCommandMessage element) Adds one element tomessageslist.final ImmutableAstTag.BuilderaddMessages(AstBody.AstCommandMessage... elements) Adds elements tomessageslist.final ImmutableAstTag.BuilderaddValues(AstTag.AstTagValue element) Adds one element tovalueslist.final ImmutableAstTag.BuilderaddValues(AstTag.AstTagValue... elements) Adds elements tovalueslist.final ImmutableAstTag.BuilderbodyType(AstBody.AstBodyType bodyType) Initializes the value for thebodyTypeattribute.build()Builds a newImmutableAstTag.final ImmutableAstTag.BuilderInitializes the value for thecommitIdattribute.final ImmutableAstTag.Buildercreated(LocalDateTime created) Initializes the value for thecreatedattribute.final ImmutableAstTag.Builderdescription(String description) Initializes the value for thedescriptionattribute.final ImmutableAstTag.BuilderFill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstBodyinstance.final ImmutableAstTag.BuilderFill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstTaginstance.final ImmutableAstTag.Builderheaders(AstBody.Headers headers) Initializes the value for theheadersattribute.final ImmutableAstTag.Buildermessages(Iterable<? extends AstBody.AstCommandMessage> elements) Sets or replaces all elements formessageslist.final ImmutableAstTag.BuilderInitializes the value for thenameattribute.final ImmutableAstTag.Buildervalues(Iterable<? extends AstTag.AstTagValue> elements) Sets or replaces all elements forvalueslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstTaginstance.- 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 ImmutableAstTag.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 ImmutableAstTag.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 ImmutableAstTag.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 ImmutableAstTag.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 ImmutableAstTag.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
-
commitId
Initializes the value for thecommitIdattribute.- Parameters:
commitId- The value for commitId (can benull)- 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
-
addValues
Adds one element tovalueslist.- Parameters:
element- A values element- Returns:
thisbuilder for use in a chained invocation
-
addValues
@CanIgnoreReturnValue public final ImmutableAstTag.Builder addValues(AstTag.AstTagValue... elements) Adds elements tovalueslist.- Parameters:
elements- An array of values elements- Returns:
thisbuilder for use in a chained invocation
-
values
@CanIgnoreReturnValue public final ImmutableAstTag.Builder values(Iterable<? extends AstTag.AstTagValue> elements) Sets or replaces all elements forvalueslist.- Parameters:
elements- An iterable of values elements- Returns:
thisbuilder for use in a chained invocation
-
addAllValues
@CanIgnoreReturnValue public final ImmutableAstTag.Builder addAllValues(Iterable<? extends AstTag.AstTagValue> elements) Adds elements tovalueslist.- Parameters:
elements- An iterable of values elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableAstTag.- Returns:
- An immutable instance of AstTag
- Throws:
IllegalStateException- if any required attributes are missing
-