-
Notifications
You must be signed in to change notification settings - Fork 0
/
item_activity_stat.go
332 lines (330 loc) · 13 KB
/
item_activity_stat.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
package models
import (
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// ItemActivityStat
type ItemActivityStat struct {
Entity
// Statistics about the access actions in this interval. Read-only.
access ItemActionStatable
// Exposes the itemActivities represented in this itemActivityStat resource.
activities []ItemActivityable
// Statistics about the create actions in this interval. Read-only.
create ItemActionStatable
// Statistics about the delete actions in this interval. Read-only.
delete ItemActionStatable
// Statistics about the edit actions in this interval. Read-only.
edit ItemActionStatable
// When the interval ends. Read-only.
endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
// Indicates that the statistics in this interval are based on incomplete data. Read-only.
incompleteData IncompleteDataable
// Indicates whether the item is 'trending.' Read-only.
isTrending *bool
// Statistics about the move actions in this interval. Read-only.
move ItemActionStatable
// When the interval starts. Read-only.
startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
}
// NewItemActivityStat instantiates a new itemActivityStat and sets the default values.
func NewItemActivityStat()(*ItemActivityStat) {
m := &ItemActivityStat{
Entity: *NewEntity(),
}
return m
}
// CreateItemActivityStatFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateItemActivityStatFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewItemActivityStat(), nil
}
// GetAccess gets the access property value. Statistics about the access actions in this interval. Read-only.
func (m *ItemActivityStat) GetAccess()(ItemActionStatable) {
return m.access
}
// GetActivities gets the activities property value. Exposes the itemActivities represented in this itemActivityStat resource.
func (m *ItemActivityStat) GetActivities()([]ItemActivityable) {
return m.activities
}
// GetCreate gets the create property value. Statistics about the create actions in this interval. Read-only.
func (m *ItemActivityStat) GetCreate()(ItemActionStatable) {
return m.create
}
// GetDelete gets the delete property value. Statistics about the delete actions in this interval. Read-only.
func (m *ItemActivityStat) GetDelete()(ItemActionStatable) {
return m.delete
}
// GetEdit gets the edit property value. Statistics about the edit actions in this interval. Read-only.
func (m *ItemActivityStat) GetEdit()(ItemActionStatable) {
return m.edit
}
// GetEndDateTime gets the endDateTime property value. When the interval ends. Read-only.
func (m *ItemActivityStat) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
return m.endDateTime
}
// GetFieldDeserializers the deserialization information for the current model
func (m *ItemActivityStat) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["access"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateItemActionStatFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetAccess(val.(ItemActionStatable))
}
return nil
}
res["activities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateItemActivityFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]ItemActivityable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(ItemActivityable)
}
}
m.SetActivities(res)
}
return nil
}
res["create"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateItemActionStatFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetCreate(val.(ItemActionStatable))
}
return nil
}
res["delete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateItemActionStatFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetDelete(val.(ItemActionStatable))
}
return nil
}
res["edit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateItemActionStatFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetEdit(val.(ItemActionStatable))
}
return nil
}
res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetEndDateTime(val)
}
return nil
}
res["incompleteData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateIncompleteDataFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetIncompleteData(val.(IncompleteDataable))
}
return nil
}
res["isTrending"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetIsTrending(val)
}
return nil
}
res["move"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateItemActionStatFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetMove(val.(ItemActionStatable))
}
return nil
}
res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetStartDateTime(val)
}
return nil
}
return res
}
// GetIncompleteData gets the incompleteData property value. Indicates that the statistics in this interval are based on incomplete data. Read-only.
func (m *ItemActivityStat) GetIncompleteData()(IncompleteDataable) {
return m.incompleteData
}
// GetIsTrending gets the isTrending property value. Indicates whether the item is 'trending.' Read-only.
func (m *ItemActivityStat) GetIsTrending()(*bool) {
return m.isTrending
}
// GetMove gets the move property value. Statistics about the move actions in this interval. Read-only.
func (m *ItemActivityStat) GetMove()(ItemActionStatable) {
return m.move
}
// GetStartDateTime gets the startDateTime property value. When the interval starts. Read-only.
func (m *ItemActivityStat) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
return m.startDateTime
}
// Serialize serializes information the current object
func (m *ItemActivityStat) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteObjectValue("access", m.GetAccess())
if err != nil {
return err
}
}
if m.GetActivities() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActivities()))
for i, v := range m.GetActivities() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("activities", cast)
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("create", m.GetCreate())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("delete", m.GetDelete())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("edit", m.GetEdit())
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("incompleteData", m.GetIncompleteData())
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("isTrending", m.GetIsTrending())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("move", m.GetMove())
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime())
if err != nil {
return err
}
}
return nil
}
// SetAccess sets the access property value. Statistics about the access actions in this interval. Read-only.
func (m *ItemActivityStat) SetAccess(value ItemActionStatable)() {
m.access = value
}
// SetActivities sets the activities property value. Exposes the itemActivities represented in this itemActivityStat resource.
func (m *ItemActivityStat) SetActivities(value []ItemActivityable)() {
m.activities = value
}
// SetCreate sets the create property value. Statistics about the create actions in this interval. Read-only.
func (m *ItemActivityStat) SetCreate(value ItemActionStatable)() {
m.create = value
}
// SetDelete sets the delete property value. Statistics about the delete actions in this interval. Read-only.
func (m *ItemActivityStat) SetDelete(value ItemActionStatable)() {
m.delete = value
}
// SetEdit sets the edit property value. Statistics about the edit actions in this interval. Read-only.
func (m *ItemActivityStat) SetEdit(value ItemActionStatable)() {
m.edit = value
}
// SetEndDateTime sets the endDateTime property value. When the interval ends. Read-only.
func (m *ItemActivityStat) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
m.endDateTime = value
}
// SetIncompleteData sets the incompleteData property value. Indicates that the statistics in this interval are based on incomplete data. Read-only.
func (m *ItemActivityStat) SetIncompleteData(value IncompleteDataable)() {
m.incompleteData = value
}
// SetIsTrending sets the isTrending property value. Indicates whether the item is 'trending.' Read-only.
func (m *ItemActivityStat) SetIsTrending(value *bool)() {
m.isTrending = value
}
// SetMove sets the move property value. Statistics about the move actions in this interval. Read-only.
func (m *ItemActivityStat) SetMove(value ItemActionStatable)() {
m.move = value
}
// SetStartDateTime sets the startDateTime property value. When the interval starts. Read-only.
func (m *ItemActivityStat) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
m.startDateTime = value
}
// ItemActivityStatable
type ItemActivityStatable interface {
Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetAccess()(ItemActionStatable)
GetActivities()([]ItemActivityable)
GetCreate()(ItemActionStatable)
GetDelete()(ItemActionStatable)
GetEdit()(ItemActionStatable)
GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetIncompleteData()(IncompleteDataable)
GetIsTrending()(*bool)
GetMove()(ItemActionStatable)
GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
SetAccess(value ItemActionStatable)()
SetActivities(value []ItemActivityable)()
SetCreate(value ItemActionStatable)()
SetDelete(value ItemActionStatable)()
SetEdit(value ItemActionStatable)()
SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetIncompleteData(value IncompleteDataable)()
SetIsTrending(value *bool)()
SetMove(value ItemActionStatable)()
SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
}