Class ImmutableComposableStepDto.Builder
java.lang.Object
com.chutneytesting.component.scenario.api.dto.ImmutableComposableStepDto.Builder
- Enclosing class:
- ImmutableComposableStepDto
Builds instances of type
ImmutableComposableStepDto.
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 TypeMethodDescriptionaddAllDefaultParameters(Iterable<? extends KeyValue> elements) Adds elements todefaultParameterslist.addAllExecutionParameters(Iterable<? extends KeyValue> elements) Adds elements toexecutionParameterslist.addAllSteps(Iterable<? extends ComposableStepDto> elements) Adds elements tostepslist.addAllTags(Iterable<String> elements) Adds elements totagslist.addDefaultParameters(KeyValue element) Adds one element todefaultParameterslist.addDefaultParameters(KeyValue... elements) Adds elements todefaultParameterslist.addExecutionParameters(KeyValue element) Adds one element toexecutionParameterslist.addExecutionParameters(KeyValue... elements) Adds elements toexecutionParameterslist.addSteps(ComposableStepDto element) Adds one element tostepslist.addSteps(ComposableStepDto... elements) Adds elements tostepslist.Adds one element totagslist.Adds elements totagslist.build()Builds a newImmutableComposableStepDto.defaultParameters(Iterable<? extends KeyValue> elements) Sets or replaces all elements fordefaultParameterslist.executionParameters(Iterable<? extends KeyValue> elements) Sets or replaces all elements forexecutionParameterslist.from(ComposableStepDto instance) Fill a builder with attribute values from the providedComposableStepDtoinstance.Initializes the optional valueidto id.Initializes the optional valueidto id.Initializes the value for thenameattribute.steps(Iterable<? extends ComposableStepDto> elements) Sets or replaces all elements forstepslist.strategy(StrategyDto strategy) Initializes the value for thestrategyattribute.Sets or replaces all elements fortagslist.Initializes the optional valuetaskto task.Initializes the optional valuetaskto task.usage(ComposableStepDto.StepUsage usage) Initializes the value for theusageattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder from(ComposableStepDto instance) Fill a builder with attribute values from the providedComposableStepDtoinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
Initializes the optional valueidto id.- Parameters:
id- The value for id- Returns:
thisbuilder for chained invocation
-
id
Initializes the optional valueidto id.- Parameters:
id- The value for id- 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
-
strategy
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder strategy(StrategyDto strategy) Initializes the value for thestrategyattribute.If not set, this attribute will have a default value as returned by the initializer of
strategy.- Parameters:
strategy- The value for strategy- Returns:
thisbuilder for use in a chained invocation
-
usage
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder usage(ComposableStepDto.StepUsage usage) Initializes the value for theusageattribute.If not set, this attribute will have a default value as returned by the initializer of
usage.- Parameters:
usage- The value for usage- Returns:
thisbuilder for use in a chained invocation
-
task
Initializes the optional valuetaskto task.- Parameters:
task- The value for task- Returns:
thisbuilder for chained invocation
-
task
Initializes the optional valuetaskto task.- Parameters:
task- The value for task- Returns:
thisbuilder for use in a chained invocation
-
addSteps
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder addSteps(ComposableStepDto element) Adds one element tostepslist.- Parameters:
element- A steps element- Returns:
thisbuilder for use in a chained invocation
-
addSteps
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder addSteps(ComposableStepDto... elements) Adds elements tostepslist.- Parameters:
elements- An array of steps elements- Returns:
thisbuilder for use in a chained invocation
-
steps
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder steps(Iterable<? extends ComposableStepDto> elements) Sets or replaces all elements forstepslist.- Parameters:
elements- An iterable of steps elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSteps
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder addAllSteps(Iterable<? extends ComposableStepDto> elements) Adds elements tostepslist.- Parameters:
elements- An iterable of steps elements- Returns:
thisbuilder for use in a chained invocation
-
addDefaultParameters
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder addDefaultParameters(KeyValue element) Adds one element todefaultParameterslist.- Parameters:
element- A defaultParameters element- Returns:
thisbuilder for use in a chained invocation
-
addDefaultParameters
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder addDefaultParameters(KeyValue... elements) Adds elements todefaultParameterslist.- Parameters:
elements- An array of defaultParameters elements- Returns:
thisbuilder for use in a chained invocation
-
defaultParameters
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder defaultParameters(Iterable<? extends KeyValue> elements) Sets or replaces all elements fordefaultParameterslist.- Parameters:
elements- An iterable of defaultParameters elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDefaultParameters
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder addAllDefaultParameters(Iterable<? extends KeyValue> elements) Adds elements todefaultParameterslist.- Parameters:
elements- An iterable of defaultParameters elements- Returns:
thisbuilder for use in a chained invocation
-
addExecutionParameters
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder addExecutionParameters(KeyValue element) Adds one element toexecutionParameterslist.- Parameters:
element- A executionParameters element- Returns:
thisbuilder for use in a chained invocation
-
addExecutionParameters
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder addExecutionParameters(KeyValue... elements) Adds elements toexecutionParameterslist.- Parameters:
elements- An array of executionParameters elements- Returns:
thisbuilder for use in a chained invocation
-
executionParameters
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder executionParameters(Iterable<? extends KeyValue> elements) Sets or replaces all elements forexecutionParameterslist.- Parameters:
elements- An iterable of executionParameters elements- Returns:
thisbuilder for use in a chained invocation
-
addAllExecutionParameters
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder addAllExecutionParameters(Iterable<? extends KeyValue> elements) Adds elements toexecutionParameterslist.- Parameters:
elements- An iterable of executionParameters elements- Returns:
thisbuilder for use in a chained invocation
-
addTags
Adds one element totagslist.- Parameters:
element- A tags element- Returns:
thisbuilder for use in a chained invocation
-
addTags
Adds elements totagslist.- Parameters:
elements- An array of tags elements- Returns:
thisbuilder for use in a chained invocation
-
tags
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder tags(Iterable<String> elements) Sets or replaces all elements fortagslist.- Parameters:
elements- An iterable of tags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTags
@CanIgnoreReturnValue public final ImmutableComposableStepDto.Builder addAllTags(Iterable<String> elements) Adds elements totagslist.- Parameters:
elements- An iterable of tags elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableComposableStepDto.- Returns:
- An immutable instance of ComposableStepDto
- Throws:
IllegalStateException- if any required attributes are missing
-