CommunicationIdentifierModel Class

  • java.lang.Object
    • com.azure.messaging.eventgrid.systemevents.CommunicationIdentifierModel

Implements

public final class CommunicationIdentifierModel
implements JsonSerializable<CommunicationIdentifierModel>

Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value.

Constructor Summary

Constructor Description
CommunicationIdentifierModel()

Creates an instance of CommunicationIdentifierModel class.

Method Summary

Modifier and Type Method and Description
static CommunicationIdentifierModel fromJson(JsonReader jsonReader)

Reads an instance of CommunicationIdentifierModel from the JsonReader.

CommunicationUserIdentifierModel getCommunicationUser()

Get the communicationUser property: The communication user.

AcsCommunicationIdentifierKind getKind()

Get the kind property: The identifier kind.

AcsMicrosoftTeamsAppIdentifier getMicrosoftTeamsApp()

Get the microsoftTeamsApp property: The Microsoft Teams application.

MicrosoftTeamsUserIdentifierModel getMicrosoftTeamsUser()

Get the microsoftTeamsUser property: The Microsoft Teams user.

PhoneNumberIdentifierModel getPhoneNumber()

Get the phoneNumber property: The phone number.

String getRawId()

Get the rawId property: Raw Id of the identifier.

CommunicationIdentifierModel setCommunicationUser(CommunicationUserIdentifierModel communicationUser)

Set the communicationUser property: The communication user.

CommunicationIdentifierModel setKind(AcsCommunicationIdentifierKind kind)

Set the kind property: The identifier kind.

CommunicationIdentifierModel setMicrosoftTeamsApp(AcsMicrosoftTeamsAppIdentifier microsoftTeamsApp)

Set the microsoftTeamsApp property: The Microsoft Teams application.

CommunicationIdentifierModel setMicrosoftTeamsUser(MicrosoftTeamsUserIdentifierModel microsoftTeamsUser)

Set the microsoftTeamsUser property: The Microsoft Teams user.

CommunicationIdentifierModel setPhoneNumber(PhoneNumberIdentifierModel phoneNumber)

Set the phoneNumber property: The phone number.

CommunicationIdentifierModel setRawId(String rawId)

Set the rawId property: Raw Id of the identifier.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

CommunicationIdentifierModel

public CommunicationIdentifierModel()

Creates an instance of CommunicationIdentifierModel class.

Method Details

fromJson

public static CommunicationIdentifierModel fromJson(JsonReader jsonReader)

Reads an instance of CommunicationIdentifierModel from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CommunicationIdentifierModel if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the CommunicationIdentifierModel.

getCommunicationUser

public CommunicationUserIdentifierModel getCommunicationUser()

Get the communicationUser property: The communication user.

Returns:

the communicationUser value.

getKind

public AcsCommunicationIdentifierKind getKind()

Get the kind property: The identifier kind. Only required in responses.

Returns:

the kind value.

getMicrosoftTeamsApp

public AcsMicrosoftTeamsAppIdentifier getMicrosoftTeamsApp()

Get the microsoftTeamsApp property: The Microsoft Teams application.

Returns:

the microsoftTeamsApp value.

getMicrosoftTeamsUser

public MicrosoftTeamsUserIdentifierModel getMicrosoftTeamsUser()

Get the microsoftTeamsUser property: The Microsoft Teams user.

Returns:

the microsoftTeamsUser value.

getPhoneNumber

public PhoneNumberIdentifierModel getPhoneNumber()

Get the phoneNumber property: The phone number.

Returns:

the phoneNumber value.

getRawId

public String getRawId()

Get the rawId property: Raw Id of the identifier. Optional in requests, required in responses.

Returns:

the rawId value.

setCommunicationUser

public CommunicationIdentifierModel setCommunicationUser(CommunicationUserIdentifierModel communicationUser)

Set the communicationUser property: The communication user.

Parameters:

communicationUser - the communicationUser value to set.

Returns:

the CommunicationIdentifierModel object itself.

setKind

public CommunicationIdentifierModel setKind(AcsCommunicationIdentifierKind kind)

Set the kind property: The identifier kind. Only required in responses.

Parameters:

kind - the kind value to set.

Returns:

the CommunicationIdentifierModel object itself.

setMicrosoftTeamsApp

public CommunicationIdentifierModel setMicrosoftTeamsApp(AcsMicrosoftTeamsAppIdentifier microsoftTeamsApp)

Set the microsoftTeamsApp property: The Microsoft Teams application.

Parameters:

microsoftTeamsApp - the microsoftTeamsApp value to set.

Returns:

the CommunicationIdentifierModel object itself.

setMicrosoftTeamsUser

public CommunicationIdentifierModel setMicrosoftTeamsUser(MicrosoftTeamsUserIdentifierModel microsoftTeamsUser)

Set the microsoftTeamsUser property: The Microsoft Teams user.

Parameters:

microsoftTeamsUser - the microsoftTeamsUser value to set.

Returns:

the CommunicationIdentifierModel object itself.

setPhoneNumber

public CommunicationIdentifierModel setPhoneNumber(PhoneNumberIdentifierModel phoneNumber)

Set the phoneNumber property: The phone number.

Parameters:

phoneNumber - the phoneNumber value to set.

Returns:

the CommunicationIdentifierModel object itself.

setRawId

public CommunicationIdentifierModel setRawId(String rawId)

Set the rawId property: Raw Id of the identifier. Optional in requests, required in responses.

Parameters:

rawId - the rawId value to set.

Returns:

the CommunicationIdentifierModel object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to