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