teamdbapi 2.37.1__py3-none-any.whl → 3.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. teamdbapi/__init__.py +11 -0
  2. teamdbapi/api/__init__.py +39 -34
  3. teamdbapi/api/assembly_api.py +2108 -2108
  4. teamdbapi/api/car_api.py +874 -874
  5. teamdbapi/api/component_api.py +954 -0
  6. teamdbapi/api/config_api.py +118 -118
  7. teamdbapi/api/criteria_api.py +126 -0
  8. teamdbapi/api/edit_api.py +433 -433
  9. teamdbapi/api/event_api.py +878 -878
  10. teamdbapi/api/fixed_field_api.py +320 -320
  11. teamdbapi/api/group_api.py +609 -609
  12. teamdbapi/api/import_export_api.py +828 -743
  13. teamdbapi/api/lap_api.py +708 -708
  14. teamdbapi/api/lap_report_api.py +490 -486
  15. teamdbapi/api/model_field_api.py +708 -708
  16. teamdbapi/api/mounting_api.py +219 -0
  17. teamdbapi/api/notes_authorization_api.py +324 -324
  18. teamdbapi/api/parameter_api.py +1176 -1176
  19. teamdbapi/api/part_api.py +304 -0
  20. teamdbapi/api/report_api.py +142 -142
  21. teamdbapi/api/revision_api.py +1420 -1420
  22. teamdbapi/api/revision_editor_selector_api.py +990 -990
  23. teamdbapi/api/run_api.py +603 -603
  24. teamdbapi/api/script_api.py +490 -490
  25. teamdbapi/api/session_api.py +720 -720
  26. teamdbapi/api/target_api.py +415 -415
  27. teamdbapi/api/team_db_list_api.py +987 -987
  28. teamdbapi/api/team_db_view_api.py +482 -482
  29. teamdbapi/api/tire_api.py +599 -599
  30. teamdbapi/api/tire_set_api.py +514 -514
  31. teamdbapi/api/track_api.py +506 -506
  32. teamdbapi/api/track_layout_api.py +514 -514
  33. teamdbapi/api/update_request_api.py +235 -0
  34. teamdbapi/api/user_api.py +474 -474
  35. teamdbapi/api/value_field_api.py +558 -558
  36. teamdbapi/api/version_api.py +449 -449
  37. teamdbapi/api_client.py +4 -8
  38. teamdbapi/configuration.py +6 -13
  39. teamdbapi/models/__init__.py +6 -0
  40. teamdbapi/models/assembly.py +1 -0
  41. teamdbapi/models/bleed_adjustment.py +1 -0
  42. teamdbapi/models/calibration.py +1 -0
  43. teamdbapi/models/car.py +1 -0
  44. teamdbapi/models/car_parameters_context.py +1 -0
  45. teamdbapi/models/compare_options.py +1 -0
  46. teamdbapi/models/compare_result.py +1 -0
  47. teamdbapi/models/compare_result_detail.py +2 -0
  48. teamdbapi/models/component.py +1217 -0
  49. teamdbapi/models/copy_from_tags_args.py +2 -0
  50. teamdbapi/models/couple_guid_text.py +1 -0
  51. teamdbapi/models/criteria.py +430 -0
  52. teamdbapi/models/criteria_value.py +197 -0
  53. teamdbapi/models/event.py +1 -0
  54. teamdbapi/models/fixed_field.py +2 -1
  55. teamdbapi/models/group.py +1 -0
  56. teamdbapi/models/import_parameters_args.py +1 -0
  57. teamdbapi/models/import_parameters_results.py +2 -0
  58. teamdbapi/models/item_value.py +1 -0
  59. teamdbapi/models/item_value_key.py +1 -0
  60. teamdbapi/models/lap.py +1 -0
  61. teamdbapi/models/lap_report_options.py +1 -0
  62. teamdbapi/models/model_field.py +3 -1
  63. teamdbapi/models/model_field_authorization.py +1 -0
  64. teamdbapi/models/mounting.py +489 -0
  65. teamdbapi/models/notes_authorization.py +1 -0
  66. teamdbapi/models/notes_context.py +1 -0
  67. teamdbapi/models/parameter.py +2 -0
  68. teamdbapi/models/parameter_cross_table.py +1 -0
  69. teamdbapi/models/part.py +963 -0
  70. teamdbapi/models/part_count.py +228 -0
  71. teamdbapi/models/problem_details.py +2 -6
  72. teamdbapi/models/revision.py +88 -3
  73. teamdbapi/models/revision_value.py +1 -0
  74. teamdbapi/models/run.py +1 -0
  75. teamdbapi/models/script.py +1 -0
  76. teamdbapi/models/session.py +1 -0
  77. teamdbapi/models/string_with_font_style.py +1 -0
  78. teamdbapi/models/target.py +64 -7
  79. teamdbapi/models/team_db_list.py +1 -0
  80. teamdbapi/models/team_db_list_item.py +1 -0
  81. teamdbapi/models/tire.py +2 -0
  82. teamdbapi/models/tire_set.py +2 -0
  83. teamdbapi/models/track.py +1 -0
  84. teamdbapi/models/track_layout.py +1 -0
  85. teamdbapi/models/user.py +1 -0
  86. teamdbapi/models/user_group.py +1 -0
  87. teamdbapi/models/value_field.py +1 -0
  88. teamdbapi/models/version.py +1 -0
  89. teamdbapi/rest.py +6 -1
  90. {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/METADATA +5 -5
  91. teamdbapi-3.0.0.dist-info/RECORD +93 -0
  92. teamdbapi-2.37.1.dist-info/RECORD +0 -82
  93. {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/LICENSE +0 -0
  94. {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/WHEEL +0 -0
@@ -1,708 +1,708 @@
1
- # coding: utf-8
2
-
3
- """
4
- Trackside Software TeamDB API v2.0
5
-
6
- This API enables you to access TeamDB data # noqa: E501
7
-
8
- OpenAPI spec version: 2.0
9
- Contact: support@trackside.fr
10
- Generated by: https://github.com/swagger-api/swagger-codegen.git
11
- """
12
-
13
- from __future__ import absolute_import
14
-
15
- import re # noqa: F401
16
-
17
- # python 2 and python 3 compatibility library
18
- import six
19
-
20
- from teamdbapi.api_client import ApiClient
21
-
22
-
23
- class ModelFieldApi(object):
24
- """NOTE: This class is auto generated by the swagger code generator program.
25
-
26
- Do not edit the class manually.
27
- Ref: https://github.com/swagger-api/swagger-codegen
28
- """
29
-
30
- def __init__(self, api_client=None):
31
- if api_client is None:
32
- api_client = ApiClient()
33
- self.api_client = api_client
34
-
35
- def create_model_field(self, body, **kwargs): # noqa: E501
36
- """Create a new model field # noqa: E501
37
-
38
- This method makes a synchronous HTTP request by default. To make an
39
- asynchronous HTTP request, please pass async_req=True
40
- >>> thread = api.create_model_field(body, async_req=True)
41
- >>> result = thread.get()
42
-
43
- :param async_req bool
44
- :param ModelField body: The model field to create. (required)
45
- :return: ModelField
46
- If the method is called asynchronously,
47
- returns the request thread.
48
- """
49
- kwargs['_return_http_data_only'] = True
50
- if kwargs.get('async_req'):
51
- return self.create_model_field_with_http_info(body, **kwargs) # noqa: E501
52
- else:
53
- (data) = self.create_model_field_with_http_info(body, **kwargs) # noqa: E501
54
- return data
55
-
56
- def create_model_field_with_http_info(self, body, **kwargs): # noqa: E501
57
- """Create a new model field # noqa: E501
58
-
59
- This method makes a synchronous HTTP request by default. To make an
60
- asynchronous HTTP request, please pass async_req=True
61
- >>> thread = api.create_model_field_with_http_info(body, async_req=True)
62
- >>> result = thread.get()
63
-
64
- :param async_req bool
65
- :param ModelField body: The model field to create. (required)
66
- :return: ModelField
67
- If the method is called asynchronously,
68
- returns the request thread.
69
- """
70
-
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')
76
-
77
- params = locals()
78
- for key, val in six.iteritems(params['kwargs']):
79
- if key not in all_params:
80
- raise TypeError(
81
- "Got an unexpected keyword argument '%s'"
82
- " to method create_model_field" % key
83
- )
84
- params[key] = val
85
- del params['kwargs']
86
- # verify the required parameter 'body' is set
87
- if ('body' not in params or
88
- params['body'] is None):
89
- raise ValueError("Missing the required parameter `body` when calling `create_model_field`") # noqa: E501
90
-
91
- collection_formats = {}
92
-
93
- path_params = {}
94
-
95
- query_params = []
96
-
97
- header_params = {}
98
-
99
- form_params = []
100
- local_var_files = {}
101
-
102
- body_params = None
103
- if 'body' in params:
104
- body_params = params['body']
105
- # HTTP header `Accept`
106
- header_params['Accept'] = self.api_client.select_header_accept(
107
- ['application/json', 'text/json']) # noqa: E501
108
-
109
- # HTTP header `Content-Type`
110
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
111
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
112
-
113
- # Authentication setting
114
- auth_settings = [] # noqa: E501
115
-
116
- return self.api_client.call_api(
117
- '/teamdbapi/v2.0/modelfield', 'POST',
118
- path_params,
119
- query_params,
120
- header_params,
121
- body=body_params,
122
- post_params=form_params,
123
- files=local_var_files,
124
- response_type='ModelField', # noqa: E501
125
- auth_settings=auth_settings,
126
- async_req=params.get('async_req'),
127
- _return_http_data_only=params.get('_return_http_data_only'),
128
- _preload_content=params.get('_preload_content', True),
129
- _request_timeout=params.get('_request_timeout'),
130
- collection_formats=collection_formats)
131
-
132
- def delete_model_field(self, model_field_id, **kwargs): # noqa: E501
133
- """Delete an existing model field # noqa: E501
134
-
135
- This method makes a synchronous HTTP request by default. To make an
136
- asynchronous HTTP request, please pass async_req=True
137
- >>> thread = api.delete_model_field(model_field_id, async_req=True)
138
- >>> result = thread.get()
139
-
140
- :param async_req bool
141
- :param str model_field_id: The unique model field id for which you want to delete the model field (required)
142
- :return: None
143
- If the method is called asynchronously,
144
- returns the request thread.
145
- """
146
- kwargs['_return_http_data_only'] = True
147
- if kwargs.get('async_req'):
148
- return self.delete_model_field_with_http_info(model_field_id, **kwargs) # noqa: E501
149
- else:
150
- (data) = self.delete_model_field_with_http_info(model_field_id, **kwargs) # noqa: E501
151
- return data
152
-
153
- def delete_model_field_with_http_info(self, model_field_id, **kwargs): # noqa: E501
154
- """Delete an existing model field # noqa: E501
155
-
156
- This method makes a synchronous HTTP request by default. To make an
157
- asynchronous HTTP request, please pass async_req=True
158
- >>> thread = api.delete_model_field_with_http_info(model_field_id, async_req=True)
159
- >>> result = thread.get()
160
-
161
- :param async_req bool
162
- :param str model_field_id: The unique model field id for which you want to delete the model field (required)
163
- :return: None
164
- If the method is called asynchronously,
165
- returns the request thread.
166
- """
167
-
168
- all_params = ['model_field_id'] # noqa: E501
169
- all_params.append('async_req')
170
- all_params.append('_return_http_data_only')
171
- all_params.append('_preload_content')
172
- all_params.append('_request_timeout')
173
-
174
- params = locals()
175
- for key, val in six.iteritems(params['kwargs']):
176
- if key not in all_params:
177
- raise TypeError(
178
- "Got an unexpected keyword argument '%s'"
179
- " to method delete_model_field" % key
180
- )
181
- params[key] = val
182
- del params['kwargs']
183
- # verify the required parameter 'model_field_id' is set
184
- if ('model_field_id' not in params or
185
- params['model_field_id'] is None):
186
- raise ValueError("Missing the required parameter `model_field_id` when calling `delete_model_field`") # noqa: E501
187
-
188
- collection_formats = {}
189
-
190
- path_params = {}
191
- if 'model_field_id' in params:
192
- path_params['modelFieldId'] = params['model_field_id'] # noqa: E501
193
-
194
- query_params = []
195
-
196
- header_params = {}
197
-
198
- form_params = []
199
- local_var_files = {}
200
-
201
- body_params = None
202
- # HTTP header `Accept`
203
- header_params['Accept'] = self.api_client.select_header_accept(
204
- ['application/json', 'text/json']) # noqa: E501
205
-
206
- # Authentication setting
207
- auth_settings = [] # noqa: E501
208
-
209
- return self.api_client.call_api(
210
- '/teamdbapi/v2.0/modelfield/{modelFieldId}', 'DELETE',
211
- path_params,
212
- query_params,
213
- header_params,
214
- body=body_params,
215
- post_params=form_params,
216
- files=local_var_files,
217
- response_type=None, # noqa: E501
218
- auth_settings=auth_settings,
219
- async_req=params.get('async_req'),
220
- _return_http_data_only=params.get('_return_http_data_only'),
221
- _preload_content=params.get('_preload_content', True),
222
- _request_timeout=params.get('_request_timeout'),
223
- collection_formats=collection_formats)
224
-
225
- def get_model_field(self, model_field_id, **kwargs): # noqa: E501
226
- """Get a model field via a unique id. # noqa: E501
227
-
228
- This method makes a synchronous HTTP request by default. To make an
229
- asynchronous HTTP request, please pass async_req=True
230
- >>> thread = api.get_model_field(model_field_id, async_req=True)
231
- >>> result = thread.get()
232
-
233
- :param async_req bool
234
- :param str model_field_id: The unique model field id for which you want to get the model field (required)
235
- :return: ModelField
236
- If the method is called asynchronously,
237
- returns the request thread.
238
- """
239
- kwargs['_return_http_data_only'] = True
240
- if kwargs.get('async_req'):
241
- return self.get_model_field_with_http_info(model_field_id, **kwargs) # noqa: E501
242
- else:
243
- (data) = self.get_model_field_with_http_info(model_field_id, **kwargs) # noqa: E501
244
- return data
245
-
246
- def get_model_field_with_http_info(self, model_field_id, **kwargs): # noqa: E501
247
- """Get a model field via a unique id. # noqa: E501
248
-
249
- This method makes a synchronous HTTP request by default. To make an
250
- asynchronous HTTP request, please pass async_req=True
251
- >>> thread = api.get_model_field_with_http_info(model_field_id, async_req=True)
252
- >>> result = thread.get()
253
-
254
- :param async_req bool
255
- :param str model_field_id: The unique model field id for which you want to get the model field (required)
256
- :return: ModelField
257
- If the method is called asynchronously,
258
- returns the request thread.
259
- """
260
-
261
- all_params = ['model_field_id'] # noqa: E501
262
- all_params.append('async_req')
263
- all_params.append('_return_http_data_only')
264
- all_params.append('_preload_content')
265
- all_params.append('_request_timeout')
266
-
267
- params = locals()
268
- for key, val in six.iteritems(params['kwargs']):
269
- if key not in all_params:
270
- raise TypeError(
271
- "Got an unexpected keyword argument '%s'"
272
- " to method get_model_field" % key
273
- )
274
- params[key] = val
275
- del params['kwargs']
276
- # verify the required parameter 'model_field_id' is set
277
- if ('model_field_id' not in params or
278
- params['model_field_id'] is None):
279
- raise ValueError("Missing the required parameter `model_field_id` when calling `get_model_field`") # noqa: E501
280
-
281
- collection_formats = {}
282
-
283
- path_params = {}
284
- if 'model_field_id' in params:
285
- path_params['modelFieldId'] = params['model_field_id'] # noqa: E501
286
-
287
- query_params = []
288
-
289
- header_params = {}
290
-
291
- form_params = []
292
- local_var_files = {}
293
-
294
- body_params = None
295
- # HTTP header `Accept`
296
- header_params['Accept'] = self.api_client.select_header_accept(
297
- ['application/json', 'text/json']) # noqa: E501
298
-
299
- # Authentication setting
300
- auth_settings = [] # noqa: E501
301
-
302
- return self.api_client.call_api(
303
- '/teamdbapi/v2.0/modelfield/{modelFieldId}', 'GET',
304
- path_params,
305
- query_params,
306
- header_params,
307
- body=body_params,
308
- post_params=form_params,
309
- files=local_var_files,
310
- response_type='ModelField', # noqa: E501
311
- auth_settings=auth_settings,
312
- async_req=params.get('async_req'),
313
- _return_http_data_only=params.get('_return_http_data_only'),
314
- _preload_content=params.get('_preload_content', True),
315
- _request_timeout=params.get('_request_timeout'),
316
- collection_formats=collection_formats)
317
-
318
- def get_model_field_authorizations(self, model_field_id, **kwargs): # noqa: E501
319
- """Get authorizations for a model field via its unique id. # noqa: E501
320
-
321
- This method makes a synchronous HTTP request by default. To make an
322
- asynchronous HTTP request, please pass async_req=True
323
- >>> thread = api.get_model_field_authorizations(model_field_id, async_req=True)
324
- >>> result = thread.get()
325
-
326
- :param async_req bool
327
- :param str model_field_id: The unique model field id for which you want to get the model field (required)
328
- :return: list[ModelFieldAuthorization]
329
- If the method is called asynchronously,
330
- returns the request thread.
331
- """
332
- kwargs['_return_http_data_only'] = True
333
- if kwargs.get('async_req'):
334
- return self.get_model_field_authorizations_with_http_info(model_field_id, **kwargs) # noqa: E501
335
- else:
336
- (data) = self.get_model_field_authorizations_with_http_info(model_field_id, **kwargs) # noqa: E501
337
- return data
338
-
339
- def get_model_field_authorizations_with_http_info(self, model_field_id, **kwargs): # noqa: E501
340
- """Get authorizations for a model field via its unique id. # noqa: E501
341
-
342
- This method makes a synchronous HTTP request by default. To make an
343
- asynchronous HTTP request, please pass async_req=True
344
- >>> thread = api.get_model_field_authorizations_with_http_info(model_field_id, async_req=True)
345
- >>> result = thread.get()
346
-
347
- :param async_req bool
348
- :param str model_field_id: The unique model field id for which you want to get the model field (required)
349
- :return: list[ModelFieldAuthorization]
350
- If the method is called asynchronously,
351
- returns the request thread.
352
- """
353
-
354
- all_params = ['model_field_id'] # noqa: E501
355
- all_params.append('async_req')
356
- all_params.append('_return_http_data_only')
357
- all_params.append('_preload_content')
358
- all_params.append('_request_timeout')
359
-
360
- params = locals()
361
- for key, val in six.iteritems(params['kwargs']):
362
- if key not in all_params:
363
- raise TypeError(
364
- "Got an unexpected keyword argument '%s'"
365
- " to method get_model_field_authorizations" % key
366
- )
367
- params[key] = val
368
- del params['kwargs']
369
- # verify the required parameter 'model_field_id' is set
370
- if ('model_field_id' not in params or
371
- params['model_field_id'] is None):
372
- raise ValueError("Missing the required parameter `model_field_id` when calling `get_model_field_authorizations`") # noqa: E501
373
-
374
- collection_formats = {}
375
-
376
- path_params = {}
377
- if 'model_field_id' in params:
378
- path_params['modelFieldId'] = params['model_field_id'] # noqa: E501
379
-
380
- query_params = []
381
-
382
- header_params = {}
383
-
384
- form_params = []
385
- local_var_files = {}
386
-
387
- body_params = None
388
- # HTTP header `Accept`
389
- header_params['Accept'] = self.api_client.select_header_accept(
390
- ['application/json', 'text/json']) # noqa: E501
391
-
392
- # Authentication setting
393
- auth_settings = [] # noqa: E501
394
-
395
- return self.api_client.call_api(
396
- '/teamdbapi/v2.0/modelfield/{modelFieldId}/auths', 'GET',
397
- path_params,
398
- query_params,
399
- header_params,
400
- body=body_params,
401
- post_params=form_params,
402
- files=local_var_files,
403
- response_type='list[ModelFieldAuthorization]', # noqa: E501
404
- auth_settings=auth_settings,
405
- async_req=params.get('async_req'),
406
- _return_http_data_only=params.get('_return_http_data_only'),
407
- _preload_content=params.get('_preload_content', True),
408
- _request_timeout=params.get('_request_timeout'),
409
- collection_formats=collection_formats)
410
-
411
- def get_model_fields(self, field_type, **kwargs): # noqa: E501
412
- """Get the list of all model fields. # noqa: E501
413
-
414
- This method makes a synchronous HTTP request by default. To make an
415
- asynchronous HTTP request, please pass async_req=True
416
- >>> thread = api.get_model_fields(field_type, async_req=True)
417
- >>> result = thread.get()
418
-
419
- :param async_req bool
420
- :param str field_type: The field type for which to return the model fields. (required)
421
- :return: list[CoupleGuidText]
422
- If the method is called asynchronously,
423
- returns the request thread.
424
- """
425
- kwargs['_return_http_data_only'] = True
426
- if kwargs.get('async_req'):
427
- return self.get_model_fields_with_http_info(field_type, **kwargs) # noqa: E501
428
- else:
429
- (data) = self.get_model_fields_with_http_info(field_type, **kwargs) # noqa: E501
430
- return data
431
-
432
- def get_model_fields_with_http_info(self, field_type, **kwargs): # noqa: E501
433
- """Get the list of all model fields. # noqa: E501
434
-
435
- This method makes a synchronous HTTP request by default. To make an
436
- asynchronous HTTP request, please pass async_req=True
437
- >>> thread = api.get_model_fields_with_http_info(field_type, async_req=True)
438
- >>> result = thread.get()
439
-
440
- :param async_req bool
441
- :param str field_type: The field type for which to return the model fields. (required)
442
- :return: list[CoupleGuidText]
443
- If the method is called asynchronously,
444
- returns the request thread.
445
- """
446
-
447
- all_params = ['field_type'] # noqa: E501
448
- all_params.append('async_req')
449
- all_params.append('_return_http_data_only')
450
- all_params.append('_preload_content')
451
- all_params.append('_request_timeout')
452
-
453
- params = locals()
454
- for key, val in six.iteritems(params['kwargs']):
455
- if key not in all_params:
456
- raise TypeError(
457
- "Got an unexpected keyword argument '%s'"
458
- " to method get_model_fields" % key
459
- )
460
- params[key] = val
461
- del params['kwargs']
462
- # verify the required parameter 'field_type' is set
463
- if ('field_type' not in params or
464
- params['field_type'] is None):
465
- raise ValueError("Missing the required parameter `field_type` when calling `get_model_fields`") # noqa: E501
466
-
467
- collection_formats = {}
468
-
469
- path_params = {}
470
-
471
- query_params = []
472
- if 'field_type' in params:
473
- query_params.append(('fieldType', params['field_type'])) # noqa: E501
474
-
475
- header_params = {}
476
-
477
- form_params = []
478
- local_var_files = {}
479
-
480
- body_params = None
481
- # HTTP header `Accept`
482
- header_params['Accept'] = self.api_client.select_header_accept(
483
- ['application/json', 'text/json']) # noqa: E501
484
-
485
- # Authentication setting
486
- auth_settings = [] # noqa: E501
487
-
488
- return self.api_client.call_api(
489
- '/teamdbapi/v2.0/modelfields', 'GET',
490
- path_params,
491
- query_params,
492
- header_params,
493
- body=body_params,
494
- post_params=form_params,
495
- files=local_var_files,
496
- response_type='list[CoupleGuidText]', # noqa: E501
497
- auth_settings=auth_settings,
498
- async_req=params.get('async_req'),
499
- _return_http_data_only=params.get('_return_http_data_only'),
500
- _preload_content=params.get('_preload_content', True),
501
- _request_timeout=params.get('_request_timeout'),
502
- collection_formats=collection_formats)
503
-
504
- def update_model_field(self, body, model_field_id, **kwargs): # noqa: E501
505
- """Update an existing model field # noqa: E501
506
-
507
- This method makes a synchronous HTTP request by default. To make an
508
- asynchronous HTTP request, please pass async_req=True
509
- >>> thread = api.update_model_field(body, model_field_id, async_req=True)
510
- >>> result = thread.get()
511
-
512
- :param async_req bool
513
- :param ModelField body: The model field to update. (required)
514
- :param str model_field_id: The unique model field id for which you want to update the modelfield (required)
515
- :return: ModelField
516
- If the method is called asynchronously,
517
- returns the request thread.
518
- """
519
- kwargs['_return_http_data_only'] = True
520
- if kwargs.get('async_req'):
521
- return self.update_model_field_with_http_info(body, model_field_id, **kwargs) # noqa: E501
522
- else:
523
- (data) = self.update_model_field_with_http_info(body, model_field_id, **kwargs) # noqa: E501
524
- return data
525
-
526
- def update_model_field_with_http_info(self, body, model_field_id, **kwargs): # noqa: E501
527
- """Update an existing model field # noqa: E501
528
-
529
- This method makes a synchronous HTTP request by default. To make an
530
- asynchronous HTTP request, please pass async_req=True
531
- >>> thread = api.update_model_field_with_http_info(body, model_field_id, async_req=True)
532
- >>> result = thread.get()
533
-
534
- :param async_req bool
535
- :param ModelField body: The model field to update. (required)
536
- :param str model_field_id: The unique model field id for which you want to update the modelfield (required)
537
- :return: ModelField
538
- If the method is called asynchronously,
539
- returns the request thread.
540
- """
541
-
542
- all_params = ['body', 'model_field_id'] # noqa: E501
543
- all_params.append('async_req')
544
- all_params.append('_return_http_data_only')
545
- all_params.append('_preload_content')
546
- all_params.append('_request_timeout')
547
-
548
- params = locals()
549
- for key, val in six.iteritems(params['kwargs']):
550
- if key not in all_params:
551
- raise TypeError(
552
- "Got an unexpected keyword argument '%s'"
553
- " to method update_model_field" % key
554
- )
555
- params[key] = val
556
- del params['kwargs']
557
- # verify the required parameter 'body' is set
558
- if ('body' not in params or
559
- params['body'] is None):
560
- raise ValueError("Missing the required parameter `body` when calling `update_model_field`") # noqa: E501
561
- # verify the required parameter 'model_field_id' is set
562
- if ('model_field_id' not in params or
563
- params['model_field_id'] is None):
564
- raise ValueError("Missing the required parameter `model_field_id` when calling `update_model_field`") # noqa: E501
565
-
566
- collection_formats = {}
567
-
568
- path_params = {}
569
- if 'model_field_id' in params:
570
- path_params['modelFieldId'] = params['model_field_id'] # noqa: E501
571
-
572
- query_params = []
573
-
574
- header_params = {}
575
-
576
- form_params = []
577
- local_var_files = {}
578
-
579
- body_params = None
580
- if 'body' in params:
581
- body_params = params['body']
582
- # HTTP header `Accept`
583
- header_params['Accept'] = self.api_client.select_header_accept(
584
- ['application/json', 'text/json']) # noqa: E501
585
-
586
- # HTTP header `Content-Type`
587
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
588
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
589
-
590
- # Authentication setting
591
- auth_settings = [] # noqa: E501
592
-
593
- return self.api_client.call_api(
594
- '/teamdbapi/v2.0/modelfield/{modelFieldId}', 'PUT',
595
- path_params,
596
- query_params,
597
- header_params,
598
- body=body_params,
599
- post_params=form_params,
600
- files=local_var_files,
601
- response_type='ModelField', # noqa: E501
602
- auth_settings=auth_settings,
603
- async_req=params.get('async_req'),
604
- _return_http_data_only=params.get('_return_http_data_only'),
605
- _preload_content=params.get('_preload_content', True),
606
- _request_timeout=params.get('_request_timeout'),
607
- collection_formats=collection_formats)
608
-
609
- def update_model_field_authorization(self, model_field_id, **kwargs): # noqa: E501
610
- """Set/Update a model field authorization # noqa: E501
611
-
612
- This method makes a synchronous HTTP request by default. To make an
613
- asynchronous HTTP request, please pass async_req=True
614
- >>> thread = api.update_model_field_authorization(model_field_id, async_req=True)
615
- >>> result = thread.get()
616
-
617
- :param async_req bool
618
- :param str model_field_id: The unique model field id for which you want to set/update the authorizations (required)
619
- :param ModelFieldAuthorization body: The authorization for the model field.
620
- :return: ModelFieldAuthorization
621
- If the method is called asynchronously,
622
- returns the request thread.
623
- """
624
- kwargs['_return_http_data_only'] = True
625
- if kwargs.get('async_req'):
626
- return self.update_model_field_authorization_with_http_info(model_field_id, **kwargs) # noqa: E501
627
- else:
628
- (data) = self.update_model_field_authorization_with_http_info(model_field_id, **kwargs) # noqa: E501
629
- return data
630
-
631
- def update_model_field_authorization_with_http_info(self, model_field_id, **kwargs): # noqa: E501
632
- """Set/Update a model field authorization # noqa: E501
633
-
634
- This method makes a synchronous HTTP request by default. To make an
635
- asynchronous HTTP request, please pass async_req=True
636
- >>> thread = api.update_model_field_authorization_with_http_info(model_field_id, async_req=True)
637
- >>> result = thread.get()
638
-
639
- :param async_req bool
640
- :param str model_field_id: The unique model field id for which you want to set/update the authorizations (required)
641
- :param ModelFieldAuthorization body: The authorization for the model field.
642
- :return: ModelFieldAuthorization
643
- If the method is called asynchronously,
644
- returns the request thread.
645
- """
646
-
647
- all_params = ['model_field_id', 'body'] # noqa: E501
648
- all_params.append('async_req')
649
- all_params.append('_return_http_data_only')
650
- all_params.append('_preload_content')
651
- all_params.append('_request_timeout')
652
-
653
- params = locals()
654
- for key, val in six.iteritems(params['kwargs']):
655
- if key not in all_params:
656
- raise TypeError(
657
- "Got an unexpected keyword argument '%s'"
658
- " to method update_model_field_authorization" % key
659
- )
660
- params[key] = val
661
- del params['kwargs']
662
- # verify the required parameter 'model_field_id' is set
663
- if ('model_field_id' not in params or
664
- params['model_field_id'] is None):
665
- raise ValueError("Missing the required parameter `model_field_id` when calling `update_model_field_authorization`") # noqa: E501
666
-
667
- collection_formats = {}
668
-
669
- path_params = {}
670
- if 'model_field_id' in params:
671
- path_params['modelFieldId'] = params['model_field_id'] # noqa: E501
672
-
673
- query_params = []
674
-
675
- header_params = {}
676
-
677
- form_params = []
678
- local_var_files = {}
679
-
680
- body_params = None
681
- if 'body' in params:
682
- body_params = params['body']
683
- # HTTP header `Accept`
684
- header_params['Accept'] = self.api_client.select_header_accept(
685
- ['application/json', 'text/json']) # noqa: E501
686
-
687
- # HTTP header `Content-Type`
688
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
689
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
690
-
691
- # Authentication setting
692
- auth_settings = [] # noqa: E501
693
-
694
- return self.api_client.call_api(
695
- '/teamdbapi/v2.0/modelfield/{modelFieldId}/auth', 'PUT',
696
- path_params,
697
- query_params,
698
- header_params,
699
- body=body_params,
700
- post_params=form_params,
701
- files=local_var_files,
702
- response_type='ModelFieldAuthorization', # noqa: E501
703
- auth_settings=auth_settings,
704
- async_req=params.get('async_req'),
705
- _return_http_data_only=params.get('_return_http_data_only'),
706
- _preload_content=params.get('_preload_content', True),
707
- _request_timeout=params.get('_request_timeout'),
708
- collection_formats=collection_formats)
1
+ # coding: utf-8
2
+
3
+ """
4
+ Trackside Software TeamDB API v2.0
5
+
6
+ This API enables you to access TeamDB data # noqa: E501
7
+
8
+ OpenAPI spec version: 2.0
9
+ Contact: support@trackside.fr
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ """
12
+
13
+ from __future__ import absolute_import
14
+
15
+ import re # noqa: F401
16
+
17
+ # python 2 and python 3 compatibility library
18
+ import six
19
+
20
+ from teamdbapi.api_client import ApiClient
21
+
22
+
23
+ class ModelFieldApi(object):
24
+ """NOTE: This class is auto generated by the swagger code generator program.
25
+
26
+ Do not edit the class manually.
27
+ Ref: https://github.com/swagger-api/swagger-codegen
28
+ """
29
+
30
+ def __init__(self, api_client=None):
31
+ if api_client is None:
32
+ api_client = ApiClient()
33
+ self.api_client = api_client
34
+
35
+ def create_model_field(self, body, **kwargs): # noqa: E501
36
+ """Create a new model field # noqa: E501
37
+
38
+ This method makes a synchronous HTTP request by default. To make an
39
+ asynchronous HTTP request, please pass async_req=True
40
+ >>> thread = api.create_model_field(body, async_req=True)
41
+ >>> result = thread.get()
42
+
43
+ :param async_req bool
44
+ :param ModelField body: The model field to create. (required)
45
+ :return: ModelField
46
+ If the method is called asynchronously,
47
+ returns the request thread.
48
+ """
49
+ kwargs['_return_http_data_only'] = True
50
+ if kwargs.get('async_req'):
51
+ return self.create_model_field_with_http_info(body, **kwargs) # noqa: E501
52
+ else:
53
+ (data) = self.create_model_field_with_http_info(body, **kwargs) # noqa: E501
54
+ return data
55
+
56
+ def create_model_field_with_http_info(self, body, **kwargs): # noqa: E501
57
+ """Create a new model field # noqa: E501
58
+
59
+ This method makes a synchronous HTTP request by default. To make an
60
+ asynchronous HTTP request, please pass async_req=True
61
+ >>> thread = api.create_model_field_with_http_info(body, async_req=True)
62
+ >>> result = thread.get()
63
+
64
+ :param async_req bool
65
+ :param ModelField body: The model field to create. (required)
66
+ :return: ModelField
67
+ If the method is called asynchronously,
68
+ returns the request thread.
69
+ """
70
+
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')
76
+
77
+ params = locals()
78
+ for key, val in six.iteritems(params['kwargs']):
79
+ if key not in all_params:
80
+ raise TypeError(
81
+ "Got an unexpected keyword argument '%s'"
82
+ " to method create_model_field" % key
83
+ )
84
+ params[key] = val
85
+ del params['kwargs']
86
+ # verify the required parameter 'body' is set
87
+ if ('body' not in params or
88
+ params['body'] is None):
89
+ raise ValueError("Missing the required parameter `body` when calling `create_model_field`") # noqa: E501
90
+
91
+ collection_formats = {}
92
+
93
+ path_params = {}
94
+
95
+ query_params = []
96
+
97
+ header_params = {}
98
+
99
+ form_params = []
100
+ local_var_files = {}
101
+
102
+ body_params = None
103
+ if 'body' in params:
104
+ body_params = params['body']
105
+ # HTTP header `Accept`
106
+ header_params['Accept'] = self.api_client.select_header_accept(
107
+ ['application/json', 'text/json']) # noqa: E501
108
+
109
+ # HTTP header `Content-Type`
110
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
111
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
112
+
113
+ # Authentication setting
114
+ auth_settings = [] # noqa: E501
115
+
116
+ return self.api_client.call_api(
117
+ '/teamdbapi/v2.0/modelfield', 'POST',
118
+ path_params,
119
+ query_params,
120
+ header_params,
121
+ body=body_params,
122
+ post_params=form_params,
123
+ files=local_var_files,
124
+ response_type='ModelField', # noqa: E501
125
+ auth_settings=auth_settings,
126
+ async_req=params.get('async_req'),
127
+ _return_http_data_only=params.get('_return_http_data_only'),
128
+ _preload_content=params.get('_preload_content', True),
129
+ _request_timeout=params.get('_request_timeout'),
130
+ collection_formats=collection_formats)
131
+
132
+ def delete_model_field(self, model_field_id, **kwargs): # noqa: E501
133
+ """Delete an existing model field # noqa: E501
134
+
135
+ This method makes a synchronous HTTP request by default. To make an
136
+ asynchronous HTTP request, please pass async_req=True
137
+ >>> thread = api.delete_model_field(model_field_id, async_req=True)
138
+ >>> result = thread.get()
139
+
140
+ :param async_req bool
141
+ :param str model_field_id: The unique model field id for which you want to delete the model field (required)
142
+ :return: None
143
+ If the method is called asynchronously,
144
+ returns the request thread.
145
+ """
146
+ kwargs['_return_http_data_only'] = True
147
+ if kwargs.get('async_req'):
148
+ return self.delete_model_field_with_http_info(model_field_id, **kwargs) # noqa: E501
149
+ else:
150
+ (data) = self.delete_model_field_with_http_info(model_field_id, **kwargs) # noqa: E501
151
+ return data
152
+
153
+ def delete_model_field_with_http_info(self, model_field_id, **kwargs): # noqa: E501
154
+ """Delete an existing model field # noqa: E501
155
+
156
+ This method makes a synchronous HTTP request by default. To make an
157
+ asynchronous HTTP request, please pass async_req=True
158
+ >>> thread = api.delete_model_field_with_http_info(model_field_id, async_req=True)
159
+ >>> result = thread.get()
160
+
161
+ :param async_req bool
162
+ :param str model_field_id: The unique model field id for which you want to delete the model field (required)
163
+ :return: None
164
+ If the method is called asynchronously,
165
+ returns the request thread.
166
+ """
167
+
168
+ all_params = ['model_field_id'] # noqa: E501
169
+ all_params.append('async_req')
170
+ all_params.append('_return_http_data_only')
171
+ all_params.append('_preload_content')
172
+ all_params.append('_request_timeout')
173
+
174
+ params = locals()
175
+ for key, val in six.iteritems(params['kwargs']):
176
+ if key not in all_params:
177
+ raise TypeError(
178
+ "Got an unexpected keyword argument '%s'"
179
+ " to method delete_model_field" % key
180
+ )
181
+ params[key] = val
182
+ del params['kwargs']
183
+ # verify the required parameter 'model_field_id' is set
184
+ if ('model_field_id' not in params or
185
+ params['model_field_id'] is None):
186
+ raise ValueError("Missing the required parameter `model_field_id` when calling `delete_model_field`") # noqa: E501
187
+
188
+ collection_formats = {}
189
+
190
+ path_params = {}
191
+ if 'model_field_id' in params:
192
+ path_params['modelFieldId'] = params['model_field_id'] # noqa: E501
193
+
194
+ query_params = []
195
+
196
+ header_params = {}
197
+
198
+ form_params = []
199
+ local_var_files = {}
200
+
201
+ body_params = None
202
+ # HTTP header `Accept`
203
+ header_params['Accept'] = self.api_client.select_header_accept(
204
+ ['application/json', 'text/json']) # noqa: E501
205
+
206
+ # Authentication setting
207
+ auth_settings = [] # noqa: E501
208
+
209
+ return self.api_client.call_api(
210
+ '/teamdbapi/v2.0/modelfield/{modelFieldId}', 'DELETE',
211
+ path_params,
212
+ query_params,
213
+ header_params,
214
+ body=body_params,
215
+ post_params=form_params,
216
+ files=local_var_files,
217
+ response_type=None, # noqa: E501
218
+ auth_settings=auth_settings,
219
+ async_req=params.get('async_req'),
220
+ _return_http_data_only=params.get('_return_http_data_only'),
221
+ _preload_content=params.get('_preload_content', True),
222
+ _request_timeout=params.get('_request_timeout'),
223
+ collection_formats=collection_formats)
224
+
225
+ def get_model_field(self, model_field_id, **kwargs): # noqa: E501
226
+ """Get a model field via a unique id. # noqa: E501
227
+
228
+ This method makes a synchronous HTTP request by default. To make an
229
+ asynchronous HTTP request, please pass async_req=True
230
+ >>> thread = api.get_model_field(model_field_id, async_req=True)
231
+ >>> result = thread.get()
232
+
233
+ :param async_req bool
234
+ :param str model_field_id: The unique model field id for which you want to get the model field (required)
235
+ :return: ModelField
236
+ If the method is called asynchronously,
237
+ returns the request thread.
238
+ """
239
+ kwargs['_return_http_data_only'] = True
240
+ if kwargs.get('async_req'):
241
+ return self.get_model_field_with_http_info(model_field_id, **kwargs) # noqa: E501
242
+ else:
243
+ (data) = self.get_model_field_with_http_info(model_field_id, **kwargs) # noqa: E501
244
+ return data
245
+
246
+ def get_model_field_with_http_info(self, model_field_id, **kwargs): # noqa: E501
247
+ """Get a model field via a unique id. # noqa: E501
248
+
249
+ This method makes a synchronous HTTP request by default. To make an
250
+ asynchronous HTTP request, please pass async_req=True
251
+ >>> thread = api.get_model_field_with_http_info(model_field_id, async_req=True)
252
+ >>> result = thread.get()
253
+
254
+ :param async_req bool
255
+ :param str model_field_id: The unique model field id for which you want to get the model field (required)
256
+ :return: ModelField
257
+ If the method is called asynchronously,
258
+ returns the request thread.
259
+ """
260
+
261
+ all_params = ['model_field_id'] # noqa: E501
262
+ all_params.append('async_req')
263
+ all_params.append('_return_http_data_only')
264
+ all_params.append('_preload_content')
265
+ all_params.append('_request_timeout')
266
+
267
+ params = locals()
268
+ for key, val in six.iteritems(params['kwargs']):
269
+ if key not in all_params:
270
+ raise TypeError(
271
+ "Got an unexpected keyword argument '%s'"
272
+ " to method get_model_field" % key
273
+ )
274
+ params[key] = val
275
+ del params['kwargs']
276
+ # verify the required parameter 'model_field_id' is set
277
+ if ('model_field_id' not in params or
278
+ params['model_field_id'] is None):
279
+ raise ValueError("Missing the required parameter `model_field_id` when calling `get_model_field`") # noqa: E501
280
+
281
+ collection_formats = {}
282
+
283
+ path_params = {}
284
+ if 'model_field_id' in params:
285
+ path_params['modelFieldId'] = params['model_field_id'] # noqa: E501
286
+
287
+ query_params = []
288
+
289
+ header_params = {}
290
+
291
+ form_params = []
292
+ local_var_files = {}
293
+
294
+ body_params = None
295
+ # HTTP header `Accept`
296
+ header_params['Accept'] = self.api_client.select_header_accept(
297
+ ['application/json', 'text/json']) # noqa: E501
298
+
299
+ # Authentication setting
300
+ auth_settings = [] # noqa: E501
301
+
302
+ return self.api_client.call_api(
303
+ '/teamdbapi/v2.0/modelfield/{modelFieldId}', 'GET',
304
+ path_params,
305
+ query_params,
306
+ header_params,
307
+ body=body_params,
308
+ post_params=form_params,
309
+ files=local_var_files,
310
+ response_type='ModelField', # noqa: E501
311
+ auth_settings=auth_settings,
312
+ async_req=params.get('async_req'),
313
+ _return_http_data_only=params.get('_return_http_data_only'),
314
+ _preload_content=params.get('_preload_content', True),
315
+ _request_timeout=params.get('_request_timeout'),
316
+ collection_formats=collection_formats)
317
+
318
+ def get_model_field_authorizations(self, model_field_id, **kwargs): # noqa: E501
319
+ """Get authorizations for a model field via its unique id. # noqa: E501
320
+
321
+ This method makes a synchronous HTTP request by default. To make an
322
+ asynchronous HTTP request, please pass async_req=True
323
+ >>> thread = api.get_model_field_authorizations(model_field_id, async_req=True)
324
+ >>> result = thread.get()
325
+
326
+ :param async_req bool
327
+ :param str model_field_id: The unique model field id for which you want to get the model field (required)
328
+ :return: list[ModelFieldAuthorization]
329
+ If the method is called asynchronously,
330
+ returns the request thread.
331
+ """
332
+ kwargs['_return_http_data_only'] = True
333
+ if kwargs.get('async_req'):
334
+ return self.get_model_field_authorizations_with_http_info(model_field_id, **kwargs) # noqa: E501
335
+ else:
336
+ (data) = self.get_model_field_authorizations_with_http_info(model_field_id, **kwargs) # noqa: E501
337
+ return data
338
+
339
+ def get_model_field_authorizations_with_http_info(self, model_field_id, **kwargs): # noqa: E501
340
+ """Get authorizations for a model field via its unique id. # noqa: E501
341
+
342
+ This method makes a synchronous HTTP request by default. To make an
343
+ asynchronous HTTP request, please pass async_req=True
344
+ >>> thread = api.get_model_field_authorizations_with_http_info(model_field_id, async_req=True)
345
+ >>> result = thread.get()
346
+
347
+ :param async_req bool
348
+ :param str model_field_id: The unique model field id for which you want to get the model field (required)
349
+ :return: list[ModelFieldAuthorization]
350
+ If the method is called asynchronously,
351
+ returns the request thread.
352
+ """
353
+
354
+ all_params = ['model_field_id'] # noqa: E501
355
+ all_params.append('async_req')
356
+ all_params.append('_return_http_data_only')
357
+ all_params.append('_preload_content')
358
+ all_params.append('_request_timeout')
359
+
360
+ params = locals()
361
+ for key, val in six.iteritems(params['kwargs']):
362
+ if key not in all_params:
363
+ raise TypeError(
364
+ "Got an unexpected keyword argument '%s'"
365
+ " to method get_model_field_authorizations" % key
366
+ )
367
+ params[key] = val
368
+ del params['kwargs']
369
+ # verify the required parameter 'model_field_id' is set
370
+ if ('model_field_id' not in params or
371
+ params['model_field_id'] is None):
372
+ raise ValueError("Missing the required parameter `model_field_id` when calling `get_model_field_authorizations`") # noqa: E501
373
+
374
+ collection_formats = {}
375
+
376
+ path_params = {}
377
+ if 'model_field_id' in params:
378
+ path_params['modelFieldId'] = params['model_field_id'] # noqa: E501
379
+
380
+ query_params = []
381
+
382
+ header_params = {}
383
+
384
+ form_params = []
385
+ local_var_files = {}
386
+
387
+ body_params = None
388
+ # HTTP header `Accept`
389
+ header_params['Accept'] = self.api_client.select_header_accept(
390
+ ['application/json', 'text/json']) # noqa: E501
391
+
392
+ # Authentication setting
393
+ auth_settings = [] # noqa: E501
394
+
395
+ return self.api_client.call_api(
396
+ '/teamdbapi/v2.0/modelfield/{modelFieldId}/auths', 'GET',
397
+ path_params,
398
+ query_params,
399
+ header_params,
400
+ body=body_params,
401
+ post_params=form_params,
402
+ files=local_var_files,
403
+ response_type='list[ModelFieldAuthorization]', # noqa: E501
404
+ auth_settings=auth_settings,
405
+ async_req=params.get('async_req'),
406
+ _return_http_data_only=params.get('_return_http_data_only'),
407
+ _preload_content=params.get('_preload_content', True),
408
+ _request_timeout=params.get('_request_timeout'),
409
+ collection_formats=collection_formats)
410
+
411
+ def get_model_fields(self, field_type, **kwargs): # noqa: E501
412
+ """Get the list of all model fields. # noqa: E501
413
+
414
+ This method makes a synchronous HTTP request by default. To make an
415
+ asynchronous HTTP request, please pass async_req=True
416
+ >>> thread = api.get_model_fields(field_type, async_req=True)
417
+ >>> result = thread.get()
418
+
419
+ :param async_req bool
420
+ :param str field_type: The field type for which to return the model fields. (required)
421
+ :return: list[CoupleGuidText]
422
+ If the method is called asynchronously,
423
+ returns the request thread.
424
+ """
425
+ kwargs['_return_http_data_only'] = True
426
+ if kwargs.get('async_req'):
427
+ return self.get_model_fields_with_http_info(field_type, **kwargs) # noqa: E501
428
+ else:
429
+ (data) = self.get_model_fields_with_http_info(field_type, **kwargs) # noqa: E501
430
+ return data
431
+
432
+ def get_model_fields_with_http_info(self, field_type, **kwargs): # noqa: E501
433
+ """Get the list of all model fields. # noqa: E501
434
+
435
+ This method makes a synchronous HTTP request by default. To make an
436
+ asynchronous HTTP request, please pass async_req=True
437
+ >>> thread = api.get_model_fields_with_http_info(field_type, async_req=True)
438
+ >>> result = thread.get()
439
+
440
+ :param async_req bool
441
+ :param str field_type: The field type for which to return the model fields. (required)
442
+ :return: list[CoupleGuidText]
443
+ If the method is called asynchronously,
444
+ returns the request thread.
445
+ """
446
+
447
+ all_params = ['field_type'] # noqa: E501
448
+ all_params.append('async_req')
449
+ all_params.append('_return_http_data_only')
450
+ all_params.append('_preload_content')
451
+ all_params.append('_request_timeout')
452
+
453
+ params = locals()
454
+ for key, val in six.iteritems(params['kwargs']):
455
+ if key not in all_params:
456
+ raise TypeError(
457
+ "Got an unexpected keyword argument '%s'"
458
+ " to method get_model_fields" % key
459
+ )
460
+ params[key] = val
461
+ del params['kwargs']
462
+ # verify the required parameter 'field_type' is set
463
+ if ('field_type' not in params or
464
+ params['field_type'] is None):
465
+ raise ValueError("Missing the required parameter `field_type` when calling `get_model_fields`") # noqa: E501
466
+
467
+ collection_formats = {}
468
+
469
+ path_params = {}
470
+
471
+ query_params = []
472
+ if 'field_type' in params:
473
+ query_params.append(('fieldType', params['field_type'])) # noqa: E501
474
+
475
+ header_params = {}
476
+
477
+ form_params = []
478
+ local_var_files = {}
479
+
480
+ body_params = None
481
+ # HTTP header `Accept`
482
+ header_params['Accept'] = self.api_client.select_header_accept(
483
+ ['application/json', 'text/json']) # noqa: E501
484
+
485
+ # Authentication setting
486
+ auth_settings = [] # noqa: E501
487
+
488
+ return self.api_client.call_api(
489
+ '/teamdbapi/v2.0/modelfields', 'GET',
490
+ path_params,
491
+ query_params,
492
+ header_params,
493
+ body=body_params,
494
+ post_params=form_params,
495
+ files=local_var_files,
496
+ response_type='list[CoupleGuidText]', # noqa: E501
497
+ auth_settings=auth_settings,
498
+ async_req=params.get('async_req'),
499
+ _return_http_data_only=params.get('_return_http_data_only'),
500
+ _preload_content=params.get('_preload_content', True),
501
+ _request_timeout=params.get('_request_timeout'),
502
+ collection_formats=collection_formats)
503
+
504
+ def update_model_field(self, body, model_field_id, **kwargs): # noqa: E501
505
+ """Update an existing model field # noqa: E501
506
+
507
+ This method makes a synchronous HTTP request by default. To make an
508
+ asynchronous HTTP request, please pass async_req=True
509
+ >>> thread = api.update_model_field(body, model_field_id, async_req=True)
510
+ >>> result = thread.get()
511
+
512
+ :param async_req bool
513
+ :param ModelField body: The model field to update. (required)
514
+ :param str model_field_id: The unique model field id for which you want to update the modelfield (required)
515
+ :return: ModelField
516
+ If the method is called asynchronously,
517
+ returns the request thread.
518
+ """
519
+ kwargs['_return_http_data_only'] = True
520
+ if kwargs.get('async_req'):
521
+ return self.update_model_field_with_http_info(body, model_field_id, **kwargs) # noqa: E501
522
+ else:
523
+ (data) = self.update_model_field_with_http_info(body, model_field_id, **kwargs) # noqa: E501
524
+ return data
525
+
526
+ def update_model_field_with_http_info(self, body, model_field_id, **kwargs): # noqa: E501
527
+ """Update an existing model field # noqa: E501
528
+
529
+ This method makes a synchronous HTTP request by default. To make an
530
+ asynchronous HTTP request, please pass async_req=True
531
+ >>> thread = api.update_model_field_with_http_info(body, model_field_id, async_req=True)
532
+ >>> result = thread.get()
533
+
534
+ :param async_req bool
535
+ :param ModelField body: The model field to update. (required)
536
+ :param str model_field_id: The unique model field id for which you want to update the modelfield (required)
537
+ :return: ModelField
538
+ If the method is called asynchronously,
539
+ returns the request thread.
540
+ """
541
+
542
+ all_params = ['body', 'model_field_id'] # noqa: E501
543
+ all_params.append('async_req')
544
+ all_params.append('_return_http_data_only')
545
+ all_params.append('_preload_content')
546
+ all_params.append('_request_timeout')
547
+
548
+ params = locals()
549
+ for key, val in six.iteritems(params['kwargs']):
550
+ if key not in all_params:
551
+ raise TypeError(
552
+ "Got an unexpected keyword argument '%s'"
553
+ " to method update_model_field" % key
554
+ )
555
+ params[key] = val
556
+ del params['kwargs']
557
+ # verify the required parameter 'body' is set
558
+ if ('body' not in params or
559
+ params['body'] is None):
560
+ raise ValueError("Missing the required parameter `body` when calling `update_model_field`") # noqa: E501
561
+ # verify the required parameter 'model_field_id' is set
562
+ if ('model_field_id' not in params or
563
+ params['model_field_id'] is None):
564
+ raise ValueError("Missing the required parameter `model_field_id` when calling `update_model_field`") # noqa: E501
565
+
566
+ collection_formats = {}
567
+
568
+ path_params = {}
569
+ if 'model_field_id' in params:
570
+ path_params['modelFieldId'] = params['model_field_id'] # noqa: E501
571
+
572
+ query_params = []
573
+
574
+ header_params = {}
575
+
576
+ form_params = []
577
+ local_var_files = {}
578
+
579
+ body_params = None
580
+ if 'body' in params:
581
+ body_params = params['body']
582
+ # HTTP header `Accept`
583
+ header_params['Accept'] = self.api_client.select_header_accept(
584
+ ['application/json', 'text/json']) # noqa: E501
585
+
586
+ # HTTP header `Content-Type`
587
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
588
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
589
+
590
+ # Authentication setting
591
+ auth_settings = [] # noqa: E501
592
+
593
+ return self.api_client.call_api(
594
+ '/teamdbapi/v2.0/modelfield/{modelFieldId}', 'PUT',
595
+ path_params,
596
+ query_params,
597
+ header_params,
598
+ body=body_params,
599
+ post_params=form_params,
600
+ files=local_var_files,
601
+ response_type='ModelField', # noqa: E501
602
+ auth_settings=auth_settings,
603
+ async_req=params.get('async_req'),
604
+ _return_http_data_only=params.get('_return_http_data_only'),
605
+ _preload_content=params.get('_preload_content', True),
606
+ _request_timeout=params.get('_request_timeout'),
607
+ collection_formats=collection_formats)
608
+
609
+ def update_model_field_authorization(self, model_field_id, **kwargs): # noqa: E501
610
+ """Set/Update a model field authorization # noqa: E501
611
+
612
+ This method makes a synchronous HTTP request by default. To make an
613
+ asynchronous HTTP request, please pass async_req=True
614
+ >>> thread = api.update_model_field_authorization(model_field_id, async_req=True)
615
+ >>> result = thread.get()
616
+
617
+ :param async_req bool
618
+ :param str model_field_id: The unique model field id for which you want to set/update the authorizations (required)
619
+ :param ModelFieldAuthorization body: The authorization for the model field.
620
+ :return: ModelFieldAuthorization
621
+ If the method is called asynchronously,
622
+ returns the request thread.
623
+ """
624
+ kwargs['_return_http_data_only'] = True
625
+ if kwargs.get('async_req'):
626
+ return self.update_model_field_authorization_with_http_info(model_field_id, **kwargs) # noqa: E501
627
+ else:
628
+ (data) = self.update_model_field_authorization_with_http_info(model_field_id, **kwargs) # noqa: E501
629
+ return data
630
+
631
+ def update_model_field_authorization_with_http_info(self, model_field_id, **kwargs): # noqa: E501
632
+ """Set/Update a model field authorization # noqa: E501
633
+
634
+ This method makes a synchronous HTTP request by default. To make an
635
+ asynchronous HTTP request, please pass async_req=True
636
+ >>> thread = api.update_model_field_authorization_with_http_info(model_field_id, async_req=True)
637
+ >>> result = thread.get()
638
+
639
+ :param async_req bool
640
+ :param str model_field_id: The unique model field id for which you want to set/update the authorizations (required)
641
+ :param ModelFieldAuthorization body: The authorization for the model field.
642
+ :return: ModelFieldAuthorization
643
+ If the method is called asynchronously,
644
+ returns the request thread.
645
+ """
646
+
647
+ all_params = ['model_field_id', 'body'] # noqa: E501
648
+ all_params.append('async_req')
649
+ all_params.append('_return_http_data_only')
650
+ all_params.append('_preload_content')
651
+ all_params.append('_request_timeout')
652
+
653
+ params = locals()
654
+ for key, val in six.iteritems(params['kwargs']):
655
+ if key not in all_params:
656
+ raise TypeError(
657
+ "Got an unexpected keyword argument '%s'"
658
+ " to method update_model_field_authorization" % key
659
+ )
660
+ params[key] = val
661
+ del params['kwargs']
662
+ # verify the required parameter 'model_field_id' is set
663
+ if ('model_field_id' not in params or
664
+ params['model_field_id'] is None):
665
+ raise ValueError("Missing the required parameter `model_field_id` when calling `update_model_field_authorization`") # noqa: E501
666
+
667
+ collection_formats = {}
668
+
669
+ path_params = {}
670
+ if 'model_field_id' in params:
671
+ path_params['modelFieldId'] = params['model_field_id'] # noqa: E501
672
+
673
+ query_params = []
674
+
675
+ header_params = {}
676
+
677
+ form_params = []
678
+ local_var_files = {}
679
+
680
+ body_params = None
681
+ if 'body' in params:
682
+ body_params = params['body']
683
+ # HTTP header `Accept`
684
+ header_params['Accept'] = self.api_client.select_header_accept(
685
+ ['application/json', 'text/json']) # noqa: E501
686
+
687
+ # HTTP header `Content-Type`
688
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
689
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
690
+
691
+ # Authentication setting
692
+ auth_settings = [] # noqa: E501
693
+
694
+ return self.api_client.call_api(
695
+ '/teamdbapi/v2.0/modelfield/{modelFieldId}/auth', 'PUT',
696
+ path_params,
697
+ query_params,
698
+ header_params,
699
+ body=body_params,
700
+ post_params=form_params,
701
+ files=local_var_files,
702
+ response_type='ModelFieldAuthorization', # noqa: E501
703
+ auth_settings=auth_settings,
704
+ async_req=params.get('async_req'),
705
+ _return_http_data_only=params.get('_return_http_data_only'),
706
+ _preload_content=params.get('_preload_content', True),
707
+ _request_timeout=params.get('_request_timeout'),
708
+ collection_formats=collection_formats)