File: extended_properties.html

package info (click to toggle)
python-exchangelib 5.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,364 kB
  • sloc: python: 25,367; sh: 6; makefile: 5
file content (932 lines) | stat: -rw-r--r-- 56,216 bytes parent folder | download
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<meta name="generator" content="pdoc3 0.11.6">
<title>exchangelib.extended_properties API documentation</title>
<meta name="description" content="">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source > summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible;min-width:max-content}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin:1em 0}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
<script>window.addEventListener('DOMContentLoaded', () => {
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
hljs.highlightAll();
/* Collapse source docstrings */
setTimeout(() => {
[...document.querySelectorAll('.hljs.language-python > .hljs-string')]
.filter(el => el.innerHTML.length > 200 && ['"""', "'''"].includes(el.innerHTML.substring(0, 3)))
.forEach(el => {
let d = document.createElement('details');
d.classList.add('hljs-string');
d.innerHTML = '<summary>"""</summary>' + el.innerHTML.substring(3);
el.replaceWith(d);
});
}, 100);
})</script>
</head>
<body>
<main>
<article id="content">
<header>
<h1 class="title">Module <code>exchangelib.extended_properties</code></h1>
</header>
<section id="section-intro">
</section>
<section>
</section>
<section>
</section>
<section>
</section>
<section>
<h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="exchangelib.extended_properties.ExtendedProperty"><code class="flex name class">
<span>class <span class="ident">ExtendedProperty</span></span>
<span>(</span><span>*args, **kwargs)</span>
</code></dt>
<dd>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class ExtendedProperty(EWSElement):
    &#34;&#34;&#34;MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/extendedproperty&#34;&#34;&#34;

    ELEMENT_NAME = &#34;ExtendedProperty&#34;

    # Enum values: https://docs.microsoft.com/en-us/dotnet/api/exchangewebservices.distinguishedpropertysettype
    DISTINGUISHED_SETS = {
        &#34;Address&#34;,
        &#34;Appointment&#34;,
        &#34;CalendarAssistant&#34;,
        &#34;Common&#34;,
        &#34;InternetHeaders&#34;,
        &#34;Meeting&#34;,
        &#34;PublicStrings&#34;,
        &#34;Sharing&#34;,
        &#34;Task&#34;,
        &#34;UnifiedMessaging&#34;,
    }
    # Enum values: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/extendedfielduri
    # The following types cannot be used for setting or getting (see docs) and are thus not very useful here:
    # &#39;Error&#39;
    # &#39;Null&#39;
    # &#39;Object&#39;
    # &#39;ObjectArray&#39;
    PROPERTY_TYPES = {
        &#34;ApplicationTime&#34;,
        &#34;Binary&#34;,
        &#34;BinaryArray&#34;,
        &#34;Boolean&#34;,
        &#34;CLSID&#34;,
        &#34;CLSIDArray&#34;,
        &#34;Currency&#34;,
        &#34;CurrencyArray&#34;,
        &#34;Double&#34;,
        &#34;DoubleArray&#34;,
        &#34;Float&#34;,
        &#34;FloatArray&#34;,
        &#34;Integer&#34;,
        &#34;IntegerArray&#34;,
        &#34;Long&#34;,
        &#34;LongArray&#34;,
        &#34;Short&#34;,
        &#34;ShortArray&#34;,
        &#34;SystemTime&#34;,
        &#34;SystemTimeArray&#34;,
        &#34;String&#34;,
        &#34;StringArray&#34;,
    }

    # Translation table between common distinguished_property_set_id and property_set_id values. See
    # https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/commonly-used-property-sets
    # ID values must be lowercase.
    DISTINGUISHED_SET_NAME_TO_ID_MAP = {
        &#34;Address&#34;: &#34;00062004-0000-0000-c000-000000000046&#34;,
        &#34;AirSync&#34;: &#34;71035549-0739-4dcb-9163-00f0580dbbdf&#34;,
        &#34;Appointment&#34;: &#34;00062002-0000-0000-c000-000000000046&#34;,
        &#34;Common&#34;: &#34;00062008-0000-0000-c000-000000000046&#34;,
        &#34;InternetHeaders&#34;: &#34;00020386-0000-0000-c000-000000000046&#34;,
        &#34;Log&#34;: &#34;0006200a-0000-0000-c000-000000000046&#34;,
        &#34;Mapi&#34;: &#34;00020328-0000-0000-c000-000000000046&#34;,
        &#34;Meeting&#34;: &#34;6ed8da90-450b-101b-98da-00aa003f1305&#34;,
        &#34;Messaging&#34;: &#34;41f28f13-83f4-4114-a584-eedb5a6b0bff&#34;,
        &#34;Note&#34;: &#34;0006200e-0000-0000-c000-000000000046&#34;,
        &#34;PostRss&#34;: &#34;00062041-0000-0000-c000-000000000046&#34;,
        &#34;PublicStrings&#34;: &#34;00020329-0000-0000-c000-000000000046&#34;,
        &#34;Remote&#34;: &#34;00062014-0000-0000-c000-000000000046&#34;,
        &#34;Report&#34;: &#34;00062013-0000-0000-c000-000000000046&#34;,
        &#34;Sharing&#34;: &#34;00062040-0000-0000-c000-000000000046&#34;,
        &#34;Task&#34;: &#34;00062003-0000-0000-c000-000000000046&#34;,
        &#34;UnifiedMessaging&#34;: &#34;4442858e-a9e3-4e80-b900-317a210cc15b&#34;,
    }
    DISTINGUISHED_SET_ID_TO_NAME_MAP = {v: k for k, v in DISTINGUISHED_SET_NAME_TO_ID_MAP.items()}

    distinguished_property_set_id = None
    property_set_id = None
    property_tag = None  # hex integer (e.g. 0x8000) or string (&#39;0x8000&#39;)
    property_name = None
    property_id = None  # integer as hex-formatted int (e.g. 0x8000) or normal int (32768)
    property_type = &#34;&#34;

    __slots__ = (&#34;value&#34;,)

    def __init__(self, *args, **kwargs):
        if not kwargs:
            # Allow to set attributes without keyword
            kwargs = dict(zip(self._slots_keys, args))
        self.value = kwargs.pop(&#34;value&#34;)
        super().__init__(**kwargs)

    @classmethod
    def validate_cls(cls):
        # Validate values of class attributes and their interdependencies
        cls._validate_distinguished_property_set_id()
        cls._validate_property_set_id()
        cls._validate_property_tag()
        cls._validate_property_name()
        cls._validate_property_id()
        cls._validate_property_type()

    @classmethod
    def _validate_distinguished_property_set_id(cls):
        if cls.distinguished_property_set_id:
            if any([cls.property_set_id, cls.property_tag]):
                raise ValueError(
                    &#34;When &#39;distinguished_property_set_id&#39; is set, &#39;property_set_id&#39; and &#39;property_tag&#39; must be None&#34;
                )
            if not any([cls.property_id, cls.property_name]):
                raise ValueError(
                    &#34;When &#39;distinguished_property_set_id&#39; is set, &#39;property_id&#39; or &#39;property_name&#39; must also be set&#34;
                )
            if cls.distinguished_property_set_id not in cls.DISTINGUISHED_SETS:
                raise InvalidEnumValue(
                    &#34;distinguished_property_set_id&#34;, cls.distinguished_property_set_id, cls.DISTINGUISHED_SETS
                )

    @classmethod
    def _validate_property_set_id(cls):
        if cls.property_set_id:
            if any([cls.distinguished_property_set_id, cls.property_tag]):
                raise ValueError(
                    &#34;When &#39;property_set_id&#39; is set, &#39;distinguished_property_set_id&#39; and &#39;property_tag&#39; must be None&#34;
                )
            if not any([cls.property_id, cls.property_name]):
                raise ValueError(&#34;When &#39;property_set_id&#39; is set, &#39;property_id&#39; or &#39;property_name&#39; must also be set&#34;)

    @classmethod
    def _validate_property_tag(cls):
        if cls.property_tag:
            if any([cls.distinguished_property_set_id, cls.property_set_id, cls.property_name, cls.property_id]):
                raise ValueError(&#34;When &#39;property_tag&#39; is set, only &#39;property_type&#39; must be set&#34;)
            if 0x8000 &lt;= cls.property_tag_as_int() &lt;= 0xFFFE:
                raise ValueError(
                    f&#34;&#39;property_tag&#39; value {cls.property_tag_as_hex()!r} is reserved for custom properties&#34;
                )

    @classmethod
    def _validate_property_name(cls):
        if cls.property_name:
            if any([cls.property_id, cls.property_tag]):
                raise ValueError(&#34;When &#39;property_name&#39; is set, &#39;property_id&#39; and &#39;property_tag&#39; must be None&#34;)
            if not any([cls.distinguished_property_set_id, cls.property_set_id]):
                raise ValueError(
                    &#34;When &#39;property_name&#39; is set, &#39;distinguished_property_set_id&#39; or &#39;property_set_id&#39; must also be set&#34;
                )

    @classmethod
    def _validate_property_id(cls):
        if cls.property_id:
            if any([cls.property_name, cls.property_tag]):
                raise ValueError(&#34;When &#39;property_id&#39; is set, &#39;property_name&#39; and &#39;property_tag&#39; must be None&#34;)
            if not any([cls.distinguished_property_set_id, cls.property_set_id]):
                raise ValueError(
                    &#34;When &#39;property_id&#39; is set, &#39;distinguished_property_set_id&#39; or &#39;property_set_id&#39; must also be set&#34;
                )

    @classmethod
    def _validate_property_type(cls):
        if cls.property_type not in cls.PROPERTY_TYPES:
            raise InvalidEnumValue(&#34;property_type&#34;, cls.property_type, cls.PROPERTY_TYPES)

    def clean(self, version=None):
        self.validate_cls()
        python_type = self.python_type()
        if self.is_array_type():
            if not is_iterable(self.value):
                raise TypeError(f&#34;Field {self.__class__.__name__!r} value {self.value!r} must be of type {list}&#34;)
            for v in self.value:
                if not isinstance(v, python_type):
                    raise TypeError(f&#34;Field {self.__class__.__name__!r} list value {v!r} must be of type {python_type}&#34;)
        else:
            if not isinstance(self.value, python_type):
                raise TypeError(f&#34;Field {self.__class__.__name__!r} value {self.value!r} must be of type {python_type}&#34;)

    @classmethod
    def _normalize_obj(cls, obj):
        # Sometimes, EWS will helpfully translate a &#39;distinguished_property_set_id&#39; value to a &#39;property_set_id&#39; value
        # and vice versa. Align these values on an ExtendedFieldURI instance.
        try:
            obj.property_set_id = cls.DISTINGUISHED_SET_NAME_TO_ID_MAP[obj.distinguished_property_set_id]
        except KeyError:
            with suppress(KeyError):
                obj.distinguished_property_set_id = cls.DISTINGUISHED_SET_ID_TO_NAME_MAP[obj.property_set_id]
        return obj

    @classmethod
    def is_property_instance(cls, elem):
        &#34;&#34;&#34;Return whether an &#39;ExtendedProperty&#39; element matches the definition for this class. Extended property fields
        do not have a name, so we must match on the cls.property_* attributes to match a field in the request with a
        field in the response.
        &#34;&#34;&#34;
        # We can&#39;t use ExtendedFieldURI.from_xml(). It clears the XML element, but we may not want to consume it here.
        kwargs = {
            f.name: f.from_xml(elem=elem.find(ExtendedFieldURI.response_tag()), account=None)
            for f in ExtendedFieldURI.FIELDS
        }
        xml_obj = ExtendedFieldURI(**kwargs)
        cls_obj = cls.as_object()
        return cls._normalize_obj(cls_obj) == cls._normalize_obj(xml_obj)

    @classmethod
    def from_xml(cls, elem, account):
        # Gets value of this specific ExtendedProperty from a list of &#39;ExtendedProperty&#39; XML elements
        python_type = cls.python_type()
        if cls.is_array_type():
            values = elem.find(f&#34;{{{TNS}}}Values&#34;)
            return [
                xml_text_to_value(value=val, value_type=python_type) for val in get_xml_attrs(values, f&#34;{{{TNS}}}Value&#34;)
            ]
        extended_field_value = xml_text_to_value(value=get_xml_attr(elem, f&#34;{{{TNS}}}Value&#34;), value_type=python_type)
        if python_type == str and not extended_field_value:
            # For string types, we want to return the empty string instead of None if the element was
            # actually found, but there was no XML value. For other types, it would be more problematic
            # to make that distinction, e.g. return False for bool, 0 for int, etc.
            return &#34;&#34;
        return extended_field_value

    def to_xml(self, version):
        if self.is_array_type():
            values = create_element(&#34;t:Values&#34;)
            for v in self.value:
                add_xml_child(values, &#34;t:Value&#34;, v)
            return values
        return set_xml_value(create_element(&#34;t:Value&#34;), self.value, version=version)

    @classmethod
    def is_array_type(cls):
        return cls.property_type.endswith(&#34;Array&#34;)

    @classmethod
    def property_tag_as_int(cls):
        if isinstance(cls.property_tag, str):
            return int(cls.property_tag, base=16)
        return cls.property_tag

    @classmethod
    def property_tag_as_hex(cls):
        return hex(cls.property_tag) if isinstance(cls.property_tag, int) else cls.property_tag

    @classmethod
    def python_type(cls):
        # Return the best equivalent for a Python type for the property type of this class
        base_type = cls.property_type[:-5] if cls.is_array_type() else cls.property_type
        return {
            &#34;ApplicationTime&#34;: Decimal,
            &#34;Binary&#34;: bytes,
            &#34;Boolean&#34;: bool,
            &#34;CLSID&#34;: str,
            &#34;Currency&#34;: int,
            &#34;Double&#34;: Decimal,
            &#34;Float&#34;: Decimal,
            &#34;Integer&#34;: int,
            &#34;Long&#34;: int,
            &#34;Short&#34;: int,
            &#34;SystemTime&#34;: EWSDateTime,
            &#34;String&#34;: str,
        }[base_type]

    @classmethod
    def as_object(cls):
        # Return an object we can use to match with the incoming object from XML
        return ExtendedFieldURI(
            distinguished_property_set_id=cls.distinguished_property_set_id,
            property_set_id=cls.property_set_id.lower() if cls.property_set_id else None,
            property_tag=cls.property_tag_as_hex(),
            property_name=cls.property_name,
            property_id=value_to_xml_text(cls.property_id) if cls.property_id else None,
            property_type=cls.property_type,
        )</code></pre>
</details>
<div class="desc"><p>MSDN: <a href="https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/extendedproperty">https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/extendedproperty</a></p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="exchangelib.properties.EWSElement" href="properties.html#exchangelib.properties.EWSElement">EWSElement</a></li>
</ul>
<h3>Subclasses</h3>
<ul class="hlist">
<li><a title="exchangelib.extended_properties.ExternId" href="#exchangelib.extended_properties.ExternId">ExternId</a></li>
<li><a title="exchangelib.extended_properties.Flag" href="#exchangelib.extended_properties.Flag">Flag</a></li>
</ul>
<h3>Class variables</h3>
<dl>
<dt id="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SETS"><code class="name">var <span class="ident">DISTINGUISHED_SETS</span></code></dt>
<dd>
<div class="desc"><p>The type of the None singleton.</p></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_ID_TO_NAME_MAP"><code class="name">var <span class="ident">DISTINGUISHED_SET_ID_TO_NAME_MAP</span></code></dt>
<dd>
<div class="desc"><p>The type of the None singleton.</p></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_NAME_TO_ID_MAP"><code class="name">var <span class="ident">DISTINGUISHED_SET_NAME_TO_ID_MAP</span></code></dt>
<dd>
<div class="desc"><p>The type of the None singleton.</p></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.PROPERTY_TYPES"><code class="name">var <span class="ident">PROPERTY_TYPES</span></code></dt>
<dd>
<div class="desc"><p>The type of the None singleton.</p></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.distinguished_property_set_id"><code class="name">var <span class="ident">distinguished_property_set_id</span></code></dt>
<dd>
<div class="desc"><p>The type of the None singleton.</p></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.property_id"><code class="name">var <span class="ident">property_id</span></code></dt>
<dd>
<div class="desc"><p>The type of the None singleton.</p></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.property_name"><code class="name">var <span class="ident">property_name</span></code></dt>
<dd>
<div class="desc"><p>The type of the None singleton.</p></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.property_set_id"><code class="name">var <span class="ident">property_set_id</span></code></dt>
<dd>
<div class="desc"><p>The type of the None singleton.</p></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.property_tag"><code class="name">var <span class="ident">property_tag</span></code></dt>
<dd>
<div class="desc"><p>The type of the None singleton.</p></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.property_type"><code class="name">var <span class="ident">property_type</span></code></dt>
<dd>
<div class="desc"><p>The type of the None singleton.</p></div>
</dd>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="exchangelib.extended_properties.ExtendedProperty.as_object"><code class="name flex">
<span>def <span class="ident">as_object</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.from_xml"><code class="name flex">
<span>def <span class="ident">from_xml</span></span>(<span>elem, account)</span>
</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.is_array_type"><code class="name flex">
<span>def <span class="ident">is_array_type</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.is_property_instance"><code class="name flex">
<span>def <span class="ident">is_property_instance</span></span>(<span>elem)</span>
</code></dt>
<dd>
<div class="desc"><p>Return whether an 'ExtendedProperty' element matches the definition for this class. Extended property fields
do not have a name, so we must match on the cls.property_* attributes to match a field in the request with a
field in the response.</p></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.property_tag_as_hex"><code class="name flex">
<span>def <span class="ident">property_tag_as_hex</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.property_tag_as_int"><code class="name flex">
<span>def <span class="ident">property_tag_as_int</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.python_type"><code class="name flex">
<span>def <span class="ident">python_type</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.validate_cls"><code class="name flex">
<span>def <span class="ident">validate_cls</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Instance variables</h3>
<dl>
<dt id="exchangelib.extended_properties.ExtendedProperty.value"><code class="name">var <span class="ident">value</span></code></dt>
<dd>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class ExtendedProperty(EWSElement):
    &#34;&#34;&#34;MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/extendedproperty&#34;&#34;&#34;

    ELEMENT_NAME = &#34;ExtendedProperty&#34;

    # Enum values: https://docs.microsoft.com/en-us/dotnet/api/exchangewebservices.distinguishedpropertysettype
    DISTINGUISHED_SETS = {
        &#34;Address&#34;,
        &#34;Appointment&#34;,
        &#34;CalendarAssistant&#34;,
        &#34;Common&#34;,
        &#34;InternetHeaders&#34;,
        &#34;Meeting&#34;,
        &#34;PublicStrings&#34;,
        &#34;Sharing&#34;,
        &#34;Task&#34;,
        &#34;UnifiedMessaging&#34;,
    }
    # Enum values: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/extendedfielduri
    # The following types cannot be used for setting or getting (see docs) and are thus not very useful here:
    # &#39;Error&#39;
    # &#39;Null&#39;
    # &#39;Object&#39;
    # &#39;ObjectArray&#39;
    PROPERTY_TYPES = {
        &#34;ApplicationTime&#34;,
        &#34;Binary&#34;,
        &#34;BinaryArray&#34;,
        &#34;Boolean&#34;,
        &#34;CLSID&#34;,
        &#34;CLSIDArray&#34;,
        &#34;Currency&#34;,
        &#34;CurrencyArray&#34;,
        &#34;Double&#34;,
        &#34;DoubleArray&#34;,
        &#34;Float&#34;,
        &#34;FloatArray&#34;,
        &#34;Integer&#34;,
        &#34;IntegerArray&#34;,
        &#34;Long&#34;,
        &#34;LongArray&#34;,
        &#34;Short&#34;,
        &#34;ShortArray&#34;,
        &#34;SystemTime&#34;,
        &#34;SystemTimeArray&#34;,
        &#34;String&#34;,
        &#34;StringArray&#34;,
    }

    # Translation table between common distinguished_property_set_id and property_set_id values. See
    # https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/commonly-used-property-sets
    # ID values must be lowercase.
    DISTINGUISHED_SET_NAME_TO_ID_MAP = {
        &#34;Address&#34;: &#34;00062004-0000-0000-c000-000000000046&#34;,
        &#34;AirSync&#34;: &#34;71035549-0739-4dcb-9163-00f0580dbbdf&#34;,
        &#34;Appointment&#34;: &#34;00062002-0000-0000-c000-000000000046&#34;,
        &#34;Common&#34;: &#34;00062008-0000-0000-c000-000000000046&#34;,
        &#34;InternetHeaders&#34;: &#34;00020386-0000-0000-c000-000000000046&#34;,
        &#34;Log&#34;: &#34;0006200a-0000-0000-c000-000000000046&#34;,
        &#34;Mapi&#34;: &#34;00020328-0000-0000-c000-000000000046&#34;,
        &#34;Meeting&#34;: &#34;6ed8da90-450b-101b-98da-00aa003f1305&#34;,
        &#34;Messaging&#34;: &#34;41f28f13-83f4-4114-a584-eedb5a6b0bff&#34;,
        &#34;Note&#34;: &#34;0006200e-0000-0000-c000-000000000046&#34;,
        &#34;PostRss&#34;: &#34;00062041-0000-0000-c000-000000000046&#34;,
        &#34;PublicStrings&#34;: &#34;00020329-0000-0000-c000-000000000046&#34;,
        &#34;Remote&#34;: &#34;00062014-0000-0000-c000-000000000046&#34;,
        &#34;Report&#34;: &#34;00062013-0000-0000-c000-000000000046&#34;,
        &#34;Sharing&#34;: &#34;00062040-0000-0000-c000-000000000046&#34;,
        &#34;Task&#34;: &#34;00062003-0000-0000-c000-000000000046&#34;,
        &#34;UnifiedMessaging&#34;: &#34;4442858e-a9e3-4e80-b900-317a210cc15b&#34;,
    }
    DISTINGUISHED_SET_ID_TO_NAME_MAP = {v: k for k, v in DISTINGUISHED_SET_NAME_TO_ID_MAP.items()}

    distinguished_property_set_id = None
    property_set_id = None
    property_tag = None  # hex integer (e.g. 0x8000) or string (&#39;0x8000&#39;)
    property_name = None
    property_id = None  # integer as hex-formatted int (e.g. 0x8000) or normal int (32768)
    property_type = &#34;&#34;

    __slots__ = (&#34;value&#34;,)

    def __init__(self, *args, **kwargs):
        if not kwargs:
            # Allow to set attributes without keyword
            kwargs = dict(zip(self._slots_keys, args))
        self.value = kwargs.pop(&#34;value&#34;)
        super().__init__(**kwargs)

    @classmethod
    def validate_cls(cls):
        # Validate values of class attributes and their interdependencies
        cls._validate_distinguished_property_set_id()
        cls._validate_property_set_id()
        cls._validate_property_tag()
        cls._validate_property_name()
        cls._validate_property_id()
        cls._validate_property_type()

    @classmethod
    def _validate_distinguished_property_set_id(cls):
        if cls.distinguished_property_set_id:
            if any([cls.property_set_id, cls.property_tag]):
                raise ValueError(
                    &#34;When &#39;distinguished_property_set_id&#39; is set, &#39;property_set_id&#39; and &#39;property_tag&#39; must be None&#34;
                )
            if not any([cls.property_id, cls.property_name]):
                raise ValueError(
                    &#34;When &#39;distinguished_property_set_id&#39; is set, &#39;property_id&#39; or &#39;property_name&#39; must also be set&#34;
                )
            if cls.distinguished_property_set_id not in cls.DISTINGUISHED_SETS:
                raise InvalidEnumValue(
                    &#34;distinguished_property_set_id&#34;, cls.distinguished_property_set_id, cls.DISTINGUISHED_SETS
                )

    @classmethod
    def _validate_property_set_id(cls):
        if cls.property_set_id:
            if any([cls.distinguished_property_set_id, cls.property_tag]):
                raise ValueError(
                    &#34;When &#39;property_set_id&#39; is set, &#39;distinguished_property_set_id&#39; and &#39;property_tag&#39; must be None&#34;
                )
            if not any([cls.property_id, cls.property_name]):
                raise ValueError(&#34;When &#39;property_set_id&#39; is set, &#39;property_id&#39; or &#39;property_name&#39; must also be set&#34;)

    @classmethod
    def _validate_property_tag(cls):
        if cls.property_tag:
            if any([cls.distinguished_property_set_id, cls.property_set_id, cls.property_name, cls.property_id]):
                raise ValueError(&#34;When &#39;property_tag&#39; is set, only &#39;property_type&#39; must be set&#34;)
            if 0x8000 &lt;= cls.property_tag_as_int() &lt;= 0xFFFE:
                raise ValueError(
                    f&#34;&#39;property_tag&#39; value {cls.property_tag_as_hex()!r} is reserved for custom properties&#34;
                )

    @classmethod
    def _validate_property_name(cls):
        if cls.property_name:
            if any([cls.property_id, cls.property_tag]):
                raise ValueError(&#34;When &#39;property_name&#39; is set, &#39;property_id&#39; and &#39;property_tag&#39; must be None&#34;)
            if not any([cls.distinguished_property_set_id, cls.property_set_id]):
                raise ValueError(
                    &#34;When &#39;property_name&#39; is set, &#39;distinguished_property_set_id&#39; or &#39;property_set_id&#39; must also be set&#34;
                )

    @classmethod
    def _validate_property_id(cls):
        if cls.property_id:
            if any([cls.property_name, cls.property_tag]):
                raise ValueError(&#34;When &#39;property_id&#39; is set, &#39;property_name&#39; and &#39;property_tag&#39; must be None&#34;)
            if not any([cls.distinguished_property_set_id, cls.property_set_id]):
                raise ValueError(
                    &#34;When &#39;property_id&#39; is set, &#39;distinguished_property_set_id&#39; or &#39;property_set_id&#39; must also be set&#34;
                )

    @classmethod
    def _validate_property_type(cls):
        if cls.property_type not in cls.PROPERTY_TYPES:
            raise InvalidEnumValue(&#34;property_type&#34;, cls.property_type, cls.PROPERTY_TYPES)

    def clean(self, version=None):
        self.validate_cls()
        python_type = self.python_type()
        if self.is_array_type():
            if not is_iterable(self.value):
                raise TypeError(f&#34;Field {self.__class__.__name__!r} value {self.value!r} must be of type {list}&#34;)
            for v in self.value:
                if not isinstance(v, python_type):
                    raise TypeError(f&#34;Field {self.__class__.__name__!r} list value {v!r} must be of type {python_type}&#34;)
        else:
            if not isinstance(self.value, python_type):
                raise TypeError(f&#34;Field {self.__class__.__name__!r} value {self.value!r} must be of type {python_type}&#34;)

    @classmethod
    def _normalize_obj(cls, obj):
        # Sometimes, EWS will helpfully translate a &#39;distinguished_property_set_id&#39; value to a &#39;property_set_id&#39; value
        # and vice versa. Align these values on an ExtendedFieldURI instance.
        try:
            obj.property_set_id = cls.DISTINGUISHED_SET_NAME_TO_ID_MAP[obj.distinguished_property_set_id]
        except KeyError:
            with suppress(KeyError):
                obj.distinguished_property_set_id = cls.DISTINGUISHED_SET_ID_TO_NAME_MAP[obj.property_set_id]
        return obj

    @classmethod
    def is_property_instance(cls, elem):
        &#34;&#34;&#34;Return whether an &#39;ExtendedProperty&#39; element matches the definition for this class. Extended property fields
        do not have a name, so we must match on the cls.property_* attributes to match a field in the request with a
        field in the response.
        &#34;&#34;&#34;
        # We can&#39;t use ExtendedFieldURI.from_xml(). It clears the XML element, but we may not want to consume it here.
        kwargs = {
            f.name: f.from_xml(elem=elem.find(ExtendedFieldURI.response_tag()), account=None)
            for f in ExtendedFieldURI.FIELDS
        }
        xml_obj = ExtendedFieldURI(**kwargs)
        cls_obj = cls.as_object()
        return cls._normalize_obj(cls_obj) == cls._normalize_obj(xml_obj)

    @classmethod
    def from_xml(cls, elem, account):
        # Gets value of this specific ExtendedProperty from a list of &#39;ExtendedProperty&#39; XML elements
        python_type = cls.python_type()
        if cls.is_array_type():
            values = elem.find(f&#34;{{{TNS}}}Values&#34;)
            return [
                xml_text_to_value(value=val, value_type=python_type) for val in get_xml_attrs(values, f&#34;{{{TNS}}}Value&#34;)
            ]
        extended_field_value = xml_text_to_value(value=get_xml_attr(elem, f&#34;{{{TNS}}}Value&#34;), value_type=python_type)
        if python_type == str and not extended_field_value:
            # For string types, we want to return the empty string instead of None if the element was
            # actually found, but there was no XML value. For other types, it would be more problematic
            # to make that distinction, e.g. return False for bool, 0 for int, etc.
            return &#34;&#34;
        return extended_field_value

    def to_xml(self, version):
        if self.is_array_type():
            values = create_element(&#34;t:Values&#34;)
            for v in self.value:
                add_xml_child(values, &#34;t:Value&#34;, v)
            return values
        return set_xml_value(create_element(&#34;t:Value&#34;), self.value, version=version)

    @classmethod
    def is_array_type(cls):
        return cls.property_type.endswith(&#34;Array&#34;)

    @classmethod
    def property_tag_as_int(cls):
        if isinstance(cls.property_tag, str):
            return int(cls.property_tag, base=16)
        return cls.property_tag

    @classmethod
    def property_tag_as_hex(cls):
        return hex(cls.property_tag) if isinstance(cls.property_tag, int) else cls.property_tag

    @classmethod
    def python_type(cls):
        # Return the best equivalent for a Python type for the property type of this class
        base_type = cls.property_type[:-5] if cls.is_array_type() else cls.property_type
        return {
            &#34;ApplicationTime&#34;: Decimal,
            &#34;Binary&#34;: bytes,
            &#34;Boolean&#34;: bool,
            &#34;CLSID&#34;: str,
            &#34;Currency&#34;: int,
            &#34;Double&#34;: Decimal,
            &#34;Float&#34;: Decimal,
            &#34;Integer&#34;: int,
            &#34;Long&#34;: int,
            &#34;Short&#34;: int,
            &#34;SystemTime&#34;: EWSDateTime,
            &#34;String&#34;: str,
        }[base_type]

    @classmethod
    def as_object(cls):
        # Return an object we can use to match with the incoming object from XML
        return ExtendedFieldURI(
            distinguished_property_set_id=cls.distinguished_property_set_id,
            property_set_id=cls.property_set_id.lower() if cls.property_set_id else None,
            property_tag=cls.property_tag_as_hex(),
            property_name=cls.property_name,
            property_id=value_to_xml_text(cls.property_id) if cls.property_id else None,
            property_type=cls.property_type,
        )</code></pre>
</details>
<div class="desc"></div>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="exchangelib.extended_properties.ExtendedProperty.clean"><code class="name flex">
<span>def <span class="ident">clean</span></span>(<span>self, version=None)</span>
</code></dt>
<dd>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def clean(self, version=None):
    self.validate_cls()
    python_type = self.python_type()
    if self.is_array_type():
        if not is_iterable(self.value):
            raise TypeError(f&#34;Field {self.__class__.__name__!r} value {self.value!r} must be of type {list}&#34;)
        for v in self.value:
            if not isinstance(v, python_type):
                raise TypeError(f&#34;Field {self.__class__.__name__!r} list value {v!r} must be of type {python_type}&#34;)
    else:
        if not isinstance(self.value, python_type):
            raise TypeError(f&#34;Field {self.__class__.__name__!r} value {self.value!r} must be of type {python_type}&#34;)</code></pre>
</details>
<div class="desc"></div>
</dd>
<dt id="exchangelib.extended_properties.ExtendedProperty.to_xml"><code class="name flex">
<span>def <span class="ident">to_xml</span></span>(<span>self, version)</span>
</code></dt>
<dd>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def to_xml(self, version):
    if self.is_array_type():
        values = create_element(&#34;t:Values&#34;)
        for v in self.value:
            add_xml_child(values, &#34;t:Value&#34;, v)
        return values
    return set_xml_value(create_element(&#34;t:Value&#34;), self.value, version=version)</code></pre>
</details>
<div class="desc"></div>
</dd>
</dl>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="exchangelib.properties.EWSElement" href="properties.html#exchangelib.properties.EWSElement">EWSElement</a></b></code>:
<ul class="hlist">
<li><code><a title="exchangelib.properties.EWSElement.ELEMENT_NAME" href="properties.html#exchangelib.properties.EWSElement.ELEMENT_NAME">ELEMENT_NAME</a></code></li>
<li><code><a title="exchangelib.properties.EWSElement.FIELDS" href="properties.html#exchangelib.properties.EWSElement.FIELDS">FIELDS</a></code></li>
<li><code><a title="exchangelib.properties.EWSElement.NAMESPACE" href="properties.html#exchangelib.properties.EWSElement.NAMESPACE">NAMESPACE</a></code></li>
<li><code><a title="exchangelib.properties.EWSElement.add_field" href="properties.html#exchangelib.properties.EWSElement.add_field">add_field</a></code></li>
<li><code><a title="exchangelib.properties.EWSElement.remove_field" href="properties.html#exchangelib.properties.EWSElement.remove_field">remove_field</a></code></li>
<li><code><a title="exchangelib.properties.EWSElement.supported_fields" href="properties.html#exchangelib.properties.EWSElement.supported_fields">supported_fields</a></code></li>
<li><code><a title="exchangelib.properties.EWSElement.validate_field" href="properties.html#exchangelib.properties.EWSElement.validate_field">validate_field</a></code></li>
</ul>
</li>
</ul>
</dd>
<dt id="exchangelib.extended_properties.ExternId"><code class="flex name class">
<span>class <span class="ident">ExternId</span></span>
<span>(</span><span>*args, **kwargs)</span>
</code></dt>
<dd>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class ExternId(ExtendedProperty):
    &#34;&#34;&#34;This is a custom extended property defined by us. It&#39;s useful for synchronization purposes, to attach a unique ID
    from an external system.
    &#34;&#34;&#34;

    property_set_id = &#34;c11ff724-aa03-4555-9952-8fa248a11c3e&#34;  # This is arbitrary. We just want a unique UUID.
    property_name = &#34;External ID&#34;
    property_type = &#34;String&#34;</code></pre>
</details>
<div class="desc"><p>This is a custom extended property defined by us. It's useful for synchronization purposes, to attach a unique ID
from an external system.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="exchangelib.extended_properties.ExtendedProperty" href="#exchangelib.extended_properties.ExtendedProperty">ExtendedProperty</a></li>
<li><a title="exchangelib.properties.EWSElement" href="properties.html#exchangelib.properties.EWSElement">EWSElement</a></li>
</ul>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="exchangelib.extended_properties.ExtendedProperty" href="#exchangelib.extended_properties.ExtendedProperty">ExtendedProperty</a></b></code>:
<ul class="hlist">
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SETS" href="#exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SETS">DISTINGUISHED_SETS</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_ID_TO_NAME_MAP" href="#exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_ID_TO_NAME_MAP">DISTINGUISHED_SET_ID_TO_NAME_MAP</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_NAME_TO_ID_MAP" href="#exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_NAME_TO_ID_MAP">DISTINGUISHED_SET_NAME_TO_ID_MAP</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.ELEMENT_NAME" href="properties.html#exchangelib.properties.EWSElement.ELEMENT_NAME">ELEMENT_NAME</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.FIELDS" href="properties.html#exchangelib.properties.EWSElement.FIELDS">FIELDS</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.NAMESPACE" href="properties.html#exchangelib.properties.EWSElement.NAMESPACE">NAMESPACE</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.PROPERTY_TYPES" href="#exchangelib.extended_properties.ExtendedProperty.PROPERTY_TYPES">PROPERTY_TYPES</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.add_field" href="properties.html#exchangelib.properties.EWSElement.add_field">add_field</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.distinguished_property_set_id" href="#exchangelib.extended_properties.ExtendedProperty.distinguished_property_set_id">distinguished_property_set_id</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.is_property_instance" href="#exchangelib.extended_properties.ExtendedProperty.is_property_instance">is_property_instance</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_id" href="#exchangelib.extended_properties.ExtendedProperty.property_id">property_id</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_name" href="#exchangelib.extended_properties.ExtendedProperty.property_name">property_name</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_set_id" href="#exchangelib.extended_properties.ExtendedProperty.property_set_id">property_set_id</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_tag" href="#exchangelib.extended_properties.ExtendedProperty.property_tag">property_tag</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_type" href="#exchangelib.extended_properties.ExtendedProperty.property_type">property_type</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.remove_field" href="properties.html#exchangelib.properties.EWSElement.remove_field">remove_field</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.supported_fields" href="properties.html#exchangelib.properties.EWSElement.supported_fields">supported_fields</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.validate_field" href="properties.html#exchangelib.properties.EWSElement.validate_field">validate_field</a></code></li>
</ul>
</li>
</ul>
</dd>
<dt id="exchangelib.extended_properties.Flag"><code class="flex name class">
<span>class <span class="ident">Flag</span></span>
<span>(</span><span>*args, **kwargs)</span>
</code></dt>
<dd>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class Flag(ExtendedProperty):
    &#34;&#34;&#34;This property returns None for Not Flagged messages, 1 for Completed messages and 2 for Flagged messages.

    For a description of each status, see:
    https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxoflag/eda9fd25-6407-4cec-9e62-26e4f9d6a098
    &#34;&#34;&#34;

    property_tag = 0x1090
    property_type = &#34;Integer&#34;</code></pre>
</details>
<div class="desc"><p>This property returns None for Not Flagged messages, 1 for Completed messages and 2 for Flagged messages.</p>
<p>For a description of each status, see:
<a href="https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxoflag/eda9fd25-6407-4cec-9e62-26e4f9d6a098">https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxoflag/eda9fd25-6407-4cec-9e62-26e4f9d6a098</a></p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="exchangelib.extended_properties.ExtendedProperty" href="#exchangelib.extended_properties.ExtendedProperty">ExtendedProperty</a></li>
<li><a title="exchangelib.properties.EWSElement" href="properties.html#exchangelib.properties.EWSElement">EWSElement</a></li>
</ul>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="exchangelib.extended_properties.ExtendedProperty" href="#exchangelib.extended_properties.ExtendedProperty">ExtendedProperty</a></b></code>:
<ul class="hlist">
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SETS" href="#exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SETS">DISTINGUISHED_SETS</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_ID_TO_NAME_MAP" href="#exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_ID_TO_NAME_MAP">DISTINGUISHED_SET_ID_TO_NAME_MAP</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_NAME_TO_ID_MAP" href="#exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_NAME_TO_ID_MAP">DISTINGUISHED_SET_NAME_TO_ID_MAP</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.ELEMENT_NAME" href="properties.html#exchangelib.properties.EWSElement.ELEMENT_NAME">ELEMENT_NAME</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.FIELDS" href="properties.html#exchangelib.properties.EWSElement.FIELDS">FIELDS</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.NAMESPACE" href="properties.html#exchangelib.properties.EWSElement.NAMESPACE">NAMESPACE</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.PROPERTY_TYPES" href="#exchangelib.extended_properties.ExtendedProperty.PROPERTY_TYPES">PROPERTY_TYPES</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.add_field" href="properties.html#exchangelib.properties.EWSElement.add_field">add_field</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.distinguished_property_set_id" href="#exchangelib.extended_properties.ExtendedProperty.distinguished_property_set_id">distinguished_property_set_id</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.is_property_instance" href="#exchangelib.extended_properties.ExtendedProperty.is_property_instance">is_property_instance</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_id" href="#exchangelib.extended_properties.ExtendedProperty.property_id">property_id</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_name" href="#exchangelib.extended_properties.ExtendedProperty.property_name">property_name</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_set_id" href="#exchangelib.extended_properties.ExtendedProperty.property_set_id">property_set_id</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_tag" href="#exchangelib.extended_properties.ExtendedProperty.property_tag">property_tag</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_type" href="#exchangelib.extended_properties.ExtendedProperty.property_type">property_type</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.remove_field" href="properties.html#exchangelib.properties.EWSElement.remove_field">remove_field</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.supported_fields" href="properties.html#exchangelib.properties.EWSElement.supported_fields">supported_fields</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.validate_field" href="properties.html#exchangelib.properties.EWSElement.validate_field">validate_field</a></code></li>
</ul>
</li>
</ul>
</dd>
</dl>
</section>
</article>
<nav id="sidebar">
<div class="toc">
<ul></ul>
</div>
<ul id="index">
<li><h3>Super-module</h3>
<ul>
<li><code><a title="exchangelib" href="index.html">exchangelib</a></code></li>
</ul>
</li>
<li><h3><a href="#header-classes">Classes</a></h3>
<ul>
<li>
<h4><code><a title="exchangelib.extended_properties.ExtendedProperty" href="#exchangelib.extended_properties.ExtendedProperty">ExtendedProperty</a></code></h4>
<ul class="">
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SETS" href="#exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SETS">DISTINGUISHED_SETS</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_ID_TO_NAME_MAP" href="#exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_ID_TO_NAME_MAP">DISTINGUISHED_SET_ID_TO_NAME_MAP</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_NAME_TO_ID_MAP" href="#exchangelib.extended_properties.ExtendedProperty.DISTINGUISHED_SET_NAME_TO_ID_MAP">DISTINGUISHED_SET_NAME_TO_ID_MAP</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.PROPERTY_TYPES" href="#exchangelib.extended_properties.ExtendedProperty.PROPERTY_TYPES">PROPERTY_TYPES</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.as_object" href="#exchangelib.extended_properties.ExtendedProperty.as_object">as_object</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.clean" href="#exchangelib.extended_properties.ExtendedProperty.clean">clean</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.distinguished_property_set_id" href="#exchangelib.extended_properties.ExtendedProperty.distinguished_property_set_id">distinguished_property_set_id</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.from_xml" href="#exchangelib.extended_properties.ExtendedProperty.from_xml">from_xml</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.is_array_type" href="#exchangelib.extended_properties.ExtendedProperty.is_array_type">is_array_type</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.is_property_instance" href="#exchangelib.extended_properties.ExtendedProperty.is_property_instance">is_property_instance</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_id" href="#exchangelib.extended_properties.ExtendedProperty.property_id">property_id</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_name" href="#exchangelib.extended_properties.ExtendedProperty.property_name">property_name</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_set_id" href="#exchangelib.extended_properties.ExtendedProperty.property_set_id">property_set_id</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_tag" href="#exchangelib.extended_properties.ExtendedProperty.property_tag">property_tag</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_tag_as_hex" href="#exchangelib.extended_properties.ExtendedProperty.property_tag_as_hex">property_tag_as_hex</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_tag_as_int" href="#exchangelib.extended_properties.ExtendedProperty.property_tag_as_int">property_tag_as_int</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.property_type" href="#exchangelib.extended_properties.ExtendedProperty.property_type">property_type</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.python_type" href="#exchangelib.extended_properties.ExtendedProperty.python_type">python_type</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.to_xml" href="#exchangelib.extended_properties.ExtendedProperty.to_xml">to_xml</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.validate_cls" href="#exchangelib.extended_properties.ExtendedProperty.validate_cls">validate_cls</a></code></li>
<li><code><a title="exchangelib.extended_properties.ExtendedProperty.value" href="#exchangelib.extended_properties.ExtendedProperty.value">value</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="exchangelib.extended_properties.ExternId" href="#exchangelib.extended_properties.ExternId">ExternId</a></code></h4>
</li>
<li>
<h4><code><a title="exchangelib.extended_properties.Flag" href="#exchangelib.extended_properties.Flag">Flag</a></code></h4>
</li>
</ul>
</li>
</ul>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.6</a>.</p>
</footer>
</body>
</html>