Class ProductResourceIdentifierBuilder
java.lang.Object
com.commercetools.api.models.product.ProductResourceIdentifierBuilder
- All Implemented Interfaces:
Builder<ProductResourceIdentifier>
public class ProductResourceIdentifierBuilder
extends Object
implements Builder<ProductResourceIdentifier>
ProductResourceIdentifierBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductResourceIdentifier productResourceIdentifier = ProductResourceIdentifier.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductResourceIdentifier with checking for non-null required valuesbuilds ProductResourceIdentifier without checking for non-null required valuesgetId()
Unique identifier of the referenced Product.getKey()
User-defined unique identifier of the referenced Product.Unique identifier of the referenced Product.User-defined unique identifier of the referenced Product.of()
factory method for an instance of ProductResourceIdentifierBuilderof
(ProductResourceIdentifier template) create builder for ProductResourceIdentifier instance
-
Constructor Details
-
ProductResourceIdentifierBuilder
public ProductResourceIdentifierBuilder()
-
-
Method Details
-
id
Unique identifier of the referenced Product. Required if
key
is absent.- Parameters:
id
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the referenced Product. Required if
id
is absent.- Parameters:
key
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the referenced Product. Required if
key
is absent.- Returns:
- id
-
getKey
User-defined unique identifier of the referenced Product. Required if
id
is absent.- Returns:
- key
-
build
builds ProductResourceIdentifier with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductResourceIdentifier>
- Returns:
- ProductResourceIdentifier
-
buildUnchecked
builds ProductResourceIdentifier without checking for non-null required values- Returns:
- ProductResourceIdentifier
-
of
factory method for an instance of ProductResourceIdentifierBuilder- Returns:
- builder
-
of
create builder for ProductResourceIdentifier instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-