18
18
from azure .core .serialization import _datetime_as_isostr # pylint:disable=protected-access
19
19
20
20
from ._models import (
21
- JobQueue as JobQueueGenerated ,
22
21
RouterWorker as RouterWorkerGenerated ,
23
22
RouterJob as RouterJobGenerated ,
24
23
JSON ,
@@ -48,12 +47,18 @@ class RouterJob(RouterJobGenerated):
48
47
def __init__ (
49
48
self ,
50
49
* ,
51
- notes : Dict [Union [str , datetime ], str ] = None ,
50
+ channel_reference : Optional [str ] = None ,
51
+ channel_id : Optional [str ] = None ,
52
+ classification_policy_id : Optional [str ] = None ,
53
+ queue_id : Optional [str ] = None ,
54
+ priority : Optional [int ] = None ,
55
+ disposition_code : Optional [str ] = None ,
56
+ requested_worker_selectors : Optional [List ["_models.WorkerSelector" ]] = None ,
52
57
labels : Optional [Dict [str , Union [int , float , str , bool , None ]]] = None ,
53
58
tags : Optional [Dict [str , Union [int , float , str , bool , None ]]] = None ,
59
+ notes : Dict [Union [str , datetime ], str ] = None ,
54
60
** kwargs
55
61
):
56
-
57
62
if notes :
58
63
for k in [key for key in notes .keys ()]:
59
64
v : str = notes [k ]
@@ -66,23 +71,44 @@ def __init__(
66
71
datetime_as_str : str = _datetime_as_isostr (k ) # pylint:disable=protected-access
67
72
notes .pop (k )
68
73
notes [datetime_as_str ] = v
69
- super ().__init__ (notes = notes , labels = labels , tags = tags , ** kwargs )
74
+ super ().__init__ (
75
+ channel_reference = channel_reference ,
76
+ channel_id = channel_id ,
77
+ classification_policy_id = classification_policy_id ,
78
+ queue_id = queue_id ,
79
+ priority = priority ,
80
+ disposition_code = disposition_code ,
81
+ requested_worker_selectors = requested_worker_selectors ,
82
+ notes = notes ,
83
+ labels = labels ,
84
+ tags = tags ,
85
+ ** kwargs )
70
86
71
87
72
88
class RouterWorker (RouterWorkerGenerated ):
73
89
def __init__ (
74
90
self ,
75
91
* ,
76
92
queue_assignments : Optional [Dict [str , Union [QueueAssignment , JSON , None ]]] = None ,
93
+ total_capacity : Optional [int ] = None ,
77
94
labels : Optional [Dict [str , Union [int , float , str , bool , None ]]] = None ,
78
95
tags : Optional [Dict [str , Union [int , float , str , bool , None ]]] = None ,
96
+ channel_configurations : Optional [Dict [str , "_models.ChannelConfiguration" ]] = None ,
97
+ available_for_offers : Optional [bool ] = None ,
79
98
** kwargs
80
99
):
81
100
if queue_assignments :
82
101
for k , v in queue_assignments .items ():
83
102
if not isinstance (v , (MutableMapping , JSON , type (None ))):
84
103
raise ValueError ("tags only accept 'QueueAssignment', 'JSON' and 'NoneType' as values." )
85
- super ().__init__ (queue_assignments = queue_assignments , labels = labels , tags = tags , ** kwargs )
104
+ super ().__init__ (
105
+ queue_assignments = queue_assignments ,
106
+ total_capacity = total_capacity ,
107
+ labels = labels ,
108
+ tags = tags ,
109
+ channel_configurations = channel_configurations ,
110
+ available_for_offers = available_for_offers ,
111
+ ** kwargs )
86
112
87
113
88
114
__all__ : List [str ] = [
0 commit comments