forked from maiiku/EWSWrapper_py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EWSType.py
1074 lines (1026 loc) · 18 KB
/
EWSType.py
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
'''
/* EWSWrapper_py
* ====================================================
* @author Michal Korzeniowski <mko_san@lafiel.net>
* @version 0.1
* @date 10-2011
* @website http://ewswrapper.lafiel.net/
* ====================================================
* Desciption
* Provides enumerable types from Exchange Web Services
* for EWSWrapper. Accessible from EWSWrapper under
* self.types
*
* ==================================================*/
'''
class EWSType:
class EWSType_AffectedTaskOccurrencesType:
##
# Specifies that a DeleteItem request deletes the master task, and therefore all recurring tasks that are associated with the master task.
#
# @var string
#
ALL_OCCURRENCES='AllOccurrences'
##
# Specifies that a DeleteItem request deletes only the current occurrence of a task.
#
# @var string
#
SPECIFIED_OCCURRENCES_ONLY='SpecifiedOccurrenceOnly'
##
# Constructor
#
def __init__() :
pass
# end class CalendarItemCreateOrDeleteOperationType
class EWSType_BodyTypeResponseType:
##
# All properties are retured in the response
#
# @var string
#
BEST='Best'
##
# Default properties are returned in the respoonse
#
# @var string
#
HTML='HTML'
##
# Plain text body
#
# @var string
#
TEXT='Text'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_BodyTypeResponseType
class EWSType_CalendarItemCreateOrDeleteOperationType:
##
# Send to
#
# @var string
#
SEND_TO_NONE='SendToNone'
##
# Send to
#
# @var string
#
SEND_ONLY_TO_ALL='SendOnlyToAll'
##
# Send to
#
# @var string
#
SEND_TO_ALL_AND_SAVE_COPY='SendToAllAndSaveCopy'
##
# Constructor
#
def __init__() :
pass
# end class CalendarItemCreateOrDeleteOperationType
class EWSType_CalendarItemUpdateOperationType:
##
# Send to
#
# @var string
#
SEND_TO_NONE='SendToNone'
##
# Send to
#
# @var string
#
SEND_ONLY_TO_ALL='SendOnlyToAll'
##
# Send to
#
# @var string
#
SEND_TO_ALL_AND_SAVE_COPY='SendToAllAndSaveCopy'
##
# Send to
#
# @var string
#
SEND_ONLY_TO_CHANGED='SendOnlyToChanged'
##
# Send to
#
# @var string
#
SEND_TO_CHANGED_AND_SAVE_COPY='SendToChangedAndSaveCopy'
##
# Constructor
#
def __init__() :
pass
# end class CalendarItemUpdateOperationType
class EWSType_DefaultShapeNamesType:
##
# All properties are retured in the response
#
# @var string
#
ALL_PROPERTIES='AllProperties'
##
# Default properties are returned in the respoonse
#
# @var string
#
DEFAULT_PROPERTIES='Default'
##
# Only folder ids are returned in the response
#
# @var string
#
ID_ONLY='IdOnly'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_DefaultShapeNamesType
class EWSType_DistinguishedFolderIdNameType:
##
# Calendar folder
#
# @var string
#
CALENDAR='calendar'
##
# Contacts folder
#
# @var string
#
CONTACTS='contacts'
##
# Deleted Items folder (ie. trash)
#
# @var string
#
DELETED_ITEMS='deleteditems'
##
# Drafts folder
#
# @var string
#
DRAFTS='drafts'
##
# Inbox folder
#
# @var string
#
INBOX='inbox'
##
# Journal folder
#
# @var string
#
JOURNAL='journal'
##
# Notes folder
#
# @var string
#
NOTES='notes'
##
# Outbox folder
#
# @var string
#
OUTBOX='outbox'
##
# Sent Items folder
#
# @var string
#
SENT_ITEMS='sentitems'
##
# Tasks folder
#
# @var string
#
TASKS='tasks'
##
# Root of the message folders
#
# @var string
#
MESSAGE_FOLDER_ROOT='msgfolderroot'
##
# Root of the folders=''
#
# @var string
#
PUBLIC_FOLDERS_ROOT='publicfoldersroot'
##
# Root of the user's mailbox
#
# @var string
#
ROOT='root'
##
# Junk Email folder
#
# @var string
#
JUNK_EMAIL='junkemail'
##
# Search folders
#
# @var string
#
SEARCH_FOLDERS='searchfolders'
##
# Voicemail folder
#
# @var string
#
VOICEMAIL='voicemail'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_DistinguishedFolderIdNameType
class EWSType_DisposalType:
##
# Deletes the item irrevocably. Does not move the item to the Deleted Items
# Folder.
#
# @var string
#
HARD_DELETE='HardDelete'
##
# Does not actually delete the item, but instead simply moves it to the
# Deleted Items folder.
#
# @var string
#
MOVE_TO_DELETED_ITEMS='MoveToDeletedItems'
##
# "Deletes" the item so that it is no longer visible in the folder, but
# actually still exists there. Avoid using this because there is nothing
# that you can do with soft-deleted items from EWS aside from finding them.
#
# @var string
#
SOFT_DELETE='SoftDelete'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_DisposalType
class EWSType_IndexBasePointType:
##
# Specifies that a DeleteItem request deletes the master task, and therefore all recurring tasks that are associated with the master task.
#
# @var string
#
BEGINNING='Beginning'
##
# Specifies that a DeleteItem request deletes only the current occurrence of a task.
#
# @var string
#
END='End'
##
# Constructor
#
def __init__() :
pass
# end class CalendarItemCreateOrDeleteOperationType
class EWSType_ItemQueryTraversalType:
##
# Consider only folders that are direct children of the parent folder(s) in
# question
#
# @var string
#
SHALLOW='Shallow'
##
# Consider only those items that are soft deleted from the parent folders
# specified
#
# @var string
#
SOFT_DELETED='SoftDeleted'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_ItemQueryTraversalType
class EWSType_FolderQueryTraversalType:
##
# Consider both direct children as well as all subfolders contained within
# those children as well as the children's children, etc.
#
# @var string
#
DEEP='Deep'
##
# Consider only folders that are direct children of the parent folder(s) in
# question
#
# @var string
#
SHALLOW='Shallow'
##
# Consider only those items that are soft deleted from the parent folders
# specified
#
# @var string
#
SOFT_DELETED='SoftDeleted'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_FolderQueryTraversalType
class EWSType_FileAsMappingType:
##
# File as mapping for "company"
#
# @var string
#
COMPANY='Company'
##
# File as mapping for "last name, first name"
#
# @var
#
COMPANY_LAST_COMMA_FIRST='CompanyLastCommaFirst'
##
# File as mapping for "company last name first name"
#
# @var string
#
COMPANY_LAST_FIRST='CompanyLastFirst'
##
# File as mapping for "company last name first name"
#
# @var string
#
COMPANY_LAST_SPACE_FIRST='CompanyLastSpaceFirst'
##
# File as mapping for "first name last name"
#
# @var string
#
FIRST_SPACE_LAST='FirstSpaceLast'
##
# File as mapping for "last name first name"
#
# @var string
#
LAST_FIRST='LastFirst'
##
# File as mapping for "last name first name company"
#
# @var string
#
LAST_FIRST_COMPANY='LastFirstCompany'
##
# File as mapping for "last name first name suffix"
#
# @var string
#
LAST_FIRST_SUFFIX='LastFirstSuffix'
##
# File as mapping for "last name, first name"
#
# @var string
#
LAST_COMMA_FIRST='LastCommaFirst'
##
# File as mapping for "last name, first name company"
#
# @var string
#
LAST_COMMA_FIRST_COMPANY='LastCommaFirstCompany'
##
# File as mapping for "last name first name"
#
# @var string
#
LAST_SPACE_FIRST='LastSpaceFirst'
##
# File as mapping for "lasy name first name company"
#
# @var string
#
LAST_SPACE_FIRST_COMPANY='LastSpaceFirstCompany'
##
# File as mapping to use when no mapping is desired.
#
# @var string
#
NONE='None'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_FileAsMappingType
class EWSType_EmailAddressKeyType:
##
# Key for a contacts first email address
#
# @var string
#
EMAIL_ADDRESS_1='EmailAddress1'
##
# Key for a contacts second email address
#
# @var string
#
EMAIL_ADDRESS_2='EmailAddress2'
##
# Key for a contacts third email address
#
# @var string
#
EMAIL_ADDRESS_3='EmailAddress3'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_EmailAddressKeyType
class EWSType_PhysicalAddressKeyType:
##
# Business physical address type
#
# @var string
#
BUSINESS='Business'
##
# Home physical address type
#
# @var string
#
HOME='Home'
##
# Other physical address type
#
# @var string
#
OTHER='Other'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_PhysicalAddressKeyType
class EWSType_PhoneNumberKeyType:
##
# Phone number key for assistant phone number
#
# @var string
#
ASSISTANT_PHONE='AssistantPhone'
##
# Phone number key for business fax number
#
# @var string
#
BUSINESS_FAX='BusinessFax'
##
# Phone number key for business phone number
#
# @var string
#
BUSINESS_PHONE='BusinessPhone'
##
# Phone number key for second business phone number
#
# @var string
#
BUSINESS_PHONE_2='BusinessPhone2'
##
# Phone number key for callback
#
# @var string
#
CALLBACK='Callback'
##
# Phone number key for car phone
#
# @var string
#
CAR_PHONE='CarPhone'
##
# Phone number key for company main phone
#
# @var string
#
COMPANY_MAIN_PHONE='CompanyMainPhone'
##
# Phone number key for home fax number
#
# @var string
#
HOME_FAX='HomeFax'
##
# Phone number key for home phone number
#
# @var string
#
HOME_PHONE='HomePhone'
##
# Phone number key for second home phone number
#
# @var string
#
HOME_PHONE_2='HomePhone2'
##
# Phone number key for ISDN line
#
# @var string
#
ISDN='Isdn'
##
# Phone number key for mobile phone number
#
# @var string
#
MOBILE_PHONE='MobilePhone'
##
# Phone number key for other fax number
#
# @var string
#
OTHER_FAX='OtherFax'
##
# Phone number key for other phone number
#
# @var string
#
OTHER_PHONE='OtherTelephone'
##
# Phone number key for pager
#
# @var string
#
PAGER='Pager'
##
# Phone number key for primary phone number
#
# @var string
#
PRIMARY_PHONE='PrimaryPhone'
##
# Phone number key for radio phone number
#
# @var string
#
RADIO_PHONE='RadioPhone'
##
# Phone number key for telex
#
# @var string
#
TELEX='Telex'
##
# Phone number key for TTY TTD phone number
#
# @var string
#
TTY_TTD_PHONE='TtyTtdPhone'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_PhoneNumberKeyType
class EWSType_ImportanceChoicesType:
##
# Specifies low priority
#
# @var string
#
LOW='Low'
##
# Specifies normal priority
#
# @var string
#
NORMAL='Normal'
##
# Specifies high priority
#
# @var string
#
HIGH='High'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_ImportanceChoicesType
class EWSType_TaskStatusType:
##
# Specifies that the task is completed.
#
# @var string
#
COMPLETED='Completed'
##
# Specifies that the task is deferred.
#
# @var string
#
DEFERRED='Deferred'
##
# Specifies that the task is in progress.
#
# @var string
#
INPROGRESS='InProgress'
##
# Specifies that the task is in progress.
#
# @var string
#
NOTSTARTED='NotStarted'
##
# Specifies that the task is in progress.
#
# @var string
#
WAITINGONOTHERS='WaitingOnOthers'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_TaskStatusType
class EWSType_SortDirectionType:
##
# Items are sorted in ascending order
#
# @var string
#
ASCENDING='Ascending'
##
# Items are sorted in descending order
#
# @var string
#
DESCENDING='Descending'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_SortDirectionType
class EWSType_SensitivityChoicesType:
##
# Specifies normal confidentiality.
#
# @var string
#
NORMAL='Normal'
##
# Specifies personal confidentiality.
#
# @var string
#
PERSONAL='Personal'
##
# Specifies confidentiality.=''
#
# @var string
#
PRIVATESENSITIVITY='Private'
##
# Specifies confidential confidentiality.
#
# @var string
#
CONFIDENTIAL='Confidential'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_SensitivityChoicesType
class EWSType_MessageDispositionType:
##
# When used in the CreateItemType, the e-mail message item is saved in the folder that is specified by the SavedItemFolderId property, or in the Sent Items folder if SavedItemFolderId is not specified.
#
# @var string
#
SAVEONLY='SaveOnly'
##
# When used in the CreateItemType, the e-mail message item is sent and a copy is saved in the folder that is specified by the SavedItemFolderId property, or in the Sent Items folder if SavedItemFolderId is not specified.
#
# @var string
#
SENDANDSAVECOPY='SendAndSaveCopy'
##
#When used in the CreateItemType, the e-mail message item is sent but no copy is saved.
#
# @var string
#
SENDONLY='SendOnly'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_MessageDispositionType
class EWSType_ConflictResolutionType:
##
# If there is a conflict, the UpdateItem operation will overwrite information.
#
# @var string
#
ALWAYSOVERWRITE='AlwaysOverwrite'
##
# The UpdateItem operation automatically resolves any conflict. The AutoResolve option will in most cases overwrite the existing value for a property. In some cases, the new value is ignored and the original value is retained. For example, user A changes the Sensitivity property from Normal to Confidential. Then user B sets the value to Public. In this example, the Confidential setting is retained and user B's update is ignored.
#
# @var string
#
AUTORESOLVE='AutoResolve'
##
# If conflict exists, the UpdateItem operation fails and an error is returned.
# @var string
#
NEVEROVERWRITE='NeverOverwrite'
##
# Constructor
#
def __init__() :
pass
# end class EWSType_MessageDispositionType
##
# Definition of the CalendarItemType type
class EWSType_CalendarItemType:
def __init__(self, subject, start, end, body=None, location=None):
##
# UID property
#
# @var string
#
self.UID=''
##
# RecurrenceId property
#
# @var EWSType_dateTime
#
self.RecurrenceId=''
##
# DateTimeStamp property
#
# @var EWSType_dateTime
#
self.DateTimeStamp=''
##
# Start property
#
# @var EWSType_dateTime
#
self.Start=''
##
# End property
#
# @var EWSType_dateTime
#
self.End=''
##
# OriginalStart property
#
# @var EWSType_dateTime
#
self.OriginalStart=''
##
# IsAllDayEvent property
#
# @var EWSType_boolean
#
self.IsAllDayEvent=''
##
# LegacyFreeBusyStatus property
#
# @var EWSType_LegacyFreeBusyType
#
self.LegacyFreeBusyStatus=''
##
# Location property
#
# @var string
#
self.Location=''
##
# When property
#
# @var string
#
self.When=''
##
# IsMeeting property
#
# @var EWSType_boolean
#
self.IsMeeting=''
##
# IsCancelled property
#
# @var EWSType_boolean
#
self.IsCancelled=''
##
# IsRecurring property
#
# @var EWSType_boolean
#
self.IsRecurring=''
##
# MeetingRequestWasSent property
#
# @var EWSType_boolean
#
self.MeetingRequestWasSent=''
##
# IsResponseRequested property
#
# @var EWSType_boolean
#
self.IsResponseRequested=''
##
# CalendarItemType property
#
# @var EWSType_CalendarItemTypeType
#
self.CalendarItemType=''
##
# MyResponseType property
#
# @var EWSType_ResponseTypeType
#
self.MyResponseType=''
##
# Organizer property
#
# @var EWSType_SingleRecipientType
#
self.Organizer=''
##
# RequiredAttendees property
#
# @var EWSType_NonEmptyArrayOfAttendeesType
#
self.RequiredAttendees=''
##
# OptionalAttendees property
#
# @var EWSType_NonEmptyArrayOfAttendeesType
#
self.OptionalAttendees=''
##
# Resources property
#
# @var EWSType_NonEmptyArrayOfAttendeesType
#
self.Resources=''
##
# ConflictingMeetingCount property
#
# @var EWSType_int
#
self.ConflictingMeetingCount=''
##
# AdjacentMeetingCount property
#
# @var EWSType_int
#
self.AdjacentMeetingCount=''
##
# ConflictingMeetings property
#
# @var EWSType_NonEmptyArrayOfAllItemsType
#
self.ConflictingMeetings=''
##
# AdjacentMeetings property
#
# @var EWSType_NonEmptyArrayOfAllItemsType
#
self.AdjacentMeetings=''
##
# Duration property
#
# @var string
#
self.Duration=''
##
# TimeZone property
#
# @var string
#
self.TimeZone=''
##
# AppointmentReplyTime property
#
# @var EWSType_dateTime
#
self.AppointmentReplyTime=''
##
# AppointmentSequenceNumber property
#
# @var EWSType_int
#
self.AppointmentSequenceNumber=''
##
# AppointmentState property
#
# @var EWSType_int
#
self.AppointmentState=''
##
# Recurrence property
#
# @var EWSType_RecurrenceType
#
self.Recurrence=''
##
# FirstOccurrence property
#