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.value of message}set the value to the messagestatic 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
set the value to the message- 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
value of message}- 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
-