Class InvalidFieldErrorBuilder
java.lang.Object
com.commercetools.api.models.error.InvalidFieldErrorBuilder
- All Implemented Interfaces:
Builder<InvalidFieldError>
InvalidFieldErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
InvalidFieldError invalidFieldError = InvalidFieldError.builder()
.message("{message}")
.field("{field}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.allowedValues
(Object... allowedValues) Fixed set of allowed values for the field, if any.allowedValues
(List<Object> allowedValues) Fixed set of allowed values for the field, if any.build()
builds InvalidFieldError with checking for non-null required valuesbuilds InvalidFieldError without checking for non-null required valuesName of the field with the invalid value.Fixed set of allowed values for the field, if any.getField()
Name of the field with the invalid value.Value invalid for the field."The value $invalidValue is not valid for field $field."
Error-specific additional fields.invalidValue
(Object invalidValue) Value invalid for the field."The value $invalidValue is not valid for field $field."
static InvalidFieldErrorBuilder
of()
factory method for an instance of InvalidFieldErrorBuilderstatic InvalidFieldErrorBuilder
of
(InvalidFieldError template) create builder for InvalidFieldError instanceplusAllowedValues
(Object... allowedValues) Fixed set of allowed values for the field, if any.Error-specific additional fields.
-
Constructor Details
-
InvalidFieldErrorBuilder
public InvalidFieldErrorBuilder()
-
-
Method Details
-
message
"The value $invalidValue is not valid for field $field."
- 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 field with the invalid value.
- Parameters:
field
- value to be set- Returns:
- Builder
-
invalidValue
Value invalid for the field.
- Parameters:
invalidValue
- value to be set- Returns:
- Builder
-
allowedValues
Fixed set of allowed values for the field, if any.
- Parameters:
allowedValues
- value to be set- Returns:
- Builder
-
allowedValues
Fixed set of allowed values for the field, if any.
- Parameters:
allowedValues
- value to be set- Returns:
- Builder
-
plusAllowedValues
Fixed set of allowed values for the field, if any.
- Parameters:
allowedValues
- value to be set- Returns:
- Builder
-
getMessage
"The value $invalidValue is not valid for field $field."
- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getField
Name of the field with the invalid value.
- Returns:
- field
-
getInvalidValue
Value invalid for the field.
- Returns:
- invalidValue
-
getAllowedValues
Fixed set of allowed values for the field, if any.
- Returns:
- allowedValues
-
build
builds InvalidFieldError with checking for non-null required values- Specified by:
build
in interfaceBuilder<InvalidFieldError>
- Returns:
- InvalidFieldError
-
buildUnchecked
builds InvalidFieldError without checking for non-null required values- Returns:
- InvalidFieldError
-
of
factory method for an instance of InvalidFieldErrorBuilder- Returns:
- builder
-
of
create builder for InvalidFieldError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-