Class DuplicateEnumValuesErrorBuilder
java.lang.Object
com.commercetools.api.models.error.DuplicateEnumValuesErrorBuilder
- All Implemented Interfaces:
Builder<DuplicateEnumValuesError>
public class DuplicateEnumValuesErrorBuilder
extends Object
implements Builder<DuplicateEnumValuesError>
DuplicateEnumValuesErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DuplicateEnumValuesError duplicateEnumValuesError = DuplicateEnumValuesError.builder()
.message("{message}")
.plusDuplicates(duplicatesBuilder -> duplicatesBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()
builds DuplicateEnumValuesError with checking for non-null required valuesbuilds DuplicateEnumValuesError without checking for non-null required valuesduplicates
(String... duplicates) Duplicate keys.duplicates
(List<String> duplicates) Duplicate keys.Duplicate keys."The enum values contain duplicate keys: $listOfDuplicateKeys."
Error-specific additional fields."The enum values contain duplicate keys: $listOfDuplicateKeys."
of()
factory method for an instance of DuplicateEnumValuesErrorBuilderof
(DuplicateEnumValuesError template) create builder for DuplicateEnumValuesError instanceplusDuplicates
(String... duplicates) Duplicate keys.Error-specific additional fields.
-
Constructor Details
-
DuplicateEnumValuesErrorBuilder
public DuplicateEnumValuesErrorBuilder()
-
-
Method Details
-
message
"The enum values contain duplicate keys: $listOfDuplicateKeys."
- 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
-
duplicates
Duplicate keys.
- Parameters:
duplicates
- value to be set- Returns:
- Builder
-
duplicates
Duplicate keys.
- Parameters:
duplicates
- value to be set- Returns:
- Builder
-
plusDuplicates
Duplicate keys.
- Parameters:
duplicates
- value to be set- Returns:
- Builder
-
getMessage
"The enum values contain duplicate keys: $listOfDuplicateKeys."
- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getDuplicates
Duplicate keys.
- Returns:
- duplicates
-
build
builds DuplicateEnumValuesError with checking for non-null required values- Specified by:
build
in interfaceBuilder<DuplicateEnumValuesError>
- Returns:
- DuplicateEnumValuesError
-
buildUnchecked
builds DuplicateEnumValuesError without checking for non-null required values- Returns:
- DuplicateEnumValuesError
-
of
factory method for an instance of DuplicateEnumValuesErrorBuilder- Returns:
- builder
-
of
create builder for DuplicateEnumValuesError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-