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