Class DuplicateAttributeValuesErrorBuilder
java.lang.Object
com.commercetools.api.models.error.DuplicateAttributeValuesErrorBuilder
- All Implemented Interfaces:
Builder<DuplicateAttributeValuesError>
public class DuplicateAttributeValuesErrorBuilder
extends Object
implements Builder<DuplicateAttributeValuesError>
DuplicateAttributeValuesErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DuplicateAttributeValuesError duplicateAttributeValuesError = DuplicateAttributeValuesError.builder()
.message("{message}")
.plusAttributes(attributesBuilder -> attributesBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAttributes
(Function<AttributeBuilder, Attribute> builder) Conflicting Attributes.Error-specific additional fields.attributes
(Attribute... attributes) Conflicting Attributes.attributes
(List<Attribute> attributes) Conflicting Attributes.build()
builds DuplicateAttributeValuesError with checking for non-null required valuesbuilds DuplicateAttributeValuesError without checking for non-null required valuesConflicting Attributes."The set of attributes must be unique across all variants."
Error-specific additional fields."The set of attributes must be unique across all variants."
of()
factory method for an instance of DuplicateAttributeValuesErrorBuilderof
(DuplicateAttributeValuesError template) create builder for DuplicateAttributeValuesError instanceplusAttributes
(Attribute... attributes) Conflicting Attributes.Conflicting Attributes.setAttributes
(Function<AttributeBuilder, Attribute> builder) Conflicting Attributes.Error-specific additional fields.Conflicting Attributes.
-
Constructor Details
-
DuplicateAttributeValuesErrorBuilder
public DuplicateAttributeValuesErrorBuilder()
-
-
Method Details
-
message
"The set of attributes must be unique across all variants."
- Parameters:
message
- value to be set- Returns:
- Builder
-
values
Error-specific additional fields.
- Parameters:
values
- properties to be set- Returns:
- Builder
-
addValue
Error-specific additional fields.
- Parameters:
key
- property namevalue
- property value- Returns:
- Builder
-
attributes
Conflicting Attributes.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
attributes
Conflicting Attributes.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
Conflicting Attributes.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
public DuplicateAttributeValuesErrorBuilder plusAttributes(Function<AttributeBuilder, AttributeBuilder> builder) Conflicting Attributes.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
withAttributes
public DuplicateAttributeValuesErrorBuilder withAttributes(Function<AttributeBuilder, AttributeBuilder> builder) Conflicting Attributes.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
addAttributes
public DuplicateAttributeValuesErrorBuilder addAttributes(Function<AttributeBuilder, Attribute> builder) Conflicting Attributes.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
setAttributes
public DuplicateAttributeValuesErrorBuilder setAttributes(Function<AttributeBuilder, Attribute> builder) Conflicting Attributes.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
getMessage
"The set of attributes must be unique across all variants."
- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getAttributes
Conflicting Attributes.
- Returns:
- attributes
-
build
builds DuplicateAttributeValuesError with checking for non-null required values- Specified by:
build
in interfaceBuilder<DuplicateAttributeValuesError>
- Returns:
- DuplicateAttributeValuesError
-
buildUnchecked
builds DuplicateAttributeValuesError without checking for non-null required values- Returns:
- DuplicateAttributeValuesError
-
of
factory method for an instance of DuplicateAttributeValuesErrorBuilder- Returns:
- builder
-
of
create builder for DuplicateAttributeValuesError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-