17
17
# python 2 and python 3 compatibility library
18
18
import six
19
19
20
+ from phrasetms_client .models import (
21
+ PageDtoAdditionalWorkflowStepDto ,
22
+ AdditionalWorkflowStepDto ,
23
+ )
20
24
from phrasetms_client .api_client import ApiClient
21
25
22
26
@@ -32,7 +36,7 @@ def __init__(self, api_client=None):
32
36
api_client = ApiClient ()
33
37
self .api_client = api_client
34
38
35
- def create_awf_step (self , ** kwargs ): # noqa: E501
39
+ def create_awf_step (self , ** kwargs ) -> AdditionalWorkflowStepDto : # noqa: E501
36
40
"""Create additional workflow step # noqa: E501
37
41
38
42
This method makes a synchronous HTTP request by default. To make an
@@ -46,14 +50,16 @@ def create_awf_step(self, **kwargs): # noqa: E501
46
50
If the method is called asynchronously,
47
51
returns the request thread.
48
52
"""
49
- kwargs [' _return_http_data_only' ] = True
50
- if kwargs .get (' async_req' ):
53
+ kwargs [" _return_http_data_only" ] = True
54
+ if kwargs .get (" async_req" ):
51
55
return self .create_awf_step_with_http_info (** kwargs ) # noqa: E501
52
56
else :
53
57
(data ) = self .create_awf_step_with_http_info (** kwargs ) # noqa: E501
54
58
return data
55
59
56
- def create_awf_step_with_http_info (self , ** kwargs ): # noqa: E501
60
+ def create_awf_step_with_http_info (
61
+ self , ** kwargs
62
+ ) -> AdditionalWorkflowStepDto : # noqa: E501
57
63
"""Create additional workflow step # noqa: E501
58
64
59
65
This method makes a synchronous HTTP request by default. To make an
@@ -68,21 +74,21 @@ def create_awf_step_with_http_info(self, **kwargs): # noqa: E501
68
74
returns the request thread.
69
75
"""
70
76
71
- all_params = [' body' ] # noqa: E501
72
- all_params .append (' async_req' )
73
- all_params .append (' _return_http_data_only' )
74
- all_params .append (' _preload_content' )
75
- all_params .append (' _request_timeout' )
77
+ all_params = [" body" ] # noqa: E501
78
+ all_params .append (" async_req" )
79
+ all_params .append (" _return_http_data_only" )
80
+ all_params .append (" _preload_content" )
81
+ all_params .append (" _request_timeout" )
76
82
77
83
params = locals ()
78
- for key , val in six .iteritems (params [' kwargs' ]):
84
+ for key , val in six .iteritems (params [" kwargs" ]):
79
85
if key not in all_params :
80
86
raise TypeError (
81
87
"Got an unexpected keyword argument '%s'"
82
88
" to method create_awf_step" % key
83
89
)
84
90
params [key ] = val
85
- del params [' kwargs' ]
91
+ del params [" kwargs" ]
86
92
87
93
collection_formats = {}
88
94
@@ -96,36 +102,42 @@ def create_awf_step_with_http_info(self, **kwargs): # noqa: E501
96
102
local_var_files = {}
97
103
98
104
body_params = None
99
- if ' body' in params :
100
- body_params = params [' body' ]
105
+ if " body" in params :
106
+ body_params = params [" body" ]
101
107
# HTTP header `Accept`
102
- header_params ['Accept' ] = self .api_client .select_header_accept (
103
- ['*/*' ]) # noqa: E501
108
+ header_params ["Accept" ] = self .api_client .select_header_accept (
109
+ ["*/*" ]
110
+ ) # noqa: E501
104
111
105
112
# HTTP header `Content-Type`
106
- header_params ['Content-Type' ] = self .api_client .select_header_content_type ( # noqa: E501
107
- ['*/*' ]) # noqa: E501
113
+ header_params [
114
+ "Content-Type"
115
+ ] = self .api_client .select_header_content_type ( # noqa: E501
116
+ ["*/*" ]
117
+ ) # noqa: E501
108
118
109
119
# Authentication setting
110
120
auth_settings = [] # noqa: E501
111
121
112
122
return self .api_client .call_api (
113
- '/api2/v1/additionalWorkflowSteps' , 'POST' ,
123
+ "/api2/v1/additionalWorkflowSteps" ,
124
+ "POST" ,
114
125
path_params ,
115
126
query_params ,
116
127
header_params ,
117
128
body = body_params ,
118
129
post_params = form_params ,
119
130
files = local_var_files ,
120
- response_type = ' AdditionalWorkflowStepDto' , # noqa: E501
131
+ response_type = " AdditionalWorkflowStepDto" , # noqa: E501
121
132
auth_settings = auth_settings ,
122
- async_req = params .get ('async_req' ),
123
- _return_http_data_only = params .get ('_return_http_data_only' ),
124
- _preload_content = params .get ('_preload_content' , True ),
125
- _request_timeout = params .get ('_request_timeout' ),
126
- collection_formats = collection_formats )
127
-
128
- def delete_awf_step (self , id , ** kwargs ): # noqa: E501
133
+ async_req = params .get ("async_req" ),
134
+ _return_http_data_only = params .get ("_return_http_data_only" ),
135
+ _preload_content = params .get ("_preload_content" , True ),
136
+ _request_timeout = params .get ("_request_timeout" ),
137
+ collection_formats = collection_formats ,
138
+ )
139
+
140
+ def delete_awf_step (self , id , ** kwargs ) -> None : # noqa: E501
129
141
"""Delete additional workflow step # noqa: E501
130
142
131
143
This method makes a synchronous HTTP request by default. To make an
@@ -139,14 +151,14 @@ def delete_awf_step(self, id, **kwargs): # noqa: E501
139
151
If the method is called asynchronously,
140
152
returns the request thread.
141
153
"""
142
- kwargs [' _return_http_data_only' ] = True
143
- if kwargs .get (' async_req' ):
154
+ kwargs [" _return_http_data_only" ] = True
155
+ if kwargs .get (" async_req" ):
144
156
return self .delete_awf_step_with_http_info (id , ** kwargs ) # noqa: E501
145
157
else :
146
158
(data ) = self .delete_awf_step_with_http_info (id , ** kwargs ) # noqa: E501
147
159
return data
148
160
149
- def delete_awf_step_with_http_info (self , id , ** kwargs ): # noqa: E501
161
+ def delete_awf_step_with_http_info (self , id , ** kwargs ) -> None : # noqa: E501
150
162
"""Delete additional workflow step # noqa: E501
151
163
152
164
This method makes a synchronous HTTP request by default. To make an
@@ -161,31 +173,32 @@ def delete_awf_step_with_http_info(self, id, **kwargs): # noqa: E501
161
173
returns the request thread.
162
174
"""
163
175
164
- all_params = ['id' ] # noqa: E501
165
- all_params .append (' async_req' )
166
- all_params .append (' _return_http_data_only' )
167
- all_params .append (' _preload_content' )
168
- all_params .append (' _request_timeout' )
176
+ all_params = ["id" ] # noqa: E501
177
+ all_params .append (" async_req" )
178
+ all_params .append (" _return_http_data_only" )
179
+ all_params .append (" _preload_content" )
180
+ all_params .append (" _request_timeout" )
169
181
170
182
params = locals ()
171
- for key , val in six .iteritems (params [' kwargs' ]):
183
+ for key , val in six .iteritems (params [" kwargs" ]):
172
184
if key not in all_params :
173
185
raise TypeError (
174
186
"Got an unexpected keyword argument '%s'"
175
187
" to method delete_awf_step" % key
176
188
)
177
189
params [key ] = val
178
- del params [' kwargs' ]
190
+ del params [" kwargs" ]
179
191
# verify the required parameter 'id' is set
180
- if ('id' not in params or
181
- params ['id' ] is None ):
182
- raise ValueError ("Missing the required parameter `id` when calling `delete_awf_step`" ) # noqa: E501
192
+ if "id" not in params or params ["id" ] is None :
193
+ raise ValueError (
194
+ "Missing the required parameter `id` when calling `delete_awf_step`"
195
+ ) # noqa: E501
183
196
184
197
collection_formats = {}
185
198
186
199
path_params = {}
187
- if 'id' in params :
188
- path_params ['id' ] = params ['id' ] # noqa: E501
200
+ if "id" in params :
201
+ path_params ["id" ] = params ["id" ] # noqa: E501
189
202
190
203
query_params = []
191
204
@@ -199,7 +212,8 @@ def delete_awf_step_with_http_info(self, id, **kwargs): # noqa: E501
199
212
auth_settings = [] # noqa: E501
200
213
201
214
return self .api_client .call_api (
202
- '/api2/v1/additionalWorkflowSteps/{id}' , 'DELETE' ,
215
+ "/api2/v1/additionalWorkflowSteps/{id}" ,
216
+ "DELETE" ,
203
217
path_params ,
204
218
query_params ,
205
219
header_params ,
@@ -208,13 +222,16 @@ def delete_awf_step_with_http_info(self, id, **kwargs): # noqa: E501
208
222
files = local_var_files ,
209
223
response_type = None , # noqa: E501
210
224
auth_settings = auth_settings ,
211
- async_req = params .get ('async_req' ),
212
- _return_http_data_only = params .get ('_return_http_data_only' ),
213
- _preload_content = params .get ('_preload_content' , True ),
214
- _request_timeout = params .get ('_request_timeout' ),
215
- collection_formats = collection_formats )
216
-
217
- def list_awf_steps (self , ** kwargs ): # noqa: E501
225
+ async_req = params .get ("async_req" ),
226
+ _return_http_data_only = params .get ("_return_http_data_only" ),
227
+ _preload_content = params .get ("_preload_content" , True ),
228
+ _request_timeout = params .get ("_request_timeout" ),
229
+ collection_formats = collection_formats ,
230
+ )
231
+
232
+ def list_awf_steps (
233
+ self , ** kwargs
234
+ ) -> PageDtoAdditionalWorkflowStepDto : # noqa: E501
218
235
"""List additional workflow steps # noqa: E501
219
236
220
237
This method makes a synchronous HTTP request by default. To make an
@@ -230,14 +247,16 @@ def list_awf_steps(self, **kwargs): # noqa: E501
230
247
If the method is called asynchronously,
231
248
returns the request thread.
232
249
"""
233
- kwargs [' _return_http_data_only' ] = True
234
- if kwargs .get (' async_req' ):
250
+ kwargs [" _return_http_data_only" ] = True
251
+ if kwargs .get (" async_req" ):
235
252
return self .list_awf_steps_with_http_info (** kwargs ) # noqa: E501
236
253
else :
237
254
(data ) = self .list_awf_steps_with_http_info (** kwargs ) # noqa: E501
238
255
return data
239
256
240
- def list_awf_steps_with_http_info (self , ** kwargs ): # noqa: E501
257
+ def list_awf_steps_with_http_info (
258
+ self , ** kwargs
259
+ ) -> PageDtoAdditionalWorkflowStepDto : # noqa: E501
241
260
"""List additional workflow steps # noqa: E501
242
261
243
262
This method makes a synchronous HTTP request by default. To make an
@@ -254,33 +273,33 @@ def list_awf_steps_with_http_info(self, **kwargs): # noqa: E501
254
273
returns the request thread.
255
274
"""
256
275
257
- all_params = [' page_number' , ' page_size' , ' name' ] # noqa: E501
258
- all_params .append (' async_req' )
259
- all_params .append (' _return_http_data_only' )
260
- all_params .append (' _preload_content' )
261
- all_params .append (' _request_timeout' )
276
+ all_params = [" page_number" , " page_size" , " name" ] # noqa: E501
277
+ all_params .append (" async_req" )
278
+ all_params .append (" _return_http_data_only" )
279
+ all_params .append (" _preload_content" )
280
+ all_params .append (" _request_timeout" )
262
281
263
282
params = locals ()
264
- for key , val in six .iteritems (params [' kwargs' ]):
283
+ for key , val in six .iteritems (params [" kwargs" ]):
265
284
if key not in all_params :
266
285
raise TypeError (
267
286
"Got an unexpected keyword argument '%s'"
268
287
" to method list_awf_steps" % key
269
288
)
270
289
params [key ] = val
271
- del params [' kwargs' ]
290
+ del params [" kwargs" ]
272
291
273
292
collection_formats = {}
274
293
275
294
path_params = {}
276
295
277
296
query_params = []
278
- if ' page_number' in params :
279
- query_params .append ((' pageNumber' , params [' page_number' ])) # noqa: E501
280
- if ' page_size' in params :
281
- query_params .append ((' pageSize' , params [' page_size' ])) # noqa: E501
282
- if ' name' in params :
283
- query_params .append ((' name' , params [' name' ])) # noqa: E501
297
+ if " page_number" in params :
298
+ query_params .append ((" pageNumber" , params [" page_number" ])) # noqa: E501
299
+ if " page_size" in params :
300
+ query_params .append ((" pageSize" , params [" page_size" ])) # noqa: E501
301
+ if " name" in params :
302
+ query_params .append ((" name" , params [" name" ])) # noqa: E501
284
303
285
304
header_params = {}
286
305
@@ -289,24 +308,27 @@ def list_awf_steps_with_http_info(self, **kwargs): # noqa: E501
289
308
290
309
body_params = None
291
310
# HTTP header `Accept`
292
- header_params ['Accept' ] = self .api_client .select_header_accept (
293
- ['application/json' ]) # noqa: E501
311
+ header_params ["Accept" ] = self .api_client .select_header_accept (
312
+ ["application/json" ]
313
+ ) # noqa: E501
294
314
295
315
# Authentication setting
296
316
auth_settings = [] # noqa: E501
297
317
298
318
return self .api_client .call_api (
299
- '/api2/v1/additionalWorkflowSteps' , 'GET' ,
319
+ "/api2/v1/additionalWorkflowSteps" ,
320
+ "GET" ,
300
321
path_params ,
301
322
query_params ,
302
323
header_params ,
303
324
body = body_params ,
304
325
post_params = form_params ,
305
326
files = local_var_files ,
306
- response_type = ' PageDtoAdditionalWorkflowStepDto' , # noqa: E501
327
+ response_type = " PageDtoAdditionalWorkflowStepDto" , # noqa: E501
307
328
auth_settings = auth_settings ,
308
- async_req = params .get ('async_req' ),
309
- _return_http_data_only = params .get ('_return_http_data_only' ),
310
- _preload_content = params .get ('_preload_content' , True ),
311
- _request_timeout = params .get ('_request_timeout' ),
312
- collection_formats = collection_formats )
329
+ async_req = params .get ("async_req" ),
330
+ _return_http_data_only = params .get ("_return_http_data_only" ),
331
+ _preload_content = params .get ("_preload_content" , True ),
332
+ _request_timeout = params .get ("_request_timeout" ),
333
+ collection_formats = collection_formats ,
334
+ )
0 commit comments