Interface KeyReference
- All Superinterfaces:
WithKey
- All Known Subinterfaces:
AssociateRoleKeyReference
,BusinessUnitKeyReference
,StoreKeyReference
A KeyReference represents a loose reference to another resource in the same Project identified by the resource's key
field. If available, the key
is immutable and mandatory. KeyReferences do not support Reference Expansion.
Example to create a subtype instance using the builder pattern
KeyReference keyReference = KeyReference.associateRoleBuilder()
key("{key}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder for associateRole subtypebuilder for businessUnit subtypestatic KeyReference
deepCopy
(KeyReference template) factory method to create a deep copy of KeyReference@NotNull String
getKey()
User-defined unique and immutable key of the referenced resource.@NotNull ReferenceTypeId
Type of referenced resource.void
User-defined unique and immutable key of the referenced resource.static StoreKeyReferenceBuilder
builder for store subtypestatic com.fasterxml.jackson.core.type.TypeReference<KeyReference>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withKeyReference
(Function<KeyReference, T> helper) accessor map function
-
Method Details
-
getTypeId
Type of referenced resource.
- Returns:
- typeId
-
getKey
User-defined unique and immutable key of the referenced resource.
-
setKey
User-defined unique and immutable key of the referenced resource.
- Parameters:
key
- value to be set
-
deepCopy
factory method to create a deep copy of KeyReference- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
associateRoleBuilder
builder for associateRole subtype- Returns:
- builder
-
businessUnitBuilder
builder for businessUnit subtype- Returns:
- builder
-
storeBuilder
builder for store subtype- Returns:
- builder
-
withKeyReference
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
-