Class ProductReferenceBuilder
java.lang.Object
com.commercetools.ml.models.common.ProductReferenceBuilder
- All Implemented Interfaces:
Builder<ProductReference>
ProductReferenceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductReference productReference = ProductReference.builder()
.id("{id}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductReference with checking for non-null required valuesbuilds ProductReference without checking for non-null required valuesgetId()
value of id}set the value to the idstatic ProductReferenceBuilder
of()
factory method for an instance of ProductReferenceBuilderstatic ProductReferenceBuilder
of
(ProductReference template) create builder for ProductReference instance
-
Constructor Details
-
ProductReferenceBuilder
public ProductReferenceBuilder()
-
-
Method Details
-
id
set the value to the id- Parameters:
id
- value to be set- Returns:
- Builder
-
getId
value of id}- Returns:
- id
-
build
builds ProductReference with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductReference>
- Returns:
- ProductReference
-
buildUnchecked
builds ProductReference without checking for non-null required values- Returns:
- ProductReference
-
of
factory method for an instance of ProductReferenceBuilder- Returns:
- builder
-
of
create builder for ProductReference instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-