Class ProductTailoringAttributeBuilder
java.lang.Object
com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder
- All Implemented Interfaces:
Builder<ProductTailoringAttribute>
public class ProductTailoringAttributeBuilder
extends Object
implements Builder<ProductTailoringAttribute>
ProductTailoringAttributeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductTailoringAttribute productTailoringAttribute = ProductTailoringAttribute.builder()
.name("{name}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ProductTailoringAttribute with checking for non-null required valuesbuilds ProductTailoringAttribute without checking for non-null required valuesgetName()Name of the Attribute.getValue()The AttributeType determines the format of the Attributevalueto be provided:Name of the Attribute.of()factory method for an instance of ProductTailoringAttributeBuilderof(ProductTailoringAttribute template) create builder for ProductTailoringAttribute instanceThe AttributeType determines the format of the Attributevalueto be provided:
-
Constructor Details
-
ProductTailoringAttributeBuilder
public ProductTailoringAttributeBuilder()
-
-
Method Details
-
name
Name of the Attribute.
- Parameters:
name- value to be set- Returns:
- Builder
-
value
The AttributeType determines the format of the Attribute
valueto be provided:- For Enum Type and Localized Enum Type, use the
keyof the Plain Enum Value or Localized Enum Value objects, or the complete objects asvalue. - For Localizable Text Type, use the LocalizedString object as
value. - For Money Type Attributes, use the Money object as
value. - For Set Type Attributes, use the entire
setobject asvalue. - For Reference Type Attributes, use the Reference object as
value.
Tailoring of Nested Type Attributes is not supported.
- Parameters:
value- value to be set- Returns:
- Builder
- For Enum Type and Localized Enum Type, use the
-
getName
Name of the Attribute.
- Returns:
- name
-
getValue
The AttributeType determines the format of the Attribute
valueto be provided:- For Enum Type and Localized Enum Type, use the
keyof the Plain Enum Value or Localized Enum Value objects, or the complete objects asvalue. - For Localizable Text Type, use the LocalizedString object as
value. - For Money Type Attributes, use the Money object as
value. - For Set Type Attributes, use the entire
setobject asvalue. - For Reference Type Attributes, use the Reference object as
value.
Tailoring of Nested Type Attributes is not supported.
- Returns:
- value
- For Enum Type and Localized Enum Type, use the
-
build
builds ProductTailoringAttribute with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductTailoringAttribute>- Returns:
- ProductTailoringAttribute
-
buildUnchecked
builds ProductTailoringAttribute without checking for non-null required values- Returns:
- ProductTailoringAttribute
-
of
factory method for an instance of ProductTailoringAttributeBuilder- Returns:
- builder
-
of
create builder for ProductTailoringAttribute instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-