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