-
Notifications
You must be signed in to change notification settings - Fork 13
/
reportingexportjobresponse.go
422 lines (263 loc) · 12.3 KB
/
reportingexportjobresponse.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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
package platformclientv2
import (
"time"
"github.com/leekchan/timeutil"
"encoding/json"
"strconv"
"strings"
)
// Reportingexportjobresponse
type Reportingexportjobresponse struct {
// Id - The globally unique identifier for the object.
Id *string `json:"id,omitempty"`
// Name
Name *string `json:"name,omitempty"`
// RunId - The unique run id of the export schedule execute
RunId *string `json:"runId,omitempty"`
// Status - The current status of the export request
Status *string `json:"status,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"`
// DownloadUrl - The url to download the request if it's status is completed
DownloadUrl *string `json:"downloadUrl,omitempty"`
// ViewType - The type of view export job to be created
ViewType *string `json:"viewType,omitempty"`
// ExportErrorMessagesType - The error message in case the export request failed
ExportErrorMessagesType *string `json:"exportErrorMessagesType,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"`
// 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"`
// CreatedDateTime - The created date/time of the request. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
// ModifiedDateTime - The last modified date/time of the request. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
ModifiedDateTime *time.Time `json:"modifiedDateTime,omitempty"`
// Locale - The locale use for localization of the exported data, i.e. en-us, es-mx
Locale *string `json:"locale,omitempty"`
// PercentageComplete - The percentage of the job that has completed processing
PercentageComplete *float64 `json:"percentageComplete,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"`
// EmailStatuses - The status of individual email addresses as a map
EmailStatuses *map[string]string `json:"emailStatuses,omitempty"`
// EmailErrorDescription - The optional error message in case the export fail to email
EmailErrorDescription *string `json:"emailErrorDescription,omitempty"`
// Enabled
Enabled *bool `json:"enabled,omitempty"`
// SelfUri - The URI for this object
SelfUri *string `json:"selfUri,omitempty"`
}
func (o *Reportingexportjobresponse) MarshalJSON() ([]byte, error) {
// Redundant initialization to avoid unused import errors for models with no Time values
_ = timeutil.Timedelta{}
type Alias Reportingexportjobresponse
CreatedDateTime := new(string)
if o.CreatedDateTime != nil {
*CreatedDateTime = timeutil.Strftime(o.CreatedDateTime, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
CreatedDateTime = nil
}
ModifiedDateTime := new(string)
if o.ModifiedDateTime != nil {
*ModifiedDateTime = timeutil.Strftime(o.ModifiedDateTime, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
ModifiedDateTime = nil
}
return json.Marshal(&struct {
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
RunId *string `json:"runId,omitempty"`
Status *string `json:"status,omitempty"`
TimeZone *string `json:"timeZone,omitempty"`
ExportFormat *string `json:"exportFormat,omitempty"`
Interval *string `json:"interval,omitempty"`
DownloadUrl *string `json:"downloadUrl,omitempty"`
ViewType *string `json:"viewType,omitempty"`
ExportErrorMessagesType *string `json:"exportErrorMessagesType,omitempty"`
Period *string `json:"period,omitempty"`
Filter *Viewfilter `json:"filter,omitempty"`
Read *bool `json:"read,omitempty"`
CreatedDateTime *string `json:"createdDateTime,omitempty"`
ModifiedDateTime *string `json:"modifiedDateTime,omitempty"`
Locale *string `json:"locale,omitempty"`
PercentageComplete *float64 `json:"percentageComplete,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"`
EmailStatuses *map[string]string `json:"emailStatuses,omitempty"`
EmailErrorDescription *string `json:"emailErrorDescription,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
SelfUri *string `json:"selfUri,omitempty"`
*Alias
}{
Id: o.Id,
Name: o.Name,
RunId: o.RunId,
Status: o.Status,
TimeZone: o.TimeZone,
ExportFormat: o.ExportFormat,
Interval: o.Interval,
DownloadUrl: o.DownloadUrl,
ViewType: o.ViewType,
ExportErrorMessagesType: o.ExportErrorMessagesType,
Period: o.Period,
Filter: o.Filter,
Read: o.Read,
CreatedDateTime: CreatedDateTime,
ModifiedDateTime: ModifiedDateTime,
Locale: o.Locale,
PercentageComplete: o.PercentageComplete,
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,
EmailStatuses: o.EmailStatuses,
EmailErrorDescription: o.EmailErrorDescription,
Enabled: o.Enabled,
SelfUri: o.SelfUri,
Alias: (*Alias)(o),
})
}
func (o *Reportingexportjobresponse) UnmarshalJSON(b []byte) error {
var ReportingexportjobresponseMap map[string]interface{}
err := json.Unmarshal(b, &ReportingexportjobresponseMap)
if err != nil {
return err
}
if Id, ok := ReportingexportjobresponseMap["id"].(string); ok {
o.Id = &Id
}
if Name, ok := ReportingexportjobresponseMap["name"].(string); ok {
o.Name = &Name
}
if RunId, ok := ReportingexportjobresponseMap["runId"].(string); ok {
o.RunId = &RunId
}
if Status, ok := ReportingexportjobresponseMap["status"].(string); ok {
o.Status = &Status
}
if TimeZone, ok := ReportingexportjobresponseMap["timeZone"].(string); ok {
o.TimeZone = &TimeZone
}
if ExportFormat, ok := ReportingexportjobresponseMap["exportFormat"].(string); ok {
o.ExportFormat = &ExportFormat
}
if Interval, ok := ReportingexportjobresponseMap["interval"].(string); ok {
o.Interval = &Interval
}
if DownloadUrl, ok := ReportingexportjobresponseMap["downloadUrl"].(string); ok {
o.DownloadUrl = &DownloadUrl
}
if ViewType, ok := ReportingexportjobresponseMap["viewType"].(string); ok {
o.ViewType = &ViewType
}
if ExportErrorMessagesType, ok := ReportingexportjobresponseMap["exportErrorMessagesType"].(string); ok {
o.ExportErrorMessagesType = &ExportErrorMessagesType
}
if Period, ok := ReportingexportjobresponseMap["period"].(string); ok {
o.Period = &Period
}
if Filter, ok := ReportingexportjobresponseMap["filter"].(map[string]interface{}); ok {
FilterString, _ := json.Marshal(Filter)
json.Unmarshal(FilterString, &o.Filter)
}
if Read, ok := ReportingexportjobresponseMap["read"].(bool); ok {
o.Read = &Read
}
if createdDateTimeString, ok := ReportingexportjobresponseMap["createdDateTime"].(string); ok {
CreatedDateTime, _ := time.Parse("2006-01-02T15:04:05.999999Z", createdDateTimeString)
o.CreatedDateTime = &CreatedDateTime
}
if modifiedDateTimeString, ok := ReportingexportjobresponseMap["modifiedDateTime"].(string); ok {
ModifiedDateTime, _ := time.Parse("2006-01-02T15:04:05.999999Z", modifiedDateTimeString)
o.ModifiedDateTime = &ModifiedDateTime
}
if Locale, ok := ReportingexportjobresponseMap["locale"].(string); ok {
o.Locale = &Locale
}
if PercentageComplete, ok := ReportingexportjobresponseMap["percentageComplete"].(float64); ok {
o.PercentageComplete = &PercentageComplete
}
if HasFormatDurations, ok := ReportingexportjobresponseMap["hasFormatDurations"].(bool); ok {
o.HasFormatDurations = &HasFormatDurations
}
if HasSplitFilters, ok := ReportingexportjobresponseMap["hasSplitFilters"].(bool); ok {
o.HasSplitFilters = &HasSplitFilters
}
if ExcludeEmptyRows, ok := ReportingexportjobresponseMap["excludeEmptyRows"].(bool); ok {
o.ExcludeEmptyRows = &ExcludeEmptyRows
}
if HasSplitByMedia, ok := ReportingexportjobresponseMap["hasSplitByMedia"].(bool); ok {
o.HasSplitByMedia = &HasSplitByMedia
}
if HasSummaryRow, ok := ReportingexportjobresponseMap["hasSummaryRow"].(bool); ok {
o.HasSummaryRow = &HasSummaryRow
}
if CsvDelimiter, ok := ReportingexportjobresponseMap["csvDelimiter"].(string); ok {
o.CsvDelimiter = &CsvDelimiter
}
if SelectedColumns, ok := ReportingexportjobresponseMap["selectedColumns"].([]interface{}); ok {
SelectedColumnsString, _ := json.Marshal(SelectedColumns)
json.Unmarshal(SelectedColumnsString, &o.SelectedColumns)
}
if HasCustomParticipantAttributes, ok := ReportingexportjobresponseMap["hasCustomParticipantAttributes"].(bool); ok {
o.HasCustomParticipantAttributes = &HasCustomParticipantAttributes
}
if RecipientEmails, ok := ReportingexportjobresponseMap["recipientEmails"].([]interface{}); ok {
RecipientEmailsString, _ := json.Marshal(RecipientEmails)
json.Unmarshal(RecipientEmailsString, &o.RecipientEmails)
}
if EmailStatuses, ok := ReportingexportjobresponseMap["emailStatuses"].(map[string]interface{}); ok {
EmailStatusesString, _ := json.Marshal(EmailStatuses)
json.Unmarshal(EmailStatusesString, &o.EmailStatuses)
}
if EmailErrorDescription, ok := ReportingexportjobresponseMap["emailErrorDescription"].(string); ok {
o.EmailErrorDescription = &EmailErrorDescription
}
if Enabled, ok := ReportingexportjobresponseMap["enabled"].(bool); ok {
o.Enabled = &Enabled
}
if SelfUri, ok := ReportingexportjobresponseMap["selfUri"].(string); ok {
o.SelfUri = &SelfUri
}
return nil
}
// String returns a JSON representation of the model
func (o *Reportingexportjobresponse) String() string {
j, _ := json.Marshal(o)
str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1))
return str
}