Class DuplicateFieldErrorBuilder
java.lang.Object
com.commercetools.importapi.models.errors.DuplicateFieldErrorBuilder
- All Implemented Interfaces:
Builder<DuplicateFieldError>
DuplicateFieldErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DuplicateFieldError duplicateFieldError = DuplicateFieldError.builder()
.message("{message}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds DuplicateFieldError with checking for non-null required valuesbuilds DuplicateFieldError without checking for non-null required valuesduplicateValue
(Object duplicateValue) The offending duplicate value.The name of the field.The offending duplicate value.getField()
The name of the field.A plain language description of the cause of an error.A plain language description of the cause of an error.static DuplicateFieldErrorBuilder
of()
factory method for an instance of DuplicateFieldErrorBuilderstatic DuplicateFieldErrorBuilder
of
(DuplicateFieldError template) create builder for DuplicateFieldError instance
-
Constructor Details
-
DuplicateFieldErrorBuilder
public DuplicateFieldErrorBuilder()
-
-
Method Details
-
message
A plain language description of the cause of an error.
- Parameters:
message
- value to be set- Returns:
- Builder
-
field
The name of the field.
- Parameters:
field
- value to be set- Returns:
- Builder
-
duplicateValue
The offending duplicate value.
- Parameters:
duplicateValue
- value to be set- Returns:
- Builder
-
getMessage
A plain language description of the cause of an error.
- Returns:
- message
-
getField
The name of the field.
- Returns:
- field
-
getDuplicateValue
The offending duplicate value.
- Returns:
- duplicateValue
-
build
builds DuplicateFieldError with checking for non-null required values- Specified by:
build
in interfaceBuilder<DuplicateFieldError>
- Returns:
- DuplicateFieldError
-
buildUnchecked
builds DuplicateFieldError without checking for non-null required values- Returns:
- DuplicateFieldError
-
of
factory method for an instance of DuplicateFieldErrorBuilder- Returns:
- builder
-
of
create builder for DuplicateFieldError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-