-
Notifications
You must be signed in to change notification settings - Fork 32
/
education_user.go
1562 lines (1560 loc) · 57.7 KB
/
education_user.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
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package models
import (
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
type EducationUser struct {
Entity
}
// NewEducationUser instantiates a new EducationUser and sets the default values.
func NewEducationUser()(*EducationUser) {
m := &EducationUser{
Entity: *NewEntity(),
}
return m
}
// CreateEducationUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateEducationUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewEducationUser(), nil
}
// GetAccountEnabled gets the accountEnabled property value. True if the account is enabled; otherwise, false. This property is required when a user is created. Supports $filter.
// returns a *bool when successful
func (m *EducationUser) GetAccountEnabled()(*bool) {
val, err := m.GetBackingStore().Get("accountEnabled")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetAssignedLicenses gets the assignedLicenses property value. The licenses that are assigned to the user. Not nullable.
// returns a []AssignedLicenseable when successful
func (m *EducationUser) GetAssignedLicenses()([]AssignedLicenseable) {
val, err := m.GetBackingStore().Get("assignedLicenses")
if err != nil {
panic(err)
}
if val != nil {
return val.([]AssignedLicenseable)
}
return nil
}
// GetAssignedPlans gets the assignedPlans property value. The plans that are assigned to the user. Read-only. Not nullable.
// returns a []AssignedPlanable when successful
func (m *EducationUser) GetAssignedPlans()([]AssignedPlanable) {
val, err := m.GetBackingStore().Get("assignedPlans")
if err != nil {
panic(err)
}
if val != nil {
return val.([]AssignedPlanable)
}
return nil
}
// GetAssignments gets the assignments property value. Assignments belonging to the user.
// returns a []EducationAssignmentable when successful
func (m *EducationUser) GetAssignments()([]EducationAssignmentable) {
val, err := m.GetBackingStore().Get("assignments")
if err != nil {
panic(err)
}
if val != nil {
return val.([]EducationAssignmentable)
}
return nil
}
// GetBusinessPhones gets the businessPhones property value. The telephone numbers for the user. Note: Although this is a string collection, only one number can be set for this property.
// returns a []string when successful
func (m *EducationUser) GetBusinessPhones()([]string) {
val, err := m.GetBackingStore().Get("businessPhones")
if err != nil {
panic(err)
}
if val != nil {
return val.([]string)
}
return nil
}
// GetClasses gets the classes property value. Classes to which the user belongs. Nullable.
// returns a []EducationClassable when successful
func (m *EducationUser) GetClasses()([]EducationClassable) {
val, err := m.GetBackingStore().Get("classes")
if err != nil {
panic(err)
}
if val != nil {
return val.([]EducationClassable)
}
return nil
}
// GetCreatedBy gets the createdBy property value. The entity who created the user.
// returns a IdentitySetable when successful
func (m *EducationUser) GetCreatedBy()(IdentitySetable) {
val, err := m.GetBackingStore().Get("createdBy")
if err != nil {
panic(err)
}
if val != nil {
return val.(IdentitySetable)
}
return nil
}
// GetDepartment gets the department property value. The name for the department in which the user works. Supports $filter.
// returns a *string when successful
func (m *EducationUser) GetDepartment()(*string) {
val, err := m.GetBackingStore().Get("department")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetDisplayName gets the displayName property value. The name displayed in the address book for the user. This is usually the combination of the user's first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. Supports $filter and $orderby.
// returns a *string when successful
func (m *EducationUser) GetDisplayName()(*string) {
val, err := m.GetBackingStore().Get("displayName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetExternalSource gets the externalSource property value. Where this user was created from. Possible values are: sis, manual.
// returns a *EducationExternalSource when successful
func (m *EducationUser) GetExternalSource()(*EducationExternalSource) {
val, err := m.GetBackingStore().Get("externalSource")
if err != nil {
panic(err)
}
if val != nil {
return val.(*EducationExternalSource)
}
return nil
}
// GetExternalSourceDetail gets the externalSourceDetail property value. The name of the external source this resource was generated from.
// returns a *string when successful
func (m *EducationUser) GetExternalSourceDetail()(*string) {
val, err := m.GetBackingStore().Get("externalSourceDetail")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *EducationUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["accountEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetAccountEnabled(val)
}
return nil
}
res["assignedLicenses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateAssignedLicenseFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]AssignedLicenseable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(AssignedLicenseable)
}
}
m.SetAssignedLicenses(res)
}
return nil
}
res["assignedPlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateAssignedPlanFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]AssignedPlanable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(AssignedPlanable)
}
}
m.SetAssignedPlans(res)
}
return nil
}
res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateEducationAssignmentFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]EducationAssignmentable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(EducationAssignmentable)
}
}
m.SetAssignments(res)
}
return nil
}
res["businessPhones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfPrimitiveValues("string")
if err != nil {
return err
}
if val != nil {
res := make([]string, len(val))
for i, v := range val {
if v != nil {
res[i] = *(v.(*string))
}
}
m.SetBusinessPhones(res)
}
return nil
}
res["classes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateEducationClassFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]EducationClassable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(EducationClassable)
}
}
m.SetClasses(res)
}
return nil
}
res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetCreatedBy(val.(IdentitySetable))
}
return nil
}
res["department"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDepartment(val)
}
return nil
}
res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDisplayName(val)
}
return nil
}
res["externalSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseEducationExternalSource)
if err != nil {
return err
}
if val != nil {
m.SetExternalSource(val.(*EducationExternalSource))
}
return nil
}
res["externalSourceDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetExternalSourceDetail(val)
}
return nil
}
res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetGivenName(val)
}
return nil
}
res["mail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetMail(val)
}
return nil
}
res["mailingAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetMailingAddress(val.(PhysicalAddressable))
}
return nil
}
res["mailNickname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetMailNickname(val)
}
return nil
}
res["middleName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetMiddleName(val)
}
return nil
}
res["mobilePhone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetMobilePhone(val)
}
return nil
}
res["officeLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOfficeLocation(val)
}
return nil
}
res["onPremisesInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateEducationOnPremisesInfoFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetOnPremisesInfo(val.(EducationOnPremisesInfoable))
}
return nil
}
res["passwordPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetPasswordPolicies(val)
}
return nil
}
res["passwordProfile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreatePasswordProfileFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetPasswordProfile(val.(PasswordProfileable))
}
return nil
}
res["preferredLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetPreferredLanguage(val)
}
return nil
}
res["primaryRole"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseEducationUserRole)
if err != nil {
return err
}
if val != nil {
m.SetPrimaryRole(val.(*EducationUserRole))
}
return nil
}
res["provisionedPlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateProvisionedPlanFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]ProvisionedPlanable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(ProvisionedPlanable)
}
}
m.SetProvisionedPlans(res)
}
return nil
}
res["refreshTokensValidFromDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetRefreshTokensValidFromDateTime(val)
}
return nil
}
res["relatedContacts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateRelatedContactFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]RelatedContactable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(RelatedContactable)
}
}
m.SetRelatedContacts(res)
}
return nil
}
res["residenceAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetResidenceAddress(val.(PhysicalAddressable))
}
return nil
}
res["rubrics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateEducationRubricFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]EducationRubricable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(EducationRubricable)
}
}
m.SetRubrics(res)
}
return nil
}
res["schools"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateEducationSchoolFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]EducationSchoolable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(EducationSchoolable)
}
}
m.SetSchools(res)
}
return nil
}
res["showInAddressList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetShowInAddressList(val)
}
return nil
}
res["student"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateEducationStudentFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetStudent(val.(EducationStudentable))
}
return nil
}
res["surname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetSurname(val)
}
return nil
}
res["taughtClasses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateEducationClassFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]EducationClassable, len(val))
for i, v := range val {
if v != nil {
res[i] = v.(EducationClassable)
}
}
m.SetTaughtClasses(res)
}
return nil
}
res["teacher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateEducationTeacherFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetTeacher(val.(EducationTeacherable))
}
return nil
}
res["usageLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetUsageLocation(val)
}
return nil
}
res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateUserFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetUser(val.(Userable))
}
return nil
}
res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetUserPrincipalName(val)
}
return nil
}
res["userType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetUserType(val)
}
return nil
}
return res
}
// GetGivenName gets the givenName property value. The given name (first name) of the user. Supports $filter.
// returns a *string when successful
func (m *EducationUser) GetGivenName()(*string) {
val, err := m.GetBackingStore().Get("givenName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetMail gets the mail property value. The SMTP address for the user, for example, jeff@contoso.com. Read-Only. Supports $filter.
// returns a *string when successful
func (m *EducationUser) GetMail()(*string) {
val, err := m.GetBackingStore().Get("mail")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetMailingAddress gets the mailingAddress property value. The mail address of the user.
// returns a PhysicalAddressable when successful
func (m *EducationUser) GetMailingAddress()(PhysicalAddressable) {
val, err := m.GetBackingStore().Get("mailingAddress")
if err != nil {
panic(err)
}
if val != nil {
return val.(PhysicalAddressable)
}
return nil
}
// GetMailNickname gets the mailNickname property value. The mail alias for the user. This property must be specified when a user is created. Supports $filter.
// returns a *string when successful
func (m *EducationUser) GetMailNickname()(*string) {
val, err := m.GetBackingStore().Get("mailNickname")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetMiddleName gets the middleName property value. The middle name of the user.
// returns a *string when successful
func (m *EducationUser) GetMiddleName()(*string) {
val, err := m.GetBackingStore().Get("middleName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetMobilePhone gets the mobilePhone property value. The primary cellular telephone number for the user.
// returns a *string when successful
func (m *EducationUser) GetMobilePhone()(*string) {
val, err := m.GetBackingStore().Get("mobilePhone")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetOfficeLocation gets the officeLocation property value. The office location for the user.
// returns a *string when successful
func (m *EducationUser) GetOfficeLocation()(*string) {
val, err := m.GetBackingStore().Get("officeLocation")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetOnPremisesInfo gets the onPremisesInfo property value. Additional information used to associate the Microsoft Entra user with its Active Directory counterpart.
// returns a EducationOnPremisesInfoable when successful
func (m *EducationUser) GetOnPremisesInfo()(EducationOnPremisesInfoable) {
val, err := m.GetBackingStore().Get("onPremisesInfo")
if err != nil {
panic(err)
}
if val != nil {
return val.(EducationOnPremisesInfoable)
}
return nil
}
// GetPasswordPolicies gets the passwordPolicies property value. Specifies password policies for the user. This value is an enumeration with one possible value being DisableStrongPassword, which allows weaker passwords than the default policy to be specified. DisablePasswordExpiration can also be specified. The two can be specified together; for example: DisablePasswordExpiration, DisableStrongPassword.
// returns a *string when successful
func (m *EducationUser) GetPasswordPolicies()(*string) {
val, err := m.GetBackingStore().Get("passwordPolicies")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetPasswordProfile gets the passwordProfile property value. Specifies the password profile for the user. The profile contains the user's password. This property is required when a user is created. The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. By default, a strong password is required.
// returns a PasswordProfileable when successful
func (m *EducationUser) GetPasswordProfile()(PasswordProfileable) {
val, err := m.GetBackingStore().Get("passwordProfile")
if err != nil {
panic(err)
}
if val != nil {
return val.(PasswordProfileable)
}
return nil
}
// GetPreferredLanguage gets the preferredLanguage property value. The preferred language for the user that should follow the ISO 639-1 code, for example, en-US.
// returns a *string when successful
func (m *EducationUser) GetPreferredLanguage()(*string) {
val, err := m.GetBackingStore().Get("preferredLanguage")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetPrimaryRole gets the primaryRole property value. The primaryRole property
// returns a *EducationUserRole when successful
func (m *EducationUser) GetPrimaryRole()(*EducationUserRole) {
val, err := m.GetBackingStore().Get("primaryRole")
if err != nil {
panic(err)
}
if val != nil {
return val.(*EducationUserRole)
}
return nil
}
// GetProvisionedPlans gets the provisionedPlans property value. The plans that are provisioned for the user. Read-only. Not nullable.
// returns a []ProvisionedPlanable when successful
func (m *EducationUser) GetProvisionedPlans()([]ProvisionedPlanable) {
val, err := m.GetBackingStore().Get("provisionedPlans")
if err != nil {
panic(err)
}
if val != nil {
return val.([]ProvisionedPlanable)
}
return nil
}
// GetRefreshTokensValidFromDateTime gets the refreshTokensValidFromDateTime property value. Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications get an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). If this happens, the application needs to acquire a new refresh token by requesting the authorized endpoint. Returned only on $select. Read-only.
// returns a *Time when successful
func (m *EducationUser) GetRefreshTokensValidFromDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("refreshTokensValidFromDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
}
return nil
}
// GetRelatedContacts gets the relatedContacts property value. Related records associated with the user. Read-only.
// returns a []RelatedContactable when successful
func (m *EducationUser) GetRelatedContacts()([]RelatedContactable) {
val, err := m.GetBackingStore().Get("relatedContacts")
if err != nil {
panic(err)
}
if val != nil {
return val.([]RelatedContactable)
}
return nil
}
// GetResidenceAddress gets the residenceAddress property value. The address where the user lives.
// returns a PhysicalAddressable when successful
func (m *EducationUser) GetResidenceAddress()(PhysicalAddressable) {
val, err := m.GetBackingStore().Get("residenceAddress")
if err != nil {
panic(err)
}
if val != nil {
return val.(PhysicalAddressable)
}
return nil
}
// GetRubrics gets the rubrics property value. When set, the grading rubric attached to the assignment.
// returns a []EducationRubricable when successful
func (m *EducationUser) GetRubrics()([]EducationRubricable) {
val, err := m.GetBackingStore().Get("rubrics")
if err != nil {
panic(err)
}
if val != nil {
return val.([]EducationRubricable)
}
return nil
}
// GetSchools gets the schools property value. Schools to which the user belongs. Nullable.
// returns a []EducationSchoolable when successful
func (m *EducationUser) GetSchools()([]EducationSchoolable) {
val, err := m.GetBackingStore().Get("schools")
if err != nil {
panic(err)
}
if val != nil {
return val.([]EducationSchoolable)
}
return nil
}
// GetShowInAddressList gets the showInAddressList property value. True if the Outlook Global Address List should contain this user; otherwise, false. If not set, this will be treated as true. For users invited through the invitation manager, this property will be set to false.
// returns a *bool when successful
func (m *EducationUser) GetShowInAddressList()(*bool) {
val, err := m.GetBackingStore().Get("showInAddressList")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetStudent gets the student property value. If the primary role is student, this block will contain student specific data.
// returns a EducationStudentable when successful
func (m *EducationUser) GetStudent()(EducationStudentable) {
val, err := m.GetBackingStore().Get("student")
if err != nil {
panic(err)
}
if val != nil {
return val.(EducationStudentable)
}
return nil
}
// GetSurname gets the surname property value. The user's surname (family name or last name). Supports $filter.
// returns a *string when successful
func (m *EducationUser) GetSurname()(*string) {
val, err := m.GetBackingStore().Get("surname")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetTaughtClasses gets the taughtClasses property value. Classes for which the user is a teacher.
// returns a []EducationClassable when successful
func (m *EducationUser) GetTaughtClasses()([]EducationClassable) {
val, err := m.GetBackingStore().Get("taughtClasses")
if err != nil {
panic(err)
}
if val != nil {
return val.([]EducationClassable)
}
return nil
}
// GetTeacher gets the teacher property value. If the primary role is teacher, this block will contain teacher specific data.
// returns a EducationTeacherable when successful
func (m *EducationUser) GetTeacher()(EducationTeacherable) {
val, err := m.GetBackingStore().Get("teacher")
if err != nil {
panic(err)
}
if val != nil {
return val.(EducationTeacherable)
}
return nil
}
// GetUsageLocation gets the usageLocation property value. A two-letter country code (ISO standard 3166). Required for users who will be assigned licenses due to a legal requirement to check for availability of services in countries or regions. Examples include: US, JP, and GB. Not nullable. Supports $filter.
// returns a *string when successful
func (m *EducationUser) GetUsageLocation()(*string) {
val, err := m.GetBackingStore().Get("usageLocation")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetUser gets the user property value. The directory user that corresponds to this user.
// returns a Userable when successful
func (m *EducationUser) GetUser()(Userable) {
val, err := m.GetBackingStore().Get("user")
if err != nil {
panic(err)
}
if val != nil {
return val.(Userable)
}
return nil
}
// GetUserPrincipalName gets the userPrincipalName property value. The user principal name (UPN) of the user. The UPN is an internet-style login name for the user based on the internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant's collection of verified domains. This property is required when a user is created. The verified domains for the tenant can be accessed from the verifiedDomains property of the organization. Supports $filter and $orderby.
// returns a *string when successful
func (m *EducationUser) GetUserPrincipalName()(*string) {
val, err := m.GetBackingStore().Get("userPrincipalName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetUserType gets the userType property value. A string value that can be used to classify user types in your directory, such as Member and Guest. Supports $filter.
// returns a *string when successful
func (m *EducationUser) GetUserType()(*string) {
val, err := m.GetBackingStore().Get("userType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// Serialize serializes information the current object
func (m *EducationUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteBoolValue("accountEnabled", m.GetAccountEnabled())
if err != nil {
return err
}
}
if m.GetAssignedLicenses() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignedLicenses()))
for i, v := range m.GetAssignedLicenses() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("assignedLicenses", cast)
if err != nil {
return err
}
}
if m.GetAssignedPlans() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignedPlans()))
for i, v := range m.GetAssignedPlans() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("assignedPlans", cast)
if err != nil {
return err
}
}
if m.GetAssignments() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments()))
for i, v := range m.GetAssignments() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("assignments", cast)
if err != nil {
return err
}
}
if m.GetBusinessPhones() != nil {
err = writer.WriteCollectionOfStringValues("businessPhones", m.GetBusinessPhones())
if err != nil {
return err
}
}
if m.GetClasses() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClasses()))
for i, v := range m.GetClasses() {
if v != nil {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
}
err = writer.WriteCollectionOfObjectValues("classes", cast)
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("createdBy", m.GetCreatedBy())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("department", m.GetDepartment())
if err != nil {
return err