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