Class MessageTemplateLocation
java.lang.Object
com.azure.communication.messages.models.MessageTemplateValue
com.azure.communication.messages.models.MessageTemplateLocation
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageTemplateValue>
The message template's location value information.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageTemplateLocation
(String refValue, com.azure.core.models.GeoPosition geoPosition) Creates an instance of MessageTemplateLocation class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageTemplateLocation
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of MessageTemplateLocation from the JsonReader.Get the address property: The [Optional] address of the location.getKind()
Get the kind property: The type discriminator describing a template parameter type.Get the locationName property: The [Optional] name of the location.com.azure.core.models.GeoPosition
Get the geo position: The longitude and latitude of the location.setAddress
(String address) Set the address property: The [Optional] address of the location.setLocationName
(String locationName) Set the locationName property: The [Optional] name of the location.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.communication.messages.models.MessageTemplateValue
getRefValue
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
-
MessageTemplateLocation
Creates an instance of MessageTemplateLocation class.- Parameters:
refValue
- the refValue value to set.geoPosition
- the geoPosition value to set.
-
-
Method Details
-
getKind
Get the kind property: The type discriminator describing a template parameter type.- Overrides:
getKind
in classMessageTemplateValue
- Returns:
- the kind value.
-
getLocationName
Get the locationName property: The [Optional] name of the location.- Returns:
- the locationName value.
-
setLocationName
Set the locationName property: The [Optional] name of the location.- Parameters:
locationName
- the locationName value to set.- Returns:
- the MessageTemplateLocation object itself.
-
getAddress
Get the address property: The [Optional] address of the location.- Returns:
- the address value.
-
setAddress
Set the address property: The [Optional] address of the location.- Parameters:
address
- the address value to set.- Returns:
- the MessageTemplateLocation object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<MessageTemplateValue>
- Overrides:
toJson
in classMessageTemplateValue
- Throws:
IOException
-
fromJson
public static MessageTemplateLocation fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of MessageTemplateLocation from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of MessageTemplateLocation 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 MessageTemplateLocation.
-
getPosition
public com.azure.core.models.GeoPosition getPosition()Get the geo position: The longitude and latitude of the location.- Returns:
- the GeoPosition object.
-