Package com.azure.communication.common
Class PhoneNumberIdentifier
java.lang.Object
com.azure.communication.common.CommunicationIdentifier
com.azure.communication.common.PhoneNumberIdentifier
Communication identifier for Communication Services Phone Numbers
-
Constructor Summary
ConstructorDescriptionPhoneNumberIdentifier
(String phoneNumber) Creates a PhoneNumberIdentifier object -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
Set full id of the identifier RawId is the encoded format for identifiers to store in databases or as stable keys in general.Methods inherited from class com.azure.communication.common.CommunicationIdentifier
fromRawId, getRawId
-
Constructor Details
-
PhoneNumberIdentifier
Creates a PhoneNumberIdentifier object- Parameters:
phoneNumber
- the string identifier representing the PhoneNumber in E.164 format. E.164 is a phone number formatted as +[CountryCode][AreaCode][LocalNumber] eg. "+18005555555"- Throws:
IllegalArgumentException
- thrown if phoneNumber parameter fail the validation.
-
-
Method Details
-
getPhoneNumber
- Returns:
- the string identifier representing the object identity
-
setRawId
Set full id of the identifier RawId is the encoded format for identifiers to store in databases or as stable keys in general.- Overrides:
setRawId
in classCommunicationIdentifier
- Parameters:
rawId
- full id of the identifier- Returns:
- PhoneNumberIdentifier object itself
-
equals
- Overrides:
equals
in classCommunicationIdentifier
-
hashCode
public int hashCode()- Overrides:
hashCode
in classCommunicationIdentifier
-