CommunicationMessagesModelFactory.MessageTemplate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of MessageTemplate.
public static Azure.Communication.Messages.MessageTemplate MessageTemplate (string name = default, string language = default, System.Collections.Generic.IEnumerable<Azure.Communication.Messages.MessageTemplateValue> values = default, Azure.Communication.Messages.MessageTemplateBindings bindings = default);
static member MessageTemplate : string * string * seq<Azure.Communication.Messages.MessageTemplateValue> * Azure.Communication.Messages.MessageTemplateBindings -> Azure.Communication.Messages.MessageTemplate
Public Shared Function MessageTemplate (Optional name As String = Nothing, Optional language As String = Nothing, Optional values As IEnumerable(Of MessageTemplateValue) = Nothing, Optional bindings As MessageTemplateBindings = Nothing) As MessageTemplate
Parameters
- name
- String
Name of the template.
- language
- String
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'.
- values
- IEnumerable<MessageTemplateValue>
The template values. Please note MessageTemplateValue is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include MessageTemplateDocument, MessageTemplateImage, MessageTemplateLocation, MessageTemplateQuickAction, MessageTemplateText and MessageTemplateVideo.
- bindings
- MessageTemplateBindings
The binding object to link values to the template specific locations Please note MessageTemplateBindings is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include WhatsAppMessageTemplateBindings.
Returns
A new MessageTemplate instance for mocking.
Applies to
Azure SDK for .NET