Interface StateReference
- All Superinterfaces:
Identifiable<State>
,IdentifiableObjHolder<State>
,Reference
,ReferenceMixin
public interface StateReference
extends Reference, Identifiable<State>, IdentifiableObjHolder<State>
Reference to a State.
Example to create an instance using the builder pattern
StateReference stateReference = StateReference.builder()
.id("{id}")
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic StateReferenceBuilder
builder()
builder factory method for StateReferencestatic StateReferenceBuilder
builder
(StateReference template) create builder for StateReference instancestatic StateReference
deepCopy
(StateReference template) factory method to create a deep copy of StateReference@NotNull String
getId()
Unique identifier of the referenced State.@Valid State
getObj()
Contains the representation of the expanded State.static StateReference
of()
factory methodstatic StateReference
of
(StateReference template) factory method to create a shallow copy StateReferencevoid
Unique identifier of the referenced State.void
Contains the representation of the expanded State.static com.fasterxml.jackson.core.type.TypeReference<StateReference>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withStateReference
(Function<StateReference, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.Reference
getTypeId, withReference
Methods inherited from interface com.commercetools.api.models.common.ReferenceMixin
toResourceIdentifier
-
Field Details
-
STATE
discriminator value for StateReference- See Also:
-
-
Method Details
-
getObj
Contains the representation of the expanded State. Only present in responses to requests with Reference Expansion for States.
- Specified by:
getObj
in interfaceIdentifiableObjHolder<State>
- Returns:
- obj
-
getId
Unique identifier of the referenced State.
- Specified by:
getId
in interfaceIdentifiable<State>
- Specified by:
getId
in interfaceReference
- Specified by:
getId
in interfaceReferenceMixin
- Returns:
- id
-
setObj
Contains the representation of the expanded State. Only present in responses to requests with Reference Expansion for States.
- Parameters:
obj
- value to be set
-
setId
Unique identifier of the referenced State.
-
of
factory method- Returns:
- instance of StateReference
-
of
factory method to create a shallow copy StateReference- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of StateReference- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StateReference- Returns:
- builder
-
builder
create builder for StateReference instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStateReference
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-