Class ReferenceExistsErrorBuilder
java.lang.Object
com.commercetools.api.models.error.ReferenceExistsErrorBuilder
- All Implemented Interfaces:
Builder<ReferenceExistsError>
ReferenceExistsErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ReferenceExistsError referenceExistsError = ReferenceExistsError.builder()
.message("{message}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()
builds ReferenceExistsError with checking for non-null required valuesbuilds ReferenceExistsError without checking for non-null required values"Can not delete a $resource while it is referenced by at least one $referencedBy."
Type of referenced resource.Error-specific additional fields."Can not delete a $resource while it is referenced by at least one $referencedBy."
static ReferenceExistsErrorBuilder
of()
factory method for an instance of ReferenceExistsErrorBuilderstatic ReferenceExistsErrorBuilder
of
(ReferenceExistsError template) create builder for ReferenceExistsError instancereferencedBy
(ReferenceTypeId referencedBy) Type of referenced resource.Error-specific additional fields.
-
Constructor Details
-
ReferenceExistsErrorBuilder
public ReferenceExistsErrorBuilder()
-
-
Method Details
-
message
"Can not delete a $resource while it is referenced by at least one $referencedBy."
- 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
-
referencedBy
Type of referenced resource.
- Parameters:
referencedBy
- value to be set- Returns:
- Builder
-
getMessage
"Can not delete a $resource while it is referenced by at least one $referencedBy."
- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getReferencedBy
Type of referenced resource.
- Returns:
- referencedBy
-
build
builds ReferenceExistsError with checking for non-null required values- Specified by:
build
in interfaceBuilder<ReferenceExistsError>
- Returns:
- ReferenceExistsError
-
buildUnchecked
builds ReferenceExistsError without checking for non-null required values- Returns:
- ReferenceExistsError
-
of
factory method for an instance of ReferenceExistsErrorBuilder- Returns:
- builder
-
of
create builder for ReferenceExistsError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-