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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353
|
# --------------------------------------------------------------------------------------------
# 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 Consumer(Model):
"""
Defines the data contract of a consumer.
:param _links: Reference Links
:type _links: :class:`ReferenceLinks <azure.devops.v5_1.service_hooks.models.ReferenceLinks>`
:param actions: Gets this consumer's actions.
:type actions: list of :class:`ConsumerAction <azure.devops.v5_1.service_hooks.models.ConsumerAction>`
:param authentication_type: Gets or sets this consumer's authentication type.
:type authentication_type: object
:param description: Gets or sets this consumer's localized description.
:type description: str
:param external_configuration: Non-null only if subscriptions for this consumer are configured externally.
:type external_configuration: :class:`ExternalConfigurationDescriptor <azure.devops.v5_1.service_hooks.models.ExternalConfigurationDescriptor>`
:param id: Gets or sets this consumer's identifier.
:type id: str
:param image_url: Gets or sets this consumer's image URL, if any.
:type image_url: str
:param information_url: Gets or sets this consumer's information URL, if any.
:type information_url: str
:param input_descriptors: Gets or sets this consumer's input descriptors.
:type input_descriptors: list of :class:`InputDescriptor <azure.devops.v5_1.service_hooks.models.InputDescriptor>`
:param name: Gets or sets this consumer's localized name.
:type name: str
:param url: The url for this resource
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'actions': {'key': 'actions', 'type': '[ConsumerAction]'},
'authentication_type': {'key': 'authenticationType', 'type': 'object'},
'description': {'key': 'description', 'type': 'str'},
'external_configuration': {'key': 'externalConfiguration', 'type': 'ExternalConfigurationDescriptor'},
'id': {'key': 'id', 'type': 'str'},
'image_url': {'key': 'imageUrl', 'type': 'str'},
'information_url': {'key': 'informationUrl', 'type': 'str'},
'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, actions=None, authentication_type=None, description=None, external_configuration=None, id=None, image_url=None, information_url=None, input_descriptors=None, name=None, url=None):
super(Consumer, self).__init__()
self._links = _links
self.actions = actions
self.authentication_type = authentication_type
self.description = description
self.external_configuration = external_configuration
self.id = id
self.image_url = image_url
self.information_url = information_url
self.input_descriptors = input_descriptors
self.name = name
self.url = url
class ConsumerAction(Model):
"""
Defines the data contract of a consumer action.
:param _links: Reference Links
:type _links: :class:`ReferenceLinks <azure.devops.v5_1.service_hooks.models.ReferenceLinks>`
:param allow_resource_version_override: Gets or sets the flag indicating if resource version can be overridden when creating or editing a subscription.
:type allow_resource_version_override: bool
:param consumer_id: Gets or sets the identifier of the consumer to which this action belongs.
:type consumer_id: str
:param description: Gets or sets this action's localized description.
:type description: str
:param id: Gets or sets this action's identifier.
:type id: str
:param input_descriptors: Gets or sets this action's input descriptors.
:type input_descriptors: list of :class:`InputDescriptor <azure.devops.v5_1.service_hooks.models.InputDescriptor>`
:param name: Gets or sets this action's localized name.
:type name: str
:param supported_event_types: Gets or sets this action's supported event identifiers.
:type supported_event_types: list of str
:param supported_resource_versions: Gets or sets this action's supported resource versions.
:type supported_resource_versions: dict
:param url: The url for this resource
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'allow_resource_version_override': {'key': 'allowResourceVersionOverride', 'type': 'bool'},
'consumer_id': {'key': 'consumerId', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'},
'name': {'key': 'name', 'type': 'str'},
'supported_event_types': {'key': 'supportedEventTypes', 'type': '[str]'},
'supported_resource_versions': {'key': 'supportedResourceVersions', 'type': '{[str]}'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, allow_resource_version_override=None, consumer_id=None, description=None, id=None, input_descriptors=None, name=None, supported_event_types=None, supported_resource_versions=None, url=None):
super(ConsumerAction, self).__init__()
self._links = _links
self.allow_resource_version_override = allow_resource_version_override
self.consumer_id = consumer_id
self.description = description
self.id = id
self.input_descriptors = input_descriptors
self.name = name
self.supported_event_types = supported_event_types
self.supported_resource_versions = supported_resource_versions
self.url = url
class Event(Model):
"""
Encapsulates the properties of an event.
:param created_date: Gets or sets the UTC-based date and time that this event was created.
:type created_date: datetime
:param detailed_message: Gets or sets the detailed message associated with this event.
:type detailed_message: :class:`FormattedEventMessage <azure.devops.v5_1.service_hooks.models.FormattedEventMessage>`
:param event_type: Gets or sets the type of this event.
:type event_type: str
:param id: Gets or sets the unique identifier of this event.
:type id: str
:param message: Gets or sets the (brief) message associated with this event.
:type message: :class:`FormattedEventMessage <azure.devops.v5_1.service_hooks.models.FormattedEventMessage>`
:param publisher_id: Gets or sets the identifier of the publisher that raised this event.
:type publisher_id: str
:param resource: Gets or sets the data associated with this event.
:type resource: object
:param resource_containers: Gets or sets the resource containers.
:type resource_containers: dict
:param resource_version: Gets or sets the version of the data associated with this event.
:type resource_version: str
:param session_token: Gets or sets the Session Token that can be used in further interactions
:type session_token: :class:`SessionToken <azure.devops.v5_1.service_hooks.models.SessionToken>`
"""
_attribute_map = {
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'detailed_message': {'key': 'detailedMessage', 'type': 'FormattedEventMessage'},
'event_type': {'key': 'eventType', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'message': {'key': 'message', 'type': 'FormattedEventMessage'},
'publisher_id': {'key': 'publisherId', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'object'},
'resource_containers': {'key': 'resourceContainers', 'type': '{ResourceContainer}'},
'resource_version': {'key': 'resourceVersion', 'type': 'str'},
'session_token': {'key': 'sessionToken', 'type': 'SessionToken'}
}
def __init__(self, created_date=None, detailed_message=None, event_type=None, id=None, message=None, publisher_id=None, resource=None, resource_containers=None, resource_version=None, session_token=None):
super(Event, self).__init__()
self.created_date = created_date
self.detailed_message = detailed_message
self.event_type = event_type
self.id = id
self.message = message
self.publisher_id = publisher_id
self.resource = resource
self.resource_containers = resource_containers
self.resource_version = resource_version
self.session_token = session_token
class EventTypeDescriptor(Model):
"""
Describes a type of event
:param description: A localized description of the event type
:type description: str
:param id: A unique id for the event type
:type id: str
:param input_descriptors: Event-specific inputs
:type input_descriptors: list of :class:`InputDescriptor <azure.devops.v5_1.service_hooks.models.InputDescriptor>`
:param name: A localized friendly name for the event type
:type name: str
:param publisher_id: A unique id for the publisher of this event type
:type publisher_id: str
:param supported_resource_versions: Supported versions for the event's resource payloads.
:type supported_resource_versions: list of str
:param url: The url for this resource
:type url: str
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'},
'name': {'key': 'name', 'type': 'str'},
'publisher_id': {'key': 'publisherId', 'type': 'str'},
'supported_resource_versions': {'key': 'supportedResourceVersions', 'type': '[str]'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, description=None, id=None, input_descriptors=None, name=None, publisher_id=None, supported_resource_versions=None, url=None):
super(EventTypeDescriptor, self).__init__()
self.description = description
self.id = id
self.input_descriptors = input_descriptors
self.name = name
self.publisher_id = publisher_id
self.supported_resource_versions = supported_resource_versions
self.url = url
class ExternalConfigurationDescriptor(Model):
"""
Describes how to configure a subscription that is managed externally.
:param create_subscription_url: Url of the site to create this type of subscription.
:type create_subscription_url: str
:param edit_subscription_property_name: The name of an input property that contains the URL to edit a subscription.
:type edit_subscription_property_name: str
:param hosted_only: True if the external configuration applies only to hosted.
:type hosted_only: bool
"""
_attribute_map = {
'create_subscription_url': {'key': 'createSubscriptionUrl', 'type': 'str'},
'edit_subscription_property_name': {'key': 'editSubscriptionPropertyName', 'type': 'str'},
'hosted_only': {'key': 'hostedOnly', 'type': 'bool'}
}
def __init__(self, create_subscription_url=None, edit_subscription_property_name=None, hosted_only=None):
super(ExternalConfigurationDescriptor, self).__init__()
self.create_subscription_url = create_subscription_url
self.edit_subscription_property_name = edit_subscription_property_name
self.hosted_only = hosted_only
class FormattedEventMessage(Model):
"""
Provides different formats of an event message
:param html: Gets or sets the html format of the message
:type html: str
:param markdown: Gets or sets the markdown format of the message
:type markdown: str
:param text: Gets or sets the raw text of the message
:type text: str
"""
_attribute_map = {
'html': {'key': 'html', 'type': 'str'},
'markdown': {'key': 'markdown', 'type': 'str'},
'text': {'key': 'text', 'type': 'str'}
}
def __init__(self, html=None, markdown=None, text=None):
super(FormattedEventMessage, self).__init__()
self.html = html
self.markdown = markdown
self.text = text
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 InputDescriptor(Model):
"""
Describes an input for subscriptions.
:param dependency_input_ids: The ids of all inputs that the value of this input is dependent on.
:type dependency_input_ids: list of str
:param description: Description of what this input is used for
:type description: str
:param group_name: The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group.
:type group_name: str
:param has_dynamic_value_information: If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change.
:type has_dynamic_value_information: bool
:param id: Identifier for the subscription input
:type id: str
:param input_mode: Mode in which the value of this input should be entered
:type input_mode: object
:param is_confidential: Gets whether this input is confidential, such as for a password or application key
:type is_confidential: bool
:param name: Localized name which can be shown as a label for the subscription input
:type name: str
:param properties: Custom properties for the input which can be used by the service provider
:type properties: dict
:param type: Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional.
:type type: str
:param use_in_default_description: Gets whether this input is included in the default generated action description.
:type use_in_default_description: bool
:param validation: Information to use to validate this input's value
:type validation: :class:`InputValidation <azure.devops.v5_1.microsoft._visual_studio._services._web_api.models.InputValidation>`
:param value_hint: A hint for input value. It can be used in the UI as the input placeholder.
:type value_hint: str
:param values: Information about possible values for this input
:type values: :class:`InputValues <azure.devops.v5_1.microsoft._visual_studio._services._web_api.models.InputValues>`
"""
_attribute_map = {
'dependency_input_ids': {'key': 'dependencyInputIds', 'type': '[str]'},
'description': {'key': 'description', 'type': 'str'},
'group_name': {'key': 'groupName', 'type': 'str'},
'has_dynamic_value_information': {'key': 'hasDynamicValueInformation', 'type': 'bool'},
'id': {'key': 'id', 'type': 'str'},
'input_mode': {'key': 'inputMode', 'type': 'object'},
'is_confidential': {'key': 'isConfidential', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'properties': {'key': 'properties', 'type': '{object}'},
'type': {'key': 'type', 'type': 'str'},
'use_in_default_description': {'key': 'useInDefaultDescription', 'type': 'bool'},
'validation': {'key': 'validation', 'type': 'InputValidation'},
'value_hint': {'key': 'valueHint', 'type': 'str'},
'values': {'key': 'values', 'type': 'InputValues'}
}
def __init__(self, dependency_input_ids=None, description=None, group_name=None, has_dynamic_value_information=None, id=None, input_mode=None, is_confidential=None, name=None, properties=None, type=None, use_in_default_description=None, validation=None, value_hint=None, values=None):
super(InputDescriptor, self).__init__()
self.dependency_input_ids = dependency_input_ids
self.description = description
self.group_name = group_name
self.has_dynamic_value_information = has_dynamic_value_information
self.id = id
self.input_mode = input_mode
self.is_confidential = is_confidential
self.name = name
self.properties = properties
self.type = type
self.use_in_default_description = use_in_default_description
self.validation = validation
self.value_hint = value_hint
self.values = values
class InputFilter(Model):
"""
Defines a filter for subscription inputs. The filter matches a set of inputs if any (one or more) of the groups evaluates to true.
:param conditions: Groups of input filter expressions. This filter matches a set of inputs if any (one or more) of the groups evaluates to true.
:type conditions: list of :class:`InputFilterCondition <azure.devops.v5_1.microsoft._visual_studio._services._web_api.models.InputFilterCondition>`
"""
_attribute_map = {
'conditions': {'key': 'conditions', 'type': '[InputFilterCondition]'}
}
def __init__(self, conditions=None):
super(InputFilter, self).__init__()
self.conditions = conditions
class InputFilterCondition(Model):
"""
An expression which can be applied to filter a list of subscription inputs
:param case_sensitive: Whether or not to do a case sensitive match
:type case_sensitive: bool
:param input_id: The Id of the input to filter on
:type input_id: str
:param input_value: The "expected" input value to compare with the actual input value
:type input_value: str
:param operator: The operator applied between the expected and actual input value
:type operator: object
"""
_attribute_map = {
'case_sensitive': {'key': 'caseSensitive', 'type': 'bool'},
'input_id': {'key': 'inputId', 'type': 'str'},
'input_value': {'key': 'inputValue', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'object'}
}
def __init__(self, case_sensitive=None, input_id=None, input_value=None, operator=None):
super(InputFilterCondition, self).__init__()
self.case_sensitive = case_sensitive
self.input_id = input_id
self.input_value = input_value
self.operator = operator
class InputValidation(Model):
"""
Describes what values are valid for a subscription input
:param data_type: Gets or sets the data data type to validate.
:type data_type: object
:param is_required: Gets or sets if this is a required field.
:type is_required: bool
:param max_length: Gets or sets the maximum length of this descriptor.
:type max_length: int
:param max_value: Gets or sets the minimum value for this descriptor.
:type max_value: decimal
:param min_length: Gets or sets the minimum length of this descriptor.
:type min_length: int
:param min_value: Gets or sets the minimum value for this descriptor.
:type min_value: decimal
:param pattern: Gets or sets the pattern to validate.
:type pattern: str
:param pattern_mismatch_error_message: Gets or sets the error on pattern mismatch.
:type pattern_mismatch_error_message: str
"""
_attribute_map = {
'data_type': {'key': 'dataType', 'type': 'object'},
'is_required': {'key': 'isRequired', 'type': 'bool'},
'max_length': {'key': 'maxLength', 'type': 'int'},
'max_value': {'key': 'maxValue', 'type': 'decimal'},
'min_length': {'key': 'minLength', 'type': 'int'},
'min_value': {'key': 'minValue', 'type': 'decimal'},
'pattern': {'key': 'pattern', 'type': 'str'},
'pattern_mismatch_error_message': {'key': 'patternMismatchErrorMessage', 'type': 'str'}
}
def __init__(self, data_type=None, is_required=None, max_length=None, max_value=None, min_length=None, min_value=None, pattern=None, pattern_mismatch_error_message=None):
super(InputValidation, self).__init__()
self.data_type = data_type
self.is_required = is_required
self.max_length = max_length
self.max_value = max_value
self.min_length = min_length
self.min_value = min_value
self.pattern = pattern
self.pattern_mismatch_error_message = pattern_mismatch_error_message
class InputValue(Model):
"""
Information about a single value for an input
:param data: Any other data about this input
:type data: dict
:param display_value: The text to show for the display of this value
:type display_value: str
:param value: The value to store for this input
:type value: str
"""
_attribute_map = {
'data': {'key': 'data', 'type': '{object}'},
'display_value': {'key': 'displayValue', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'}
}
def __init__(self, data=None, display_value=None, value=None):
super(InputValue, self).__init__()
self.data = data
self.display_value = display_value
self.value = value
class InputValues(Model):
"""
Information about the possible/allowed values for a given subscription input
:param default_value: The default value to use for this input
:type default_value: str
:param error: Errors encountered while computing dynamic values.
:type error: :class:`InputValuesError <azure.devops.v5_1.microsoft._visual_studio._services._web_api.models.InputValuesError>`
:param input_id: The id of the input
:type input_id: str
:param is_disabled: Should this input be disabled
:type is_disabled: bool
:param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False)
:type is_limited_to_possible_values: bool
:param is_read_only: Should this input be made read-only
:type is_read_only: bool
:param possible_values: Possible values that this input can take
:type possible_values: list of :class:`InputValue <azure.devops.v5_1.microsoft._visual_studio._services._web_api.models.InputValue>`
"""
_attribute_map = {
'default_value': {'key': 'defaultValue', 'type': 'str'},
'error': {'key': 'error', 'type': 'InputValuesError'},
'input_id': {'key': 'inputId', 'type': 'str'},
'is_disabled': {'key': 'isDisabled', 'type': 'bool'},
'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'},
'is_read_only': {'key': 'isReadOnly', 'type': 'bool'},
'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'}
}
def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None):
super(InputValues, self).__init__()
self.default_value = default_value
self.error = error
self.input_id = input_id
self.is_disabled = is_disabled
self.is_limited_to_possible_values = is_limited_to_possible_values
self.is_read_only = is_read_only
self.possible_values = possible_values
class InputValuesError(Model):
"""
Error information related to a subscription input value.
:param message: The error message.
:type message: str
"""
_attribute_map = {
'message': {'key': 'message', 'type': 'str'}
}
def __init__(self, message=None):
super(InputValuesError, self).__init__()
self.message = message
class InputValuesQuery(Model):
"""
:param current_values:
:type current_values: dict
:param input_values: The input values to return on input, and the result from the consumer on output.
:type input_values: list of :class:`InputValues <azure.devops.v5_1.microsoft._visual_studio._services._web_api.models.InputValues>`
:param resource: Subscription containing information about the publisher/consumer and the current input values
:type resource: object
"""
_attribute_map = {
'current_values': {'key': 'currentValues', 'type': '{str}'},
'input_values': {'key': 'inputValues', 'type': '[InputValues]'},
'resource': {'key': 'resource', 'type': 'object'}
}
def __init__(self, current_values=None, input_values=None, resource=None):
super(InputValuesQuery, self).__init__()
self.current_values = current_values
self.input_values = input_values
self.resource = resource
class Notification(Model):
"""
Defines the data contract of the result of processing an event for a subscription.
:param created_date: Gets or sets date and time that this result was created.
:type created_date: datetime
:param details: Details about this notification (if available)
:type details: :class:`NotificationDetails <azure.devops.v5_1.service_hooks.models.NotificationDetails>`
:param event_id: The event id associated with this notification
:type event_id: str
:param id: The notification id
:type id: int
:param modified_date: Gets or sets date and time that this result was last modified.
:type modified_date: datetime
:param result: Result of the notification
:type result: object
:param status: Status of the notification
:type status: object
:param subscriber_id: The subscriber Id associated with this notification. This is the last identity who touched in the subscription. In case of test notifications it can be the tester if the subscription is not created yet.
:type subscriber_id: str
:param subscription_id: The subscription id associated with this notification
:type subscription_id: str
"""
_attribute_map = {
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'details': {'key': 'details', 'type': 'NotificationDetails'},
'event_id': {'key': 'eventId', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'},
'result': {'key': 'result', 'type': 'object'},
'status': {'key': 'status', 'type': 'object'},
'subscriber_id': {'key': 'subscriberId', 'type': 'str'},
'subscription_id': {'key': 'subscriptionId', 'type': 'str'}
}
def __init__(self, created_date=None, details=None, event_id=None, id=None, modified_date=None, result=None, status=None, subscriber_id=None, subscription_id=None):
super(Notification, self).__init__()
self.created_date = created_date
self.details = details
self.event_id = event_id
self.id = id
self.modified_date = modified_date
self.result = result
self.status = status
self.subscriber_id = subscriber_id
self.subscription_id = subscription_id
class NotificationDetails(Model):
"""
Defines the data contract of notification details.
:param completed_date: Gets or sets the time that this notification was completed (response received from the consumer)
:type completed_date: datetime
:param consumer_action_id: Gets or sets this notification detail's consumer action identifier.
:type consumer_action_id: str
:param consumer_id: Gets or sets this notification detail's consumer identifier.
:type consumer_id: str
:param consumer_inputs: Gets or sets this notification detail's consumer inputs.
:type consumer_inputs: dict
:param dequeued_date: Gets or sets the time that this notification was dequeued for processing
:type dequeued_date: datetime
:param error_detail: Gets or sets this notification detail's error detail.
:type error_detail: str
:param error_message: Gets or sets this notification detail's error message.
:type error_message: str
:param event: Gets or sets this notification detail's event content.
:type event: :class:`Event <azure.devops.v5_1.service_hooks.models.Event>`
:param event_type: Gets or sets this notification detail's event type.
:type event_type: str
:param processed_date: Gets or sets the time that this notification was finished processing (just before the request is sent to the consumer)
:type processed_date: datetime
:param publisher_id: Gets or sets this notification detail's publisher identifier.
:type publisher_id: str
:param publisher_inputs: Gets or sets this notification detail's publisher inputs.
:type publisher_inputs: dict
:param queued_date: Gets or sets the time that this notification was queued (created)
:type queued_date: datetime
:param request: Gets or sets this notification detail's request.
:type request: str
:param request_attempts: Number of requests attempted to be sent to the consumer
:type request_attempts: int
:param request_duration: Duration of the request to the consumer in seconds
:type request_duration: float
:param response: Gets or sets this notification detail's response.
:type response: str
"""
_attribute_map = {
'completed_date': {'key': 'completedDate', 'type': 'iso-8601'},
'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'},
'consumer_id': {'key': 'consumerId', 'type': 'str'},
'consumer_inputs': {'key': 'consumerInputs', 'type': '{str}'},
'dequeued_date': {'key': 'dequeuedDate', 'type': 'iso-8601'},
'error_detail': {'key': 'errorDetail', 'type': 'str'},
'error_message': {'key': 'errorMessage', 'type': 'str'},
'event': {'key': 'event', 'type': 'Event'},
'event_type': {'key': 'eventType', 'type': 'str'},
'processed_date': {'key': 'processedDate', 'type': 'iso-8601'},
'publisher_id': {'key': 'publisherId', 'type': 'str'},
'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'},
'queued_date': {'key': 'queuedDate', 'type': 'iso-8601'},
'request': {'key': 'request', 'type': 'str'},
'request_attempts': {'key': 'requestAttempts', 'type': 'int'},
'request_duration': {'key': 'requestDuration', 'type': 'float'},
'response': {'key': 'response', 'type': 'str'}
}
def __init__(self, completed_date=None, consumer_action_id=None, consumer_id=None, consumer_inputs=None, dequeued_date=None, error_detail=None, error_message=None, event=None, event_type=None, processed_date=None, publisher_id=None, publisher_inputs=None, queued_date=None, request=None, request_attempts=None, request_duration=None, response=None):
super(NotificationDetails, self).__init__()
self.completed_date = completed_date
self.consumer_action_id = consumer_action_id
self.consumer_id = consumer_id
self.consumer_inputs = consumer_inputs
self.dequeued_date = dequeued_date
self.error_detail = error_detail
self.error_message = error_message
self.event = event
self.event_type = event_type
self.processed_date = processed_date
self.publisher_id = publisher_id
self.publisher_inputs = publisher_inputs
self.queued_date = queued_date
self.request = request
self.request_attempts = request_attempts
self.request_duration = request_duration
self.response = response
class NotificationResultsSummaryDetail(Model):
"""
Summary of a particular result and count.
:param notification_count: Count of notification sent out with a matching result.
:type notification_count: int
:param result: Result of the notification
:type result: object
"""
_attribute_map = {
'notification_count': {'key': 'notificationCount', 'type': 'int'},
'result': {'key': 'result', 'type': 'object'}
}
def __init__(self, notification_count=None, result=None):
super(NotificationResultsSummaryDetail, self).__init__()
self.notification_count = notification_count
self.result = result
class NotificationsQuery(Model):
"""
Defines a query for service hook notifications.
:param associated_subscriptions: The subscriptions associated with the notifications returned from the query
:type associated_subscriptions: list of :class:`Subscription <azure.devops.v5_1.service_hooks.models.Subscription>`
:param include_details: If true, we will return all notification history for the query provided; otherwise, the summary is returned.
:type include_details: bool
:param max_created_date: Optional maximum date at which the notification was created
:type max_created_date: datetime
:param max_results: Optional maximum number of overall results to include
:type max_results: int
:param max_results_per_subscription: Optional maximum number of results for each subscription. Only takes effect when a list of subscription ids is supplied in the query.
:type max_results_per_subscription: int
:param min_created_date: Optional minimum date at which the notification was created
:type min_created_date: datetime
:param publisher_id: Optional publisher id to restrict the results to
:type publisher_id: str
:param results: Results from the query
:type results: list of :class:`Notification <azure.devops.v5_1.service_hooks.models.Notification>`
:param result_type: Optional notification result type to filter results to
:type result_type: object
:param status: Optional notification status to filter results to
:type status: object
:param subscription_ids: Optional list of subscription ids to restrict the results to
:type subscription_ids: list of str
:param summary: Summary of notifications - the count of each result type (success, fail, ..).
:type summary: list of :class:`NotificationSummary <azure.devops.v5_1.service_hooks.models.NotificationSummary>`
"""
_attribute_map = {
'associated_subscriptions': {'key': 'associatedSubscriptions', 'type': '[Subscription]'},
'include_details': {'key': 'includeDetails', 'type': 'bool'},
'max_created_date': {'key': 'maxCreatedDate', 'type': 'iso-8601'},
'max_results': {'key': 'maxResults', 'type': 'int'},
'max_results_per_subscription': {'key': 'maxResultsPerSubscription', 'type': 'int'},
'min_created_date': {'key': 'minCreatedDate', 'type': 'iso-8601'},
'publisher_id': {'key': 'publisherId', 'type': 'str'},
'results': {'key': 'results', 'type': '[Notification]'},
'result_type': {'key': 'resultType', 'type': 'object'},
'status': {'key': 'status', 'type': 'object'},
'subscription_ids': {'key': 'subscriptionIds', 'type': '[str]'},
'summary': {'key': 'summary', 'type': '[NotificationSummary]'}
}
def __init__(self, associated_subscriptions=None, include_details=None, max_created_date=None, max_results=None, max_results_per_subscription=None, min_created_date=None, publisher_id=None, results=None, result_type=None, status=None, subscription_ids=None, summary=None):
super(NotificationsQuery, self).__init__()
self.associated_subscriptions = associated_subscriptions
self.include_details = include_details
self.max_created_date = max_created_date
self.max_results = max_results
self.max_results_per_subscription = max_results_per_subscription
self.min_created_date = min_created_date
self.publisher_id = publisher_id
self.results = results
self.result_type = result_type
self.status = status
self.subscription_ids = subscription_ids
self.summary = summary
class NotificationSummary(Model):
"""
Summary of the notifications for a subscription.
:param results: The notification results for this particular subscription.
:type results: list of :class:`NotificationResultsSummaryDetail <azure.devops.v5_1.service_hooks.models.NotificationResultsSummaryDetail>`
:param subscription_id: The subscription id associated with this notification
:type subscription_id: str
"""
_attribute_map = {
'results': {'key': 'results', 'type': '[NotificationResultsSummaryDetail]'},
'subscription_id': {'key': 'subscriptionId', 'type': 'str'}
}
def __init__(self, results=None, subscription_id=None):
super(NotificationSummary, self).__init__()
self.results = results
self.subscription_id = subscription_id
class Publisher(Model):
"""
Defines the data contract of an event publisher.
:param _links: Reference Links
:type _links: :class:`ReferenceLinks <azure.devops.v5_1.service_hooks.models.ReferenceLinks>`
:param description: Gets this publisher's localized description.
:type description: str
:param id: Gets this publisher's identifier.
:type id: str
:param input_descriptors: Publisher-specific inputs
:type input_descriptors: list of :class:`InputDescriptor <azure.devops.v5_1.service_hooks.models.InputDescriptor>`
:param name: Gets this publisher's localized name.
:type name: str
:param service_instance_type: The service instance type of the first party publisher.
:type service_instance_type: str
:param supported_events: Gets this publisher's supported event types.
:type supported_events: list of :class:`EventTypeDescriptor <azure.devops.v5_1.service_hooks.models.EventTypeDescriptor>`
:param url: The url for this resource
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'description': {'key': 'description', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'},
'name': {'key': 'name', 'type': 'str'},
'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'},
'supported_events': {'key': 'supportedEvents', 'type': '[EventTypeDescriptor]'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, description=None, id=None, input_descriptors=None, name=None, service_instance_type=None, supported_events=None, url=None):
super(Publisher, self).__init__()
self._links = _links
self.description = description
self.id = id
self.input_descriptors = input_descriptors
self.name = name
self.service_instance_type = service_instance_type
self.supported_events = supported_events
self.url = url
class PublisherEvent(Model):
"""
Wrapper around an event which is being published
:param diagnostics: Add key/value pairs which will be stored with a published notification in the SH service DB. This key/value pairs are for diagnostic purposes only and will have not effect on the delivery of a notificaton.
:type diagnostics: dict
:param event: The event being published
:type event: :class:`Event <azure.devops.v5_1.service_hooks.models.Event>`
:param is_filtered_event: Gets or sets flag for filtered events
:type is_filtered_event: bool
:param notification_data: Additional data that needs to be sent as part of notification to complement the Resource data in the Event
:type notification_data: dict
:param other_resource_versions: Gets or sets the array of older supported resource versions.
:type other_resource_versions: list of :class:`VersionedResource <azure.devops.v5_1.service_hooks.models.VersionedResource>`
:param publisher_input_filters: Optional publisher-input filters which restricts the set of subscriptions which are triggered by the event
:type publisher_input_filters: list of :class:`InputFilter <azure.devops.v5_1.service_hooks.models.InputFilter>`
:param subscription: Gets or sets matched hooks subscription which caused this event.
:type subscription: :class:`Subscription <azure.devops.v5_1.service_hooks.models.Subscription>`
"""
_attribute_map = {
'diagnostics': {'key': 'diagnostics', 'type': '{str}'},
'event': {'key': 'event', 'type': 'Event'},
'is_filtered_event': {'key': 'isFilteredEvent', 'type': 'bool'},
'notification_data': {'key': 'notificationData', 'type': '{str}'},
'other_resource_versions': {'key': 'otherResourceVersions', 'type': '[VersionedResource]'},
'publisher_input_filters': {'key': 'publisherInputFilters', 'type': '[InputFilter]'},
'subscription': {'key': 'subscription', 'type': 'Subscription'}
}
def __init__(self, diagnostics=None, event=None, is_filtered_event=None, notification_data=None, other_resource_versions=None, publisher_input_filters=None, subscription=None):
super(PublisherEvent, self).__init__()
self.diagnostics = diagnostics
self.event = event
self.is_filtered_event = is_filtered_event
self.notification_data = notification_data
self.other_resource_versions = other_resource_versions
self.publisher_input_filters = publisher_input_filters
self.subscription = subscription
class PublishersQuery(Model):
"""
Defines a query for service hook publishers.
:param publisher_ids: Optional list of publisher ids to restrict the results to
:type publisher_ids: list of str
:param publisher_inputs: Filter for publisher inputs
:type publisher_inputs: dict
:param results: Results from the query
:type results: list of :class:`Publisher <azure.devops.v5_1.service_hooks.models.Publisher>`
"""
_attribute_map = {
'publisher_ids': {'key': 'publisherIds', 'type': '[str]'},
'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'},
'results': {'key': 'results', 'type': '[Publisher]'}
}
def __init__(self, publisher_ids=None, publisher_inputs=None, results=None):
super(PublishersQuery, self).__init__()
self.publisher_ids = publisher_ids
self.publisher_inputs = publisher_inputs
self.results = results
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 ResourceContainer(Model):
"""
The base class for all resource containers, i.e. Account, Collection, Project
:param base_url: Gets or sets the container's base URL, i.e. the URL of the host (collection, application, or deployment) containing the container resource.
:type base_url: str
:param id: Gets or sets the container's specific Id.
:type id: str
:param name: Gets or sets the container's name.
:type name: str
:param url: Gets or sets the container's REST API URL.
:type url: str
"""
_attribute_map = {
'base_url': {'key': 'baseUrl', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, base_url=None, id=None, name=None, url=None):
super(ResourceContainer, self).__init__()
self.base_url = base_url
self.id = id
self.name = name
self.url = url
class SessionToken(Model):
"""
Represents a session token to be attached in Events for Consumer actions that need it.
:param error: The error message in case of error
:type error: str
:param token: The access token
:type token: str
:param valid_to: The expiration date in UTC
:type valid_to: datetime
"""
_attribute_map = {
'error': {'key': 'error', 'type': 'str'},
'token': {'key': 'token', 'type': 'str'},
'valid_to': {'key': 'validTo', 'type': 'iso-8601'}
}
def __init__(self, error=None, token=None, valid_to=None):
super(SessionToken, self).__init__()
self.error = error
self.token = token
self.valid_to = valid_to
class Subscription(Model):
"""
Encapsulates an event subscription.
:param _links: Reference Links
:type _links: :class:`ReferenceLinks <azure.devops.v5_1.service_hooks.models.ReferenceLinks>`
:param action_description:
:type action_description: str
:param consumer_action_id:
:type consumer_action_id: str
:param consumer_id:
:type consumer_id: str
:param consumer_inputs: Consumer input values
:type consumer_inputs: dict
:param created_by:
:type created_by: :class:`IdentityRef <azure.devops.v5_1.service_hooks.models.IdentityRef>`
:param created_date:
:type created_date: datetime
:param event_description:
:type event_description: str
:param event_type:
:type event_type: str
:param id:
:type id: str
:param modified_by:
:type modified_by: :class:`IdentityRef <azure.devops.v5_1.service_hooks.models.IdentityRef>`
:param modified_date:
:type modified_date: datetime
:param probation_retries:
:type probation_retries: str
:param publisher_id:
:type publisher_id: str
:param publisher_inputs: Publisher input values
:type publisher_inputs: dict
:param resource_version:
:type resource_version: str
:param status:
:type status: object
:param subscriber:
:type subscriber: :class:`IdentityRef <azure.devops.v5_1.service_hooks.models.IdentityRef>`
:param url:
:type url: str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'action_description': {'key': 'actionDescription', 'type': 'str'},
'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'},
'consumer_id': {'key': 'consumerId', 'type': 'str'},
'consumer_inputs': {'key': 'consumerInputs', 'type': '{str}'},
'created_by': {'key': 'createdBy', 'type': 'IdentityRef'},
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
'event_description': {'key': 'eventDescription', 'type': 'str'},
'event_type': {'key': 'eventType', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'},
'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'},
'probation_retries': {'key': 'probationRetries', 'type': 'str'},
'publisher_id': {'key': 'publisherId', 'type': 'str'},
'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'},
'resource_version': {'key': 'resourceVersion', 'type': 'str'},
'status': {'key': 'status', 'type': 'object'},
'subscriber': {'key': 'subscriber', 'type': 'IdentityRef'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, _links=None, action_description=None, consumer_action_id=None, consumer_id=None, consumer_inputs=None, created_by=None, created_date=None, event_description=None, event_type=None, id=None, modified_by=None, modified_date=None, probation_retries=None, publisher_id=None, publisher_inputs=None, resource_version=None, status=None, subscriber=None, url=None):
super(Subscription, self).__init__()
self._links = _links
self.action_description = action_description
self.consumer_action_id = consumer_action_id
self.consumer_id = consumer_id
self.consumer_inputs = consumer_inputs
self.created_by = created_by
self.created_date = created_date
self.event_description = event_description
self.event_type = event_type
self.id = id
self.modified_by = modified_by
self.modified_date = modified_date
self.probation_retries = probation_retries
self.publisher_id = publisher_id
self.publisher_inputs = publisher_inputs
self.resource_version = resource_version
self.status = status
self.subscriber = subscriber
self.url = url
class SubscriptionDiagnostics(Model):
"""
Contains all the diagonstics settings for a subscription.
:param delivery_results: Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions.
:type delivery_results: :class:`SubscriptionTracing <azure.devops.v5_1.microsoft._visual_studio._services._notifications._web_api.models.SubscriptionTracing>`
:param delivery_tracing: Diagnostics settings for troubleshooting notification delivery.
:type delivery_tracing: :class:`SubscriptionTracing <azure.devops.v5_1.microsoft._visual_studio._services._notifications._web_api.models.SubscriptionTracing>`
:param evaluation_tracing: Diagnostics settings for troubleshooting event matching.
:type evaluation_tracing: :class:`SubscriptionTracing <azure.devops.v5_1.microsoft._visual_studio._services._notifications._web_api.models.SubscriptionTracing>`
"""
_attribute_map = {
'delivery_results': {'key': 'deliveryResults', 'type': 'SubscriptionTracing'},
'delivery_tracing': {'key': 'deliveryTracing', 'type': 'SubscriptionTracing'},
'evaluation_tracing': {'key': 'evaluationTracing', 'type': 'SubscriptionTracing'}
}
def __init__(self, delivery_results=None, delivery_tracing=None, evaluation_tracing=None):
super(SubscriptionDiagnostics, self).__init__()
self.delivery_results = delivery_results
self.delivery_tracing = delivery_tracing
self.evaluation_tracing = evaluation_tracing
class SubscriptionInputValuesQuery(Model):
"""
Query for obtaining information about the possible/allowed values for one or more subscription inputs
:param input_values: The input values to return on input, and the result from the consumer on output.
:type input_values: list of :class:`InputValues <azure.devops.v5_1.service_hooks.models.InputValues>`
:param scope: The scope at which the properties to query belong
:type scope: object
:param subscription: Subscription containing information about the publisher/consumer and the current input values
:type subscription: :class:`Subscription <azure.devops.v5_1.service_hooks.models.Subscription>`
"""
_attribute_map = {
'input_values': {'key': 'inputValues', 'type': '[InputValues]'},
'scope': {'key': 'scope', 'type': 'object'},
'subscription': {'key': 'subscription', 'type': 'Subscription'}
}
def __init__(self, input_values=None, scope=None, subscription=None):
super(SubscriptionInputValuesQuery, self).__init__()
self.input_values = input_values
self.scope = scope
self.subscription = subscription
class SubscriptionsQuery(Model):
"""
Defines a query for service hook subscriptions.
:param consumer_action_id: Optional consumer action id to restrict the results to (null for any)
:type consumer_action_id: str
:param consumer_id: Optional consumer id to restrict the results to (null for any)
:type consumer_id: str
:param consumer_input_filters: Filter for subscription consumer inputs
:type consumer_input_filters: list of :class:`InputFilter <azure.devops.v5_1.service_hooks.models.InputFilter>`
:param event_type: Optional event type id to restrict the results to (null for any)
:type event_type: str
:param publisher_id: Optional publisher id to restrict the results to (null for any)
:type publisher_id: str
:param publisher_input_filters: Filter for subscription publisher inputs
:type publisher_input_filters: list of :class:`InputFilter <azure.devops.v5_1.service_hooks.models.InputFilter>`
:param results: Results from the query
:type results: list of :class:`Subscription <azure.devops.v5_1.service_hooks.models.Subscription>`
:param subscriber_id: Optional subscriber filter.
:type subscriber_id: str
"""
_attribute_map = {
'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'},
'consumer_id': {'key': 'consumerId', 'type': 'str'},
'consumer_input_filters': {'key': 'consumerInputFilters', 'type': '[InputFilter]'},
'event_type': {'key': 'eventType', 'type': 'str'},
'publisher_id': {'key': 'publisherId', 'type': 'str'},
'publisher_input_filters': {'key': 'publisherInputFilters', 'type': '[InputFilter]'},
'results': {'key': 'results', 'type': '[Subscription]'},
'subscriber_id': {'key': 'subscriberId', 'type': 'str'}
}
def __init__(self, consumer_action_id=None, consumer_id=None, consumer_input_filters=None, event_type=None, publisher_id=None, publisher_input_filters=None, results=None, subscriber_id=None):
super(SubscriptionsQuery, self).__init__()
self.consumer_action_id = consumer_action_id
self.consumer_id = consumer_id
self.consumer_input_filters = consumer_input_filters
self.event_type = event_type
self.publisher_id = publisher_id
self.publisher_input_filters = publisher_input_filters
self.results = results
self.subscriber_id = subscriber_id
class SubscriptionTracing(Model):
"""
Data controlling a single diagnostic setting for a subscription.
:param enabled: Indicates whether the diagnostic tracing is enabled or not.
:type enabled: bool
:param end_date: Trace until the specified end date.
:type end_date: datetime
:param max_traced_entries: The maximum number of result details to trace.
:type max_traced_entries: int
:param start_date: The date and time tracing started.
:type start_date: datetime
:param traced_entries: Trace until remaining count reaches 0.
:type traced_entries: int
"""
_attribute_map = {
'enabled': {'key': 'enabled', 'type': 'bool'},
'end_date': {'key': 'endDate', 'type': 'iso-8601'},
'max_traced_entries': {'key': 'maxTracedEntries', 'type': 'int'},
'start_date': {'key': 'startDate', 'type': 'iso-8601'},
'traced_entries': {'key': 'tracedEntries', 'type': 'int'}
}
def __init__(self, enabled=None, end_date=None, max_traced_entries=None, start_date=None, traced_entries=None):
super(SubscriptionTracing, self).__init__()
self.enabled = enabled
self.end_date = end_date
self.max_traced_entries = max_traced_entries
self.start_date = start_date
self.traced_entries = traced_entries
class UpdateSubscripitonDiagnosticsParameters(Model):
"""
Parameters to update diagnostics settings for a subscription.
:param delivery_results: Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions.
:type delivery_results: :class:`UpdateSubscripitonTracingParameters <azure.devops.v5_1.microsoft._visual_studio._services._notifications._web_api.models.UpdateSubscripitonTracingParameters>`
:param delivery_tracing: Diagnostics settings for troubleshooting notification delivery.
:type delivery_tracing: :class:`UpdateSubscripitonTracingParameters <azure.devops.v5_1.microsoft._visual_studio._services._notifications._web_api.models.UpdateSubscripitonTracingParameters>`
:param evaluation_tracing: Diagnostics settings for troubleshooting event matching.
:type evaluation_tracing: :class:`UpdateSubscripitonTracingParameters <azure.devops.v5_1.microsoft._visual_studio._services._notifications._web_api.models.UpdateSubscripitonTracingParameters>`
"""
_attribute_map = {
'delivery_results': {'key': 'deliveryResults', 'type': 'UpdateSubscripitonTracingParameters'},
'delivery_tracing': {'key': 'deliveryTracing', 'type': 'UpdateSubscripitonTracingParameters'},
'evaluation_tracing': {'key': 'evaluationTracing', 'type': 'UpdateSubscripitonTracingParameters'}
}
def __init__(self, delivery_results=None, delivery_tracing=None, evaluation_tracing=None):
super(UpdateSubscripitonDiagnosticsParameters, self).__init__()
self.delivery_results = delivery_results
self.delivery_tracing = delivery_tracing
self.evaluation_tracing = evaluation_tracing
class UpdateSubscripitonTracingParameters(Model):
"""
Parameters to update a specific diagnostic setting.
:param enabled: Indicates whether to enable to disable the diagnostic tracing.
:type enabled: bool
"""
_attribute_map = {
'enabled': {'key': 'enabled', 'type': 'bool'}
}
def __init__(self, enabled=None):
super(UpdateSubscripitonTracingParameters, self).__init__()
self.enabled = enabled
class VersionedResource(Model):
"""
Encapsulates the resource version and its data or reference to the compatible version. Only one of the two last fields should be not null.
:param compatible_with: Gets or sets the reference to the compatible version.
:type compatible_with: str
:param resource: Gets or sets the resource data.
:type resource: object
:param resource_version: Gets or sets the version of the resource data.
:type resource_version: str
"""
_attribute_map = {
'compatible_with': {'key': 'compatibleWith', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'object'},
'resource_version': {'key': 'resourceVersion', 'type': 'str'}
}
def __init__(self, compatible_with=None, resource=None, resource_version=None):
super(VersionedResource, self).__init__()
self.compatible_with = compatible_with
self.resource = resource
self.resource_version = resource_version
__all__ = [
'Consumer',
'ConsumerAction',
'Event',
'EventTypeDescriptor',
'ExternalConfigurationDescriptor',
'FormattedEventMessage',
'GraphSubjectBase',
'IdentityRef',
'InputDescriptor',
'InputFilter',
'InputFilterCondition',
'InputValidation',
'InputValue',
'InputValues',
'InputValuesError',
'InputValuesQuery',
'Notification',
'NotificationDetails',
'NotificationResultsSummaryDetail',
'NotificationsQuery',
'NotificationSummary',
'Publisher',
'PublisherEvent',
'PublishersQuery',
'ReferenceLinks',
'ResourceContainer',
'SessionToken',
'Subscription',
'SubscriptionDiagnostics',
'SubscriptionInputValuesQuery',
'SubscriptionsQuery',
'SubscriptionTracing',
'UpdateSubscripitonDiagnosticsParameters',
'UpdateSubscripitonTracingParameters',
'VersionedResource',
]
|