-
Notifications
You must be signed in to change notification settings - Fork 13
/
reportingexportjobrequest.go
258 lines (163 loc) · 7.57 KB
/
reportingexportjobrequest.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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
package platformclientv2
import (
"github.com/leekchan/timeutil"
"encoding/json"
"strconv"
"strings"
)
// Reportingexportjobrequest
type Reportingexportjobrequest struct {
// Name - The user supplied name of the export request
Name *string `json:"name,omitempty"`
// TimeZone - The requested timezone of the exported data. Time zones are represented as a string of the zone name as found in the IANA time zone database. For example: UTC, Etc/UTC, or Europe/London
TimeZone *string `json:"timeZone,omitempty"`
// ExportFormat - The requested format of the exported data
ExportFormat *string `json:"exportFormat,omitempty"`
// Interval - The time period used to limit the the exported data. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss
Interval *string `json:"interval,omitempty"`
// Period - The Period of the request in which to break down the intervals. Periods are represented as an ISO-8601 string. For example: P1D or P1DT12H
Period *string `json:"period,omitempty"`
// ViewType - The type of view export job to be created
ViewType *string `json:"viewType,omitempty"`
// Filter - Filters to apply to create the view
Filter *Viewfilter `json:"filter,omitempty"`
// Read - Indicates if the request has been marked as read
Read *bool `json:"read,omitempty"`
// Locale - The locale use for localization of the exported data, i.e. en-us, es-mx
Locale *string `json:"locale,omitempty"`
// HasFormatDurations - Indicates if durations are formatted in hh:mm:ss format instead of ms
HasFormatDurations *bool `json:"hasFormatDurations,omitempty"`
// HasSplitFilters - Indicates if filters will be split in aggregate detail exports
HasSplitFilters *bool `json:"hasSplitFilters,omitempty"`
// ExcludeEmptyRows - Excludes empty rows from the exports
ExcludeEmptyRows *bool `json:"excludeEmptyRows,omitempty"`
// HasSplitByMedia - Indicates if media type will be split in aggregate detail exports
HasSplitByMedia *bool `json:"hasSplitByMedia,omitempty"`
// HasSummaryRow - Indicates if summary row needs to be present in exports
HasSummaryRow *bool `json:"hasSummaryRow,omitempty"`
// CsvDelimiter - The user supplied csv delimiter string value either of type 'comma' or 'semicolon' permitted for the export request
CsvDelimiter *string `json:"csvDelimiter,omitempty"`
// SelectedColumns - The list of ordered selected columns from the export view by the user
SelectedColumns *[]Selectedcolumns `json:"selectedColumns,omitempty"`
// HasCustomParticipantAttributes - Indicates if custom participant attributes will be exported
HasCustomParticipantAttributes *bool `json:"hasCustomParticipantAttributes,omitempty"`
// RecipientEmails - The list of email recipients for the exports
RecipientEmails *[]string `json:"recipientEmails,omitempty"`
}
func (o *Reportingexportjobrequest) MarshalJSON() ([]byte, error) {
// Redundant initialization to avoid unused import errors for models with no Time values
_ = timeutil.Timedelta{}
type Alias Reportingexportjobrequest
return json.Marshal(&struct {
Name *string `json:"name,omitempty"`
TimeZone *string `json:"timeZone,omitempty"`
ExportFormat *string `json:"exportFormat,omitempty"`
Interval *string `json:"interval,omitempty"`
Period *string `json:"period,omitempty"`
ViewType *string `json:"viewType,omitempty"`
Filter *Viewfilter `json:"filter,omitempty"`
Read *bool `json:"read,omitempty"`
Locale *string `json:"locale,omitempty"`
HasFormatDurations *bool `json:"hasFormatDurations,omitempty"`
HasSplitFilters *bool `json:"hasSplitFilters,omitempty"`
ExcludeEmptyRows *bool `json:"excludeEmptyRows,omitempty"`
HasSplitByMedia *bool `json:"hasSplitByMedia,omitempty"`
HasSummaryRow *bool `json:"hasSummaryRow,omitempty"`
CsvDelimiter *string `json:"csvDelimiter,omitempty"`
SelectedColumns *[]Selectedcolumns `json:"selectedColumns,omitempty"`
HasCustomParticipantAttributes *bool `json:"hasCustomParticipantAttributes,omitempty"`
RecipientEmails *[]string `json:"recipientEmails,omitempty"`
*Alias
}{
Name: o.Name,
TimeZone: o.TimeZone,
ExportFormat: o.ExportFormat,
Interval: o.Interval,
Period: o.Period,
ViewType: o.ViewType,
Filter: o.Filter,
Read: o.Read,
Locale: o.Locale,
HasFormatDurations: o.HasFormatDurations,
HasSplitFilters: o.HasSplitFilters,
ExcludeEmptyRows: o.ExcludeEmptyRows,
HasSplitByMedia: o.HasSplitByMedia,
HasSummaryRow: o.HasSummaryRow,
CsvDelimiter: o.CsvDelimiter,
SelectedColumns: o.SelectedColumns,
HasCustomParticipantAttributes: o.HasCustomParticipantAttributes,
RecipientEmails: o.RecipientEmails,
Alias: (*Alias)(o),
})
}
func (o *Reportingexportjobrequest) UnmarshalJSON(b []byte) error {
var ReportingexportjobrequestMap map[string]interface{}
err := json.Unmarshal(b, &ReportingexportjobrequestMap)
if err != nil {
return err
}
if Name, ok := ReportingexportjobrequestMap["name"].(string); ok {
o.Name = &Name
}
if TimeZone, ok := ReportingexportjobrequestMap["timeZone"].(string); ok {
o.TimeZone = &TimeZone
}
if ExportFormat, ok := ReportingexportjobrequestMap["exportFormat"].(string); ok {
o.ExportFormat = &ExportFormat
}
if Interval, ok := ReportingexportjobrequestMap["interval"].(string); ok {
o.Interval = &Interval
}
if Period, ok := ReportingexportjobrequestMap["period"].(string); ok {
o.Period = &Period
}
if ViewType, ok := ReportingexportjobrequestMap["viewType"].(string); ok {
o.ViewType = &ViewType
}
if Filter, ok := ReportingexportjobrequestMap["filter"].(map[string]interface{}); ok {
FilterString, _ := json.Marshal(Filter)
json.Unmarshal(FilterString, &o.Filter)
}
if Read, ok := ReportingexportjobrequestMap["read"].(bool); ok {
o.Read = &Read
}
if Locale, ok := ReportingexportjobrequestMap["locale"].(string); ok {
o.Locale = &Locale
}
if HasFormatDurations, ok := ReportingexportjobrequestMap["hasFormatDurations"].(bool); ok {
o.HasFormatDurations = &HasFormatDurations
}
if HasSplitFilters, ok := ReportingexportjobrequestMap["hasSplitFilters"].(bool); ok {
o.HasSplitFilters = &HasSplitFilters
}
if ExcludeEmptyRows, ok := ReportingexportjobrequestMap["excludeEmptyRows"].(bool); ok {
o.ExcludeEmptyRows = &ExcludeEmptyRows
}
if HasSplitByMedia, ok := ReportingexportjobrequestMap["hasSplitByMedia"].(bool); ok {
o.HasSplitByMedia = &HasSplitByMedia
}
if HasSummaryRow, ok := ReportingexportjobrequestMap["hasSummaryRow"].(bool); ok {
o.HasSummaryRow = &HasSummaryRow
}
if CsvDelimiter, ok := ReportingexportjobrequestMap["csvDelimiter"].(string); ok {
o.CsvDelimiter = &CsvDelimiter
}
if SelectedColumns, ok := ReportingexportjobrequestMap["selectedColumns"].([]interface{}); ok {
SelectedColumnsString, _ := json.Marshal(SelectedColumns)
json.Unmarshal(SelectedColumnsString, &o.SelectedColumns)
}
if HasCustomParticipantAttributes, ok := ReportingexportjobrequestMap["hasCustomParticipantAttributes"].(bool); ok {
o.HasCustomParticipantAttributes = &HasCustomParticipantAttributes
}
if RecipientEmails, ok := ReportingexportjobrequestMap["recipientEmails"].([]interface{}); ok {
RecipientEmailsString, _ := json.Marshal(RecipientEmails)
json.Unmarshal(RecipientEmailsString, &o.RecipientEmails)
}
return nil
}
// String returns a JSON representation of the model
func (o *Reportingexportjobrequest) String() string {
j, _ := json.Marshal(o)
str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1))
return str
}