Class AttributesBuilder
java.lang.Object
com.commercetools.importapi.models.productvariants.AttributesBuilder
- All Implemented Interfaces:
Builder<Attributes>
AttributesBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Attributes attributes = Attributes.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe name of the attribute is given by the key and shouldn't be set on the attribute itself.build()
builds Attributes with checking for non-null required valuesbuilds Attributes without checking for non-null required valuesThe name of the attribute is given by the key and shouldn't be set on the attribute itself.static AttributesBuilder
of()
factory method for an instance of AttributesBuilderstatic AttributesBuilder
of
(Attributes template) create builder for Attributes instanceThe name of the attribute is given by the key and shouldn't be set on the attribute itself.
-
Constructor Details
-
AttributesBuilder
public AttributesBuilder()
-
-
Method Details
-
values
The name of the attribute is given by the key and shouldn't be set on the attribute itself. And since this property will be represented as a map, we can set individual attributes to null to delete them (which follows JSON Merge Patch semantics).
- Parameters:
values
- properties to be set- Returns:
- Builder
-
addValue
The name of the attribute is given by the key and shouldn't be set on the attribute itself. And since this property will be represented as a map, we can set individual attributes to null to delete them (which follows JSON Merge Patch semantics).
- Parameters:
key
- property namevalue
- property value- Returns:
- Builder
-
getValues
The name of the attribute is given by the key and shouldn't be set on the attribute itself. And since this property will be represented as a map, we can set individual attributes to null to delete them (which follows JSON Merge Patch semantics).
- Returns:
- pattern properties
-
build
builds Attributes with checking for non-null required values- Specified by:
build
in interfaceBuilder<Attributes>
- Returns:
- Attributes
-
buildUnchecked
builds Attributes without checking for non-null required values- Returns:
- Attributes
-
of
factory method for an instance of AttributesBuilder- Returns:
- builder
-
of
create builder for Attributes instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-