Package app.knock.api.models.recipients
Class RecipientReference
-
- All Implemented Interfaces:
public final class RecipientReferenceA reference to a recipient, either a user identifier (string) or an object reference (ID, collection).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRecipientReference.VisitorAn interface that defines how to map each variant of RecipientReference to a value of type T.
public final classRecipientReference.ObjectReferenceA reference to a recipient object.
-
Method Summary
Modifier and Type Method Description final Optional<String>user()The ID of the user which is used as the reference for the recipient. final Optional<RecipientReference.ObjectReference>objectReference()A reference to a recipient object. final BooleanisUser()final BooleanisObjectReference()final StringasUser()The ID of the user which is used as the reference for the recipient. final RecipientReference.ObjectReferenceasObjectReference()A reference to a recipient object. final Optional<JsonValue>_json()final <T extends Any> Taccept(RecipientReference.Visitor<T> visitor)final RecipientReferencevalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RecipientReferenceofUser(String user)The ID of the user which is used as the reference for the recipient. final static RecipientReferenceofObjectReference(RecipientReference.ObjectReference objectReference)A reference to a recipient object. -
-
Method Detail
-
user
final Optional<String> user()
The ID of the user which is used as the reference for the recipient.
-
objectReference
final Optional<RecipientReference.ObjectReference> objectReference()
A reference to a recipient object.
-
isObjectReference
final Boolean isObjectReference()
-
asObjectReference
final RecipientReference.ObjectReference asObjectReference()
A reference to a recipient object.
-
accept
final <T extends Any> T accept(RecipientReference.Visitor<T> visitor)
-
validate
final RecipientReference validate()
-
ofUser
final static RecipientReference ofUser(String user)
The ID of the user which is used as the reference for the recipient.
-
ofObjectReference
final static RecipientReference ofObjectReference(RecipientReference.ObjectReference objectReference)
A reference to a recipient object.
-
-
-
-