-
Notifications
You must be signed in to change notification settings - Fork 13
/
organizationfeatures.go
195 lines (125 loc) · 4.2 KB
/
organizationfeatures.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
package platformclientv2
import (
"github.com/leekchan/timeutil"
"encoding/json"
"strconv"
"strings"
)
// Organizationfeatures
type Organizationfeatures struct {
// RealtimeCIC
RealtimeCIC *bool `json:"realtimeCIC,omitempty"`
// Purecloud
Purecloud *bool `json:"purecloud,omitempty"`
// Hipaa
Hipaa *bool `json:"hipaa,omitempty"`
// UcEnabled
UcEnabled *bool `json:"ucEnabled,omitempty"`
// Pci
Pci *bool `json:"pci,omitempty"`
// PurecloudVoice
PurecloudVoice *bool `json:"purecloudVoice,omitempty"`
// XmppFederation
XmppFederation *bool `json:"xmppFederation,omitempty"`
// Chat
Chat *bool `json:"chat,omitempty"`
// InformalPhotos
InformalPhotos *bool `json:"informalPhotos,omitempty"`
// Directory
Directory *bool `json:"directory,omitempty"`
// ContactCenter
ContactCenter *bool `json:"contactCenter,omitempty"`
// UnifiedCommunications
UnifiedCommunications *bool `json:"unifiedCommunications,omitempty"`
// Custserv
Custserv *bool `json:"custserv,omitempty"`
}
func (o *Organizationfeatures) MarshalJSON() ([]byte, error) {
// Redundant initialization to avoid unused import errors for models with no Time values
_ = timeutil.Timedelta{}
type Alias Organizationfeatures
return json.Marshal(&struct {
RealtimeCIC *bool `json:"realtimeCIC,omitempty"`
Purecloud *bool `json:"purecloud,omitempty"`
Hipaa *bool `json:"hipaa,omitempty"`
UcEnabled *bool `json:"ucEnabled,omitempty"`
Pci *bool `json:"pci,omitempty"`
PurecloudVoice *bool `json:"purecloudVoice,omitempty"`
XmppFederation *bool `json:"xmppFederation,omitempty"`
Chat *bool `json:"chat,omitempty"`
InformalPhotos *bool `json:"informalPhotos,omitempty"`
Directory *bool `json:"directory,omitempty"`
ContactCenter *bool `json:"contactCenter,omitempty"`
UnifiedCommunications *bool `json:"unifiedCommunications,omitempty"`
Custserv *bool `json:"custserv,omitempty"`
*Alias
}{
RealtimeCIC: o.RealtimeCIC,
Purecloud: o.Purecloud,
Hipaa: o.Hipaa,
UcEnabled: o.UcEnabled,
Pci: o.Pci,
PurecloudVoice: o.PurecloudVoice,
XmppFederation: o.XmppFederation,
Chat: o.Chat,
InformalPhotos: o.InformalPhotos,
Directory: o.Directory,
ContactCenter: o.ContactCenter,
UnifiedCommunications: o.UnifiedCommunications,
Custserv: o.Custserv,
Alias: (*Alias)(o),
})
}
func (o *Organizationfeatures) UnmarshalJSON(b []byte) error {
var OrganizationfeaturesMap map[string]interface{}
err := json.Unmarshal(b, &OrganizationfeaturesMap)
if err != nil {
return err
}
if RealtimeCIC, ok := OrganizationfeaturesMap["realtimeCIC"].(bool); ok {
o.RealtimeCIC = &RealtimeCIC
}
if Purecloud, ok := OrganizationfeaturesMap["purecloud"].(bool); ok {
o.Purecloud = &Purecloud
}
if Hipaa, ok := OrganizationfeaturesMap["hipaa"].(bool); ok {
o.Hipaa = &Hipaa
}
if UcEnabled, ok := OrganizationfeaturesMap["ucEnabled"].(bool); ok {
o.UcEnabled = &UcEnabled
}
if Pci, ok := OrganizationfeaturesMap["pci"].(bool); ok {
o.Pci = &Pci
}
if PurecloudVoice, ok := OrganizationfeaturesMap["purecloudVoice"].(bool); ok {
o.PurecloudVoice = &PurecloudVoice
}
if XmppFederation, ok := OrganizationfeaturesMap["xmppFederation"].(bool); ok {
o.XmppFederation = &XmppFederation
}
if Chat, ok := OrganizationfeaturesMap["chat"].(bool); ok {
o.Chat = &Chat
}
if InformalPhotos, ok := OrganizationfeaturesMap["informalPhotos"].(bool); ok {
o.InformalPhotos = &InformalPhotos
}
if Directory, ok := OrganizationfeaturesMap["directory"].(bool); ok {
o.Directory = &Directory
}
if ContactCenter, ok := OrganizationfeaturesMap["contactCenter"].(bool); ok {
o.ContactCenter = &ContactCenter
}
if UnifiedCommunications, ok := OrganizationfeaturesMap["unifiedCommunications"].(bool); ok {
o.UnifiedCommunications = &UnifiedCommunications
}
if Custserv, ok := OrganizationfeaturesMap["custserv"].(bool); ok {
o.Custserv = &Custserv
}
return nil
}
// String returns a JSON representation of the model
func (o *Organizationfeatures) String() string {
j, _ := json.Marshal(o)
str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1))
return str
}