Class ReferenceSetAttributeBuilder
java.lang.Object
com.commercetools.importapi.models.productvariants.ReferenceSetAttributeBuilder
- All Implemented Interfaces:
Builder<ReferenceSetAttribute>
ReferenceSetAttributeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ReferenceSetAttribute referenceSetAttribute = ReferenceSetAttribute.builder()
.plusValue(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ReferenceSetAttribute with checking for non-null required valuesbuilds ReferenceSetAttribute without checking for non-null required valuesgetName()
The name of this attribute must match a name of the product types attribute definitions.getValue()
value of value}The name of this attribute must match a name of the product types attribute definitions.static ReferenceSetAttributeBuilder
of()
factory method for an instance of ReferenceSetAttributeBuilderstatic ReferenceSetAttributeBuilder
of
(ReferenceSetAttribute template) create builder for ReferenceSetAttribute instanceplusValue
(KeyReference... value) add values to the valueplusValue
(Function<KeyReferenceBuilder, Builder<? extends KeyReference>> builder) add a value to the value using the builder functionvalue
(KeyReference... value) set values to the valuevalue
(List<KeyReference> value) set value to the valuewithValue
(Function<KeyReferenceBuilder, Builder<? extends KeyReference>> builder) set the value to the value using the builder function
-
Constructor Details
-
ReferenceSetAttributeBuilder
public ReferenceSetAttributeBuilder()
-
-
Method Details
-
name
The name of this attribute must match a name of the product types attribute definitions. The name is required if this type is used in a product variant and must not be set when used in a product variant patch.
- Parameters:
name
- value to be set- Returns:
- Builder
-
value
set values to the value- Parameters:
value
- value to be set- Returns:
- Builder
-
value
set value to the value- Parameters:
value
- value to be set- Returns:
- Builder
-
plusValue
add values to the value- Parameters:
value
- value to be set- Returns:
- Builder
-
plusValue
public ReferenceSetAttributeBuilder plusValue(Function<KeyReferenceBuilder, Builder<? extends KeyReference>> builder) add a value to the value using the builder function- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
withValue
public ReferenceSetAttributeBuilder withValue(Function<KeyReferenceBuilder, Builder<? extends KeyReference>> builder) set the value to the value using the builder function- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
getName
The name of this attribute must match a name of the product types attribute definitions. The name is required if this type is used in a product variant and must not be set when used in a product variant patch.
- Returns:
- name
-
getValue
value of value}- Returns:
- value
-
build
builds ReferenceSetAttribute with checking for non-null required values- Specified by:
build
in interfaceBuilder<ReferenceSetAttribute>
- Returns:
- ReferenceSetAttribute
-
buildUnchecked
builds ReferenceSetAttribute without checking for non-null required values- Returns:
- ReferenceSetAttribute
-
of
factory method for an instance of ReferenceSetAttributeBuilder- Returns:
- builder
-
of
create builder for ReferenceSetAttribute instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-