Class StateReferenceBuilder
java.lang.Object
com.commercetools.api.models.state.StateReferenceBuilder
- All Implemented Interfaces:
Builder<StateReference>
StateReferenceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
StateReference stateReference = StateReference.builder()
.id("{id}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds StateReference with checking for non-null required valuesbuilds StateReference without checking for non-null required valuesgetId()Unique identifier of the referenced State.getObj()Contains the representation of the expanded State.Unique identifier of the referenced State.Contains the representation of the expanded State.obj(Function<StateBuilder, StateBuilder> builder) Contains the representation of the expanded State.static StateReferenceBuilderof()factory method for an instance of StateReferenceBuilderstatic StateReferenceBuilderof(StateReference template) create builder for StateReference instancewithObj(Function<StateBuilder, State> builder) Contains the representation of the expanded State.
-
Constructor Details
-
StateReferenceBuilder
public StateReferenceBuilder()
-
-
Method Details
-
id
Unique identifier of the referenced State.
- Parameters:
id- value to be set- Returns:
- Builder
-
obj
Contains the representation of the expanded State. Only present in responses to requests with Reference Expansion for States.
- Parameters:
builder- function to build the obj value- Returns:
- Builder
-
withObj
Contains the representation of the expanded State. Only present in responses to requests with Reference Expansion for States.
- Parameters:
builder- function to build the obj value- Returns:
- Builder
-
obj
Contains the representation of the expanded State. Only present in responses to requests with Reference Expansion for States.
- Parameters:
obj- value to be set- Returns:
- Builder
-
getId
Unique identifier of the referenced State.
- Returns:
- id
-
getObj
Contains the representation of the expanded State. Only present in responses to requests with Reference Expansion for States.
- Returns:
- obj
-
build
builds StateReference with checking for non-null required values- Specified by:
buildin interfaceBuilder<StateReference>- Returns:
- StateReference
-
buildUnchecked
builds StateReference without checking for non-null required values- Returns:
- StateReference
-
of
factory method for an instance of StateReferenceBuilder- Returns:
- builder
-
of
create builder for StateReference instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-