Interface GraphQLDuplicateFieldWithConflictingResourceError
- All Superinterfaces:
GraphQLErrorObject
Returned when a field value conflicts with an existing value stored in a particular resource causing a duplicate.
Example to create an instance using the builder pattern
GraphQLDuplicateFieldWithConflictingResourceError graphQLDuplicateFieldWithConflictingResourceError = GraphQLDuplicateFieldWithConflictingResourceError.builder()
.field("{field}")
.conflictingResource(conflictingResourceBuilder -> conflictingResourceBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for GraphQLDuplicateFieldWithConflictingResourceError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for GraphQLDuplicateFieldWithConflictingResourceErrorcreate builder for GraphQLDuplicateFieldWithConflictingResourceError instancecopyDeep()factory method to create a deep copy of GraphQLDuplicateFieldWithConflictingResourceError@NotNull StringgetCode()One of the error codes that is listed on the Errors page.@NotNull @Valid ReferenceReference to the resource that has the conflicting value.@NotNull ObjectConflicting duplicate value.@NotNull StringgetField()Name of the conflicting field.of()factory methodfactory method to create a shallow copy GraphQLDuplicateFieldWithConflictingResourceErrorvoidsetConflictingResource(Reference conflictingResource) Reference to the resource that has the conflicting value.voidsetDuplicateValue(Object duplicateValue) Conflicting duplicate value.voidName of the conflicting field.static com.fasterxml.jackson.core.type.TypeReference<GraphQLDuplicateFieldWithConflictingResourceError>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithGraphQLDuplicateFieldWithConflictingResourceError(Function<GraphQLDuplicateFieldWithConflictingResourceError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.GraphQLErrorObject
setValue, values, withGraphQLErrorObject
-
Field Details
-
DUPLICATE_FIELD_WITH_CONFLICTING_RESOURCE
discriminator value for GraphQLDuplicateFieldWithConflictingResourceError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:GraphQLErrorObjectOne of the error codes that is listed on the Errors page.
- Specified by:
getCodein interfaceGraphQLErrorObject- Returns:
- code
-
getField
Name of the conflicting field.
- Returns:
- field
-
getDuplicateValue
Conflicting duplicate value.
- Returns:
- duplicateValue
-
getConflictingResource
Reference to the resource that has the conflicting value.
- Returns:
- conflictingResource
-
setField
Name of the conflicting field.
- Parameters:
field- value to be set
-
setDuplicateValue
Conflicting duplicate value.
- Parameters:
duplicateValue- value to be set
-
setConflictingResource
Reference to the resource that has the conflicting value.
- Parameters:
conflictingResource- value to be set
-
of
factory method- Returns:
- instance of GraphQLDuplicateFieldWithConflictingResourceError
-
of
static GraphQLDuplicateFieldWithConflictingResourceError of(GraphQLDuplicateFieldWithConflictingResourceError template) factory method to create a shallow copy GraphQLDuplicateFieldWithConflictingResourceError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
- Specified by:
copyDeepin interfaceGraphQLErrorObject
-
deepCopy
@Nullable static GraphQLDuplicateFieldWithConflictingResourceError deepCopy(@Nullable GraphQLDuplicateFieldWithConflictingResourceError template) factory method to create a deep copy of GraphQLDuplicateFieldWithConflictingResourceError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLDuplicateFieldWithConflictingResourceError- Returns:
- builder
-
builder
static GraphQLDuplicateFieldWithConflictingResourceErrorBuilder builder(GraphQLDuplicateFieldWithConflictingResourceError template) create builder for GraphQLDuplicateFieldWithConflictingResourceError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLDuplicateFieldWithConflictingResourceError
default <T> T withGraphQLDuplicateFieldWithConflictingResourceError(Function<GraphQLDuplicateFieldWithConflictingResourceError, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<GraphQLDuplicateFieldWithConflictingResourceError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-