File size: 36,735 Bytes
1b7e88c |
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 |
import pprint
import re # noqa: F401
import six
from omagent_core.engine.http.models.workflow_task import WorkflowTask
from omagent_core.engine.http.models.task_result import TaskResult
from omagent_core.engine.http.models.task_result_status import TaskResultStatus
class Task(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
"task_type": "str",
"status": "str",
"input_data": "dict(str, object)",
"reference_task_name": "str",
"retry_count": "int",
"seq": "int",
"correlation_id": "str",
"poll_count": "int",
"task_def_name": "str",
"scheduled_time": "int",
"start_time": "int",
"end_time": "int",
"update_time": "int",
"start_delay_in_seconds": "int",
"retried_task_id": "str",
"retried": "bool",
"executed": "bool",
"callback_from_worker": "bool",
"response_timeout_seconds": "int",
"workflow_instance_id": "str",
"workflow_type": "str",
"task_id": "str",
"reason_for_incompletion": "str",
"callback_after_seconds": "int",
"worker_id": "str",
"output_data": "dict(str, object)",
"workflow_task": "WorkflowTask",
"domain": "str",
"rate_limit_per_frequency": "int",
"rate_limit_frequency_in_seconds": "int",
"external_input_payload_storage_path": "str",
"external_output_payload_storage_path": "str",
"workflow_priority": "int",
"execution_name_space": "str",
"isolation_group_id": "str",
"iteration": "int",
"sub_workflow_id": "str",
"subworkflow_changed": "bool",
"loop_over_task": "bool",
"task_definition": "TaskDef",
"queue_wait_time": "int",
"biz_meta": "str",
"callback_url": "str",
"conversation_info": "dict(str, object)",
}
attribute_map = {
"task_type": "taskType",
"status": "status",
"input_data": "inputData",
"reference_task_name": "referenceTaskName",
"retry_count": "retryCount",
"seq": "seq",
"correlation_id": "correlationId",
"poll_count": "pollCount",
"task_def_name": "taskDefName",
"scheduled_time": "scheduledTime",
"start_time": "startTime",
"end_time": "endTime",
"update_time": "updateTime",
"start_delay_in_seconds": "startDelayInSeconds",
"retried_task_id": "retriedTaskId",
"retried": "retried",
"executed": "executed",
"callback_from_worker": "callbackFromWorker",
"response_timeout_seconds": "responseTimeoutSeconds",
"workflow_instance_id": "workflowInstanceId",
"workflow_type": "workflowType",
"task_id": "taskId",
"reason_for_incompletion": "reasonForIncompletion",
"callback_after_seconds": "callbackAfterSeconds",
"worker_id": "workerId",
"output_data": "outputData",
"workflow_task": "workflowTask",
"domain": "domain",
"rate_limit_per_frequency": "rateLimitPerFrequency",
"rate_limit_frequency_in_seconds": "rateLimitFrequencyInSeconds",
"external_input_payload_storage_path": "externalInputPayloadStoragePath",
"external_output_payload_storage_path": "externalOutputPayloadStoragePath",
"workflow_priority": "workflowPriority",
"execution_name_space": "executionNameSpace",
"isolation_group_id": "isolationGroupId",
"iteration": "iteration",
"sub_workflow_id": "subWorkflowId",
"subworkflow_changed": "subworkflowChanged",
"loop_over_task": "loopOverTask",
"task_definition": "taskDefinition",
"queue_wait_time": "queueWaitTime",
"biz_meta": "bizMeta",
"callback_url": "callbackUrl",
"conversation_info": "conversationInfo",
}
def __init__(
self,
task_type=None,
status=None,
input_data=None,
reference_task_name=None,
retry_count=None,
seq=None,
correlation_id=None,
poll_count=None,
task_def_name=None,
scheduled_time=None,
start_time=None,
end_time=None,
update_time=None,
start_delay_in_seconds=None,
retried_task_id=None,
retried=None,
executed=None,
callback_from_worker=None,
response_timeout_seconds=None,
workflow_instance_id=None,
workflow_type=None,
task_id=None,
reason_for_incompletion=None,
callback_after_seconds=None,
worker_id=None,
output_data=None,
workflow_task=None,
domain=None,
rate_limit_per_frequency=None,
rate_limit_frequency_in_seconds=None,
external_input_payload_storage_path=None,
external_output_payload_storage_path=None,
workflow_priority=None,
execution_name_space=None,
isolation_group_id=None,
iteration=None,
sub_workflow_id=None,
subworkflow_changed=None,
loop_over_task=None,
task_definition=None,
queue_wait_time=None,
biz_meta=None,
callback_url=None,
conversation_info=None,
): # noqa: E501
"""Task - a model defined in Swagger""" # noqa: E501
self._task_type = None
self._status = None
self._input_data = None
self._reference_task_name = None
self._retry_count = None
self._seq = None
self._correlation_id = None
self._poll_count = None
self._task_def_name = None
self._scheduled_time = None
self._start_time = None
self._end_time = None
self._update_time = None
self._start_delay_in_seconds = None
self._retried_task_id = None
self._retried = None
self._executed = None
self._callback_from_worker = None
self._response_timeout_seconds = None
self._workflow_instance_id = None
self._workflow_type = None
self._task_id = None
self._reason_for_incompletion = None
self._callback_after_seconds = None
self._worker_id = None
self._output_data = None
self._workflow_task = None
self._domain = None
self._rate_limit_per_frequency = None
self._rate_limit_frequency_in_seconds = None
self._external_input_payload_storage_path = None
self._external_output_payload_storage_path = None
self._workflow_priority = None
self._execution_name_space = None
self._isolation_group_id = None
self._iteration = None
self._sub_workflow_id = None
self._subworkflow_changed = None
self._loop_over_task = None
self._task_definition = None
self._queue_wait_time = None
self.discriminator = None
self.biz_meta = None
self.callback_url = None
self.conversation_info = None
if task_type is not None:
self.task_type = task_type
if status is not None:
self.status = status
if input_data is not None:
self.input_data = input_data
if reference_task_name is not None:
self.reference_task_name = reference_task_name
if retry_count is not None:
self.retry_count = retry_count
if seq is not None:
self.seq = seq
if correlation_id is not None:
self.correlation_id = correlation_id
if poll_count is not None:
self.poll_count = poll_count
if task_def_name is not None:
self.task_def_name = task_def_name
if scheduled_time is not None:
self.scheduled_time = scheduled_time
if start_time is not None:
self.start_time = start_time
if end_time is not None:
self.end_time = end_time
if update_time is not None:
self.update_time = update_time
if start_delay_in_seconds is not None:
self.start_delay_in_seconds = start_delay_in_seconds
if retried_task_id is not None:
self.retried_task_id = retried_task_id
if retried is not None:
self.retried = retried
if executed is not None:
self.executed = executed
if callback_from_worker is not None:
self.callback_from_worker = callback_from_worker
if response_timeout_seconds is not None:
self.response_timeout_seconds = response_timeout_seconds
if workflow_instance_id is not None:
self.workflow_instance_id = workflow_instance_id
if workflow_type is not None:
self.workflow_type = workflow_type
if task_id is not None:
self.task_id = task_id
if reason_for_incompletion is not None:
self.reason_for_incompletion = reason_for_incompletion
if callback_after_seconds is not None:
self.callback_after_seconds = callback_after_seconds
if worker_id is not None:
self.worker_id = worker_id
if output_data is not None:
self.output_data = output_data
if workflow_task is not None:
self.workflow_task = workflow_task
if domain is not None:
self.domain = domain
if rate_limit_per_frequency is not None:
self.rate_limit_per_frequency = rate_limit_per_frequency
if rate_limit_frequency_in_seconds is not None:
self.rate_limit_frequency_in_seconds = rate_limit_frequency_in_seconds
if external_input_payload_storage_path is not None:
self.external_input_payload_storage_path = (
external_input_payload_storage_path
)
if external_output_payload_storage_path is not None:
self.external_output_payload_storage_path = (
external_output_payload_storage_path
)
if workflow_priority is not None:
self.workflow_priority = workflow_priority
if execution_name_space is not None:
self.execution_name_space = execution_name_space
if isolation_group_id is not None:
self.isolation_group_id = isolation_group_id
if iteration is not None:
self.iteration = iteration
if sub_workflow_id is not None:
self.sub_workflow_id = sub_workflow_id
if subworkflow_changed is not None:
self.subworkflow_changed = subworkflow_changed
if loop_over_task is not None:
self.loop_over_task = loop_over_task
if task_definition is not None:
self.task_definition = task_definition
if queue_wait_time is not None:
self.queue_wait_time = queue_wait_time
if biz_meta is not None:
self.biz_meta = biz_meta
if callback_url is not None:
self.callback_url = callback_url
if conversation_info is not None:
self.conversation_info = conversation_info
@property
def task_type(self):
"""Gets the task_type of this Task. # noqa: E501
:return: The task_type of this Task. # noqa: E501
:rtype: str
"""
return self._task_type
@task_type.setter
def task_type(self, task_type):
"""Sets the task_type of this Task.
:param task_type: The task_type of this Task. # noqa: E501
:type: str
"""
self._task_type = task_type
@property
def status(self):
"""Gets the status of this Task. # noqa: E501
:return: The status of this Task. # noqa: E501
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""Sets the status of this Task.
:param status: The status of this Task. # noqa: E501
:type: str
"""
allowed_values = [
"IN_PROGRESS",
"CANCELED",
"FAILED",
"FAILED_WITH_TERMINAL_ERROR",
"COMPLETED",
"COMPLETED_WITH_ERRORS",
"SCHEDULED",
"TIMED_OUT",
"SKIPPED",
] # noqa: E501
if status not in allowed_values:
raise ValueError(
"Invalid value for `status` ({0}), must be one of {1}".format( # noqa: E501
status, allowed_values
)
)
self._status = status
@property
def input_data(self):
"""Gets the input_data of this Task. # noqa: E501
:return: The input_data of this Task. # noqa: E501
:rtype: dict(str, object)
"""
return self._input_data
@input_data.setter
def input_data(self, input_data):
"""Sets the input_data of this Task.
:param input_data: The input_data of this Task. # noqa: E501
:type: dict(str, object)
"""
self._input_data = input_data
@property
def reference_task_name(self):
"""Gets the reference_task_name of this Task. # noqa: E501
:return: The reference_task_name of this Task. # noqa: E501
:rtype: str
"""
return self._reference_task_name
@reference_task_name.setter
def reference_task_name(self, reference_task_name):
"""Sets the reference_task_name of this Task.
:param reference_task_name: The reference_task_name of this Task. # noqa: E501
:type: str
"""
self._reference_task_name = reference_task_name
@property
def retry_count(self):
"""Gets the retry_count of this Task. # noqa: E501
:return: The retry_count of this Task. # noqa: E501
:rtype: int
"""
return self._retry_count
@retry_count.setter
def retry_count(self, retry_count):
"""Sets the retry_count of this Task.
:param retry_count: The retry_count of this Task. # noqa: E501
:type: int
"""
self._retry_count = retry_count
@property
def seq(self):
"""Gets the seq of this Task. # noqa: E501
:return: The seq of this Task. # noqa: E501
:rtype: int
"""
return self._seq
@seq.setter
def seq(self, seq):
"""Sets the seq of this Task.
:param seq: The seq of this Task. # noqa: E501
:type: int
"""
self._seq = seq
@property
def correlation_id(self):
"""Gets the correlation_id of this Task. # noqa: E501
:return: The correlation_id of this Task. # noqa: E501
:rtype: str
"""
return self._correlation_id
@correlation_id.setter
def correlation_id(self, correlation_id):
"""Sets the correlation_id of this Task.
:param correlation_id: The correlation_id of this Task. # noqa: E501
:type: str
"""
self._correlation_id = correlation_id
@property
def poll_count(self):
"""Gets the poll_count of this Task. # noqa: E501
:return: The poll_count of this Task. # noqa: E501
:rtype: int
"""
return self._poll_count
@poll_count.setter
def poll_count(self, poll_count):
"""Sets the poll_count of this Task.
:param poll_count: The poll_count of this Task. # noqa: E501
:type: int
"""
self._poll_count = poll_count
@property
def task_def_name(self):
"""Gets the task_def_name of this Task. # noqa: E501
:return: The task_def_name of this Task. # noqa: E501
:rtype: str
"""
return self._task_def_name
@task_def_name.setter
def task_def_name(self, task_def_name):
"""Sets the task_def_name of this Task.
:param task_def_name: The task_def_name of this Task. # noqa: E501
:type: str
"""
self._task_def_name = task_def_name
@property
def scheduled_time(self):
"""Gets the scheduled_time of this Task. # noqa: E501
:return: The scheduled_time of this Task. # noqa: E501
:rtype: int
"""
return self._scheduled_time
@scheduled_time.setter
def scheduled_time(self, scheduled_time):
"""Sets the scheduled_time of this Task.
:param scheduled_time: The scheduled_time of this Task. # noqa: E501
:type: int
"""
self._scheduled_time = scheduled_time
@property
def start_time(self):
"""Gets the start_time of this Task. # noqa: E501
:return: The start_time of this Task. # noqa: E501
:rtype: int
"""
return self._start_time
@start_time.setter
def start_time(self, start_time):
"""Sets the start_time of this Task.
:param start_time: The start_time of this Task. # noqa: E501
:type: int
"""
self._start_time = start_time
@property
def end_time(self):
"""Gets the end_time of this Task. # noqa: E501
:return: The end_time of this Task. # noqa: E501
:rtype: int
"""
return self._end_time
@end_time.setter
def end_time(self, end_time):
"""Sets the end_time of this Task.
:param end_time: The end_time of this Task. # noqa: E501
:type: int
"""
self._end_time = end_time
@property
def update_time(self):
"""Gets the update_time of this Task. # noqa: E501
:return: The update_time of this Task. # noqa: E501
:rtype: int
"""
return self._update_time
@update_time.setter
def update_time(self, update_time):
"""Sets the update_time of this Task.
:param update_time: The update_time of this Task. # noqa: E501
:type: int
"""
self._update_time = update_time
@property
def start_delay_in_seconds(self):
"""Gets the start_delay_in_seconds of this Task. # noqa: E501
:return: The start_delay_in_seconds of this Task. # noqa: E501
:rtype: int
"""
return self._start_delay_in_seconds
@start_delay_in_seconds.setter
def start_delay_in_seconds(self, start_delay_in_seconds):
"""Sets the start_delay_in_seconds of this Task.
:param start_delay_in_seconds: The start_delay_in_seconds of this Task. # noqa: E501
:type: int
"""
self._start_delay_in_seconds = start_delay_in_seconds
@property
def retried_task_id(self):
"""Gets the retried_task_id of this Task. # noqa: E501
:return: The retried_task_id of this Task. # noqa: E501
:rtype: str
"""
return self._retried_task_id
@retried_task_id.setter
def retried_task_id(self, retried_task_id):
"""Sets the retried_task_id of this Task.
:param retried_task_id: The retried_task_id of this Task. # noqa: E501
:type: str
"""
self._retried_task_id = retried_task_id
@property
def retried(self):
"""Gets the retried of this Task. # noqa: E501
:return: The retried of this Task. # noqa: E501
:rtype: bool
"""
return self._retried
@retried.setter
def retried(self, retried):
"""Sets the retried of this Task.
:param retried: The retried of this Task. # noqa: E501
:type: bool
"""
self._retried = retried
@property
def executed(self):
"""Gets the executed of this Task. # noqa: E501
:return: The executed of this Task. # noqa: E501
:rtype: bool
"""
return self._executed
@executed.setter
def executed(self, executed):
"""Sets the executed of this Task.
:param executed: The executed of this Task. # noqa: E501
:type: bool
"""
self._executed = executed
@property
def callback_from_worker(self):
"""Gets the callback_from_worker of this Task. # noqa: E501
:return: The callback_from_worker of this Task. # noqa: E501
:rtype: bool
"""
return self._callback_from_worker
@callback_from_worker.setter
def callback_from_worker(self, callback_from_worker):
"""Sets the callback_from_worker of this Task.
:param callback_from_worker: The callback_from_worker of this Task. # noqa: E501
:type: bool
"""
self._callback_from_worker = callback_from_worker
@property
def response_timeout_seconds(self):
"""Gets the response_timeout_seconds of this Task. # noqa: E501
:return: The response_timeout_seconds of this Task. # noqa: E501
:rtype: int
"""
return self._response_timeout_seconds
@response_timeout_seconds.setter
def response_timeout_seconds(self, response_timeout_seconds):
"""Sets the response_timeout_seconds of this Task.
:param response_timeout_seconds: The response_timeout_seconds of this Task. # noqa: E501
:type: int
"""
self._response_timeout_seconds = response_timeout_seconds
@property
def workflow_instance_id(self):
"""Gets the workflow_instance_id of this Task. # noqa: E501
:return: The workflow_instance_id of this Task. # noqa: E501
:rtype: str
"""
return self._workflow_instance_id
@workflow_instance_id.setter
def workflow_instance_id(self, workflow_instance_id):
"""Sets the workflow_instance_id of this Task.
:param workflow_instance_id: The workflow_instance_id of this Task. # noqa: E501
:type: str
"""
self._workflow_instance_id = workflow_instance_id
@property
def workflow_type(self):
"""Gets the workflow_type of this Task. # noqa: E501
:return: The workflow_type of this Task. # noqa: E501
:rtype: str
"""
return self._workflow_type
@workflow_type.setter
def workflow_type(self, workflow_type):
"""Sets the workflow_type of this Task.
:param workflow_type: The workflow_type of this Task. # noqa: E501
:type: str
"""
self._workflow_type = workflow_type
@property
def task_id(self):
"""Gets the task_id of this Task. # noqa: E501
:return: The task_id of this Task. # noqa: E501
:rtype: str
"""
return self._task_id
@task_id.setter
def task_id(self, task_id):
"""Sets the task_id of this Task.
:param task_id: The task_id of this Task. # noqa: E501
:type: str
"""
self._task_id = task_id
@property
def reason_for_incompletion(self):
"""Gets the reason_for_incompletion of this Task. # noqa: E501
:return: The reason_for_incompletion of this Task. # noqa: E501
:rtype: str
"""
return self._reason_for_incompletion
@reason_for_incompletion.setter
def reason_for_incompletion(self, reason_for_incompletion):
"""Sets the reason_for_incompletion of this Task.
:param reason_for_incompletion: The reason_for_incompletion of this Task. # noqa: E501
:type: str
"""
self._reason_for_incompletion = reason_for_incompletion
@property
def callback_after_seconds(self):
"""Gets the callback_after_seconds of this Task. # noqa: E501
:return: The callback_after_seconds of this Task. # noqa: E501
:rtype: int
"""
return self._callback_after_seconds
@callback_after_seconds.setter
def callback_after_seconds(self, callback_after_seconds):
"""Sets the callback_after_seconds of this Task.
:param callback_after_seconds: The callback_after_seconds of this Task. # noqa: E501
:type: int
"""
self._callback_after_seconds = callback_after_seconds
@property
def worker_id(self):
"""Gets the worker_id of this Task. # noqa: E501
:return: The worker_id of this Task. # noqa: E501
:rtype: str
"""
return self._worker_id
@worker_id.setter
def worker_id(self, worker_id):
"""Sets the worker_id of this Task.
:param worker_id: The worker_id of this Task. # noqa: E501
:type: str
"""
self._worker_id = worker_id
@property
def output_data(self):
"""Gets the output_data of this Task. # noqa: E501
:return: The output_data of this Task. # noqa: E501
:rtype: dict(str, object)
"""
return self._output_data
@output_data.setter
def output_data(self, output_data):
"""Sets the output_data of this Task.
:param output_data: The output_data of this Task. # noqa: E501
:type: dict(str, object)
"""
self._output_data = output_data
@property
def workflow_task(self) -> WorkflowTask:
"""Gets the workflow_task of this Task. # noqa: E501
:return: The workflow_task of this Task. # noqa: E501
:rtype: WorkflowTask
"""
return self._workflow_task
@workflow_task.setter
def workflow_task(self, workflow_task):
"""Sets the workflow_task of this Task.
:param workflow_task: The workflow_task of this Task. # noqa: E501
:type: WorkflowTask
"""
self._workflow_task = workflow_task
@property
def domain(self):
"""Gets the domain of this Task. # noqa: E501
:return: The domain of this Task. # noqa: E501
:rtype: str
"""
return self._domain
@domain.setter
def domain(self, domain):
"""Sets the domain of this Task.
:param domain: The domain of this Task. # noqa: E501
:type: str
"""
self._domain = domain
@property
def rate_limit_per_frequency(self):
"""Gets the rate_limit_per_frequency of this Task. # noqa: E501
:return: The rate_limit_per_frequency of this Task. # noqa: E501
:rtype: int
"""
return self._rate_limit_per_frequency
@rate_limit_per_frequency.setter
def rate_limit_per_frequency(self, rate_limit_per_frequency):
"""Sets the rate_limit_per_frequency of this Task.
:param rate_limit_per_frequency: The rate_limit_per_frequency of this Task. # noqa: E501
:type: int
"""
self._rate_limit_per_frequency = rate_limit_per_frequency
@property
def rate_limit_frequency_in_seconds(self):
"""Gets the rate_limit_frequency_in_seconds of this Task. # noqa: E501
:return: The rate_limit_frequency_in_seconds of this Task. # noqa: E501
:rtype: int
"""
return self._rate_limit_frequency_in_seconds
@rate_limit_frequency_in_seconds.setter
def rate_limit_frequency_in_seconds(self, rate_limit_frequency_in_seconds):
"""Sets the rate_limit_frequency_in_seconds of this Task.
:param rate_limit_frequency_in_seconds: The rate_limit_frequency_in_seconds of this Task. # noqa: E501
:type: int
"""
self._rate_limit_frequency_in_seconds = rate_limit_frequency_in_seconds
@property
def external_input_payload_storage_path(self):
"""Gets the external_input_payload_storage_path of this Task. # noqa: E501
:return: The external_input_payload_storage_path of this Task. # noqa: E501
:rtype: str
"""
return self._external_input_payload_storage_path
@external_input_payload_storage_path.setter
def external_input_payload_storage_path(self, external_input_payload_storage_path):
"""Sets the external_input_payload_storage_path of this Task.
:param external_input_payload_storage_path: The external_input_payload_storage_path of this Task. # noqa: E501
:type: str
"""
self._external_input_payload_storage_path = external_input_payload_storage_path
@property
def external_output_payload_storage_path(self):
"""Gets the external_output_payload_storage_path of this Task. # noqa: E501
:return: The external_output_payload_storage_path of this Task. # noqa: E501
:rtype: str
"""
return self._external_output_payload_storage_path
@external_output_payload_storage_path.setter
def external_output_payload_storage_path(
self, external_output_payload_storage_path
):
"""Sets the external_output_payload_storage_path of this Task.
:param external_output_payload_storage_path: The external_output_payload_storage_path of this Task. # noqa: E501
:type: str
"""
self._external_output_payload_storage_path = (
external_output_payload_storage_path
)
@property
def workflow_priority(self):
"""Gets the workflow_priority of this Task. # noqa: E501
:return: The workflow_priority of this Task. # noqa: E501
:rtype: int
"""
return self._workflow_priority
@workflow_priority.setter
def workflow_priority(self, workflow_priority):
"""Sets the workflow_priority of this Task.
:param workflow_priority: The workflow_priority of this Task. # noqa: E501
:type: int
"""
self._workflow_priority = workflow_priority
@property
def execution_name_space(self):
"""Gets the execution_name_space of this Task. # noqa: E501
:return: The execution_name_space of this Task. # noqa: E501
:rtype: str
"""
return self._execution_name_space
@execution_name_space.setter
def execution_name_space(self, execution_name_space):
"""Sets the execution_name_space of this Task.
:param execution_name_space: The execution_name_space of this Task. # noqa: E501
:type: str
"""
self._execution_name_space = execution_name_space
@property
def isolation_group_id(self):
"""Gets the isolation_group_id of this Task. # noqa: E501
:return: The isolation_group_id of this Task. # noqa: E501
:rtype: str
"""
return self._isolation_group_id
@isolation_group_id.setter
def isolation_group_id(self, isolation_group_id):
"""Sets the isolation_group_id of this Task.
:param isolation_group_id: The isolation_group_id of this Task. # noqa: E501
:type: str
"""
self._isolation_group_id = isolation_group_id
@property
def iteration(self):
"""Gets the iteration of this Task. # noqa: E501
:return: The iteration of this Task. # noqa: E501
:rtype: int
"""
return self._iteration
@iteration.setter
def iteration(self, iteration):
"""Sets the iteration of this Task.
:param iteration: The iteration of this Task. # noqa: E501
:type: int
"""
self._iteration = iteration
@property
def sub_workflow_id(self):
"""Gets the sub_workflow_id of this Task. # noqa: E501
:return: The sub_workflow_id of this Task. # noqa: E501
:rtype: str
"""
return self._sub_workflow_id
@sub_workflow_id.setter
def sub_workflow_id(self, sub_workflow_id):
"""Sets the sub_workflow_id of this Task.
:param sub_workflow_id: The sub_workflow_id of this Task. # noqa: E501
:type: str
"""
self._sub_workflow_id = sub_workflow_id
@property
def subworkflow_changed(self):
"""Gets the subworkflow_changed of this Task. # noqa: E501
:return: The subworkflow_changed of this Task. # noqa: E501
:rtype: bool
"""
return self._subworkflow_changed
@subworkflow_changed.setter
def subworkflow_changed(self, subworkflow_changed):
"""Sets the subworkflow_changed of this Task.
:param subworkflow_changed: The subworkflow_changed of this Task. # noqa: E501
:type: bool
"""
self._subworkflow_changed = subworkflow_changed
@property
def loop_over_task(self):
"""Gets the loop_over_task of this Task. # noqa: E501
:return: The loop_over_task of this Task. # noqa: E501
:rtype: bool
"""
return self._loop_over_task
@loop_over_task.setter
def loop_over_task(self, loop_over_task):
"""Sets the loop_over_task of this Task.
:param loop_over_task: The loop_over_task of this Task. # noqa: E501
:type: bool
"""
self._loop_over_task = loop_over_task
@property
def task_definition(self):
"""Gets the task_definition of this Task. # noqa: E501
:return: The task_definition of this Task. # noqa: E501
:rtype: TaskDef
"""
return self._task_definition
@task_definition.setter
def task_definition(self, task_definition):
"""Sets the task_definition of this Task.
:param task_definition: The task_definition of this Task. # noqa: E501
:type: TaskDef
"""
self._task_definition = task_definition
@property
def queue_wait_time(self):
"""Gets the queue_wait_time of this Task. # noqa: E501
:return: The queue_wait_time of this Task. # noqa: E501
:rtype: int
"""
return self._queue_wait_time
@queue_wait_time.setter
def queue_wait_time(self, queue_wait_time):
"""Sets the queue_wait_time of this Task.
:param queue_wait_time: The queue_wait_time of this Task. # noqa: E501
:type: int
"""
self._queue_wait_time = queue_wait_time
@property
def biz_meta(self):
return self._biz_meta
@biz_meta.setter
def biz_meta(self, biz_meta):
self._biz_meta = biz_meta
@property
def callback_url(self):
return self._callback_url
@callback_url.setter
def callback_url(self, callback_url):
self._callback_url = callback_url
@property
def conversation_info(self):
return self._conversation_info
@conversation_info.setter
def conversation_info(self, conversation_info):
self._conversation_info = conversation_info
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(
map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)
)
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(
map(
lambda item: (
(item[0], item[1].to_dict())
if hasattr(item[1], "to_dict")
else item
),
value.items(),
)
)
else:
result[attr] = value
if issubclass(Task, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, Task):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
def to_task_result(
self, status: TaskResultStatus = TaskResultStatus.COMPLETED
) -> TaskResult:
task_result = TaskResult(
task_id=self.task_id,
workflow_instance_id=self.workflow_instance_id,
worker_id=self.worker_id,
status=status,
)
return task_result
|