Class RequiredFieldErrorBuilder
java.lang.Object
com.commercetools.importapi.models.errors.RequiredFieldErrorBuilder
- All Implemented Interfaces:
Builder<RequiredFieldError>
RequiredFieldErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
RequiredFieldError requiredFieldError = RequiredFieldError.builder()
.message("{message}")
.field("{field}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds RequiredFieldError with checking for non-null required valuesbuilds RequiredFieldError without checking for non-null required valuesThe name of the field.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 RequiredFieldErrorBuilder
of()
factory method for an instance of RequiredFieldErrorBuilderstatic RequiredFieldErrorBuilder
of
(RequiredFieldError template) create builder for RequiredFieldError instance
-
Constructor Details
-
RequiredFieldErrorBuilder
public RequiredFieldErrorBuilder()
-
-
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
-
getMessage
A plain language description of the cause of an error.
- Returns:
- message
-
getField
The name of the field.
- Returns:
- field
-
build
builds RequiredFieldError with checking for non-null required values- Specified by:
build
in interfaceBuilder<RequiredFieldError>
- Returns:
- RequiredFieldError
-
buildUnchecked
builds RequiredFieldError without checking for non-null required values- Returns:
- RequiredFieldError
-
of
factory method for an instance of RequiredFieldErrorBuilder- Returns:
- builder
-
of
create builder for RequiredFieldError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-