/
opennormalizedmessage.go
41 lines (27 loc) · 1.07 KB
/
opennormalizedmessage.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package platformclientv2
import (
"encoding/json"
"strconv"
"strings"
)
// Opennormalizedmessage - Open Messaging rich media message structure
type Opennormalizedmessage struct {
// Id - Unique ID of the message. This ID is generated by Messaging Platform. Message receipts will have the same ID as the message they reference.
Id *string `json:"id,omitempty"`
// Channel - Channel-specific information that describes the message and the message channel/provider.
Channel *Openmessagingchannel `json:"channel,omitempty"`
// VarType - Message type.
VarType *string `json:"type,omitempty"`
// Text - Message text.
Text *string `json:"text,omitempty"`
// Content - List of content elements.
Content *[]Openmessagecontent `json:"content,omitempty"`
// Direction - The direction of the message.
Direction *string `json:"direction,omitempty"`
}
// String returns a JSON representation of the model
func (o *Opennormalizedmessage) String() string {
j, _ := json.Marshal(o)
str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1))
return str
}