Condividi tramite


WhatsAppMessageTemplateItem Class

Definition

The WhatsApp-specific template response contract.

public class WhatsAppMessageTemplateItem : Azure.Communication.Messages.MessageTemplateItem, System.ClientModel.Primitives.IJsonModel<Azure.Communication.Messages.Models.Channels.WhatsAppMessageTemplateItem>, System.ClientModel.Primitives.IPersistableModel<Azure.Communication.Messages.Models.Channels.WhatsAppMessageTemplateItem>
type WhatsAppMessageTemplateItem = class
    inherit MessageTemplateItem
    interface IJsonModel<WhatsAppMessageTemplateItem>
    interface IPersistableModel<WhatsAppMessageTemplateItem>
Public Class WhatsAppMessageTemplateItem
Inherits MessageTemplateItem
Implements IJsonModel(Of WhatsAppMessageTemplateItem), IPersistableModel(Of WhatsAppMessageTemplateItem)
Inheritance
WhatsAppMessageTemplateItem
Implements

Properties

ChannelType

Gets the channel type.

(Inherited from MessageTemplateItem)
Content

WhatsApp platform's template content. This is the payload returned from WhatsApp API.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"): Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""): Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }): Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"): Creates a payload of { "key": "value" }.

Language

The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'.

(Inherited from MessageTemplateItem)
Name

The template's name.

(Inherited from MessageTemplateItem)
Status

The aggregated template status.

(Inherited from MessageTemplateItem)
WhatsApp

The WhatsApp-specific template response contract.

(Inherited from MessageTemplateItem)

Explicit Interface Implementations

IJsonModel<MessageTemplateItem>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

(Inherited from MessageTemplateItem)
IJsonModel<MessageTemplateItem>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from MessageTemplateItem)
IJsonModel<WhatsAppMessageTemplateItem>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<WhatsAppMessageTemplateItem>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<MessageTemplateItem>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from MessageTemplateItem)
IPersistableModel<MessageTemplateItem>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

(Inherited from MessageTemplateItem)
IPersistableModel<MessageTemplateItem>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from MessageTemplateItem)
IPersistableModel<WhatsAppMessageTemplateItem>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<WhatsAppMessageTemplateItem>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<WhatsAppMessageTemplateItem>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to