/
models.go
627 lines (556 loc) · 29 KB
/
models.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
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
package graphapi
import (
"time"
)
const (
AtMicrosoftGraphDownloadURLAvailableSafePeriod = int64(3300)
AtMicrosoftGraphDownloadURLAvailablePeriod = int64(3600)
)
type NewMicrosoftGraphAPIInput struct {
MicrosoftEndPoints *MicrosoftEndPoints `json:"microsoftEndPoints,omitempty"`
AzureADAppRegistration *AzureADAppRegistration `json:"azureAdAppRegistration,omitempty"`
AzureADAuthFlowContext *AzureADAuthFlowContext `json:"azureAdAuthFlowContext,omitempty"`
}
type MicrosoftGraphAPI struct {
MicrosoftEndPoints MicrosoftEndPoints `json:"microsoftEndPoints"`
AzureADAppRegistration AzureADAppRegistration `json:"azureAdAppRegistration"`
AzureADAuthFlowContext AzureADAuthFlowContext `json:"azureAdAuthFlowContext"`
MicrosoftGraphAPIToken *MicrosoftGraphAPIToken `json:"microsoftGraphApiToken,omitempty"`
}
type MicrosoftEndPoints struct {
AzureADPortalEndPointURL *string `json:"azureAdPortalEndPointUrl,omitempty"`
AzureADEndPointURL string `json:"azureAdEndPointUrl"`
MicrosoftGraphAPIEndPointURL string `json:"microsoftgraphApiEndPointUrl"`
}
type AzureADAppRegistration struct {
DisplayName *string `json:"displayName,omitempty"`
ClientID string `json:"clientId"`
TenantID *string `json:"tenantId,omitempty"`
ObjectID *string `json:"objectId,omitempty"`
RedirectURIs []string `json:"redirectUris"`
LogoutURL *string `json:"logoutUrl,omitempty"`
ClientSecret string `json:"clientSecret"`
}
type AzureADAuthFlowContext struct {
GrantScope string `json:"grantScope"`
StateID *string `json:"stateId,omitempty"`
Code *string `json:"code,omitempty"`
RefreshToken *string `json:"refreshToken,omitempty"`
}
type MicrosoftGraphAPIToken struct {
TokenType string `json:"token_type"`
ExpiresIn int32 `json:"expires_in"`
ExtExpiresIn *int32 `json:"ext_expires_in,omitempty"`
Scope string `json:"scope"`
AccessToken string `json:"access_token"`
RefreshToken *string `json:"refresh_token,omitempty"`
}
// MicrosoftGraphBaseItem "@odata.type": "microsoft.graph.baseItem"
type MicrosoftGraphBaseItem struct {
ID string `json:"id"` // identifier
CreatedBy *MicrosoftGraphIdentitySet `json:"createdBy,omitempty"`
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
Description *string `json:"description,omitempty"`
ETag string `json:"eTag"`
LastModifiedBy *MicrosoftGraphIdentitySet `json:"lastModifiedBy,omitempty"`
LastModifiedDateTime time.Time `json:"lastModifiedDateTime"`
Name string `json:"name"`
ParentReference *MicrosoftGraphItemReference `json:"parentReference,omitempty"`
WebURL string `json:"webUrl"`
}
// MicrosoftGraphDriveItem "@odata.type": "microsoft.graph.driveItem"
type MicrosoftGraphDriveItem struct {
Audio *MicrosoftGraphAudio `json:"audio,omitempty"`
Content *EdmDotStream `json:"content,omitempty"`
CTag string `json:"cTag"` // etag
Deleted *MicrosoftGraphDeleted `json:"deleted,omitempty"`
Description *string `json:"description,omitempty"`
File *MicrosoftGraphFile `json:"file,omitempty"`
FileSystemInfo *MicrosoftGraphFileSystemInfo `json:"fileSystemInfo,omitempty"`
Folder *MicrosoftGraphFolder `json:"folder,omitempty"`
Image *MicrosoftGraphImage `json:"image,omitempty"`
Location *MicrosoftGraphGEOCoordinates `json:"location,omitempty"`
Malware *MicrosoftGraphMalware `json:"malware,omitempty"`
Package *MicrosoftGraphPackage `json:"package,omitempty"`
Photo *MicrosoftGraphPhoto `json:"photo,omitempty"`
Publication *MicrosoftGraphPublicationFacet `json:"publication,omitempty"`
RemoteItem *MicrosoftGraphRemoteItem `json:"remoteItem,omitempty"`
Root *MicrosoftGraphRoot `json:"root,omitempty"`
SearchResult *MicrosoftGraphSearchResult `json:"searchResult,omitempty"`
Shared *MicrosoftGraphShared `json:"shared,omitempty"`
SharepointIDs *MicrosoftGraphSharepointIDs `json:"sharepointIds,omitempty"`
Size int64 `json:"size"`
SpecialFolder *MicrosoftGraphSpecialFolder `json:"specialFolder,omitempty"`
Video *MicrosoftGraphVideo `json:"video,omitempty"`
WebDavURL *string `json:"webDavUrl,omitempty"`
/* relationships */
Activities []MicrosoftGraphItemActivity `json:"activities,omitempty"`
Children []MicrosoftGraphDriveItem `json:"children,omitempty"`
Permissions []MicrosoftGraphPermission `json:"permissions,omitempty"`
Thumbnails []MicrosoftGraphThumbnailSet `json:"thumbnails,omitempty"`
Versions []MicrosoftGraphDriveItemVersion `json:"versions,omitempty"`
/* inherited from baseItem */
ID string `json:"id"` // identifier
CreatedBy *MicrosoftGraphIdentitySet `json:"createdBy,omitempty"`
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
ETag string `json:"eTag"`
LastModifiedBy *MicrosoftGraphIdentitySet `json:"lastModifiedBy,omitempty"`
LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"`
Name string `json:"name"`
ParentReference *MicrosoftGraphItemReference `json:"parentReference,omitempty"`
WebURL string `json:"webUrl"`
/* instance annotations */
AtMicrosoftGraphConflictBehavior *string `json:"@microsoft.graph.conflictBehavior,omitempty"`
AtMicrosoftGraphDownloadURL *string `json:"@microsoft.graph.downloadUrl,omitempty"`
AtMicrosoftGraphSourceURL *string `json:"@microsoft.graph.sourceUrl,omitempty"`
/* NOTE AtMicrosoftGraphConflictBehavior
* The parameter @microsoft.graph.conflictBehavior should be included in the URL
* instead of the body of the request.
*
* NOTE for AtMicrosoftGraphDownloadURL:
* The @microsoft.graph.downloadUrl value is a short-lived URL and can't be cached.
* The URL will only be available for a short period of time (1 hour) before it is
* invalidated. Removing file permissions for a user may not immediately invalidate
* the URL.
*
* https://docs.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0#instance-attributes
*/
/* more */
AtOdataContext *string `json:"@odata.context,omitempty"`
AtOdataType *string `json:"@odata.type,omitempty"`
AtOdataID *string `json:"@odata.id,omitempty"`
AtOdataEditLink *string `json:"@odata.editLink,omitempty"`
AtContentDownloadURL *string `json:"@content.downloadUrl,omitempty"`
}
// MicrosoftGraphDriveItemCollection "@odata.type": "microsoft.graph.driveItemCollection"
type MicrosoftGraphDriveItemCollection struct {
Value []MicrosoftGraphDriveItem `json:"value"`
AtODataDeltaLink *string `json:"@odata.deltaLink,omitempty"`
AtODataNextLink *string `json:"@odata.nextLink,omitempty"`
}
// MicrosoftGraphAudio "@odata.type": "microsoft.graph.audio"
type MicrosoftGraphAudio struct {
Album string `json:"album"`
AlbumArtist string `json:"albumArtist"`
Artist string `json:"artist"`
Bitrate int64 `json:"bitrate"`
Composers string `json:"composers"`
Copyright string `json:"copyright"`
Disc int16 `json:"disc"`
DiscCount int16 `json:"discCount"`
Duration int64 `json:"duration"`
Genre string `json:"genre"`
HasDRM bool `json:"hasDrm"`
IsVariableBitrate bool `json:"isVariableBitrate"`
Title string `json:"title"`
Track int32 `json:"track"`
TrackCount int32 `json:"trackCount"`
Year int32 `json:"year"`
}
// EdmDotStream "@odata.type": "Edm.Stream"
type EdmDotStream struct {
// The content stream.
}
// MicrosoftGraphIdentitySet "@odata.type": "microsoft.graph.identitySet"
type MicrosoftGraphIdentitySet struct {
Application *MicrosoftGraphIdentity `json:"application,omitempty"`
Device *MicrosoftGraphIdentity `json:"device,omitempty"`
Group *MicrosoftGraphIdentity `json:"group,omitempty"`
User *MicrosoftGraphIdentity `json:"user,omitempty"`
}
// MicrosoftGraphIdentity "@odata.type": "microsoft.graph.identity"
type MicrosoftGraphIdentity struct {
DisplayName string `json:"displayName"`
ID string `json:"id,omitempty"`
Thumbnails *MicrosoftGraphThumbnailSet `json:"thumbnails,omitempty"`
}
// MicrosoftGraphDeleted "@odata.type": "microsoft.graph.deleted"
type MicrosoftGraphDeleted struct {
State string `json:"state"`
}
// MicrosoftGraphFile "@odata.type": "microsoft.graph.file"
type MicrosoftGraphFile struct {
Hashes *MicrosoftGraphHashes `json:"hashes,omitempty"`
MimeType string `json:"mimeType"`
IRMEnabled *bool `json:"irmEnabled,omitempty"`
ProcessingMetadata *bool `json:"processingMetadata,omitempty"`
}
// MicrosoftGraphHashes "@odata.type": "microsoft.graph.hashes"
type MicrosoftGraphHashes struct {
CRC32Hash *string `json:"crc32Hash,omitempty"` // hex
SHA1Hash *string `json:"sha1Hash,omitempty"` // hex
QuickXorHash *string `json:"quickXorHash,omitempty"` // base64
}
// MicrosoftGraphFileSystemInfo "@odata.type": "microsoft.graph.fileSystemInfo"
type MicrosoftGraphFileSystemInfo struct {
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
LastAccessedDateTime *time.Time `json:"lastAccessedDateTime,omitempty"`
LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"`
}
// MicrosoftGraphFolder "@odata.type": "microsoft.graph.folder"
type MicrosoftGraphFolder struct {
ChildCount int32 `json:"childCount"`
View *MicrosoftGraphFolderView `json:"view,omitempty"`
}
// MicrosoftGraphFolderView "@odata.type": "microsoft.graph.folderView"
type MicrosoftGraphFolderView struct {
SortBy string `json:"sortBy"` // default, name, type, size, takenOrCreatedDateTime, lastModifiedDateTime, sequence
SortOrder string `json:"sortOrder"` // ascending, descending
ViewType string `json:"viewType"` // default, icons, details, thumbnails
}
// MicrosoftGraphImage "@odata.type": "microsoft.graph.image"
type MicrosoftGraphImage struct {
Width int32 `json:"width"`
Height int32 `json:"height"`
}
// MicrosoftGraphGEOCoordinates "@odata.type": "microsoft.graph.geoCoordinates"
type MicrosoftGraphGEOCoordinates struct {
Altitude float64 `json:"altitude"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
}
// MicrosoftGraphMalware "@odata.type": "microsoft.graph.malware"
type MicrosoftGraphMalware struct {
/* The Malware resource indicates that malware has been detected in the item.
* In this version of the API, the presence (non-null) of the resource indicates
* that item contains malware, while a null (or missing) value indicates that
* the item is clean.
*
* Note: While this resource is empty today, in future API revisions the resource
* may be populated with additional properties.
*/
}
// MicrosoftGraphPackage "@odata.type": "microsoft.graph.package"
type MicrosoftGraphPackage struct {
Type string `json:"type"`
}
// MicrosoftGraphItemReference "@odata.type": "microsoft.graph.itemReference"
type MicrosoftGraphItemReference struct {
DriveID string `json:"driveId"`
DriveType string `json:"driveType"` // personal, business, documentLibrary
ID string `json:"id"`
ListID *string `json:"listId,omitempty"`
Name *string `json:"name,omitempty"`
Path string `json:"path"`
ShareID *string `json:"shareId,omitempty"`
SharepointIDs *MicrosoftGraphSharepointIDs `json:"sharepointIds,omitempty"`
SiteID *string `json:"siteId,omitempty"`
}
// MicrosoftGraphSharepointIDs "@odata.type": "microsoft.graph.sharepointIds"
type MicrosoftGraphSharepointIDs struct {
ListID string `json:"listId"`
ListItemID string `json:"listItemId"`
ListItemUniqueID string `json:"listItemUniqueId"`
SiteID string `json:"siteId"`
SiteURL string `json:"siteUrl"`
TenantID string `json:"tenantId"`
WebID string `json:"webId"`
}
// MicrosoftGraphPhoto "@odata.type": "microsoft.graph.photo"
type MicrosoftGraphPhoto struct {
CameraMake string `json:"cameraMake"`
CameraModel string `json:"cameraModel"`
ExposureDenominator float64 `json:"exposureDenominator"`
ExposureNumerator float64 `json:"exposureNumerator"`
FNumber float64 `json:"fNumber"`
FocalLength float64 `json:"focalLength"`
ISO int32 `json:"iso"`
TakenDateTime *time.Time `json:"takenDateTime,omitempty"`
}
// MicrosoftGraphPublicationFacet "@odata.type": "microsoft.graph.publicationFacet"
type MicrosoftGraphPublicationFacet struct {
Level string `json:"level"` // published, checkout
VersionID string `json:"versionId"`
}
// MicrosoftGraphRemoteItem "@odata.type": "microsoft.graph.remoteItem"
type MicrosoftGraphRemoteItem struct {
ID string `json:"id"` // identifier
CreatedBy *MicrosoftGraphIdentitySet `json:"createdBy,omitempty"`
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
File *MicrosoftGraphFile `json:"file,omitempty"`
FileSystemInfo *MicrosoftGraphFileSystemInfo `json:"fileSystemInfo,omitempty"`
Folder *MicrosoftGraphFolder `json:"folder,omitempty"`
LastModifiedBy *MicrosoftGraphIdentitySet `json:"lastModifiedBy,omitempty"`
LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"`
Name string `json:"name"`
Package *MicrosoftGraphPackage `json:"package,omitempty"`
ParentReference *MicrosoftGraphItemReference `json:"parentReference,omitempty"`
Shared *MicrosoftGraphShared `json:"shared,omitempty"`
SharepointIDs *MicrosoftGraphSharepointIDs `json:"sharepointIds,omitempty"`
SpecialFolder *MicrosoftGraphSpecialFolder `json:"specialFolder,omitempty"`
Size int64 `json:"size"`
WebDavURL string `json:"webDavUrl"`
WebURL string `json:"webUrl"`
}
// MicrosoftGraphRoot "@odata.type": "microsoft.graph.root"
type MicrosoftGraphRoot struct {
/* The Root facet indicates that an object is the top-most one in its hierarchy.
* The presence (non-null) of the facet value indicates that the object is the
* root. A null (or missing) value indicates the object is not the root.
*
* Note: While this facet is empty today, in future API revisions the facet may
* be populated with additional properties.
*/
}
// MicrosoftGraphSearchResult "@odata.type": "microsoft.graph.searchResult"
type MicrosoftGraphSearchResult struct {
OnClickTelemetryURL string `json:"onClickTelemetryUrl"`
}
// MicrosoftGraphShared "@odata.type": "microsoft.graph.shared"
type MicrosoftGraphShared struct {
Owner *MicrosoftGraphIdentitySet `json:"owner,omitempty"`
Scope string `json:"scope"` // anonymous, organization, users
SharedBy *MicrosoftGraphIdentitySet `json:"sharedBy,omitempty"`
SharedDateTime *time.Time `json:"sharedDateTime,omitempty"`
}
// MicrosoftGraphSpecialFolder "@odata.type": "microsoft.graph.specialFolder"
type MicrosoftGraphSpecialFolder struct {
Name string `json:"name"`
}
// MicrosoftGraphVideo "@odata.type": "microsoft.graph.video"
type MicrosoftGraphVideo struct {
AudioBitsPerSample int32 `json:"audioBitsPerSample"`
AudioChannels int32 `json:"audioChannels"`
AudioFormat string `json:"audioFormat"`
AudioSamplesPerSecond int32 `json:"audioSamplesPerSecond"`
Bitrate int32 `json:"bitrate"`
Duration int32 `json:"duration"`
FourCC string `json:"fourCC"`
FrameRate float64 `json:"frameRate"`
Height int32 `json:"height"`
Width int32 `json:"width"`
}
// MicrosoftGraphItemActivity "@odata.type": "microsoft.graph.itemActivity"
type MicrosoftGraphItemActivity struct {
ID string `json:"id"` // identifier
Action *MicrosoftGraphItemActionSet `json:"action,omitempty"`
Actor *MicrosoftGraphIdentitySet `json:"actor,omitempty"`
Times *MicrosoftGraphitemActivityTimeSet `json:"times,omitempty"`
/* relationships */
DriveItem *MicrosoftGraphDriveItem `json:"driveItem,omitempty"`
ListItem *MicrosoftGraphListItem `json:"listItem,omitempty"`
}
// MicrosoftGraphItemActionSet "@odata.type": "microsoft.graph.itemActionSet"
type MicrosoftGraphItemActionSet struct {
Comment *MicrosoftGraphCommentAction `json:"comment,omitempty"`
Create *MicrosoftGraphCreateAction `json:"create,omitempty"`
Delete *MicrosoftGraphDeleteAction `json:"delete,omitempty"`
Edit *MicrosoftGraphEditAction `json:"edit,omitempty"`
Mention *MicrosoftGraphMentionAction `json:"mention,omitempty"`
Move *MicrosoftGraphMoveAction `json:"move,omitempty"`
Rename *MicrosoftGraphRenameAction `json:"rename,omitempty"`
Restore *MicrosoftGraphRestoreAction `json:"restore,omitempty"`
Share *MicrosoftGraphShareAction `json:"share,omitempty"`
Version *MicrosoftGraphVersionAction `json:"version,omitempty"`
}
// MicrosoftGraphCommentAction "@odata.type": "microsoft.graph.commentAction"
type MicrosoftGraphCommentAction struct {
IsReply bool `json:"isReply"`
ParentAuthor *MicrosoftGraphIdentitySet `json:"parentAuthor,omitempty"`
Participants []MicrosoftGraphIdentitySet `json:"participants,omitempty"`
}
// MicrosoftGraphCreateAction "@odata.type": "microsoft.graph.createAction"
type MicrosoftGraphCreateAction struct {
/* The presence of the CreateAction resource on an itemActivity indicates that
* the activity created an item.
*
* Note: While this resource is empty today, in future API revisions it may be
* populated with additional properties.
*/
}
// MicrosoftGraphDeleteAction "@odata.type": "microsoft.graph.deleteAction"
type MicrosoftGraphDeleteAction struct {
Name string `json:"name"`
ObjectType string `json:"objectType"` // File, Folder
}
// MicrosoftGraphEditAction "@odata.type": "microsoft.graph.editAction"
type MicrosoftGraphEditAction struct {
/* The presence of the EditAction resource on an itemActivity indicates that
* the activity edited an item.
*
* Note: While this resource is empty today, in future API revisions it may
* be populated with additional properties.
*/
}
// MicrosoftGraphMentionAction "@odata.type": "microsoft.graph.mentionAction"
type MicrosoftGraphMentionAction struct {
Mentionees []MicrosoftGraphIdentitySet `json:"mentionees,omitempty"`
}
// MicrosoftGraphMoveAction "@odata.type": "microsoft.graph.moveAction"
type MicrosoftGraphMoveAction struct {
From string `json:"from"`
To string `json:"to"`
}
// MicrosoftGraphRenameAction "@odata.type": "microsoft.graph.renameAction"
type MicrosoftGraphRenameAction struct {
OldName string `json:"oldName"`
NewName string `json:"newName"`
}
// MicrosoftGraphRestoreAction "@odata.type": "microsoft.graph.restoreAction"
type MicrosoftGraphRestoreAction struct {
/* The presence of the RestoreAction resource on an itemActivity indicates
* that the activity restored an item.
*
* Note: While this resource is empty today, in future API revisions it may
* be populated with additional properties.
*/
}
// MicrosoftGraphShareAction "@odata.type": "microsoft.graph.shareAction"
type MicrosoftGraphShareAction struct {
Recipients []MicrosoftGraphIdentitySet `json:"recipients,omitempty"`
}
// MicrosoftGraphVersionAction "@odata.type": "microsoft.graph.versionAction"
type MicrosoftGraphVersionAction struct {
NewVersion string `json:"newVersion"`
}
// MicrosoftGraphListItem "@odata.type": "microsoft.graph.listItem"
type MicrosoftGraphListItem struct {
ContentType *MicrosoftGraphContentTypeInfo `json:"contentType,omitempty"`
Fields *MicrosoftGraphFieldValueSet `json:"fields,omitempty"`
SharepointIDs *MicrosoftGraphSharepointIDs `json:"sharepointIds,omitempty"`
/* relationships */
Activities []MicrosoftGraphItemActivity `json:"activities,omitempty"`
DriveItem *MicrosoftGraphDriveItem `json:"driveItem,omitempty"`
Versions []MicrosoftGraphListItemVersion `json:"versions,omitempty"`
/* inherited from baseItem */
ID string `json:"id"`
CreatedBy *MicrosoftGraphIdentitySet `json:"createdBy,omitempty"`
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
Description *string `json:"description,omitempty"`
ETag string `json:"eTag"`
LastModifiedBy *MicrosoftGraphIdentitySet `json:"lastModifiedBy,omitempty"`
LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"`
Name string `json:"name"`
ParentReference *MicrosoftGraphItemReference `json:"parentReference,omitempty"`
WebURL string `json:"webUrl"`
}
// MicrosoftGraphContentTypeInfo "@odata.type": "microsoft.graph.contentTypeInfo"
type MicrosoftGraphContentTypeInfo struct {
ID string `json:"id"`
Name string `json:"name"`
}
// MicrosoftGraphFieldValueSet "@odata.type": "microsoft.graph.fieldValueSet"
type MicrosoftGraphFieldValueSet struct {
Author string `json:"Author"`
AuthorLookupID string `json:"AuthorLookupId"`
Name string `json:"Name"`
Color string `json:"Color"`
Quantity int32 `json:"Quantity"`
}
// MicrosoftGraphListItemVersion "@odata.type": "microsoft.graph.listItemVersion"
type MicrosoftGraphListItemVersion struct {
Fields *MicrosoftGraphFieldValueSet `json:"fields,omitempty"`
ID string `json:"id"`
LastModifiedBy *MicrosoftGraphIdentitySet `json:"lastModifiedBy,omitempty"`
LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"`
Published *MicrosoftGraphPublicationFacet `json:"published,omitempty"`
}
// MicrosoftGraphitemActivityTimeSet "@odata.type": "microsoft.graph.itemActivityTimeSet"
type MicrosoftGraphitemActivityTimeSet struct {
ObservedDateTime *time.Time `json:"observedDateTime,omitempty"`
RecordedDateTime *time.Time `json:"recordedDateTime,omitempty"`
}
// MicrosoftGraphPermission "@odata.type": "microsoft.graph.permission"
type MicrosoftGraphPermission struct {
ID string `json:"id"`
GrantedTo *MicrosoftGraphIdentitySet `json:"grantedTo,omitempty"`
GrantedToIdentities []MicrosoftGraphIdentitySet `json:"grantedToIdentities,omitempty"`
InheritedFrom *MicrosoftGraphItemReference `json:"inheritedFrom,omitempty"`
Invitation *MicrosoftGraphSharingInvitation `json:"invitation,omitempty"`
Link *MicrosoftGraphSharingLink `json:"link,omitempty"`
Roles []string `json:"roles"` // read, write, sp.owner, sp.member
ShareID string `json:"shareId"`
}
// MicrosoftGraphSharingInvitation "@odata.type": "microsoft.graph.sharingInvitation"
type MicrosoftGraphSharingInvitation struct {
Email string `json:"email"`
InvitedBy *MicrosoftGraphIdentitySet `json:"invitedBy,omitempty"`
SignInRequired bool `json:"signInRequired"`
}
// MicrosoftGraphSharingLink "@odata.type": "microsoft.graph.sharingLink"
type MicrosoftGraphSharingLink struct {
Application *MicrosoftGraphIdentity `json:"application,omitempty"`
Type string `json:"type"` // view, edit, embed
Scope string `json:"scope"` // anonymous, organization
WebHTML string `json:"webHtml"`
WebURL string `json:"webUrl"`
}
// MicrosoftGraphThumbnailSet "@odata.type": "microsoft.graph.thumbnailSet"
type MicrosoftGraphThumbnailSet struct {
ID string `json:"id"` // identifier
Large *MicrosoftGraphThumbnail `json:"large,omitempty"`
Medium *MicrosoftGraphThumbnail `json:"medium,omitempty"`
Small *MicrosoftGraphThumbnail `json:"small,omitempty"`
Source *MicrosoftGraphThumbnail `json:"source,omitempty"`
}
// MicrosoftGraphThumbnail "@odata.type": "microsoft.graph.thumbnail"
type MicrosoftGraphThumbnail struct {
Content *EdmDotStream `json:"content,omitempty"`
Height int32 `json:"height"`
SourceItemID string `json:"sourceItemId"`
URL string `json:"url"`
Width int32 `json:"width"`
}
// MicrosoftGraphDriveItemVersion "@odata.type": "microsoft.graph.driveItemVersion"
type MicrosoftGraphDriveItemVersion struct {
Content *EdmDotStream `json:"content,omitempty"`
ID string `json:"id"`
LastModifiedBy *MicrosoftGraphIdentitySet `json:"lastModifiedBy,omitempty"`
LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"`
Publication *MicrosoftGraphPublicationFacet `json:"publication,omitempty"`
Height int32 `json:"height"`
}
// MicrosoftGraphDrive "@odata.type": "microsoft.graph.drive"
type MicrosoftGraphDrive struct {
Activities []MicrosoftGraphItemActivity `json:"activities,omitempty"`
ID string `json:"id"` // identifier
CreatedBy *MicrosoftGraphIdentitySet `json:"createdBy,omitempty"`
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
Description *string `json:"description,omitempty"`
DriveType string `json:"driveType"` // personal, business, documentLibrary
Items []MicrosoftGraphDriveItem `json:"items,omitempty"`
LastModifiedBy *MicrosoftGraphIdentitySet `json:"lastModifiedBy,omitempty"`
LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"`
Name string `json:"name"`
Owner *MicrosoftGraphIdentitySet `json:"owner,omitempty"`
Quota *MicrosoftGraphQuota `json:"quota,omitempty"`
Root *MicrosoftGraphDriveItem `json:"root,omitempty"`
SharepointIDs *MicrosoftGraphSharepointIDs `json:"sharepointIds,omitempty"`
Special []MicrosoftGraphDriveItem `json:"special,omitempty"`
System *MicrosoftGraphSystemFacet `json:"system,omitempty"`
WebURL string `json:"webUrl"`
}
// MicrosoftGraphQuota "@odata.type": "microsoft.graph.quota"
type MicrosoftGraphQuota struct {
Deleted int64 `json:"deleted"`
FileCount *int64 `json:"fileCount,omitempty"`
Remaining int64 `json:"remaining"`
State string `json:"state"` // normal, nearing, critical, exceeded
Total int64 `json:"total"`
Used int64 `json:"used"`
}
// MicrosoftGraphSystemFacet "@odata.type": "microsoft.graph.systemFacet"
type MicrosoftGraphSystemFacet struct {
/* The System facet indicates that the object is managed by the system
* for its own operation. Most apps should ignore items that have a
* System facet.
*
* Note: While this facet is empty today, in future API revisions the
* facet may be populated with additional properties.
*/
}
// MicrosoftGraphUploadSession "@odata.type": "microsoft.graph.uploadSession"
type MicrosoftGraphUploadSession struct {
ExpirationDateTime time.Time `json:"expirationDateTime"`
NextExpectedRanges []string `json:"nextExpectedRanges"`
UploadURL *string `json:"uploadUrl"`
}
// MicrosoftGraphDriveItemUploadableProperties "@odata.type": "microsoft.graph.driveItemUploadableProperties"
type MicrosoftGraphDriveItemUploadableProperties struct {
Description *string `json:"description,omitempty"`
FileSize *int64 `json:"fileSize"`
FileSystemInfo *MicrosoftGraphFileSystemInfo `json:"fileSystemInfo,omitempty"`
Name string `json:"name"`
AtMicrosoftGraphConflictBehavior *string `json:"@microsoft.graph.conflictBehavior"` // rename, fail, replace
AtMicrosoftGraphSourceURL *string `json:"@microsoft.graph.sourceUrl"`
}