Partilhar via


VoiceReceiver Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.models.VoiceReceiver

Implements

public final class VoiceReceiver
implements JsonSerializable<VoiceReceiver>

A voice receiver.

Constructor Summary

Constructor Description
VoiceReceiver()

Creates an instance of VoiceReceiver class.

Method Summary

Modifier and Type Method and Description
String countryCode()

Get the countryCode property: The country code of the voice receiver.

static VoiceReceiver fromJson(JsonReader jsonReader)

Reads an instance of VoiceReceiver from the JsonReader.

String name()

Get the name property: The name of the voice receiver.

String phoneNumber()

Get the phoneNumber property: The phone number of the voice receiver.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

VoiceReceiver withCountryCode(String countryCode)

Set the countryCode property: The country code of the voice receiver.

VoiceReceiver withName(String name)

Set the name property: The name of the voice receiver.

VoiceReceiver withPhoneNumber(String phoneNumber)

Set the phoneNumber property: The phone number of the voice receiver.

Methods inherited from java.lang.Object

Constructor Details

VoiceReceiver

public VoiceReceiver()

Creates an instance of VoiceReceiver class.

Method Details

countryCode

public String countryCode()

Get the countryCode property: The country code of the voice receiver.

Returns:

the countryCode value.

fromJson

public static VoiceReceiver fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

name

public String 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.

phoneNumber

public String phoneNumber()

Get the phoneNumber property: The phone number of the voice receiver.

Returns:

the phoneNumber value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCountryCode

public VoiceReceiver withCountryCode(String countryCode)

Set the countryCode property: The country code of the voice receiver.

Parameters:

countryCode - the countryCode value to set.

Returns:

the VoiceReceiver object itself.

withName

public VoiceReceiver withName(String name)

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.

withPhoneNumber

public VoiceReceiver withPhoneNumber(String phoneNumber)

Set the phoneNumber property: The phone number of the voice receiver.

Parameters:

phoneNumber - the phoneNumber value to set.

Returns:

the VoiceReceiver object itself.

Applies to