-
Notifications
You must be signed in to change notification settings - Fork 197
/
models.py
2052 lines (1730 loc) · 74.8 KB
/
models.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
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest.serialization import Model
class Activity(Model):
"""
:param capacity_per_day:
:type capacity_per_day: float
:param name:
:type name: str
"""
_attribute_map = {
'capacity_per_day': {'key': 'capacityPerDay', 'type': 'float'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, capacity_per_day=None, name=None):
super(Activity, self).__init__()
self.capacity_per_day = capacity_per_day
self.name = name
class BacklogColumn(Model):
"""
:param column_field_reference:
:type column_field_reference: :class:`WorkItemFieldReference <azure.devops.v5_1.work.models.WorkItemFieldReference>`
:param width:
:type width: int
"""
_attribute_map = {
'column_field_reference': {'key': 'columnFieldReference', 'type': 'WorkItemFieldReference'},
'width': {'key': 'width', 'type': 'int'}
}
def __init__(self, column_field_reference=None, width=None):
super(BacklogColumn, self).__init__()
self.column_field_reference = column_field_reference
self.width = width
class BacklogConfiguration(Model):
"""
:param backlog_fields: Behavior/type field mapping
:type backlog_fields: :class:`BacklogFields <azure.devops.v5_1.work.models.BacklogFields>`
:param bugs_behavior: Bugs behavior
:type bugs_behavior: object
:param hidden_backlogs: Hidden Backlog
:type hidden_backlogs: list of str
:param is_bugs_behavior_configured: Is BugsBehavior Configured in the process
:type is_bugs_behavior_configured: bool
:param portfolio_backlogs: Portfolio backlog descriptors
:type portfolio_backlogs: list of :class:`BacklogLevelConfiguration <azure.devops.v5_1.work.models.BacklogLevelConfiguration>`
:param requirement_backlog: Requirement backlog
:type requirement_backlog: :class:`BacklogLevelConfiguration <azure.devops.v5_1.work.models.BacklogLevelConfiguration>`
:param task_backlog: Task backlog
:type task_backlog: :class:`BacklogLevelConfiguration <azure.devops.v5_1.work.models.BacklogLevelConfiguration>`
:param url:
:type url: str
:param work_item_type_mapped_states: Mapped states for work item types
:type work_item_type_mapped_states: list of :class:`WorkItemTypeStateInfo <azure.devops.v5_1.work.models.WorkItemTypeStateInfo>`
"""
_attribute_map = {
'backlog_fields': {'key': 'backlogFields', 'type': 'BacklogFields'},
'bugs_behavior': {'key': 'bugsBehavior', 'type': 'object'},
'hidden_backlogs': {'key': 'hiddenBacklogs', 'type': '[str]'},
'is_bugs_behavior_configured': {'key': 'isBugsBehaviorConfigured', 'type': 'bool'},
'portfolio_backlogs': {'key': 'portfolioBacklogs', 'type': '[BacklogLevelConfiguration]'},
'requirement_backlog': {'key': 'requirementBacklog', 'type': 'BacklogLevelConfiguration'},
'task_backlog': {'key': 'taskBacklog', 'type': 'BacklogLevelConfiguration'},
'url': {'key': 'url', 'type': 'str'},
'work_item_type_mapped_states': {'key': 'workItemTypeMappedStates', 'type': '[WorkItemTypeStateInfo]'}
}
def __init__(self, backlog_fields=None, bugs_behavior=None, hidden_backlogs=None, is_bugs_behavior_configured=None, portfolio_backlogs=None, requirement_backlog=None, task_backlog=None, url=None, work_item_type_mapped_states=None):
super(BacklogConfiguration, self).__init__()
self.backlog_fields = backlog_fields
self.bugs_behavior = bugs_behavior
self.hidden_backlogs = hidden_backlogs
self.is_bugs_behavior_configured = is_bugs_behavior_configured
self.portfolio_backlogs = portfolio_backlogs
self.requirement_backlog = requirement_backlog
self.task_backlog = task_backlog
self.url = url
self.work_item_type_mapped_states = work_item_type_mapped_states
class BacklogFields(Model):
"""
:param type_fields: Field Type (e.g. Order, Activity) to Field Reference Name map
:type type_fields: dict
"""
_attribute_map = {
'type_fields': {'key': 'typeFields', 'type': '{str}'}
}
def __init__(self, type_fields=None):
super(BacklogFields, self).__init__()
self.type_fields = type_fields
class BacklogLevel(Model):
"""
Contract representing a backlog level
:param category_reference_name: Reference name of the corresponding WIT category
:type category_reference_name: str
:param plural_name: Plural name for the backlog level
:type plural_name: str
:param work_item_states: Collection of work item states that are included in the plan. The server will filter to only these work item types.
:type work_item_states: list of str
:param work_item_types: Collection of valid workitem type names for the given backlog level
:type work_item_types: list of str
"""
_attribute_map = {
'category_reference_name': {'key': 'categoryReferenceName', 'type': 'str'},
'plural_name': {'key': 'pluralName', 'type': 'str'},
'work_item_states': {'key': 'workItemStates', 'type': '[str]'},
'work_item_types': {'key': 'workItemTypes', 'type': '[str]'}
}
def __init__(self, category_reference_name=None, plural_name=None, work_item_states=None, work_item_types=None):
super(BacklogLevel, self).__init__()
self.category_reference_name = category_reference_name
self.plural_name = plural_name
self.work_item_states = work_item_states
self.work_item_types = work_item_types
class BacklogLevelConfiguration(Model):
"""
:param add_panel_fields: List of fields to include in Add Panel
:type add_panel_fields: list of :class:`WorkItemFieldReference <azure.devops.v5_1.work.models.WorkItemFieldReference>`
:param color: Color for the backlog level
:type color: str
:param column_fields: Default list of columns for the backlog
:type column_fields: list of :class:`BacklogColumn <azure.devops.v5_1.work.models.BacklogColumn>`
:param default_work_item_type: Default Work Item Type for the backlog
:type default_work_item_type: :class:`WorkItemTypeReference <azure.devops.v5_1.work.models.WorkItemTypeReference>`
:param id: Backlog Id (for Legacy Backlog Level from process config it can be categoryref name)
:type id: str
:param is_hidden: Indicates whether the backlog level is hidden
:type is_hidden: bool
:param name: Backlog Name
:type name: str
:param rank: Backlog Rank (Taskbacklog is 0)
:type rank: int
:param type: The type of this backlog level
:type type: object
:param work_item_count_limit: Max number of work items to show in the given backlog
:type work_item_count_limit: int
:param work_item_types: Work Item types participating in this backlog as known by the project/Process, can be overridden by team settings for bugs
:type work_item_types: list of :class:`WorkItemTypeReference <azure.devops.v5_1.work.models.WorkItemTypeReference>`
"""
_attribute_map = {
'add_panel_fields': {'key': 'addPanelFields', 'type': '[WorkItemFieldReference]'},
'color': {'key': 'color', 'type': 'str'},
'column_fields': {'key': 'columnFields', 'type': '[BacklogColumn]'},
'default_work_item_type': {'key': 'defaultWorkItemType', 'type': 'WorkItemTypeReference'},
'id': {'key': 'id', 'type': 'str'},
'is_hidden': {'key': 'isHidden', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'rank': {'key': 'rank', 'type': 'int'},
'type': {'key': 'type', 'type': 'object'},
'work_item_count_limit': {'key': 'workItemCountLimit', 'type': 'int'},
'work_item_types': {'key': 'workItemTypes', 'type': '[WorkItemTypeReference]'}
}
def __init__(self, add_panel_fields=None, color=None, column_fields=None, default_work_item_type=None, id=None, is_hidden=None, name=None, rank=None, type=None, work_item_count_limit=None, work_item_types=None):
super(BacklogLevelConfiguration, self).__init__()
self.add_panel_fields = add_panel_fields
self.color = color
self.column_fields = column_fields
self.default_work_item_type = default_work_item_type
self.id = id
self.is_hidden = is_hidden
self.name = name
self.rank = rank
self.type = type
self.work_item_count_limit = work_item_count_limit
self.work_item_types = work_item_types
class BacklogLevelWorkItems(Model):
"""
Represents work items in a backlog level
:param work_items: A list of work items within a backlog level
:type work_items: list of :class:`WorkItemLink <azure.devops.v5_1.work.models.WorkItemLink>`
"""
_attribute_map = {
'work_items': {'key': 'workItems', 'type': '[WorkItemLink]'}
}
def __init__(self, work_items=None):
super(BacklogLevelWorkItems, self).__init__()
self.work_items = work_items
class BoardBadge(Model):
"""
Represents a board badge.
:param board_id: The ID of the board represented by this badge.
:type board_id: str
:param image_url: A link to the SVG resource.
:type image_url: str
"""
_attribute_map = {
'board_id': {'key': 'boardId', 'type': 'str'},
'image_url': {'key': 'imageUrl', 'type': 'str'}
}
def __init__(self, board_id=None, image_url=None):
super(BoardBadge, self).__init__()
self.board_id = board_id
self.image_url = image_url
class BoardCardRuleSettings(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v5_1.work.models.ReferenceLinks>`
:param rules:
:type rules: dict
:param url:
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'rules': {'key': 'rules', 'type': '{[Rule]}'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, rules=None, url=None):
super(BoardCardRuleSettings, self).__init__()
self._links = _links
self.rules = rules
self.url = url
class BoardCardSettings(Model):
"""
:param cards:
:type cards: dict
"""
_attribute_map = {
'cards': {'key': 'cards', 'type': '{[FieldSetting]}'}
}
def __init__(self, cards=None):
super(BoardCardSettings, self).__init__()
self.cards = cards
class BoardChartReference(Model):
"""
:param name: Name of the resource
:type name: str
:param url: Full http link to the resource
:type url: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, name=None, url=None):
super(BoardChartReference, self).__init__()
self.name = name
self.url = url
class BoardColumn(Model):
"""
:param column_type:
:type column_type: object
:param description:
:type description: str
:param id:
:type id: str
:param is_split:
:type is_split: bool
:param item_limit:
:type item_limit: int
:param name:
:type name: str
:param state_mappings:
:type state_mappings: dict
"""
_attribute_map = {
'column_type': {'key': 'columnType', 'type': 'object'},
'description': {'key': 'description', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'is_split': {'key': 'isSplit', 'type': 'bool'},
'item_limit': {'key': 'itemLimit', 'type': 'int'},
'name': {'key': 'name', 'type': 'str'},
'state_mappings': {'key': 'stateMappings', 'type': '{str}'}
}
def __init__(self, column_type=None, description=None, id=None, is_split=None, item_limit=None, name=None, state_mappings=None):
super(BoardColumn, self).__init__()
self.column_type = column_type
self.description = description
self.id = id
self.is_split = is_split
self.item_limit = item_limit
self.name = name
self.state_mappings = state_mappings
class BoardFields(Model):
"""
:param column_field:
:type column_field: :class:`FieldReference <azure.devops.v5_1.work.models.FieldReference>`
:param done_field:
:type done_field: :class:`FieldReference <azure.devops.v5_1.work.models.FieldReference>`
:param row_field:
:type row_field: :class:`FieldReference <azure.devops.v5_1.work.models.FieldReference>`
"""
_attribute_map = {
'column_field': {'key': 'columnField', 'type': 'FieldReference'},
'done_field': {'key': 'doneField', 'type': 'FieldReference'},
'row_field': {'key': 'rowField', 'type': 'FieldReference'}
}
def __init__(self, column_field=None, done_field=None, row_field=None):
super(BoardFields, self).__init__()
self.column_field = column_field
self.done_field = done_field
self.row_field = row_field
class BoardReference(Model):
"""
:param id: Id of the resource
:type id: str
:param name: Name of the resource
:type name: str
:param url: Full http link to the resource
:type url: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, id=None, name=None, url=None):
super(BoardReference, self).__init__()
self.id = id
self.name = name
self.url = url
class BoardRow(Model):
"""
:param id:
:type id: str
:param name:
:type name: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, id=None, name=None):
super(BoardRow, self).__init__()
self.id = id
self.name = name
class BoardSuggestedValue(Model):
"""
:param name:
:type name: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, name=None):
super(BoardSuggestedValue, self).__init__()
self.name = name
class BoardUserSettings(Model):
"""
:param auto_refresh_state:
:type auto_refresh_state: bool
"""
_attribute_map = {
'auto_refresh_state': {'key': 'autoRefreshState', 'type': 'bool'}
}
def __init__(self, auto_refresh_state=None):
super(BoardUserSettings, self).__init__()
self.auto_refresh_state = auto_refresh_state
class CapacityPatch(Model):
"""
Expected data from PATCH
:param activities:
:type activities: list of :class:`Activity <azure.devops.v5_1.work.models.Activity>`
:param days_off:
:type days_off: list of :class:`DateRange <azure.devops.v5_1.work.models.DateRange>`
"""
_attribute_map = {
'activities': {'key': 'activities', 'type': '[Activity]'},
'days_off': {'key': 'daysOff', 'type': '[DateRange]'}
}
def __init__(self, activities=None, days_off=None):
super(CapacityPatch, self).__init__()
self.activities = activities
self.days_off = days_off
class CategoryConfiguration(Model):
"""
Details about a given backlog category
:param name: Name
:type name: str
:param reference_name: Category Reference Name
:type reference_name: str
:param work_item_types: Work item types for the backlog category
:type work_item_types: list of :class:`WorkItemTypeReference <azure.devops.v5_1.work.models.WorkItemTypeReference>`
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'reference_name': {'key': 'referenceName', 'type': 'str'},
'work_item_types': {'key': 'workItemTypes', 'type': '[WorkItemTypeReference]'}
}
def __init__(self, name=None, reference_name=None, work_item_types=None):
super(CategoryConfiguration, self).__init__()
self.name = name
self.reference_name = reference_name
self.work_item_types = work_item_types
class CreatePlan(Model):
"""
:param description: Description of the plan
:type description: str
:param name: Name of the plan to create.
:type name: str
:param properties: Plan properties.
:type properties: object
:param type: Type of plan to create.
:type type: object
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'object'},
'type': {'key': 'type', 'type': 'object'}
}
def __init__(self, description=None, name=None, properties=None, type=None):
super(CreatePlan, self).__init__()
self.description = description
self.name = name
self.properties = properties
self.type = type
class DateRange(Model):
"""
:param end: End of the date range.
:type end: datetime
:param start: Start of the date range.
:type start: datetime
"""
_attribute_map = {
'end': {'key': 'end', 'type': 'iso-8601'},
'start': {'key': 'start', 'type': 'iso-8601'}
}
def __init__(self, end=None, start=None):
super(DateRange, self).__init__()
self.end = end
self.start = start
class FieldReference(Model):
"""
An abstracted reference to a field
:param reference_name: fieldRefName for the field
:type reference_name: str
:param url: Full http link to more information about the field
:type url: str
"""
_attribute_map = {
'reference_name': {'key': 'referenceName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, reference_name=None, url=None):
super(FieldReference, self).__init__()
self.reference_name = reference_name
self.url = url
class FilterClause(Model):
"""
:param field_name:
:type field_name: str
:param index:
:type index: int
:param logical_operator:
:type logical_operator: str
:param operator:
:type operator: str
:param value:
:type value: str
"""
_attribute_map = {
'field_name': {'key': 'fieldName', 'type': 'str'},
'index': {'key': 'index', 'type': 'int'},
'logical_operator': {'key': 'logicalOperator', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'}
}
def __init__(self, field_name=None, index=None, logical_operator=None, operator=None, value=None):
super(FilterClause, self).__init__()
self.field_name = field_name
self.index = index
self.logical_operator = logical_operator
self.operator = operator
self.value = value
class GraphSubjectBase(Model):
"""
:param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
:type _links: :class:`ReferenceLinks <azure.devops.v5_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>`
:param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
:type descriptor: str
:param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
:type display_name: str
:param url: This url is the full route to the source resource of this graph subject.
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, descriptor=None, display_name=None, url=None):
super(GraphSubjectBase, self).__init__()
self._links = _links
self.descriptor = descriptor
self.display_name = display_name
self.url = url
class IdentityRef(GraphSubjectBase):
"""
:param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
:type _links: :class:`ReferenceLinks <azure.devops.v5_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>`
:param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
:type descriptor: str
:param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
:type display_name: str
:param url: This url is the full route to the source resource of this graph subject.
:type url: str
:param directory_alias: Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary
:type directory_alias: str
:param id:
:type id: str
:param image_url: Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary
:type image_url: str
:param inactive: Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary
:type inactive: bool
:param is_aad_identity: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)
:type is_aad_identity: bool
:param is_container: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)
:type is_container: bool
:param is_deleted_in_origin:
:type is_deleted_in_origin: bool
:param profile_url: Deprecated - not in use in most preexisting implementations of ToIdentityRef
:type profile_url: str
:param unique_name: Deprecated - use Domain+PrincipalName instead
:type unique_name: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'directory_alias': {'key': 'directoryAlias', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'image_url': {'key': 'imageUrl', 'type': 'str'},
'inactive': {'key': 'inactive', 'type': 'bool'},
'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'},
'is_container': {'key': 'isContainer', 'type': 'bool'},
'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'},
'profile_url': {'key': 'profileUrl', 'type': 'str'},
'unique_name': {'key': 'uniqueName', 'type': 'str'}
}
def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None):
super(IdentityRef, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url)
self.directory_alias = directory_alias
self.id = id
self.image_url = image_url
self.inactive = inactive
self.is_aad_identity = is_aad_identity
self.is_container = is_container
self.is_deleted_in_origin = is_deleted_in_origin
self.profile_url = profile_url
self.unique_name = unique_name
class Link(Model):
"""
Link description.
:param attributes: Collection of link attributes.
:type attributes: dict
:param rel: Relation type.
:type rel: str
:param url: Link url.
:type url: str
"""
_attribute_map = {
'attributes': {'key': 'attributes', 'type': '{object}'},
'rel': {'key': 'rel', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, attributes=None, rel=None, url=None):
super(Link, self).__init__()
self.attributes = attributes
self.rel = rel
self.url = url
class Member(Model):
"""
:param display_name:
:type display_name: str
:param id:
:type id: str
:param image_url:
:type image_url: str
:param unique_name:
:type unique_name: str
:param url:
:type url: str
"""
_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'image_url': {'key': 'imageUrl', 'type': 'str'},
'unique_name': {'key': 'uniqueName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, display_name=None, id=None, image_url=None, unique_name=None, url=None):
super(Member, self).__init__()
self.display_name = display_name
self.id = id
self.image_url = image_url
self.unique_name = unique_name
self.url = url
class ParentChildWIMap(Model):
"""
:param child_work_item_ids:
:type child_work_item_ids: list of int
:param id:
:type id: int
:param title:
:type title: str
"""
_attribute_map = {
'child_work_item_ids': {'key': 'childWorkItemIds', 'type': '[int]'},
'id': {'key': 'id', 'type': 'int'},
'title': {'key': 'title', 'type': 'str'}
}
def __init__(self, child_work_item_ids=None, id=None, title=None):
super(ParentChildWIMap, self).__init__()
self.child_work_item_ids = child_work_item_ids
self.id = id
self.title = title
class Plan(Model):
"""
Data contract for the plan definition
:param created_by_identity: Identity that created this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4.
:type created_by_identity: :class:`IdentityRef <azure.devops.v5_1.work.models.IdentityRef>`
:param created_date: Date when the plan was created
:type created_date: datetime
:param description: Description of the plan
:type description: str
:param id: Id of the plan
:type id: str
:param modified_by_identity: Identity that last modified this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4.
:type modified_by_identity: :class:`IdentityRef <azure.devops.v5_1.work.models.IdentityRef>`
:param modified_date: Date when the plan was last modified. Default to CreatedDate when the plan is first created.
:type modified_date: datetime
:param name: Name of the plan
:type name: str
:param properties: The PlanPropertyCollection instance associated with the plan. These are dependent on the type of the plan. For example, DeliveryTimelineView, it would be of type DeliveryViewPropertyCollection.
:type properties: object
:param revision: Revision of the plan. Used to safeguard users from overwriting each other's changes.
:type revision: int
:param type: Type of the plan
:type type: object
:param url: The resource url to locate the plan via rest api
:type url: str
:param user_permissions: Bit flag indicating set of permissions a user has to the plan.
:type user_permissions: object
"""
_attribute_map = {
'created_by_identity': {'key': 'createdByIdentity', 'type': 'IdentityRef'},
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'description': {'key': 'description', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'modified_by_identity': {'key': 'modifiedByIdentity', 'type': 'IdentityRef'},
'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'},
'name': {'key': 'name', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'object'},
'revision': {'key': 'revision', 'type': 'int'},
'type': {'key': 'type', 'type': 'object'},
'url': {'key': 'url', 'type': 'str'},
'user_permissions': {'key': 'userPermissions', 'type': 'object'}
}
def __init__(self, created_by_identity=None, created_date=None, description=None, id=None, modified_by_identity=None, modified_date=None, name=None, properties=None, revision=None, type=None, url=None, user_permissions=None):
super(Plan, self).__init__()
self.created_by_identity = created_by_identity
self.created_date = created_date
self.description = description
self.id = id
self.modified_by_identity = modified_by_identity
self.modified_date = modified_date
self.name = name
self.properties = properties
self.revision = revision
self.type = type
self.url = url
self.user_permissions = user_permissions
class PlanViewData(Model):
"""
Base class for plan view data contracts. Anything common goes here.
:param id:
:type id: str
:param revision:
:type revision: int
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'revision': {'key': 'revision', 'type': 'int'}
}
def __init__(self, id=None, revision=None):
super(PlanViewData, self).__init__()
self.id = id
self.revision = revision
class PredefinedQuery(Model):
"""
Represents a single pre-defined query.
:param has_more: Whether or not the query returned the complete set of data or if the data was truncated.
:type has_more: bool
:param id: Id of the query
:type id: str
:param name: Localized name of the query
:type name: str
:param results: The results of the query. This will be a set of WorkItem objects with only the 'id' set. The client is responsible for paging in the data as needed.
:type results: list of :class:`WorkItem <azure.devops.v5_1.work.models.WorkItem>`
:param url: REST API Url to use to retrieve results for this query
:type url: str
:param web_url: Url to use to display a page in the browser with the results of this query
:type web_url: str
"""
_attribute_map = {
'has_more': {'key': 'hasMore', 'type': 'bool'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'results': {'key': 'results', 'type': '[WorkItem]'},
'url': {'key': 'url', 'type': 'str'},
'web_url': {'key': 'webUrl', 'type': 'str'}
}
def __init__(self, has_more=None, id=None, name=None, results=None, url=None, web_url=None):
super(PredefinedQuery, self).__init__()
self.has_more = has_more
self.id = id
self.name = name
self.results = results
self.url = url
self.web_url = web_url
class ProcessConfiguration(Model):
"""
Process Configurations for the project
:param bug_work_items: Details about bug work items
:type bug_work_items: :class:`CategoryConfiguration <azure.devops.v5_1.work.models.CategoryConfiguration>`
:param portfolio_backlogs: Details about portfolio backlogs
:type portfolio_backlogs: list of :class:`CategoryConfiguration <azure.devops.v5_1.work.models.CategoryConfiguration>`
:param requirement_backlog: Details of requirement backlog
:type requirement_backlog: :class:`CategoryConfiguration <azure.devops.v5_1.work.models.CategoryConfiguration>`
:param task_backlog: Details of task backlog
:type task_backlog: :class:`CategoryConfiguration <azure.devops.v5_1.work.models.CategoryConfiguration>`
:param type_fields: Type fields for the process configuration
:type type_fields: dict
:param url:
:type url: str
"""
_attribute_map = {
'bug_work_items': {'key': 'bugWorkItems', 'type': 'CategoryConfiguration'},
'portfolio_backlogs': {'key': 'portfolioBacklogs', 'type': '[CategoryConfiguration]'},
'requirement_backlog': {'key': 'requirementBacklog', 'type': 'CategoryConfiguration'},
'task_backlog': {'key': 'taskBacklog', 'type': 'CategoryConfiguration'},
'type_fields': {'key': 'typeFields', 'type': '{WorkItemFieldReference}'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, bug_work_items=None, portfolio_backlogs=None, requirement_backlog=None, task_backlog=None, type_fields=None, url=None):
super(ProcessConfiguration, self).__init__()
self.bug_work_items = bug_work_items
self.portfolio_backlogs = portfolio_backlogs
self.requirement_backlog = requirement_backlog
self.task_backlog = task_backlog
self.type_fields = type_fields
self.url = url
class ReferenceLinks(Model):
"""
The class to represent a collection of REST reference links.
:param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.
:type links: dict
"""
_attribute_map = {
'links': {'key': 'links', 'type': '{object}'}
}
def __init__(self, links=None):
super(ReferenceLinks, self).__init__()
self.links = links
class ReorderOperation(Model):
"""
Represents a reorder request for one or more work items.
:param ids: IDs of the work items to be reordered. Must be valid WorkItem Ids.
:type ids: list of int
:param iteration_path: IterationPath for reorder operation. This is only used when we reorder from the Iteration Backlog
:type iteration_path: str
:param next_id: ID of the work item that should be after the reordered items. Can use 0 to specify the end of the list.
:type next_id: int
:param parent_id: Parent ID for all of the work items involved in this operation. Can use 0 to indicate the items don't have a parent.
:type parent_id: int
:param previous_id: ID of the work item that should be before the reordered items. Can use 0 to specify the beginning of the list.
:type previous_id: int
"""
_attribute_map = {
'ids': {'key': 'ids', 'type': '[int]'},
'iteration_path': {'key': 'iterationPath', 'type': 'str'},
'next_id': {'key': 'nextId', 'type': 'int'},
'parent_id': {'key': 'parentId', 'type': 'int'},
'previous_id': {'key': 'previousId', 'type': 'int'}
}
def __init__(self, ids=None, iteration_path=None, next_id=None, parent_id=None, previous_id=None):
super(ReorderOperation, self).__init__()
self.ids = ids
self.iteration_path = iteration_path
self.next_id = next_id
self.parent_id = parent_id
self.previous_id = previous_id
class ReorderResult(Model):
"""
Represents a reorder result for a work item.
:param id: The ID of the work item that was reordered.
:type id: int
:param order: The updated order value of the work item that was reordered.
:type order: float
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'int'},
'order': {'key': 'order', 'type': 'float'}
}
def __init__(self, id=None, order=None):
super(ReorderResult, self).__init__()
self.id = id
self.order = order
class Rule(Model):
"""
:param clauses:
:type clauses: list of :class:`FilterClause <azure.devops.v5_1.work.models.FilterClause>`
:param filter:
:type filter: str
:param is_enabled:
:type is_enabled: str
:param name:
:type name: str
:param settings:
:type settings: dict
"""
_attribute_map = {
'clauses': {'key': 'clauses', 'type': '[FilterClause]'},
'filter': {'key': 'filter', 'type': 'str'},
'is_enabled': {'key': 'isEnabled', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'settings': {'key': 'settings', 'type': '{str}'}
}
def __init__(self, clauses=None, filter=None, is_enabled=None, name=None, settings=None):
super(Rule, self).__init__()
self.clauses = clauses
self.filter = filter
self.is_enabled = is_enabled
self.name = name
self.settings = settings
class TeamContext(Model):
"""
The Team Context for an operation.
:param project: The team project Id or name. Ignored if ProjectId is set.
:type project: str
:param project_id: The Team Project ID. Required if Project is not set.
:type project_id: str
:param team: The Team Id or name. Ignored if TeamId is set.