Class VoiceReceiver
java.lang.Object
com.azure.resourcemanager.monitor.models.VoiceReceiver
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VoiceReceiver>
public final class VoiceReceiver
extends Object
implements com.azure.json.JsonSerializable<VoiceReceiver>
A voice receiver.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the countryCode property: The country code of the voice receiver.static VoiceReceiver
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of VoiceReceiver from the JsonReader.name()
Get the name property: The name of the voice receiver.Get the phoneNumber property: The phone number of the voice receiver.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withCountryCode
(String countryCode) Set the countryCode property: The country code of the voice receiver.Set the name property: The name of the voice receiver.withPhoneNumber
(String phoneNumber) Set the phoneNumber property: The phone number of the voice receiver.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
VoiceReceiver
public VoiceReceiver()Creates an instance of VoiceReceiver class.
-
-
Method Details
-
name
Get the name property: The name of the voice receiver. Names must be unique across all receivers within an action group.- Returns:
- the name value.
-
withName
Set the name property: The name of the voice receiver. Names must be unique across all receivers within an action group.- Parameters:
name
- the name value to set.- Returns:
- the VoiceReceiver object itself.
-
countryCode
Get the countryCode property: The country code of the voice receiver.- Returns:
- the countryCode value.
-
withCountryCode
Set the countryCode property: The country code of the voice receiver.- Parameters:
countryCode
- the countryCode value to set.- Returns:
- the VoiceReceiver object itself.
-
phoneNumber
Get the phoneNumber property: The phone number of the voice receiver.- Returns:
- the phoneNumber value.
-
withPhoneNumber
Set the phoneNumber property: The phone number of the voice receiver.- Parameters:
phoneNumber
- the phoneNumber value to set.- Returns:
- the VoiceReceiver object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<VoiceReceiver>
- Throws:
IOException
-
fromJson
Reads an instance of VoiceReceiver from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of VoiceReceiver if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the VoiceReceiver.
-