teamdbapi 2.37.2__py3-none-any.whl → 3.2.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 (84) hide show
  1. teamdbapi/__init__.py +26 -0
  2. teamdbapi/api/__init__.py +6 -0
  3. teamdbapi/api/assembly_api.py +23 -23
  4. teamdbapi/api/component_api.py +1071 -0
  5. teamdbapi/api/criteria_api.py +126 -0
  6. teamdbapi/api/import_export_api.py +85 -0
  7. teamdbapi/api/issue_api.py +1537 -0
  8. teamdbapi/api/lap_report_api.py +5 -1
  9. teamdbapi/api/mounting_api.py +219 -0
  10. teamdbapi/api/part_api.py +785 -0
  11. teamdbapi/api/revision_api.py +109 -4
  12. teamdbapi/api/update_request_api.py +235 -0
  13. teamdbapi/api_client.py +4 -8
  14. teamdbapi/configuration.py +5 -12
  15. teamdbapi/models/__init__.py +20 -0
  16. teamdbapi/models/add_part_car_parameter_arg.py +396 -0
  17. teamdbapi/models/assembly.py +1 -0
  18. teamdbapi/models/bleed_adjustment.py +1 -0
  19. teamdbapi/models/calibration.py +1 -0
  20. teamdbapi/models/car.py +1 -0
  21. teamdbapi/models/car_parameters_context.py +1 -0
  22. teamdbapi/models/compare_options.py +1 -0
  23. teamdbapi/models/compare_result.py +1 -0
  24. teamdbapi/models/compare_result_detail.py +2 -0
  25. teamdbapi/models/component.py +1301 -0
  26. teamdbapi/models/copy_from_tags_args.py +2 -0
  27. teamdbapi/models/couple_guid_text.py +1 -0
  28. teamdbapi/models/criteria.py +430 -0
  29. teamdbapi/models/criteria_value.py +197 -0
  30. teamdbapi/models/event.py +1 -0
  31. teamdbapi/models/file_revision_info.py +199 -0
  32. teamdbapi/models/fixed_field.py +2 -1
  33. teamdbapi/models/group.py +1 -0
  34. teamdbapi/models/import_parameters_args.py +1 -0
  35. teamdbapi/models/import_parameters_results.py +2 -0
  36. teamdbapi/models/import_revisions_args.py +173 -0
  37. teamdbapi/models/import_revisions_info.py +197 -0
  38. teamdbapi/models/import_revisions_results.py +170 -0
  39. teamdbapi/models/issue.py +674 -0
  40. teamdbapi/models/issue_custom_field_value.py +319 -0
  41. teamdbapi/models/issue_priority.py +227 -0
  42. teamdbapi/models/issue_project.py +229 -0
  43. teamdbapi/models/issue_sector.py +199 -0
  44. teamdbapi/models/issue_status.py +284 -0
  45. teamdbapi/models/issue_type.py +199 -0
  46. teamdbapi/models/issue_workflow.py +199 -0
  47. teamdbapi/models/item_value.py +1 -0
  48. teamdbapi/models/item_value_key.py +1 -0
  49. teamdbapi/models/lap.py +1 -0
  50. teamdbapi/models/lap_report_options.py +1 -0
  51. teamdbapi/models/model_field.py +3 -1
  52. teamdbapi/models/model_field_authorization.py +1 -0
  53. teamdbapi/models/mounting.py +489 -0
  54. teamdbapi/models/notes_authorization.py +1 -0
  55. teamdbapi/models/notes_context.py +1 -0
  56. teamdbapi/models/parameter.py +2 -0
  57. teamdbapi/models/parameter_cross_table.py +1 -0
  58. teamdbapi/models/part.py +991 -0
  59. teamdbapi/models/part_car_parameters.py +561 -0
  60. teamdbapi/models/part_count.py +228 -0
  61. teamdbapi/models/problem_details.py +2 -6
  62. teamdbapi/models/revision.py +116 -3
  63. teamdbapi/models/revision_value.py +32 -3
  64. teamdbapi/models/run.py +1 -0
  65. teamdbapi/models/script.py +1 -0
  66. teamdbapi/models/session.py +1 -0
  67. teamdbapi/models/string_with_font_style.py +1 -0
  68. teamdbapi/models/target.py +64 -7
  69. teamdbapi/models/team_db_list.py +1 -0
  70. teamdbapi/models/team_db_list_item.py +1 -0
  71. teamdbapi/models/tire.py +2 -0
  72. teamdbapi/models/tire_set.py +2 -0
  73. teamdbapi/models/track.py +1 -0
  74. teamdbapi/models/track_layout.py +1 -0
  75. teamdbapi/models/user.py +1 -0
  76. teamdbapi/models/user_group.py +1 -0
  77. teamdbapi/models/value_field.py +1 -0
  78. teamdbapi/models/version.py +1 -0
  79. teamdbapi/rest.py +6 -1
  80. {teamdbapi-2.37.2.dist-info → teamdbapi-3.2.0.dist-info}/METADATA +3 -3
  81. teamdbapi-3.2.0.dist-info/RECORD +108 -0
  82. teamdbapi-2.37.2.dist-info/RECORD +0 -82
  83. {teamdbapi-2.37.2.dist-info → teamdbapi-3.2.0.dist-info}/LICENSE +0 -0
  84. {teamdbapi-2.37.2.dist-info → teamdbapi-3.2.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,785 @@
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 PartApi(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 add_car_parameter_to_part(self, body, **kwargs): # noqa: E501
36
+ """Add a car parameter to a part. This will create an association between a lifing part and car parameter. You can specify a car parameter redirection for a part group. # 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.add_car_parameter_to_part(body, async_req=True)
41
+ >>> result = thread.get()
42
+
43
+ :param async_req bool
44
+ :param AddPartCarParameterArg body: The association beetween a part and a car parameter. (required)
45
+ :return: PartCarParameters
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.add_car_parameter_to_part_with_http_info(body, **kwargs) # noqa: E501
52
+ else:
53
+ (data) = self.add_car_parameter_to_part_with_http_info(body, **kwargs) # noqa: E501
54
+ return data
55
+
56
+ def add_car_parameter_to_part_with_http_info(self, body, **kwargs): # noqa: E501
57
+ """Add a car parameter to a part. This will create an association between a lifing part and car parameter. You can specify a car parameter redirection for a part group. # 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.add_car_parameter_to_part_with_http_info(body, async_req=True)
62
+ >>> result = thread.get()
63
+
64
+ :param async_req bool
65
+ :param AddPartCarParameterArg body: The association beetween a part and a car parameter. (required)
66
+ :return: PartCarParameters
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 add_car_parameter_to_part" % 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 `add_car_parameter_to_part`") # 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/part/carparameter', '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='PartCarParameters', # 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_part_car_parameter(self, part_id, parameter_id, **kwargs): # noqa: E501
133
+ """Delete an existing assocation between a part and a car parameter. # 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_part_car_parameter(part_id, parameter_id, async_req=True)
138
+ >>> result = thread.get()
139
+
140
+ :param async_req bool
141
+ :param str part_id: The part unique identifier of the association to delete (required)
142
+ :param str parameter_id: The car parameter unique identifier of the association to delete (required)
143
+ :return: None
144
+ If the method is called asynchronously,
145
+ returns the request thread.
146
+ """
147
+ kwargs['_return_http_data_only'] = True
148
+ if kwargs.get('async_req'):
149
+ return self.delete_part_car_parameter_with_http_info(part_id, parameter_id, **kwargs) # noqa: E501
150
+ else:
151
+ (data) = self.delete_part_car_parameter_with_http_info(part_id, parameter_id, **kwargs) # noqa: E501
152
+ return data
153
+
154
+ def delete_part_car_parameter_with_http_info(self, part_id, parameter_id, **kwargs): # noqa: E501
155
+ """Delete an existing assocation between a part and a car parameter. # noqa: E501
156
+
157
+ This method makes a synchronous HTTP request by default. To make an
158
+ asynchronous HTTP request, please pass async_req=True
159
+ >>> thread = api.delete_part_car_parameter_with_http_info(part_id, parameter_id, async_req=True)
160
+ >>> result = thread.get()
161
+
162
+ :param async_req bool
163
+ :param str part_id: The part unique identifier of the association to delete (required)
164
+ :param str parameter_id: The car parameter unique identifier of the association to delete (required)
165
+ :return: None
166
+ If the method is called asynchronously,
167
+ returns the request thread.
168
+ """
169
+
170
+ all_params = ['part_id', 'parameter_id'] # noqa: E501
171
+ all_params.append('async_req')
172
+ all_params.append('_return_http_data_only')
173
+ all_params.append('_preload_content')
174
+ all_params.append('_request_timeout')
175
+
176
+ params = locals()
177
+ for key, val in six.iteritems(params['kwargs']):
178
+ if key not in all_params:
179
+ raise TypeError(
180
+ "Got an unexpected keyword argument '%s'"
181
+ " to method delete_part_car_parameter" % key
182
+ )
183
+ params[key] = val
184
+ del params['kwargs']
185
+ # verify the required parameter 'part_id' is set
186
+ if ('part_id' not in params or
187
+ params['part_id'] is None):
188
+ raise ValueError("Missing the required parameter `part_id` when calling `delete_part_car_parameter`") # noqa: E501
189
+ # verify the required parameter 'parameter_id' is set
190
+ if ('parameter_id' not in params or
191
+ params['parameter_id'] is None):
192
+ raise ValueError("Missing the required parameter `parameter_id` when calling `delete_part_car_parameter`") # noqa: E501
193
+
194
+ collection_formats = {}
195
+
196
+ path_params = {}
197
+ if 'part_id' in params:
198
+ path_params['partId'] = params['part_id'] # noqa: E501
199
+ if 'parameter_id' in params:
200
+ path_params['parameterId'] = params['parameter_id'] # noqa: E501
201
+
202
+ query_params = []
203
+
204
+ header_params = {}
205
+
206
+ form_params = []
207
+ local_var_files = {}
208
+
209
+ body_params = None
210
+ # HTTP header `Accept`
211
+ header_params['Accept'] = self.api_client.select_header_accept(
212
+ ['application/json', 'text/json']) # noqa: E501
213
+
214
+ # Authentication setting
215
+ auth_settings = [] # noqa: E501
216
+
217
+ return self.api_client.call_api(
218
+ '/teamdbapi/v2.0/part/{partId}/carParameter/{parameterId}', 'DELETE',
219
+ path_params,
220
+ query_params,
221
+ header_params,
222
+ body=body_params,
223
+ post_params=form_params,
224
+ files=local_var_files,
225
+ response_type=None, # noqa: E501
226
+ auth_settings=auth_settings,
227
+ async_req=params.get('async_req'),
228
+ _return_http_data_only=params.get('_return_http_data_only'),
229
+ _preload_content=params.get('_preload_content', True),
230
+ _request_timeout=params.get('_request_timeout'),
231
+ collection_formats=collection_formats)
232
+
233
+ def get_part(self, part_id, **kwargs): # noqa: E501
234
+ """Get a part from it's unique identifier. # noqa: E501
235
+
236
+ This method makes a synchronous HTTP request by default. To make an
237
+ asynchronous HTTP request, please pass async_req=True
238
+ >>> thread = api.get_part(part_id, async_req=True)
239
+ >>> result = thread.get()
240
+
241
+ :param async_req bool
242
+ :param str part_id: The unique identifier of the part to retrieve. (required)
243
+ :return: Part
244
+ If the method is called asynchronously,
245
+ returns the request thread.
246
+ """
247
+ kwargs['_return_http_data_only'] = True
248
+ if kwargs.get('async_req'):
249
+ return self.get_part_with_http_info(part_id, **kwargs) # noqa: E501
250
+ else:
251
+ (data) = self.get_part_with_http_info(part_id, **kwargs) # noqa: E501
252
+ return data
253
+
254
+ def get_part_with_http_info(self, part_id, **kwargs): # noqa: E501
255
+ """Get a part from it's unique identifier. # noqa: E501
256
+
257
+ This method makes a synchronous HTTP request by default. To make an
258
+ asynchronous HTTP request, please pass async_req=True
259
+ >>> thread = api.get_part_with_http_info(part_id, async_req=True)
260
+ >>> result = thread.get()
261
+
262
+ :param async_req bool
263
+ :param str part_id: The unique identifier of the part to retrieve. (required)
264
+ :return: Part
265
+ If the method is called asynchronously,
266
+ returns the request thread.
267
+ """
268
+
269
+ all_params = ['part_id'] # noqa: E501
270
+ all_params.append('async_req')
271
+ all_params.append('_return_http_data_only')
272
+ all_params.append('_preload_content')
273
+ all_params.append('_request_timeout')
274
+
275
+ params = locals()
276
+ for key, val in six.iteritems(params['kwargs']):
277
+ if key not in all_params:
278
+ raise TypeError(
279
+ "Got an unexpected keyword argument '%s'"
280
+ " to method get_part" % key
281
+ )
282
+ params[key] = val
283
+ del params['kwargs']
284
+ # verify the required parameter 'part_id' is set
285
+ if ('part_id' not in params or
286
+ params['part_id'] is None):
287
+ raise ValueError("Missing the required parameter `part_id` when calling `get_part`") # noqa: E501
288
+
289
+ collection_formats = {}
290
+
291
+ path_params = {}
292
+ if 'part_id' in params:
293
+ path_params['partId'] = params['part_id'] # noqa: E501
294
+
295
+ query_params = []
296
+
297
+ header_params = {}
298
+
299
+ form_params = []
300
+ local_var_files = {}
301
+
302
+ body_params = None
303
+ # HTTP header `Accept`
304
+ header_params['Accept'] = self.api_client.select_header_accept(
305
+ ['application/json', 'text/json']) # noqa: E501
306
+
307
+ # Authentication setting
308
+ auth_settings = [] # noqa: E501
309
+
310
+ return self.api_client.call_api(
311
+ '/teamdbapi/v2.0/part/{partId}', 'GET',
312
+ path_params,
313
+ query_params,
314
+ header_params,
315
+ body=body_params,
316
+ post_params=form_params,
317
+ files=local_var_files,
318
+ response_type='Part', # noqa: E501
319
+ auth_settings=auth_settings,
320
+ async_req=params.get('async_req'),
321
+ _return_http_data_only=params.get('_return_http_data_only'),
322
+ _preload_content=params.get('_preload_content', True),
323
+ _request_timeout=params.get('_request_timeout'),
324
+ collection_formats=collection_formats)
325
+
326
+ def get_part_by_part_number(self, part_number, **kwargs): # noqa: E501
327
+ """Get a part from it's part number. # noqa: E501
328
+
329
+ This method makes a synchronous HTTP request by default. To make an
330
+ asynchronous HTTP request, please pass async_req=True
331
+ >>> thread = api.get_part_by_part_number(part_number, async_req=True)
332
+ >>> result = thread.get()
333
+
334
+ :param async_req bool
335
+ :param str part_number: The part number of the part to retrieve. (required)
336
+ :return: Part
337
+ If the method is called asynchronously,
338
+ returns the request thread.
339
+ """
340
+ kwargs['_return_http_data_only'] = True
341
+ if kwargs.get('async_req'):
342
+ return self.get_part_by_part_number_with_http_info(part_number, **kwargs) # noqa: E501
343
+ else:
344
+ (data) = self.get_part_by_part_number_with_http_info(part_number, **kwargs) # noqa: E501
345
+ return data
346
+
347
+ def get_part_by_part_number_with_http_info(self, part_number, **kwargs): # noqa: E501
348
+ """Get a part from it's part number. # noqa: E501
349
+
350
+ This method makes a synchronous HTTP request by default. To make an
351
+ asynchronous HTTP request, please pass async_req=True
352
+ >>> thread = api.get_part_by_part_number_with_http_info(part_number, async_req=True)
353
+ >>> result = thread.get()
354
+
355
+ :param async_req bool
356
+ :param str part_number: The part number of the part to retrieve. (required)
357
+ :return: Part
358
+ If the method is called asynchronously,
359
+ returns the request thread.
360
+ """
361
+
362
+ all_params = ['part_number'] # noqa: E501
363
+ all_params.append('async_req')
364
+ all_params.append('_return_http_data_only')
365
+ all_params.append('_preload_content')
366
+ all_params.append('_request_timeout')
367
+
368
+ params = locals()
369
+ for key, val in six.iteritems(params['kwargs']):
370
+ if key not in all_params:
371
+ raise TypeError(
372
+ "Got an unexpected keyword argument '%s'"
373
+ " to method get_part_by_part_number" % key
374
+ )
375
+ params[key] = val
376
+ del params['kwargs']
377
+ # verify the required parameter 'part_number' is set
378
+ if ('part_number' not in params or
379
+ params['part_number'] is None):
380
+ raise ValueError("Missing the required parameter `part_number` when calling `get_part_by_part_number`") # noqa: E501
381
+
382
+ collection_formats = {}
383
+
384
+ path_params = {}
385
+ if 'part_number' in params:
386
+ path_params['partNumber'] = params['part_number'] # noqa: E501
387
+
388
+ query_params = []
389
+
390
+ header_params = {}
391
+
392
+ form_params = []
393
+ local_var_files = {}
394
+
395
+ body_params = None
396
+ # HTTP header `Accept`
397
+ header_params['Accept'] = self.api_client.select_header_accept(
398
+ ['application/json', 'text/json']) # noqa: E501
399
+
400
+ # Authentication setting
401
+ auth_settings = [] # noqa: E501
402
+
403
+ return self.api_client.call_api(
404
+ '/teamdbapi/v2.0/partnumber/{partNumber}/part', 'GET',
405
+ path_params,
406
+ query_params,
407
+ header_params,
408
+ body=body_params,
409
+ post_params=form_params,
410
+ files=local_var_files,
411
+ response_type='Part', # noqa: E501
412
+ auth_settings=auth_settings,
413
+ async_req=params.get('async_req'),
414
+ _return_http_data_only=params.get('_return_http_data_only'),
415
+ _preload_content=params.get('_preload_content', True),
416
+ _request_timeout=params.get('_request_timeout'),
417
+ collection_formats=collection_formats)
418
+
419
+ def get_part_car_parameters(self, part_id, **kwargs): # noqa: E501
420
+ """Get the car parameters associated with the part # noqa: E501
421
+
422
+ This method makes a synchronous HTTP request by default. To make an
423
+ asynchronous HTTP request, please pass async_req=True
424
+ >>> thread = api.get_part_car_parameters(part_id, async_req=True)
425
+ >>> result = thread.get()
426
+
427
+ :param async_req bool
428
+ :param str part_id: The unique identifier of the part. (required)
429
+ :return: list[PartCarParameters]
430
+ If the method is called asynchronously,
431
+ returns the request thread.
432
+ """
433
+ kwargs['_return_http_data_only'] = True
434
+ if kwargs.get('async_req'):
435
+ return self.get_part_car_parameters_with_http_info(part_id, **kwargs) # noqa: E501
436
+ else:
437
+ (data) = self.get_part_car_parameters_with_http_info(part_id, **kwargs) # noqa: E501
438
+ return data
439
+
440
+ def get_part_car_parameters_with_http_info(self, part_id, **kwargs): # noqa: E501
441
+ """Get the car parameters associated with the part # noqa: E501
442
+
443
+ This method makes a synchronous HTTP request by default. To make an
444
+ asynchronous HTTP request, please pass async_req=True
445
+ >>> thread = api.get_part_car_parameters_with_http_info(part_id, async_req=True)
446
+ >>> result = thread.get()
447
+
448
+ :param async_req bool
449
+ :param str part_id: The unique identifier of the part. (required)
450
+ :return: list[PartCarParameters]
451
+ If the method is called asynchronously,
452
+ returns the request thread.
453
+ """
454
+
455
+ all_params = ['part_id'] # noqa: E501
456
+ all_params.append('async_req')
457
+ all_params.append('_return_http_data_only')
458
+ all_params.append('_preload_content')
459
+ all_params.append('_request_timeout')
460
+
461
+ params = locals()
462
+ for key, val in six.iteritems(params['kwargs']):
463
+ if key not in all_params:
464
+ raise TypeError(
465
+ "Got an unexpected keyword argument '%s'"
466
+ " to method get_part_car_parameters" % key
467
+ )
468
+ params[key] = val
469
+ del params['kwargs']
470
+ # verify the required parameter 'part_id' is set
471
+ if ('part_id' not in params or
472
+ params['part_id'] is None):
473
+ raise ValueError("Missing the required parameter `part_id` when calling `get_part_car_parameters`") # noqa: E501
474
+
475
+ collection_formats = {}
476
+
477
+ path_params = {}
478
+ if 'part_id' in params:
479
+ path_params['partId'] = params['part_id'] # noqa: E501
480
+
481
+ query_params = []
482
+
483
+ header_params = {}
484
+
485
+ form_params = []
486
+ local_var_files = {}
487
+
488
+ body_params = None
489
+ # HTTP header `Accept`
490
+ header_params['Accept'] = self.api_client.select_header_accept(
491
+ ['application/json', 'text/json']) # noqa: E501
492
+
493
+ # Authentication setting
494
+ auth_settings = [] # noqa: E501
495
+
496
+ return self.api_client.call_api(
497
+ '/teamdbapi/v2.0/part/{partId}/carparameters', 'GET',
498
+ path_params,
499
+ query_params,
500
+ header_params,
501
+ body=body_params,
502
+ post_params=form_params,
503
+ files=local_var_files,
504
+ response_type='list[PartCarParameters]', # noqa: E501
505
+ auth_settings=auth_settings,
506
+ async_req=params.get('async_req'),
507
+ _return_http_data_only=params.get('_return_http_data_only'),
508
+ _preload_content=params.get('_preload_content', True),
509
+ _request_timeout=params.get('_request_timeout'),
510
+ collection_formats=collection_formats)
511
+
512
+ def get_part_content(self, part_id, **kwargs): # noqa: E501
513
+ """Get the content of a part group from it's unique identifier. # noqa: E501
514
+
515
+ This method makes a synchronous HTTP request by default. To make an
516
+ asynchronous HTTP request, please pass async_req=True
517
+ >>> thread = api.get_part_content(part_id, async_req=True)
518
+ >>> result = thread.get()
519
+
520
+ :param async_req bool
521
+ :param str part_id: The unique identifier of the part to retrieve. (required)
522
+ :return: list[PartCount]
523
+ If the method is called asynchronously,
524
+ returns the request thread.
525
+ """
526
+ kwargs['_return_http_data_only'] = True
527
+ if kwargs.get('async_req'):
528
+ return self.get_part_content_with_http_info(part_id, **kwargs) # noqa: E501
529
+ else:
530
+ (data) = self.get_part_content_with_http_info(part_id, **kwargs) # noqa: E501
531
+ return data
532
+
533
+ def get_part_content_with_http_info(self, part_id, **kwargs): # noqa: E501
534
+ """Get the content of a part group from it's unique identifier. # noqa: E501
535
+
536
+ This method makes a synchronous HTTP request by default. To make an
537
+ asynchronous HTTP request, please pass async_req=True
538
+ >>> thread = api.get_part_content_with_http_info(part_id, async_req=True)
539
+ >>> result = thread.get()
540
+
541
+ :param async_req bool
542
+ :param str part_id: The unique identifier of the part to retrieve. (required)
543
+ :return: list[PartCount]
544
+ If the method is called asynchronously,
545
+ returns the request thread.
546
+ """
547
+
548
+ all_params = ['part_id'] # noqa: E501
549
+ all_params.append('async_req')
550
+ all_params.append('_return_http_data_only')
551
+ all_params.append('_preload_content')
552
+ all_params.append('_request_timeout')
553
+
554
+ params = locals()
555
+ for key, val in six.iteritems(params['kwargs']):
556
+ if key not in all_params:
557
+ raise TypeError(
558
+ "Got an unexpected keyword argument '%s'"
559
+ " to method get_part_content" % key
560
+ )
561
+ params[key] = val
562
+ del params['kwargs']
563
+ # verify the required parameter 'part_id' is set
564
+ if ('part_id' not in params or
565
+ params['part_id'] is None):
566
+ raise ValueError("Missing the required parameter `part_id` when calling `get_part_content`") # noqa: E501
567
+
568
+ collection_formats = {}
569
+
570
+ path_params = {}
571
+ if 'part_id' in params:
572
+ path_params['partId'] = params['part_id'] # noqa: E501
573
+
574
+ query_params = []
575
+
576
+ header_params = {}
577
+
578
+ form_params = []
579
+ local_var_files = {}
580
+
581
+ body_params = None
582
+ # HTTP header `Accept`
583
+ header_params['Accept'] = self.api_client.select_header_accept(
584
+ ['application/json', 'text/json']) # noqa: E501
585
+
586
+ # Authentication setting
587
+ auth_settings = [] # noqa: E501
588
+
589
+ return self.api_client.call_api(
590
+ '/teamdbapi/v2.0/part/{partId}/content', 'GET',
591
+ path_params,
592
+ query_params,
593
+ header_params,
594
+ body=body_params,
595
+ post_params=form_params,
596
+ files=local_var_files,
597
+ response_type='list[PartCount]', # noqa: E501
598
+ auth_settings=auth_settings,
599
+ async_req=params.get('async_req'),
600
+ _return_http_data_only=params.get('_return_http_data_only'),
601
+ _preload_content=params.get('_preload_content', True),
602
+ _request_timeout=params.get('_request_timeout'),
603
+ collection_formats=collection_formats)
604
+
605
+ def get_parts(self, **kwargs): # noqa: E501
606
+ """Get all parts stored in TeamDB. # noqa: E501
607
+
608
+ This method makes a synchronous HTTP request by default. To make an
609
+ asynchronous HTTP request, please pass async_req=True
610
+ >>> thread = api.get_parts(async_req=True)
611
+ >>> result = thread.get()
612
+
613
+ :param async_req bool
614
+ :return: list[Part]
615
+ If the method is called asynchronously,
616
+ returns the request thread.
617
+ """
618
+ kwargs['_return_http_data_only'] = True
619
+ if kwargs.get('async_req'):
620
+ return self.get_parts_with_http_info(**kwargs) # noqa: E501
621
+ else:
622
+ (data) = self.get_parts_with_http_info(**kwargs) # noqa: E501
623
+ return data
624
+
625
+ def get_parts_with_http_info(self, **kwargs): # noqa: E501
626
+ """Get all parts stored in TeamDB. # noqa: E501
627
+
628
+ This method makes a synchronous HTTP request by default. To make an
629
+ asynchronous HTTP request, please pass async_req=True
630
+ >>> thread = api.get_parts_with_http_info(async_req=True)
631
+ >>> result = thread.get()
632
+
633
+ :param async_req bool
634
+ :return: list[Part]
635
+ If the method is called asynchronously,
636
+ returns the request thread.
637
+ """
638
+
639
+ all_params = [] # noqa: E501
640
+ all_params.append('async_req')
641
+ all_params.append('_return_http_data_only')
642
+ all_params.append('_preload_content')
643
+ all_params.append('_request_timeout')
644
+
645
+ params = locals()
646
+ for key, val in six.iteritems(params['kwargs']):
647
+ if key not in all_params:
648
+ raise TypeError(
649
+ "Got an unexpected keyword argument '%s'"
650
+ " to method get_parts" % key
651
+ )
652
+ params[key] = val
653
+ del params['kwargs']
654
+
655
+ collection_formats = {}
656
+
657
+ path_params = {}
658
+
659
+ query_params = []
660
+
661
+ header_params = {}
662
+
663
+ form_params = []
664
+ local_var_files = {}
665
+
666
+ body_params = None
667
+ # HTTP header `Accept`
668
+ header_params['Accept'] = self.api_client.select_header_accept(
669
+ ['application/json', 'text/json']) # noqa: E501
670
+
671
+ # Authentication setting
672
+ auth_settings = [] # noqa: E501
673
+
674
+ return self.api_client.call_api(
675
+ '/teamdbapi/v2.0/parts', 'GET',
676
+ path_params,
677
+ query_params,
678
+ header_params,
679
+ body=body_params,
680
+ post_params=form_params,
681
+ files=local_var_files,
682
+ response_type='list[Part]', # noqa: E501
683
+ auth_settings=auth_settings,
684
+ async_req=params.get('async_req'),
685
+ _return_http_data_only=params.get('_return_http_data_only'),
686
+ _preload_content=params.get('_preload_content', True),
687
+ _request_timeout=params.get('_request_timeout'),
688
+ collection_formats=collection_formats)
689
+
690
+ def update_part_car_parameter(self, body, **kwargs): # noqa: E501
691
+ """Update an existing assocation between a part and a car parameter. You can specify a car parameter redirection for a part group. # noqa: E501
692
+
693
+ This method makes a synchronous HTTP request by default. To make an
694
+ asynchronous HTTP request, please pass async_req=True
695
+ >>> thread = api.update_part_car_parameter(body, async_req=True)
696
+ >>> result = thread.get()
697
+
698
+ :param async_req bool
699
+ :param AddPartCarParameterArg body: The association beetween a part and a car parameter. (required)
700
+ :return: PartCarParameters
701
+ If the method is called asynchronously,
702
+ returns the request thread.
703
+ """
704
+ kwargs['_return_http_data_only'] = True
705
+ if kwargs.get('async_req'):
706
+ return self.update_part_car_parameter_with_http_info(body, **kwargs) # noqa: E501
707
+ else:
708
+ (data) = self.update_part_car_parameter_with_http_info(body, **kwargs) # noqa: E501
709
+ return data
710
+
711
+ def update_part_car_parameter_with_http_info(self, body, **kwargs): # noqa: E501
712
+ """Update an existing assocation between a part and a car parameter. You can specify a car parameter redirection for a part group. # noqa: E501
713
+
714
+ This method makes a synchronous HTTP request by default. To make an
715
+ asynchronous HTTP request, please pass async_req=True
716
+ >>> thread = api.update_part_car_parameter_with_http_info(body, async_req=True)
717
+ >>> result = thread.get()
718
+
719
+ :param async_req bool
720
+ :param AddPartCarParameterArg body: The association beetween a part and a car parameter. (required)
721
+ :return: PartCarParameters
722
+ If the method is called asynchronously,
723
+ returns the request thread.
724
+ """
725
+
726
+ all_params = ['body'] # noqa: E501
727
+ all_params.append('async_req')
728
+ all_params.append('_return_http_data_only')
729
+ all_params.append('_preload_content')
730
+ all_params.append('_request_timeout')
731
+
732
+ params = locals()
733
+ for key, val in six.iteritems(params['kwargs']):
734
+ if key not in all_params:
735
+ raise TypeError(
736
+ "Got an unexpected keyword argument '%s'"
737
+ " to method update_part_car_parameter" % key
738
+ )
739
+ params[key] = val
740
+ del params['kwargs']
741
+ # verify the required parameter 'body' is set
742
+ if ('body' not in params or
743
+ params['body'] is None):
744
+ raise ValueError("Missing the required parameter `body` when calling `update_part_car_parameter`") # noqa: E501
745
+
746
+ collection_formats = {}
747
+
748
+ path_params = {}
749
+
750
+ query_params = []
751
+
752
+ header_params = {}
753
+
754
+ form_params = []
755
+ local_var_files = {}
756
+
757
+ body_params = None
758
+ if 'body' in params:
759
+ body_params = params['body']
760
+ # HTTP header `Accept`
761
+ header_params['Accept'] = self.api_client.select_header_accept(
762
+ ['application/json', 'text/json']) # noqa: E501
763
+
764
+ # HTTP header `Content-Type`
765
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
766
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
767
+
768
+ # Authentication setting
769
+ auth_settings = [] # noqa: E501
770
+
771
+ return self.api_client.call_api(
772
+ '/teamdbapi/v2.0/part/carParameter', 'PUT',
773
+ path_params,
774
+ query_params,
775
+ header_params,
776
+ body=body_params,
777
+ post_params=form_params,
778
+ files=local_var_files,
779
+ response_type='PartCarParameters', # noqa: E501
780
+ auth_settings=auth_settings,
781
+ async_req=params.get('async_req'),
782
+ _return_http_data_only=params.get('_return_http_data_only'),
783
+ _preload_content=params.get('_preload_content', True),
784
+ _request_timeout=params.get('_request_timeout'),
785
+ collection_formats=collection_formats)