Class DuplicateFieldWithConflictingResourceErrorBuilder
java.lang.Object
com.commercetools.api.models.error.DuplicateFieldWithConflictingResourceErrorBuilder
- All Implemented Interfaces:
Builder<DuplicateFieldWithConflictingResourceError>
public class DuplicateFieldWithConflictingResourceErrorBuilder
extends Object
implements Builder<DuplicateFieldWithConflictingResourceError>
DuplicateFieldWithConflictingResourceErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DuplicateFieldWithConflictingResourceError duplicateFieldWithConflictingResourceError = DuplicateFieldWithConflictingResourceError.builder()
.message("{message}")
.field("{field}")
.conflictingResource(conflictingResourceBuilder -> conflictingResourceBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()
builds DuplicateFieldWithConflictingResourceError with checking for non-null required valuesbuilds DuplicateFieldWithConflictingResourceError without checking for non-null required valuesconflictingResource
(Reference conflictingResource) Reference to the resource that has the conflicting value.conflictingResource
(Function<ReferenceBuilder, Builder<? extends Reference>> builder) Reference to the resource that has the conflicting value.duplicateValue
(Object duplicateValue) Conflicting duplicate value.Name of the conflicting field.Reference to the resource that has the conflicting value.Conflicting duplicate value.getField()
Name of the conflicting field."A duplicate value $duplicateValue exists for field $field on $conflictingResource."
Error-specific additional fields."A duplicate value $duplicateValue exists for field $field on $conflictingResource."
of()
factory method for an instance of DuplicateFieldWithConflictingResourceErrorBuilderof
(DuplicateFieldWithConflictingResourceError template) create builder for DuplicateFieldWithConflictingResourceError instanceError-specific additional fields.
-
Constructor Details
-
DuplicateFieldWithConflictingResourceErrorBuilder
public DuplicateFieldWithConflictingResourceErrorBuilder()
-
-
Method Details
-
message
"A duplicate value $duplicateValue exists for field $field on $conflictingResource."
- 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
-
field
Name of the conflicting field.
- Parameters:
field
- value to be set- Returns:
- Builder
-
duplicateValue
Conflicting duplicate value.
- Parameters:
duplicateValue
- value to be set- Returns:
- Builder
-
conflictingResource
public DuplicateFieldWithConflictingResourceErrorBuilder conflictingResource(Reference conflictingResource) Reference to the resource that has the conflicting value.
- Parameters:
conflictingResource
- value to be set- Returns:
- Builder
-
conflictingResource
public DuplicateFieldWithConflictingResourceErrorBuilder conflictingResource(Function<ReferenceBuilder, Builder<? extends Reference>> builder) Reference to the resource that has the conflicting value.
- Parameters:
builder
- function to build the conflictingResource value- Returns:
- Builder
-
getMessage
"A duplicate value $duplicateValue exists for field $field on $conflictingResource."
- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getField
Name of the conflicting field.
- Returns:
- field
-
getDuplicateValue
Conflicting duplicate value.
- Returns:
- duplicateValue
-
getConflictingResource
Reference to the resource that has the conflicting value.
- Returns:
- conflictingResource
-
build
builds DuplicateFieldWithConflictingResourceError with checking for non-null required values- Specified by:
build
in interfaceBuilder<DuplicateFieldWithConflictingResourceError>
- Returns:
- DuplicateFieldWithConflictingResourceError
-
buildUnchecked
builds DuplicateFieldWithConflictingResourceError without checking for non-null required values- Returns:
- DuplicateFieldWithConflictingResourceError
-
of
factory method for an instance of DuplicateFieldWithConflictingResourceErrorBuilder- Returns:
- builder
-
of
public static DuplicateFieldWithConflictingResourceErrorBuilder of(DuplicateFieldWithConflictingResourceError template) create builder for DuplicateFieldWithConflictingResourceError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-