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