Class MessageTemplateQuickAction

java.lang.Object
com.azure.communication.messages.models.MessageTemplateValue
com.azure.communication.messages.models.MessageTemplateQuickAction
All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageTemplateValue>

public final class MessageTemplateQuickAction extends MessageTemplateValue
The message template's quick action value information.
  • Constructor Details

    • MessageTemplateQuickAction

      public MessageTemplateQuickAction(String refValue)
      Creates an instance of MessageTemplateQuickAction class.
      Parameters:
      refValue - the refValue 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.
    • getText

      public String getText()
      Get the text property: The [Optional] quick action text.
      Returns:
      the text value.
    • setText

      public MessageTemplateQuickAction setText(String text)
      Set the text property: The [Optional] quick action text.
      Parameters:
      text - the text value to set.
      Returns:
      the MessageTemplateQuickAction object itself.
    • getPayload

      public String getPayload()
      Get the payload property: The [Optional] quick action payload.
      Returns:
      the payload value.
    • setPayload

      public MessageTemplateQuickAction setPayload(String payload)
      Set the payload property: The [Optional] quick action payload.
      Parameters:
      payload - the payload value to set.
      Returns:
      the MessageTemplateQuickAction 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 MessageTemplateQuickAction fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of MessageTemplateQuickAction from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of MessageTemplateQuickAction 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 MessageTemplateQuickAction.