Package io.resys.hdes.client.api.ast
Class ImmutableAstService.Builder
java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstService.Builder
- Enclosing class:
- ImmutableAstService
Builds instances of type
ImmutableAstService.
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.addAllRefs(Iterable<? extends AstService.AstServiceRef> elements) Adds elements torefslist.addMessages(AstBody.AstCommandMessage element) Adds one element tomessageslist.addMessages(AstBody.AstCommandMessage... elements) Adds elements tomessageslist.addRefs(AstService.AstServiceRef element) Adds one element torefslist.addRefs(AstService.AstServiceRef... elements) Adds elements torefslist.beanType(Class<? extends AstService.ServiceExecutorType> beanType) Initializes the value for thebeanTypeattribute.bodyType(AstBody.AstBodyType bodyType) Initializes the value for thebodyTypeattribute.build()Builds a newImmutableAstService.description(String description) Initializes the value for thedescriptionattribute.executorType(AstService.AstServiceType executorType) Initializes the value for theexecutorTypeattribute.Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstBodyinstance.from(AstService instance) Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstServiceinstance.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.refs(Iterable<? extends AstService.AstServiceRef> elements) Sets or replaces all elements forrefslist.returnDef1(TypeDef returnDef1) Initializes the value for thereturnDef1attribute.Initializes the value for thetypeDef0attribute.Initializes the value for thetypeDef1attribute.Initializes the value for thevalueattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.resys.hdes.client.api.ast.AstServiceinstance.- 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 ImmutableAstService.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 ImmutableAstService.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 ImmutableAstService.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 ImmutableAstService.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 ImmutableAstService.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 ImmutableAstService.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
-
beanType
@CanIgnoreReturnValue public final ImmutableAstService.Builder beanType(Class<? extends AstService.ServiceExecutorType> beanType) Initializes the value for thebeanTypeattribute.- Parameters:
beanType- The value for beanType- Returns:
thisbuilder for use in a chained invocation
-
value
Initializes the value for thevalueattribute.- Parameters:
value- The value for value- Returns:
thisbuilder for use in a chained invocation
-
typeDef0
Initializes the value for thetypeDef0attribute.- Parameters:
typeDef0- The value for typeDef0 (can benull)- Returns:
thisbuilder for use in a chained invocation
-
typeDef1
Initializes the value for thetypeDef1attribute.- Parameters:
typeDef1- The value for typeDef1 (can benull)- Returns:
thisbuilder for use in a chained invocation
-
returnDef1
@CanIgnoreReturnValue public final ImmutableAstService.Builder returnDef1(@Nullable TypeDef returnDef1) Initializes the value for thereturnDef1attribute.- Parameters:
returnDef1- The value for returnDef1 (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addRefs
@CanIgnoreReturnValue public final ImmutableAstService.Builder addRefs(AstService.AstServiceRef element) Adds one element torefslist.- Parameters:
element- A refs element- Returns:
thisbuilder for use in a chained invocation
-
addRefs
@CanIgnoreReturnValue public final ImmutableAstService.Builder addRefs(AstService.AstServiceRef... elements) Adds elements torefslist.- Parameters:
elements- An array of refs elements- Returns:
thisbuilder for use in a chained invocation
-
refs
@CanIgnoreReturnValue public final ImmutableAstService.Builder refs(Iterable<? extends AstService.AstServiceRef> elements) Sets or replaces all elements forrefslist.- Parameters:
elements- An iterable of refs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllRefs
@CanIgnoreReturnValue public final ImmutableAstService.Builder addAllRefs(Iterable<? extends AstService.AstServiceRef> elements) Adds elements torefslist.- Parameters:
elements- An iterable of refs elements- Returns:
thisbuilder for use in a chained invocation
-
executorType
@CanIgnoreReturnValue public final ImmutableAstService.Builder executorType(AstService.AstServiceType executorType) Initializes the value for theexecutorTypeattribute.- Parameters:
executorType- The value for executorType- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableAstService.- Returns:
- An immutable instance of AstService
- Throws:
IllegalStateException- if any required attributes are missing
-