Class ProductStateTransitionMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.ProductStateTransitionMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ProductStateTransitionMessagePayload>
public class ProductStateTransitionMessagePayloadBuilder
extends Object
implements Builder<ProductStateTransitionMessagePayload>
ProductStateTransitionMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductStateTransitionMessagePayload productStateTransitionMessagePayload = ProductStateTransitionMessagePayload.builder()
.state(stateBuilder -> stateBuilder)
.force(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductStateTransitionMessagePayload with checking for non-null required valuesbuilds ProductStateTransitionMessagePayload without checking for non-null required valuesWhether State transition validations were turned off during the Transition State update action.getForce()
Whether State transition validations were turned off during the Transition State update action.getState()
Product State after the Transition State update action.of()
factory method for an instance of ProductStateTransitionMessagePayloadBuilderof
(ProductStateTransitionMessagePayload template) create builder for ProductStateTransitionMessagePayload instancestate
(StateReference state) Product State after the Transition State update action.Product State after the Transition State update action.withState
(Function<StateReferenceBuilder, StateReference> builder) Product State after the Transition State update action.
-
Constructor Details
-
ProductStateTransitionMessagePayloadBuilder
public ProductStateTransitionMessagePayloadBuilder()
-
-
Method Details
-
state
public ProductStateTransitionMessagePayloadBuilder state(Function<StateReferenceBuilder, StateReferenceBuilder> builder) Product State after the Transition State update action.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
public ProductStateTransitionMessagePayloadBuilder withState(Function<StateReferenceBuilder, StateReference> builder) Product State after the Transition State update action.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
Product State after the Transition State update action.
- Parameters:
state
- value to be set- Returns:
- Builder
-
force
Whether State transition validations were turned off during the Transition State update action.
- Parameters:
force
- value to be set- Returns:
- Builder
-
getState
Product State after the Transition State update action.
- Returns:
- state
-
getForce
Whether State transition validations were turned off during the Transition State update action.
- Returns:
- force
-
build
builds ProductStateTransitionMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductStateTransitionMessagePayload>
- Returns:
- ProductStateTransitionMessagePayload
-
buildUnchecked
builds ProductStateTransitionMessagePayload without checking for non-null required values- Returns:
- ProductStateTransitionMessagePayload
-
of
factory method for an instance of ProductStateTransitionMessagePayloadBuilder- Returns:
- builder
-
of
public static ProductStateTransitionMessagePayloadBuilder of(ProductStateTransitionMessagePayload template) create builder for ProductStateTransitionMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-