Class DuplicateAttributeValueErrorBuilder
java.lang.Object
com.commercetools.api.models.error.DuplicateAttributeValueErrorBuilder
- All Implemented Interfaces:
Builder<DuplicateAttributeValueError>
public class DuplicateAttributeValueErrorBuilder
extends Object
implements Builder<DuplicateAttributeValueError>
DuplicateAttributeValueErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DuplicateAttributeValueError duplicateAttributeValueError = DuplicateAttributeValueError.builder()
.message("{message}")
.attribute(attributeBuilder -> attributeBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.Conflicting Attributes.attribute
(Function<AttributeBuilder, AttributeBuilder> builder) Conflicting Attributes.build()
builds DuplicateAttributeValueError with checking for non-null required valuesbuilds DuplicateAttributeValueError without checking for non-null required valuesConflicting Attributes."Attribute can't have the same value in a different variant."
Error-specific additional fields."Attribute can't have the same value in a different variant."
of()
factory method for an instance of DuplicateAttributeValueErrorBuilderof
(DuplicateAttributeValueError template) create builder for DuplicateAttributeValueError instanceError-specific additional fields.withAttribute
(Function<AttributeBuilder, Attribute> builder) Conflicting Attributes.
-
Constructor Details
-
DuplicateAttributeValueErrorBuilder
public DuplicateAttributeValueErrorBuilder()
-
-
Method Details
-
message
"Attribute can't have the same value in a different variant."
- 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
-
attribute
public DuplicateAttributeValueErrorBuilder attribute(Function<AttributeBuilder, AttributeBuilder> builder) Conflicting Attributes.
- Parameters:
builder
- function to build the attribute value- Returns:
- Builder
-
withAttribute
public DuplicateAttributeValueErrorBuilder withAttribute(Function<AttributeBuilder, Attribute> builder) Conflicting Attributes.
- Parameters:
builder
- function to build the attribute value- Returns:
- Builder
-
attribute
Conflicting Attributes.
- Parameters:
attribute
- value to be set- Returns:
- Builder
-
getMessage
"Attribute can't have the same value in a different variant."
- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getAttribute
Conflicting Attributes.
- Returns:
- attribute
-
build
builds DuplicateAttributeValueError with checking for non-null required values- Specified by:
build
in interfaceBuilder<DuplicateAttributeValueError>
- Returns:
- DuplicateAttributeValueError
-
buildUnchecked
builds DuplicateAttributeValueError without checking for non-null required values- Returns:
- DuplicateAttributeValueError
-
of
factory method for an instance of DuplicateAttributeValueErrorBuilder- Returns:
- builder
-
of
create builder for DuplicateAttributeValueError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-