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>

public final class MessageTemplateLocation extends MessageTemplateValue
The message template's location value information.
  • Constructor Details

    • MessageTemplateLocation

      public MessageTemplateLocation(String refValue, com.azure.core.models.GeoPosition geoPosition)
      Creates an instance of MessageTemplateLocation class.
      Parameters:
      refValue - the refValue value to set.
      geoPosition - the geoPosition value to set.
  • Method Details

    • getKind

      public MessageTemplateValueKind getKind()
      Get the kind property: The type discriminator describing a template parameter type.
      Overrides:
      getKind in class MessageTemplateValue
      Returns:
      the kind value.
    • getLocationName

      public String getLocationName()
      Get the locationName property: The [Optional] name of the location.
      Returns:
      the locationName value.
    • setLocationName

      public MessageTemplateLocation setLocationName(String locationName)
      Set the locationName property: The [Optional] name of the location.
      Parameters:
      locationName - the locationName value to set.
      Returns:
      the MessageTemplateLocation object itself.
    • getAddress

      public String getAddress()
      Get the address property: The [Optional] address of the location.
      Returns:
      the address value.
    • setAddress

      public MessageTemplateLocation setAddress(String address)
      Set the address property: The [Optional] address of the location.
      Parameters:
      address - the address value to set.
      Returns:
      the MessageTemplateLocation object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<MessageTemplateValue>
      Overrides:
      toJson in class MessageTemplateValue
      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.