MessageTemplateItem Class

  • java.lang.Object
    • com.azure.communication.messages.models.MessageTemplateItem

Implements

public abstract class MessageTemplateItem
implements JsonSerializable<MessageTemplateItem>

The message template as returned from the service.

Constructor Summary

Modifier Constructor Description
protected MessageTemplateItem(String language, MessageTemplateStatus status)

Creates an instance of MessageTemplateItem class.

Method Summary

Modifier and Type Method and Description
static MessageTemplateItem fromJson(JsonReader jsonReader)

Reads an instance of MessageTemplateItem from the JsonReader.

CommunicationMessagesChannel getKind()

Get the kind property: The type discriminator describing a template type.

String getLanguage()

Get the language property: 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'.

String getName()

Get the name property: The template's name.

MessageTemplateStatus getStatus()

Get the status property: The aggregated template status.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

MessageTemplateItem

protected MessageTemplateItem(String language, MessageTemplateStatus status)

Creates an instance of MessageTemplateItem class.

Parameters:

language - the language value to set.
status - the status value to set.

Method Details

fromJson

public static MessageTemplateItem fromJson(JsonReader jsonReader)

Reads an instance of MessageTemplateItem from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MessageTemplateItem 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.

getKind

public CommunicationMessagesChannel getKind()

Get the kind property: The type discriminator describing a template type.

Returns:

the kind value.

getLanguage

public String getLanguage()

Get the language property: 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'.

Returns:

the language value.

getName

public String getName()

Get the name property: The template's name.

Returns:

the name value.

getStatus

public MessageTemplateStatus getStatus()

Get the status property: The aggregated template status.

Returns:

the status value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to