-
Notifications
You must be signed in to change notification settings - Fork 199
/
models.py
3977 lines (3468 loc) · 172 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 AdvSecEnablementStatus(Model):
"""
:param enabled: Enabled status 0 disabled, 1 enabled, Null never explicitly set, always whatever project is, ya this should probably be an enum somewhere
:type enabled: bool
:param enabled_changed_on_date: Enabled changed on datetime To Be Removed M223 +
:type enabled_changed_on_date: datetime
:param changed_by_id: Enabled by VSID
:type changed_by_id: str
:param changed_on_date: Enabled changed on datetime
:type changed_on_date: datetime
:param project_id: ProjectId
:type project_id: str
:param repository_id: RepositoryId
:type repository_id: str
"""
_attribute_map = {
'enabled': {'key': 'enabled', 'type': 'bool'},
'enabled_changed_on_date': {'key': 'enabledChangedOnDate', 'type': 'iso-8601'},
'changed_by_id': {'key': 'changedById', 'type': 'str'},
'changed_on_date': {'key': 'changedOnDate', 'type': 'iso-8601'},
'project_id': {'key': 'projectId', 'type': 'str'},
'repository_id': {'key': 'repositoryId', 'type': 'str'}
}
def __init__(self, enabled=None, enabled_changed_on_date=None, changed_by_id=None, changed_on_date=None, project_id=None, repository_id=None):
super(AdvSecEnablementStatus, self).__init__()
self.enabled = enabled
self.enabled_changed_on_date = enabled_changed_on_date
self.changed_by_id = changed_by_id
self.changed_on_date = changed_on_date
self.project_id = project_id
self.repository_id = repository_id
class AdvSecEnablementUpdate(Model):
"""
:param new_status: New status
:type new_status: bool
:param project_id: ProjectId
:type project_id: str
:param repository_id: RepositoryId Actual RepositoryId to Modify or Magic Repository Id "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" for ALL Repositories for that project
:type repository_id: str
"""
_attribute_map = {
'new_status': {'key': 'newStatus', 'type': 'bool'},
'project_id': {'key': 'projectId', 'type': 'str'},
'repository_id': {'key': 'repositoryId', 'type': 'str'}
}
def __init__(self, new_status=None, project_id=None, repository_id=None):
super(AdvSecEnablementUpdate, self).__init__()
self.new_status = new_status
self.project_id = project_id
self.repository_id = repository_id
class Attachment(Model):
"""
Meta data for a file attached to an artifact.
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param author: The person that uploaded this attachment.
:type author: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param content_hash: Content hash of on-disk representation of file content. Its calculated by the server by using SHA1 hash function.
:type content_hash: str
:param created_date: The time the attachment was uploaded.
:type created_date: datetime
:param description: The description of the attachment.
:type description: str
:param display_name: The display name of the attachment. Can't be null or empty.
:type display_name: str
:param id: Id of the attachment.
:type id: int
:param properties: Extended properties.
:type properties: :class:`object <azure.devops.v7_1.git.models.object>`
:param url: The url to download the content of the attachment.
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'IdentityRef'},
'content_hash': {'key': 'contentHash', 'type': 'str'},
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'description': {'key': 'description', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'properties': {'key': 'properties', 'type': 'object'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, author=None, content_hash=None, created_date=None, description=None, display_name=None, id=None, properties=None, url=None):
super(Attachment, self).__init__()
self._links = _links
self.author = author
self.content_hash = content_hash
self.created_date = created_date
self.description = description
self.display_name = display_name
self.id = id
self.properties = properties
self.url = url
class BillableCommitter(Model):
"""
Used by AdvSec to return billable committers.
:param repo_id: RepositoryId commit was pushed to.
:type repo_id: str
:param vsid: Visual Studio ID /Team Foundation ID
:type vsid: str
"""
_attribute_map = {
'repo_id': {'key': 'repoId', 'type': 'str'},
'vsid': {'key': 'vsid', 'type': 'str'}
}
def __init__(self, repo_id=None, vsid=None):
super(BillableCommitter, self).__init__()
self.repo_id = repo_id
self.vsid = vsid
class BillableCommitterDetail(BillableCommitter):
"""
:param repo_id: RepositoryId commit was pushed to.
:type repo_id: str
:param vsid: Visual Studio ID /Team Foundation ID
:type vsid: str
:param commit_id: ID (SHA-1) of the commit.
:type commit_id: str
:param committer_email: Committer email address after parsing.
:type committer_email: str
:param commit_time: Time reported by the commit.
:type commit_time: datetime
:param project_id: Project Id commit was pushed to.
:type project_id: str
:param project_name: Project name commit was pushed to.
:type project_name: str
:param pushed_time: Time of the push that contained the commit.
:type pushed_time: datetime
:param push_id: Push Id that contained the commit.
:type push_id: int
:param repo_name: Repository name commit was pushed to.
:type repo_name: str
"""
_attribute_map = {
'repo_id': {'key': 'repoId', 'type': 'str'},
'vsid': {'key': 'vsid', 'type': 'str'},
'commit_id': {'key': 'commitId', 'type': 'str'},
'committer_email': {'key': 'committerEmail', 'type': 'str'},
'commit_time': {'key': 'commitTime', 'type': 'iso-8601'},
'project_id': {'key': 'projectId', 'type': 'str'},
'project_name': {'key': 'projectName', 'type': 'str'},
'pushed_time': {'key': 'pushedTime', 'type': 'iso-8601'},
'push_id': {'key': 'pushId', 'type': 'int'},
'repo_name': {'key': 'repoName', 'type': 'str'}
}
def __init__(self, repo_id=None, vsid=None, commit_id=None, committer_email=None, commit_time=None, project_id=None, project_name=None, pushed_time=None, push_id=None, repo_name=None):
super(BillableCommitterDetail, self).__init__(repo_id=repo_id, vsid=vsid)
self.commit_id = commit_id
self.committer_email = committer_email
self.commit_time = commit_time
self.project_id = project_id
self.project_name = project_name
self.pushed_time = pushed_time
self.push_id = push_id
self.repo_name = repo_name
class Comment(Model):
"""
Represents a comment which is one of potentially many in a comment thread.
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param author: The author of the comment.
:type author: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param comment_type: The comment type at the time of creation.
:type comment_type: object
:param content: The comment content.
:type content: str
:param id: The comment ID. IDs start at 1 and are unique to a pull request.
:type id: int
:param is_deleted: Whether or not this comment was soft-deleted.
:type is_deleted: bool
:param last_content_updated_date: The date the comment's content was last updated.
:type last_content_updated_date: datetime
:param last_updated_date: The date the comment was last updated.
:type last_updated_date: datetime
:param parent_comment_id: The ID of the parent comment. This is used for replies.
:type parent_comment_id: int
:param published_date: The date the comment was first published.
:type published_date: datetime
:param users_liked: A list of the users who have liked this comment.
:type users_liked: list of :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'IdentityRef'},
'comment_type': {'key': 'commentType', 'type': 'object'},
'content': {'key': 'content', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'last_content_updated_date': {'key': 'lastContentUpdatedDate', 'type': 'iso-8601'},
'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'},
'parent_comment_id': {'key': 'parentCommentId', 'type': 'int'},
'published_date': {'key': 'publishedDate', 'type': 'iso-8601'},
'users_liked': {'key': 'usersLiked', 'type': '[IdentityRef]'}
}
def __init__(self, _links=None, author=None, comment_type=None, content=None, id=None, is_deleted=None, last_content_updated_date=None, last_updated_date=None, parent_comment_id=None, published_date=None, users_liked=None):
super(Comment, self).__init__()
self._links = _links
self.author = author
self.comment_type = comment_type
self.content = content
self.id = id
self.is_deleted = is_deleted
self.last_content_updated_date = last_content_updated_date
self.last_updated_date = last_updated_date
self.parent_comment_id = parent_comment_id
self.published_date = published_date
self.users_liked = users_liked
class CommentIterationContext(Model):
"""
Comment iteration context is used to identify which diff was being viewed when the thread was created.
:param first_comparing_iteration: The iteration of the file on the left side of the diff when the thread was created. If this value is equal to SecondComparingIteration, then this version is the common commit between the source and target branches of the pull request.
:type first_comparing_iteration: int
:param second_comparing_iteration: The iteration of the file on the right side of the diff when the thread was created.
:type second_comparing_iteration: int
"""
_attribute_map = {
'first_comparing_iteration': {'key': 'firstComparingIteration', 'type': 'int'},
'second_comparing_iteration': {'key': 'secondComparingIteration', 'type': 'int'}
}
def __init__(self, first_comparing_iteration=None, second_comparing_iteration=None):
super(CommentIterationContext, self).__init__()
self.first_comparing_iteration = first_comparing_iteration
self.second_comparing_iteration = second_comparing_iteration
class CommentPosition(Model):
"""
:param line: The line number of a thread's position. Starts at 1.
:type line: int
:param offset: The character offset of a thread's position inside of a line. Starts at 0.
:type offset: int
"""
_attribute_map = {
'line': {'key': 'line', 'type': 'int'},
'offset': {'key': 'offset', 'type': 'int'}
}
def __init__(self, line=None, offset=None):
super(CommentPosition, self).__init__()
self.line = line
self.offset = offset
class CommentThread(Model):
"""
Represents a comment thread of a pull request. A thread contains meta data about the file it was left on along with one or more comments (an initial comment and the subsequent replies).
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param comments: A list of the comments.
:type comments: list of :class:`Comment <azure.devops.v7_1.git.models.Comment>`
:param id: The comment thread id.
:type id: int
:param identities: Set of identities related to this thread
:type identities: dict
:param is_deleted: Specify if the thread is deleted which happens when all comments are deleted.
:type is_deleted: bool
:param last_updated_date: The time this thread was last updated.
:type last_updated_date: datetime
:param properties: Optional properties associated with the thread as a collection of key-value pairs.
:type properties: :class:`object <azure.devops.v7_1.git.models.object>`
:param published_date: The time this thread was published.
:type published_date: datetime
:param status: The status of the comment thread.
:type status: object
:param thread_context: Specify thread context such as position in left/right file.
:type thread_context: :class:`CommentThreadContext <azure.devops.v7_1.git.models.CommentThreadContext>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'comments': {'key': 'comments', 'type': '[Comment]'},
'id': {'key': 'id', 'type': 'int'},
'identities': {'key': 'identities', 'type': '{IdentityRef}'},
'is_deleted': {'key': 'isDeleted', 'type': 'bool'},
'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'},
'properties': {'key': 'properties', 'type': 'object'},
'published_date': {'key': 'publishedDate', 'type': 'iso-8601'},
'status': {'key': 'status', 'type': 'object'},
'thread_context': {'key': 'threadContext', 'type': 'CommentThreadContext'}
}
def __init__(self, _links=None, comments=None, id=None, identities=None, is_deleted=None, last_updated_date=None, properties=None, published_date=None, status=None, thread_context=None):
super(CommentThread, self).__init__()
self._links = _links
self.comments = comments
self.id = id
self.identities = identities
self.is_deleted = is_deleted
self.last_updated_date = last_updated_date
self.properties = properties
self.published_date = published_date
self.status = status
self.thread_context = thread_context
class CommentThreadContext(Model):
"""
:param file_path: File path relative to the root of the repository. It's up to the client to use any path format.
:type file_path: str
:param left_file_end: Position of last character of the thread's span in left file.
:type left_file_end: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param left_file_start: Position of first character of the thread's span in left file.
:type left_file_start: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param right_file_end: Position of last character of the thread's span in right file.
:type right_file_end: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param right_file_start: Position of first character of the thread's span in right file.
:type right_file_start: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
"""
_attribute_map = {
'file_path': {'key': 'filePath', 'type': 'str'},
'left_file_end': {'key': 'leftFileEnd', 'type': 'CommentPosition'},
'left_file_start': {'key': 'leftFileStart', 'type': 'CommentPosition'},
'right_file_end': {'key': 'rightFileEnd', 'type': 'CommentPosition'},
'right_file_start': {'key': 'rightFileStart', 'type': 'CommentPosition'}
}
def __init__(self, file_path=None, left_file_end=None, left_file_start=None, right_file_end=None, right_file_start=None):
super(CommentThreadContext, self).__init__()
self.file_path = file_path
self.left_file_end = left_file_end
self.left_file_start = left_file_start
self.right_file_end = right_file_end
self.right_file_start = right_file_start
class CommentTrackingCriteria(Model):
"""
Comment tracking criteria is used to identify which iteration context the thread has been tracked to (if any) along with some detail about the original position and filename.
:param first_comparing_iteration: The iteration of the file on the left side of the diff that the thread will be tracked to. Threads were tracked if this is greater than 0.
:type first_comparing_iteration: int
:param orig_file_path: Original filepath the thread was created on before tracking. This will be different than the current thread filepath if the file in question was renamed in a later iteration.
:type orig_file_path: str
:param orig_left_file_end: Original position of last character of the thread's span in left file.
:type orig_left_file_end: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param orig_left_file_start: Original position of first character of the thread's span in left file.
:type orig_left_file_start: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param orig_right_file_end: Original position of last character of the thread's span in right file.
:type orig_right_file_end: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param orig_right_file_start: Original position of first character of the thread's span in right file.
:type orig_right_file_start: :class:`CommentPosition <azure.devops.v7_1.git.models.CommentPosition>`
:param second_comparing_iteration: The iteration of the file on the right side of the diff that the thread will be tracked to. Threads were tracked if this is greater than 0.
:type second_comparing_iteration: int
"""
_attribute_map = {
'first_comparing_iteration': {'key': 'firstComparingIteration', 'type': 'int'},
'orig_file_path': {'key': 'origFilePath', 'type': 'str'},
'orig_left_file_end': {'key': 'origLeftFileEnd', 'type': 'CommentPosition'},
'orig_left_file_start': {'key': 'origLeftFileStart', 'type': 'CommentPosition'},
'orig_right_file_end': {'key': 'origRightFileEnd', 'type': 'CommentPosition'},
'orig_right_file_start': {'key': 'origRightFileStart', 'type': 'CommentPosition'},
'second_comparing_iteration': {'key': 'secondComparingIteration', 'type': 'int'}
}
def __init__(self, first_comparing_iteration=None, orig_file_path=None, orig_left_file_end=None, orig_left_file_start=None, orig_right_file_end=None, orig_right_file_start=None, second_comparing_iteration=None):
super(CommentTrackingCriteria, self).__init__()
self.first_comparing_iteration = first_comparing_iteration
self.orig_file_path = orig_file_path
self.orig_left_file_end = orig_left_file_end
self.orig_left_file_start = orig_left_file_start
self.orig_right_file_end = orig_right_file_end
self.orig_right_file_start = orig_right_file_start
self.second_comparing_iteration = second_comparing_iteration
class FileContentMetadata(Model):
"""
:param content_type:
:type content_type: str
:param encoding:
:type encoding: int
:param extension:
:type extension: str
:param file_name:
:type file_name: str
:param is_binary:
:type is_binary: bool
:param is_image:
:type is_image: bool
:param vs_link:
:type vs_link: str
"""
_attribute_map = {
'content_type': {'key': 'contentType', 'type': 'str'},
'encoding': {'key': 'encoding', 'type': 'int'},
'extension': {'key': 'extension', 'type': 'str'},
'file_name': {'key': 'fileName', 'type': 'str'},
'is_binary': {'key': 'isBinary', 'type': 'bool'},
'is_image': {'key': 'isImage', 'type': 'bool'},
'vs_link': {'key': 'vsLink', 'type': 'str'}
}
def __init__(self, content_type=None, encoding=None, extension=None, file_name=None, is_binary=None, is_image=None, vs_link=None):
super(FileContentMetadata, self).__init__()
self.content_type = content_type
self.encoding = encoding
self.extension = extension
self.file_name = file_name
self.is_binary = is_binary
self.is_image = is_image
self.vs_link = vs_link
class FileDiff(Model):
"""
Provides properties that describe file differences
:param line_diff_blocks: The collection of line diff blocks
:type line_diff_blocks: list of :class:`LineDiffBlock <azure.devops.v7_1.git.models.LineDiffBlock>`
:param original_path: Original path of item if different from current path.
:type original_path: str
:param path: Current path of item
:type path: str
"""
_attribute_map = {
'line_diff_blocks': {'key': 'lineDiffBlocks', 'type': '[LineDiffBlock]'},
'original_path': {'key': 'originalPath', 'type': 'str'},
'path': {'key': 'path', 'type': 'str'}
}
def __init__(self, line_diff_blocks=None, original_path=None, path=None):
super(FileDiff, self).__init__()
self.line_diff_blocks = line_diff_blocks
self.original_path = original_path
self.path = path
class FileDiffParams(Model):
"""
Provides parameters that describe inputs for the file diff
:param original_path: Original path of the file
:type original_path: str
:param path: Current path of the file
:type path: str
"""
_attribute_map = {
'original_path': {'key': 'originalPath', 'type': 'str'},
'path': {'key': 'path', 'type': 'str'}
}
def __init__(self, original_path=None, path=None):
super(FileDiffParams, self).__init__()
self.original_path = original_path
self.path = path
class FileDiffsCriteria(Model):
"""
Provides properties that describe inputs for the file diffs
:param base_version_commit: Commit ID of the base version
:type base_version_commit: str
:param file_diff_params: List of parameters for each of the files for which we need to get the file diff
:type file_diff_params: list of :class:`FileDiffParams <azure.devops.v7_1.git.models.FileDiffParams>`
:param target_version_commit: Commit ID of the target version
:type target_version_commit: str
"""
_attribute_map = {
'base_version_commit': {'key': 'baseVersionCommit', 'type': 'str'},
'file_diff_params': {'key': 'fileDiffParams', 'type': '[FileDiffParams]'},
'target_version_commit': {'key': 'targetVersionCommit', 'type': 'str'}
}
def __init__(self, base_version_commit=None, file_diff_params=None, target_version_commit=None):
super(FileDiffsCriteria, self).__init__()
self.base_version_commit = base_version_commit
self.file_diff_params = file_diff_params
self.target_version_commit = target_version_commit
class GitAnnotatedTag(Model):
"""
A Git annotated tag.
:param message: The tagging Message
:type message: str
:param name: The name of the annotated tag.
:type name: str
:param object_id: The objectId (Sha1Id) of the tag.
:type object_id: str
:param tagged_by: User info and date of tagging.
:type tagged_by: :class:`GitUserDate <azure.devops.v7_1.git.models.GitUserDate>`
:param tagged_object: Tagged git object.
:type tagged_object: :class:`GitObject <azure.devops.v7_1.git.models.GitObject>`
:param url:
:type url: str
"""
_attribute_map = {
'message': {'key': 'message', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'object_id': {'key': 'objectId', 'type': 'str'},
'tagged_by': {'key': 'taggedBy', 'type': 'GitUserDate'},
'tagged_object': {'key': 'taggedObject', 'type': 'GitObject'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, message=None, name=None, object_id=None, tagged_by=None, tagged_object=None, url=None):
super(GitAnnotatedTag, self).__init__()
self.message = message
self.name = name
self.object_id = object_id
self.tagged_by = tagged_by
self.tagged_object = tagged_object
self.url = url
class GitAsyncRefOperation(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param detailed_status:
:type detailed_status: :class:`GitAsyncRefOperationDetail <azure.devops.v7_1.git.models.GitAsyncRefOperationDetail>`
:param parameters:
:type parameters: :class:`GitAsyncRefOperationParameters <azure.devops.v7_1.git.models.GitAsyncRefOperationParameters>`
:param status:
:type status: object
:param url: A URL that can be used to make further requests for status about the operation
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'detailed_status': {'key': 'detailedStatus', 'type': 'GitAsyncRefOperationDetail'},
'parameters': {'key': 'parameters', 'type': 'GitAsyncRefOperationParameters'},
'status': {'key': 'status', 'type': 'object'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, detailed_status=None, parameters=None, status=None, url=None):
super(GitAsyncRefOperation, self).__init__()
self._links = _links
self.detailed_status = detailed_status
self.parameters = parameters
self.status = status
self.url = url
class GitAsyncRefOperationDetail(Model):
"""
Information about the progress of a cherry pick or revert operation.
:param conflict: Indicates if there was a conflict generated when trying to cherry pick or revert the changes.
:type conflict: bool
:param current_commit_id: The current commit from the list of commits that are being cherry picked or reverted.
:type current_commit_id: str
:param failure_message: Detailed information about why the cherry pick or revert failed to complete.
:type failure_message: str
:param progress: A number between 0 and 1 indicating the percent complete of the operation.
:type progress: float
:param status: Provides a status code that indicates the reason the cherry pick or revert failed.
:type status: object
:param timedout: Indicates if the operation went beyond the maximum time allowed for a cherry pick or revert operation.
:type timedout: bool
"""
_attribute_map = {
'conflict': {'key': 'conflict', 'type': 'bool'},
'current_commit_id': {'key': 'currentCommitId', 'type': 'str'},
'failure_message': {'key': 'failureMessage', 'type': 'str'},
'progress': {'key': 'progress', 'type': 'float'},
'status': {'key': 'status', 'type': 'object'},
'timedout': {'key': 'timedout', 'type': 'bool'}
}
def __init__(self, conflict=None, current_commit_id=None, failure_message=None, progress=None, status=None, timedout=None):
super(GitAsyncRefOperationDetail, self).__init__()
self.conflict = conflict
self.current_commit_id = current_commit_id
self.failure_message = failure_message
self.progress = progress
self.status = status
self.timedout = timedout
class GitAsyncRefOperationParameters(Model):
"""
Parameters that are provided in the request body when requesting to cherry pick or revert.
:param generated_ref_name: Proposed target branch name for the cherry pick or revert operation.
:type generated_ref_name: str
:param onto_ref_name: The target branch for the cherry pick or revert operation.
:type onto_ref_name: str
:param repository: The git repository for the cherry pick or revert operation.
:type repository: :class:`GitRepository <azure.devops.v7_1.git.models.GitRepository>`
:param source: Details about the source of the cherry pick or revert operation (e.g. A pull request or a specific commit).
:type source: :class:`GitAsyncRefOperationSource <azure.devops.v7_1.git.models.GitAsyncRefOperationSource>`
"""
_attribute_map = {
'generated_ref_name': {'key': 'generatedRefName', 'type': 'str'},
'onto_ref_name': {'key': 'ontoRefName', 'type': 'str'},
'repository': {'key': 'repository', 'type': 'GitRepository'},
'source': {'key': 'source', 'type': 'GitAsyncRefOperationSource'}
}
def __init__(self, generated_ref_name=None, onto_ref_name=None, repository=None, source=None):
super(GitAsyncRefOperationParameters, self).__init__()
self.generated_ref_name = generated_ref_name
self.onto_ref_name = onto_ref_name
self.repository = repository
self.source = source
class GitAsyncRefOperationSource(Model):
"""
GitAsyncRefOperationSource specifies the pull request or list of commits to use when making a cherry pick and revert operation request. Only one should be provided.
:param commit_list: A list of commits to cherry pick or revert
:type commit_list: list of :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param pull_request_id: Id of the pull request to cherry pick or revert
:type pull_request_id: int
"""
_attribute_map = {
'commit_list': {'key': 'commitList', 'type': '[GitCommitRef]'},
'pull_request_id': {'key': 'pullRequestId', 'type': 'int'}
}
def __init__(self, commit_list=None, pull_request_id=None):
super(GitAsyncRefOperationSource, self).__init__()
self.commit_list = commit_list
self.pull_request_id = pull_request_id
class GitBlobRef(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param object_id: SHA1 hash of git object
:type object_id: str
:param size: Size of blob content (in bytes)
:type size: long
:param url:
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'object_id': {'key': 'objectId', 'type': 'str'},
'size': {'key': 'size', 'type': 'long'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, object_id=None, size=None, url=None):
super(GitBlobRef, self).__init__()
self._links = _links
self.object_id = object_id
self.size = size
self.url = url
class GitBranchStats(Model):
"""
Ahead and behind counts for a particular ref.
:param ahead_count: Number of commits ahead.
:type ahead_count: int
:param behind_count: Number of commits behind.
:type behind_count: int
:param commit: Current commit.
:type commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param is_base_version: True if this is the result for the base version.
:type is_base_version: bool
:param name: Name of the ref.
:type name: str
"""
_attribute_map = {
'ahead_count': {'key': 'aheadCount', 'type': 'int'},
'behind_count': {'key': 'behindCount', 'type': 'int'},
'commit': {'key': 'commit', 'type': 'GitCommitRef'},
'is_base_version': {'key': 'isBaseVersion', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, ahead_count=None, behind_count=None, commit=None, is_base_version=None, name=None):
super(GitBranchStats, self).__init__()
self.ahead_count = ahead_count
self.behind_count = behind_count
self.commit = commit
self.is_base_version = is_base_version
self.name = name
class GitCommitDiffs(Model):
"""
:param ahead_count:
:type ahead_count: int
:param all_changes_included:
:type all_changes_included: bool
:param base_commit:
:type base_commit: str
:param behind_count:
:type behind_count: int
:param common_commit:
:type common_commit: str
:param change_counts:
:type change_counts: dict
:param changes:
:type changes: list of :class:`object <azure.devops.v7_1.git.models.object>`
:param target_commit:
:type target_commit: str
"""
_attribute_map = {
'ahead_count': {'key': 'aheadCount', 'type': 'int'},
'all_changes_included': {'key': 'allChangesIncluded', 'type': 'bool'},
'base_commit': {'key': 'baseCommit', 'type': 'str'},
'behind_count': {'key': 'behindCount', 'type': 'int'},
'common_commit': {'key': 'commonCommit', 'type': 'str'},
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[object]'},
'target_commit': {'key': 'targetCommit', 'type': 'str'}
}
def __init__(self, ahead_count=None, all_changes_included=None, base_commit=None, behind_count=None, common_commit=None, change_counts=None, changes=None, target_commit=None):
super(GitCommitDiffs, self).__init__()
self.ahead_count = ahead_count
self.all_changes_included = all_changes_included
self.base_commit = base_commit
self.behind_count = behind_count
self.common_commit = common_commit
self.change_counts = change_counts
self.changes = changes
self.target_commit = target_commit
class GitCommitChanges(Model):
"""
:param change_counts:
:type change_counts: :class:`ChangeCountDictionary <azure.devops.v7_1.git.models.ChangeCountDictionary>`
:param changes:
:type changes: list of :class:`object <azure.devops.v7_1.git.models.object>`
"""
_attribute_map = {
'change_counts': {'key': 'changeCounts', 'type': 'ChangeCountDictionary'},
'changes': {'key': 'changes', 'type': '[object]'}
}
def __init__(self, change_counts=None, changes=None):
super(GitCommitChanges, self).__init__()
self.change_counts = change_counts
self.changes = changes
class GitCommitRef(Model):
"""
Provides properties that describe a Git commit and associated metadata.
:param _links: A collection of related REST reference links.
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param author: Author of the commit.
:type author: :class:`GitUserDate <azure.devops.v7_1.git.models.GitUserDate>`
:param comment: Comment or message of the commit.
:type comment: str
:param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message.
:type comment_truncated: bool
:param commit_id: ID (SHA-1) of the commit.
:type commit_id: str
:param committer: Committer of the commit.
:type committer: :class:`GitUserDate <azure.devops.v7_1.git.models.GitUserDate>`
:param commit_too_many_changes: Indicates that commit contains too many changes to be displayed
:type commit_too_many_changes: bool
:param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit.
:type change_counts: :class:`ChangeCountDictionary <azure.devops.v7_1.git.models.ChangeCountDictionary>`
:param changes: An enumeration of the changes included with the commit.
:type changes: list of :class:`object <azure.devops.v7_1.git.models.object>`
:param parents: An enumeration of the parent commit IDs for this commit.
:type parents: list of str
:param push: The push associated with this commit.
:type push: :class:`GitPushRef <azure.devops.v7_1.git.models.GitPushRef>`
:param remote_url: Remote URL path to the commit.
:type remote_url: str
:param statuses: A list of status metadata from services and extensions that may associate additional information to the commit.
:type statuses: list of :class:`GitStatus <azure.devops.v7_1.git.models.GitStatus>`
:param url: REST URL for this resource.
:type url: str
:param work_items: A list of workitems associated with this commit.
:type work_items: list of :class:`ResourceRef <azure.devops.v7_1.git.models.ResourceRef>`
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'GitUserDate'},
'comment': {'key': 'comment', 'type': 'str'},
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
'commit_id': {'key': 'commitId', 'type': 'str'},
'committer': {'key': 'committer', 'type': 'GitUserDate'},
'commit_too_many_changes': {'key': 'commitTooManyChanges', 'type': 'bool'},
'change_counts': {'key': 'changeCounts', 'type': 'ChangeCountDictionary'},
'changes': {'key': 'changes', 'type': '[object]'},
'parents': {'key': 'parents', 'type': '[str]'},
'push': {'key': 'push', 'type': 'GitPushRef'},
'remote_url': {'key': 'remoteUrl', 'type': 'str'},
'statuses': {'key': 'statuses', 'type': '[GitStatus]'},
'url': {'key': 'url', 'type': 'str'},
'work_items': {'key': 'workItems', 'type': '[ResourceRef]'}
}
def __init__(self, _links=None, author=None, comment=None, comment_truncated=None, commit_id=None, committer=None, commit_too_many_changes=None, change_counts=None, changes=None, parents=None, push=None, remote_url=None, statuses=None, url=None, work_items=None):
super(GitCommitRef, self).__init__()
self._links = _links
self.author = author
self.comment = comment
self.comment_truncated = comment_truncated
self.commit_id = commit_id
self.committer = committer
self.commit_too_many_changes = commit_too_many_changes
self.change_counts = change_counts
self.changes = changes
self.parents = parents
self.push = push
self.remote_url = remote_url
self.statuses = statuses
self.url = url
self.work_items = work_items
class GitConflict(Model):
"""
:param _links:
:type _links: :class:`ReferenceLinks <azure.devops.v7_1.git.models.ReferenceLinks>`
:param conflict_id:
:type conflict_id: int
:param conflict_path:
:type conflict_path: str
:param conflict_type:
:type conflict_type: object
:param merge_base_commit:
:type merge_base_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param merge_origin:
:type merge_origin: :class:`GitMergeOriginRef <azure.devops.v7_1.git.models.GitMergeOriginRef>`
:param merge_source_commit:
:type merge_source_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param merge_target_commit:
:type merge_target_commit: :class:`GitCommitRef <azure.devops.v7_1.git.models.GitCommitRef>`
:param resolution_error:
:type resolution_error: object
:param resolution_status:
:type resolution_status: object
:param resolved_by:
:type resolved_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param resolved_date:
:type resolved_date: datetime
:param url:
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'conflict_id': {'key': 'conflictId', 'type': 'int'},
'conflict_path': {'key': 'conflictPath', 'type': 'str'},
'conflict_type': {'key': 'conflictType', 'type': 'object'},
'merge_base_commit': {'key': 'mergeBaseCommit', 'type': 'GitCommitRef'},
'merge_origin': {'key': 'mergeOrigin', 'type': 'GitMergeOriginRef'},
'merge_source_commit': {'key': 'mergeSourceCommit', 'type': 'GitCommitRef'},
'merge_target_commit': {'key': 'mergeTargetCommit', 'type': 'GitCommitRef'},
'resolution_error': {'key': 'resolutionError', 'type': 'object'},
'resolution_status': {'key': 'resolutionStatus', 'type': 'object'},
'resolved_by': {'key': 'resolvedBy', 'type': 'IdentityRef'},
'resolved_date': {'key': 'resolvedDate', 'type': 'iso-8601'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, conflict_id=None, conflict_path=None, conflict_type=None, merge_base_commit=None, merge_origin=None, merge_source_commit=None, merge_target_commit=None, resolution_error=None, resolution_status=None, resolved_by=None, resolved_date=None, url=None):
super(GitConflict, self).__init__()
self._links = _links
self.conflict_id = conflict_id
self.conflict_path = conflict_path
self.conflict_type = conflict_type
self.merge_base_commit = merge_base_commit
self.merge_origin = merge_origin
self.merge_source_commit = merge_source_commit
self.merge_target_commit = merge_target_commit
self.resolution_error = resolution_error
self.resolution_status = resolution_status
self.resolved_by = resolved_by
self.resolved_date = resolved_date
self.url = url
class GitConflictUpdateResult(Model):
"""
:param conflict_id: Conflict ID that was provided by input
:type conflict_id: int
:param custom_message: Reason for failing
:type custom_message: str
:param updated_conflict: New state of the conflict after updating
:type updated_conflict: :class:`GitConflict <azure.devops.v7_1.git.models.GitConflict>`
:param update_status: Status of the update on the server
:type update_status: object
"""
_attribute_map = {
'conflict_id': {'key': 'conflictId', 'type': 'int'},
'custom_message': {'key': 'customMessage', 'type': 'str'},
'updated_conflict': {'key': 'updatedConflict', 'type': 'GitConflict'},
'update_status': {'key': 'updateStatus', 'type': 'object'}
}
def __init__(self, conflict_id=None, custom_message=None, updated_conflict=None, update_status=None):
super(GitConflictUpdateResult, self).__init__()
self.conflict_id = conflict_id
self.custom_message = custom_message
self.updated_conflict = updated_conflict
self.update_status = update_status
class GitDeletedRepository(Model):
"""
:param created_date:
:type created_date: datetime
:param deleted_by:
:type deleted_by: :class:`IdentityRef <azure.devops.v7_1.git.models.IdentityRef>`
:param deleted_date:
:type deleted_date: datetime
:param id:
:type id: str
:param name:
:type name: str
:param project:
:type project: :class:`TeamProjectReference <azure.devops.v7_1.git.models.TeamProjectReference>`
"""
_attribute_map = {
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'deleted_by': {'key': 'deletedBy', 'type': 'IdentityRef'},
'deleted_date': {'key': 'deletedDate', 'type': 'iso-8601'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'project': {'key': 'project', 'type': 'TeamProjectReference'}
}
def __init__(self, created_date=None, deleted_by=None, deleted_date=None, id=None, name=None, project=None):
super(GitDeletedRepository, self).__init__()
self.created_date = created_date
self.deleted_by = deleted_by
self.deleted_date = deleted_date
self.id = id
self.name = name
self.project = project
class GitFilePathsCollection(Model):
"""
:param commit_id:
:type commit_id: str
:param paths: