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