-
Notifications
You must be signed in to change notification settings - Fork 12
/
conversation.go
70 lines (42 loc) · 2.62 KB
/
conversation.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package platformclientv2
import (
"time"
"encoding/json"
"strconv"
"strings"
)
// Conversation
type Conversation struct {
// Id - The globally unique identifier for the object.
Id *string `json:"id,omitempty"`
// Name
Name *string `json:"name,omitempty"`
// ExternalTag - The external tag associated with the conversation.
ExternalTag *string `json:"externalTag,omitempty"`
// StartTime - The time when the conversation started. This will be the time when the first participant joined the conversation. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
StartTime *time.Time `json:"startTime,omitempty"`
// EndTime - The time when the conversation ended. This will be the time when the last participant left the conversation, or null when the conversation is still active. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
EndTime *time.Time `json:"endTime,omitempty"`
// Address - The address of the conversation as seen from an external participant. For phone calls this will be the DNIS for inbound calls and the ANI for outbound calls. For other media types this will be the address of the destination participant for inbound and the address of the initiating participant for outbound.
Address *string `json:"address,omitempty"`
// Participants - The list of all participants in the conversation.
Participants *[]Participant `json:"participants,omitempty"`
// ConversationIds - A list of conversations to merge into this conversation to create a conference. This field is null except when being used to create a conference.
ConversationIds *[]string `json:"conversationIds,omitempty"`
// MaxParticipants - If this is a conference conversation, then this field indicates the maximum number of participants allowed to participant in the conference.
MaxParticipants *int `json:"maxParticipants,omitempty"`
// RecordingState - On update, 'paused' initiates a secure pause, 'active' resumes any paused recordings; otherwise indicates state of conversation recording.
RecordingState *string `json:"recordingState,omitempty"`
// State - The conversation's state
State *string `json:"state,omitempty"`
// Divisions - Identifiers of divisions associated with this conversation
Divisions *[]Conversationdivisionmembership `json:"divisions,omitempty"`
// SelfUri - The URI for this object
SelfUri *string `json:"selfUri,omitempty"`
}
// String returns a JSON representation of the model
func (o *Conversation) String() string {
j, _ := json.Marshal(o)
str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1))
return str
}