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
Modifier and TypeFieldDescriptionstatic final String
discriminator value for GraphQLDuplicateFieldWithConflictingResourceError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for GraphQLDuplicateFieldWithConflictingResourceErrorcreate builder for GraphQLDuplicateFieldWithConflictingResourceError instancefactory method to create a deep copy of GraphQLDuplicateFieldWithConflictingResourceError@NotNull String
getCode()
Error identifier.@NotNull @Valid Reference
Reference to the resource that has the conflicting value.@NotNull Object
Conflicting duplicate value.@NotNull String
getField()
Name of the conflicting field.of()
factory methodfactory method to create a shallow copy GraphQLDuplicateFieldWithConflictingResourceErrorvoid
setConflictingResource
(Reference conflictingResource) Reference to the resource that has the conflicting value.void
setDuplicateValue
(Object duplicateValue) Conflicting duplicate value.void
Name of the conflicting field.static com.fasterxml.jackson.core.type.TypeReference<GraphQLDuplicateFieldWithConflictingResourceError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withGraphQLDuplicateFieldWithConflictingResourceError
(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:GraphQLErrorObject
Error identifier.
- Specified by:
getCode
in 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
-
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
-