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,449 +1,449 @@
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 VersionApi(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_version(self, body, **kwargs): # noqa: E501
36
- """Create a new version by importing a definition file # 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_version(body, async_req=True)
41
- >>> result = thread.get()
42
-
43
- :param async_req bool
44
- :param Version body: The version to create. (required)
45
- :param str default_revision_name: The default name that will be given to the new revisions created during the file import. For example : Rev_000
46
- :param str assembly_name: The assembly name that will be created during the import.
47
- :param str copy_from_version: The version id used to copy the group. Set this argument to \"00000000-0000-0000-0000-000000000000\" if you don't want to make a copy.
48
- :param bool set_default_assembly: True to define the new assembly as the version's default assembly
49
- :param str copy_from_assembly: If not empty, enable the creation of the new assembly by copying another assembly from another version
50
- :param bool auto_naming_partial_assembly: True to enable the automatic naming of partial assemblies
51
- :param bool copy_history_log: True to copy logs when copying a version
52
- :return: Version
53
- If the method is called asynchronously,
54
- returns the request thread.
55
- """
56
- kwargs['_return_http_data_only'] = True
57
- if kwargs.get('async_req'):
58
- return self.create_version_with_http_info(body, **kwargs) # noqa: E501
59
- else:
60
- (data) = self.create_version_with_http_info(body, **kwargs) # noqa: E501
61
- return data
62
-
63
- def create_version_with_http_info(self, body, **kwargs): # noqa: E501
64
- """Create a new version by importing a definition file # noqa: E501
65
-
66
- This method makes a synchronous HTTP request by default. To make an
67
- asynchronous HTTP request, please pass async_req=True
68
- >>> thread = api.create_version_with_http_info(body, async_req=True)
69
- >>> result = thread.get()
70
-
71
- :param async_req bool
72
- :param Version body: The version to create. (required)
73
- :param str default_revision_name: The default name that will be given to the new revisions created during the file import. For example : Rev_000
74
- :param str assembly_name: The assembly name that will be created during the import.
75
- :param str copy_from_version: The version id used to copy the group. Set this argument to \"00000000-0000-0000-0000-000000000000\" if you don't want to make a copy.
76
- :param bool set_default_assembly: True to define the new assembly as the version's default assembly
77
- :param str copy_from_assembly: If not empty, enable the creation of the new assembly by copying another assembly from another version
78
- :param bool auto_naming_partial_assembly: True to enable the automatic naming of partial assemblies
79
- :param bool copy_history_log: True to copy logs when copying a version
80
- :return: Version
81
- If the method is called asynchronously,
82
- returns the request thread.
83
- """
84
-
85
- all_params = ['body', 'default_revision_name', 'assembly_name', 'copy_from_version', 'set_default_assembly', 'copy_from_assembly', 'auto_naming_partial_assembly', 'copy_history_log'] # noqa: E501
86
- all_params.append('async_req')
87
- all_params.append('_return_http_data_only')
88
- all_params.append('_preload_content')
89
- all_params.append('_request_timeout')
90
-
91
- params = locals()
92
- for key, val in six.iteritems(params['kwargs']):
93
- if key not in all_params:
94
- raise TypeError(
95
- "Got an unexpected keyword argument '%s'"
96
- " to method create_version" % key
97
- )
98
- params[key] = val
99
- del params['kwargs']
100
- # verify the required parameter 'body' is set
101
- if ('body' not in params or
102
- params['body'] is None):
103
- raise ValueError("Missing the required parameter `body` when calling `create_version`") # noqa: E501
104
-
105
- collection_formats = {}
106
-
107
- path_params = {}
108
-
109
- query_params = []
110
- if 'default_revision_name' in params:
111
- query_params.append(('defaultRevisionName', params['default_revision_name'])) # noqa: E501
112
- if 'assembly_name' in params:
113
- query_params.append(('assemblyName', params['assembly_name'])) # noqa: E501
114
- if 'copy_from_version' in params:
115
- query_params.append(('copyFromVersion', params['copy_from_version'])) # noqa: E501
116
- if 'set_default_assembly' in params:
117
- query_params.append(('setDefaultAssembly', params['set_default_assembly'])) # noqa: E501
118
- if 'copy_from_assembly' in params:
119
- query_params.append(('copyFromAssembly', params['copy_from_assembly'])) # noqa: E501
120
- if 'auto_naming_partial_assembly' in params:
121
- query_params.append(('autoNamingPartialAssembly', params['auto_naming_partial_assembly'])) # noqa: E501
122
- if 'copy_history_log' in params:
123
- query_params.append(('copyHistoryLog', params['copy_history_log'])) # noqa: E501
124
-
125
- header_params = {}
126
-
127
- form_params = []
128
- local_var_files = {}
129
-
130
- body_params = None
131
- if 'body' in params:
132
- body_params = params['body']
133
- # HTTP header `Accept`
134
- header_params['Accept'] = self.api_client.select_header_accept(
135
- ['application/json', 'text/json']) # noqa: E501
136
-
137
- # HTTP header `Content-Type`
138
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
139
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
140
-
141
- # Authentication setting
142
- auth_settings = [] # noqa: E501
143
-
144
- return self.api_client.call_api(
145
- '/teamdbapi/v2.0/version', 'POST',
146
- path_params,
147
- query_params,
148
- header_params,
149
- body=body_params,
150
- post_params=form_params,
151
- files=local_var_files,
152
- response_type='Version', # noqa: E501
153
- auth_settings=auth_settings,
154
- async_req=params.get('async_req'),
155
- _return_http_data_only=params.get('_return_http_data_only'),
156
- _preload_content=params.get('_preload_content', True),
157
- _request_timeout=params.get('_request_timeout'),
158
- collection_formats=collection_formats)
159
-
160
- def get_version(self, version_id, **kwargs): # noqa: E501
161
- """Get a version via a unique id. # noqa: E501
162
-
163
- This method makes a synchronous HTTP request by default. To make an
164
- asynchronous HTTP request, please pass async_req=True
165
- >>> thread = api.get_version(version_id, async_req=True)
166
- >>> result = thread.get()
167
-
168
- :param async_req bool
169
- :param str version_id: The unique version id to which you want to get the version (required)
170
- :return: Version
171
- If the method is called asynchronously,
172
- returns the request thread.
173
- """
174
- kwargs['_return_http_data_only'] = True
175
- if kwargs.get('async_req'):
176
- return self.get_version_with_http_info(version_id, **kwargs) # noqa: E501
177
- else:
178
- (data) = self.get_version_with_http_info(version_id, **kwargs) # noqa: E501
179
- return data
180
-
181
- def get_version_with_http_info(self, version_id, **kwargs): # noqa: E501
182
- """Get a version via a unique id. # noqa: E501
183
-
184
- This method makes a synchronous HTTP request by default. To make an
185
- asynchronous HTTP request, please pass async_req=True
186
- >>> thread = api.get_version_with_http_info(version_id, async_req=True)
187
- >>> result = thread.get()
188
-
189
- :param async_req bool
190
- :param str version_id: The unique version id to which you want to get the version (required)
191
- :return: Version
192
- If the method is called asynchronously,
193
- returns the request thread.
194
- """
195
-
196
- all_params = ['version_id'] # noqa: E501
197
- all_params.append('async_req')
198
- all_params.append('_return_http_data_only')
199
- all_params.append('_preload_content')
200
- all_params.append('_request_timeout')
201
-
202
- params = locals()
203
- for key, val in six.iteritems(params['kwargs']):
204
- if key not in all_params:
205
- raise TypeError(
206
- "Got an unexpected keyword argument '%s'"
207
- " to method get_version" % key
208
- )
209
- params[key] = val
210
- del params['kwargs']
211
- # verify the required parameter 'version_id' is set
212
- if ('version_id' not in params or
213
- params['version_id'] is None):
214
- raise ValueError("Missing the required parameter `version_id` when calling `get_version`") # noqa: E501
215
-
216
- collection_formats = {}
217
-
218
- path_params = {}
219
- if 'version_id' in params:
220
- path_params['versionId'] = params['version_id'] # noqa: E501
221
-
222
- query_params = []
223
-
224
- header_params = {}
225
-
226
- form_params = []
227
- local_var_files = {}
228
-
229
- body_params = None
230
- # HTTP header `Accept`
231
- header_params['Accept'] = self.api_client.select_header_accept(
232
- ['application/json', 'text/json']) # noqa: E501
233
-
234
- # Authentication setting
235
- auth_settings = [] # noqa: E501
236
-
237
- return self.api_client.call_api(
238
- '/teamdbapi/v2.0/version/{versionId}', 'GET',
239
- path_params,
240
- query_params,
241
- header_params,
242
- body=body_params,
243
- post_params=form_params,
244
- files=local_var_files,
245
- response_type='Version', # noqa: E501
246
- auth_settings=auth_settings,
247
- async_req=params.get('async_req'),
248
- _return_http_data_only=params.get('_return_http_data_only'),
249
- _preload_content=params.get('_preload_content', True),
250
- _request_timeout=params.get('_request_timeout'),
251
- collection_formats=collection_formats)
252
-
253
- def get_versions(self, target_id, **kwargs): # noqa: E501
254
- """Get the list of all versions for a given target # noqa: E501
255
-
256
- This method makes a synchronous HTTP request by default. To make an
257
- asynchronous HTTP request, please pass async_req=True
258
- >>> thread = api.get_versions(target_id, async_req=True)
259
- >>> result = thread.get()
260
-
261
- :param async_req bool
262
- :param str target_id: The unique target id to wich you want to get the versions. (required)
263
- :return: list[Version]
264
- If the method is called asynchronously,
265
- returns the request thread.
266
- """
267
- kwargs['_return_http_data_only'] = True
268
- if kwargs.get('async_req'):
269
- return self.get_versions_with_http_info(target_id, **kwargs) # noqa: E501
270
- else:
271
- (data) = self.get_versions_with_http_info(target_id, **kwargs) # noqa: E501
272
- return data
273
-
274
- def get_versions_with_http_info(self, target_id, **kwargs): # noqa: E501
275
- """Get the list of all versions for a given target # noqa: E501
276
-
277
- This method makes a synchronous HTTP request by default. To make an
278
- asynchronous HTTP request, please pass async_req=True
279
- >>> thread = api.get_versions_with_http_info(target_id, async_req=True)
280
- >>> result = thread.get()
281
-
282
- :param async_req bool
283
- :param str target_id: The unique target id to wich you want to get the versions. (required)
284
- :return: list[Version]
285
- If the method is called asynchronously,
286
- returns the request thread.
287
- """
288
-
289
- all_params = ['target_id'] # noqa: E501
290
- all_params.append('async_req')
291
- all_params.append('_return_http_data_only')
292
- all_params.append('_preload_content')
293
- all_params.append('_request_timeout')
294
-
295
- params = locals()
296
- for key, val in six.iteritems(params['kwargs']):
297
- if key not in all_params:
298
- raise TypeError(
299
- "Got an unexpected keyword argument '%s'"
300
- " to method get_versions" % key
301
- )
302
- params[key] = val
303
- del params['kwargs']
304
- # verify the required parameter 'target_id' is set
305
- if ('target_id' not in params or
306
- params['target_id'] is None):
307
- raise ValueError("Missing the required parameter `target_id` when calling `get_versions`") # noqa: E501
308
-
309
- collection_formats = {}
310
-
311
- path_params = {}
312
- if 'target_id' in params:
313
- path_params['targetId'] = params['target_id'] # noqa: E501
314
-
315
- query_params = []
316
-
317
- header_params = {}
318
-
319
- form_params = []
320
- local_var_files = {}
321
-
322
- body_params = None
323
- # HTTP header `Accept`
324
- header_params['Accept'] = self.api_client.select_header_accept(
325
- ['application/json', 'text/json']) # noqa: E501
326
-
327
- # Authentication setting
328
- auth_settings = [] # noqa: E501
329
-
330
- return self.api_client.call_api(
331
- '/teamdbapi/v2.0/target/{targetId}/versions', 'GET',
332
- path_params,
333
- query_params,
334
- header_params,
335
- body=body_params,
336
- post_params=form_params,
337
- files=local_var_files,
338
- response_type='list[Version]', # noqa: E501
339
- auth_settings=auth_settings,
340
- async_req=params.get('async_req'),
341
- _return_http_data_only=params.get('_return_http_data_only'),
342
- _preload_content=params.get('_preload_content', True),
343
- _request_timeout=params.get('_request_timeout'),
344
- collection_formats=collection_formats)
345
-
346
- def update_version(self, body, version_id, **kwargs): # noqa: E501
347
- """Update an existing version # noqa: E501
348
-
349
- This method makes a synchronous HTTP request by default. To make an
350
- asynchronous HTTP request, please pass async_req=True
351
- >>> thread = api.update_version(body, version_id, async_req=True)
352
- >>> result = thread.get()
353
-
354
- :param async_req bool
355
- :param Version body: The version to update. (required)
356
- :param str version_id: The version id corresponding to the version you want to update. (required)
357
- :return: Version
358
- If the method is called asynchronously,
359
- returns the request thread.
360
- """
361
- kwargs['_return_http_data_only'] = True
362
- if kwargs.get('async_req'):
363
- return self.update_version_with_http_info(body, version_id, **kwargs) # noqa: E501
364
- else:
365
- (data) = self.update_version_with_http_info(body, version_id, **kwargs) # noqa: E501
366
- return data
367
-
368
- def update_version_with_http_info(self, body, version_id, **kwargs): # noqa: E501
369
- """Update an existing version # noqa: E501
370
-
371
- This method makes a synchronous HTTP request by default. To make an
372
- asynchronous HTTP request, please pass async_req=True
373
- >>> thread = api.update_version_with_http_info(body, version_id, async_req=True)
374
- >>> result = thread.get()
375
-
376
- :param async_req bool
377
- :param Version body: The version to update. (required)
378
- :param str version_id: The version id corresponding to the version you want to update. (required)
379
- :return: Version
380
- If the method is called asynchronously,
381
- returns the request thread.
382
- """
383
-
384
- all_params = ['body', 'version_id'] # noqa: E501
385
- all_params.append('async_req')
386
- all_params.append('_return_http_data_only')
387
- all_params.append('_preload_content')
388
- all_params.append('_request_timeout')
389
-
390
- params = locals()
391
- for key, val in six.iteritems(params['kwargs']):
392
- if key not in all_params:
393
- raise TypeError(
394
- "Got an unexpected keyword argument '%s'"
395
- " to method update_version" % key
396
- )
397
- params[key] = val
398
- del params['kwargs']
399
- # verify the required parameter 'body' is set
400
- if ('body' not in params or
401
- params['body'] is None):
402
- raise ValueError("Missing the required parameter `body` when calling `update_version`") # noqa: E501
403
- # verify the required parameter 'version_id' is set
404
- if ('version_id' not in params or
405
- params['version_id'] is None):
406
- raise ValueError("Missing the required parameter `version_id` when calling `update_version`") # noqa: E501
407
-
408
- collection_formats = {}
409
-
410
- path_params = {}
411
- if 'version_id' in params:
412
- path_params['versionId'] = params['version_id'] # noqa: E501
413
-
414
- query_params = []
415
-
416
- header_params = {}
417
-
418
- form_params = []
419
- local_var_files = {}
420
-
421
- body_params = None
422
- if 'body' in params:
423
- body_params = params['body']
424
- # HTTP header `Accept`
425
- header_params['Accept'] = self.api_client.select_header_accept(
426
- ['application/json', 'text/json']) # noqa: E501
427
-
428
- # HTTP header `Content-Type`
429
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
430
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
431
-
432
- # Authentication setting
433
- auth_settings = [] # noqa: E501
434
-
435
- return self.api_client.call_api(
436
- '/teamdbapi/v2.0/version/{versionId}', 'PUT',
437
- path_params,
438
- query_params,
439
- header_params,
440
- body=body_params,
441
- post_params=form_params,
442
- files=local_var_files,
443
- response_type='Version', # noqa: E501
444
- auth_settings=auth_settings,
445
- async_req=params.get('async_req'),
446
- _return_http_data_only=params.get('_return_http_data_only'),
447
- _preload_content=params.get('_preload_content', True),
448
- _request_timeout=params.get('_request_timeout'),
449
- 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 VersionApi(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_version(self, body, **kwargs): # noqa: E501
36
+ """Create a new version by importing a definition file # 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_version(body, async_req=True)
41
+ >>> result = thread.get()
42
+
43
+ :param async_req bool
44
+ :param Version body: The version to create. (required)
45
+ :param str default_revision_name: The default name that will be given to the new revisions created during the file import. For example : Rev_000
46
+ :param str assembly_name: The assembly name that will be created during the import.
47
+ :param str copy_from_version: The version id used to copy the group. Set this argument to \"00000000-0000-0000-0000-000000000000\" if you don't want to make a copy.
48
+ :param bool set_default_assembly: True to define the new assembly as the version's default assembly
49
+ :param str copy_from_assembly: If not empty, enable the creation of the new assembly by copying another assembly from another version
50
+ :param bool auto_naming_partial_assembly: True to enable the automatic naming of partial assemblies
51
+ :param bool copy_history_log: True to copy logs when copying a version
52
+ :return: Version
53
+ If the method is called asynchronously,
54
+ returns the request thread.
55
+ """
56
+ kwargs['_return_http_data_only'] = True
57
+ if kwargs.get('async_req'):
58
+ return self.create_version_with_http_info(body, **kwargs) # noqa: E501
59
+ else:
60
+ (data) = self.create_version_with_http_info(body, **kwargs) # noqa: E501
61
+ return data
62
+
63
+ def create_version_with_http_info(self, body, **kwargs): # noqa: E501
64
+ """Create a new version by importing a definition file # noqa: E501
65
+
66
+ This method makes a synchronous HTTP request by default. To make an
67
+ asynchronous HTTP request, please pass async_req=True
68
+ >>> thread = api.create_version_with_http_info(body, async_req=True)
69
+ >>> result = thread.get()
70
+
71
+ :param async_req bool
72
+ :param Version body: The version to create. (required)
73
+ :param str default_revision_name: The default name that will be given to the new revisions created during the file import. For example : Rev_000
74
+ :param str assembly_name: The assembly name that will be created during the import.
75
+ :param str copy_from_version: The version id used to copy the group. Set this argument to \"00000000-0000-0000-0000-000000000000\" if you don't want to make a copy.
76
+ :param bool set_default_assembly: True to define the new assembly as the version's default assembly
77
+ :param str copy_from_assembly: If not empty, enable the creation of the new assembly by copying another assembly from another version
78
+ :param bool auto_naming_partial_assembly: True to enable the automatic naming of partial assemblies
79
+ :param bool copy_history_log: True to copy logs when copying a version
80
+ :return: Version
81
+ If the method is called asynchronously,
82
+ returns the request thread.
83
+ """
84
+
85
+ all_params = ['body', 'default_revision_name', 'assembly_name', 'copy_from_version', 'set_default_assembly', 'copy_from_assembly', 'auto_naming_partial_assembly', 'copy_history_log'] # noqa: E501
86
+ all_params.append('async_req')
87
+ all_params.append('_return_http_data_only')
88
+ all_params.append('_preload_content')
89
+ all_params.append('_request_timeout')
90
+
91
+ params = locals()
92
+ for key, val in six.iteritems(params['kwargs']):
93
+ if key not in all_params:
94
+ raise TypeError(
95
+ "Got an unexpected keyword argument '%s'"
96
+ " to method create_version" % key
97
+ )
98
+ params[key] = val
99
+ del params['kwargs']
100
+ # verify the required parameter 'body' is set
101
+ if ('body' not in params or
102
+ params['body'] is None):
103
+ raise ValueError("Missing the required parameter `body` when calling `create_version`") # noqa: E501
104
+
105
+ collection_formats = {}
106
+
107
+ path_params = {}
108
+
109
+ query_params = []
110
+ if 'default_revision_name' in params:
111
+ query_params.append(('defaultRevisionName', params['default_revision_name'])) # noqa: E501
112
+ if 'assembly_name' in params:
113
+ query_params.append(('assemblyName', params['assembly_name'])) # noqa: E501
114
+ if 'copy_from_version' in params:
115
+ query_params.append(('copyFromVersion', params['copy_from_version'])) # noqa: E501
116
+ if 'set_default_assembly' in params:
117
+ query_params.append(('setDefaultAssembly', params['set_default_assembly'])) # noqa: E501
118
+ if 'copy_from_assembly' in params:
119
+ query_params.append(('copyFromAssembly', params['copy_from_assembly'])) # noqa: E501
120
+ if 'auto_naming_partial_assembly' in params:
121
+ query_params.append(('autoNamingPartialAssembly', params['auto_naming_partial_assembly'])) # noqa: E501
122
+ if 'copy_history_log' in params:
123
+ query_params.append(('copyHistoryLog', params['copy_history_log'])) # noqa: E501
124
+
125
+ header_params = {}
126
+
127
+ form_params = []
128
+ local_var_files = {}
129
+
130
+ body_params = None
131
+ if 'body' in params:
132
+ body_params = params['body']
133
+ # HTTP header `Accept`
134
+ header_params['Accept'] = self.api_client.select_header_accept(
135
+ ['application/json', 'text/json']) # noqa: E501
136
+
137
+ # HTTP header `Content-Type`
138
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
139
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
140
+
141
+ # Authentication setting
142
+ auth_settings = [] # noqa: E501
143
+
144
+ return self.api_client.call_api(
145
+ '/teamdbapi/v2.0/version', 'POST',
146
+ path_params,
147
+ query_params,
148
+ header_params,
149
+ body=body_params,
150
+ post_params=form_params,
151
+ files=local_var_files,
152
+ response_type='Version', # noqa: E501
153
+ auth_settings=auth_settings,
154
+ async_req=params.get('async_req'),
155
+ _return_http_data_only=params.get('_return_http_data_only'),
156
+ _preload_content=params.get('_preload_content', True),
157
+ _request_timeout=params.get('_request_timeout'),
158
+ collection_formats=collection_formats)
159
+
160
+ def get_version(self, version_id, **kwargs): # noqa: E501
161
+ """Get a version via a unique id. # noqa: E501
162
+
163
+ This method makes a synchronous HTTP request by default. To make an
164
+ asynchronous HTTP request, please pass async_req=True
165
+ >>> thread = api.get_version(version_id, async_req=True)
166
+ >>> result = thread.get()
167
+
168
+ :param async_req bool
169
+ :param str version_id: The unique version id to which you want to get the version (required)
170
+ :return: Version
171
+ If the method is called asynchronously,
172
+ returns the request thread.
173
+ """
174
+ kwargs['_return_http_data_only'] = True
175
+ if kwargs.get('async_req'):
176
+ return self.get_version_with_http_info(version_id, **kwargs) # noqa: E501
177
+ else:
178
+ (data) = self.get_version_with_http_info(version_id, **kwargs) # noqa: E501
179
+ return data
180
+
181
+ def get_version_with_http_info(self, version_id, **kwargs): # noqa: E501
182
+ """Get a version via a unique id. # noqa: E501
183
+
184
+ This method makes a synchronous HTTP request by default. To make an
185
+ asynchronous HTTP request, please pass async_req=True
186
+ >>> thread = api.get_version_with_http_info(version_id, async_req=True)
187
+ >>> result = thread.get()
188
+
189
+ :param async_req bool
190
+ :param str version_id: The unique version id to which you want to get the version (required)
191
+ :return: Version
192
+ If the method is called asynchronously,
193
+ returns the request thread.
194
+ """
195
+
196
+ all_params = ['version_id'] # noqa: E501
197
+ all_params.append('async_req')
198
+ all_params.append('_return_http_data_only')
199
+ all_params.append('_preload_content')
200
+ all_params.append('_request_timeout')
201
+
202
+ params = locals()
203
+ for key, val in six.iteritems(params['kwargs']):
204
+ if key not in all_params:
205
+ raise TypeError(
206
+ "Got an unexpected keyword argument '%s'"
207
+ " to method get_version" % key
208
+ )
209
+ params[key] = val
210
+ del params['kwargs']
211
+ # verify the required parameter 'version_id' is set
212
+ if ('version_id' not in params or
213
+ params['version_id'] is None):
214
+ raise ValueError("Missing the required parameter `version_id` when calling `get_version`") # noqa: E501
215
+
216
+ collection_formats = {}
217
+
218
+ path_params = {}
219
+ if 'version_id' in params:
220
+ path_params['versionId'] = params['version_id'] # noqa: E501
221
+
222
+ query_params = []
223
+
224
+ header_params = {}
225
+
226
+ form_params = []
227
+ local_var_files = {}
228
+
229
+ body_params = None
230
+ # HTTP header `Accept`
231
+ header_params['Accept'] = self.api_client.select_header_accept(
232
+ ['application/json', 'text/json']) # noqa: E501
233
+
234
+ # Authentication setting
235
+ auth_settings = [] # noqa: E501
236
+
237
+ return self.api_client.call_api(
238
+ '/teamdbapi/v2.0/version/{versionId}', 'GET',
239
+ path_params,
240
+ query_params,
241
+ header_params,
242
+ body=body_params,
243
+ post_params=form_params,
244
+ files=local_var_files,
245
+ response_type='Version', # noqa: E501
246
+ auth_settings=auth_settings,
247
+ async_req=params.get('async_req'),
248
+ _return_http_data_only=params.get('_return_http_data_only'),
249
+ _preload_content=params.get('_preload_content', True),
250
+ _request_timeout=params.get('_request_timeout'),
251
+ collection_formats=collection_formats)
252
+
253
+ def get_versions(self, target_id, **kwargs): # noqa: E501
254
+ """Get the list of all versions for a given target # noqa: E501
255
+
256
+ This method makes a synchronous HTTP request by default. To make an
257
+ asynchronous HTTP request, please pass async_req=True
258
+ >>> thread = api.get_versions(target_id, async_req=True)
259
+ >>> result = thread.get()
260
+
261
+ :param async_req bool
262
+ :param str target_id: The unique target id to wich you want to get the versions. (required)
263
+ :return: list[Version]
264
+ If the method is called asynchronously,
265
+ returns the request thread.
266
+ """
267
+ kwargs['_return_http_data_only'] = True
268
+ if kwargs.get('async_req'):
269
+ return self.get_versions_with_http_info(target_id, **kwargs) # noqa: E501
270
+ else:
271
+ (data) = self.get_versions_with_http_info(target_id, **kwargs) # noqa: E501
272
+ return data
273
+
274
+ def get_versions_with_http_info(self, target_id, **kwargs): # noqa: E501
275
+ """Get the list of all versions for a given target # noqa: E501
276
+
277
+ This method makes a synchronous HTTP request by default. To make an
278
+ asynchronous HTTP request, please pass async_req=True
279
+ >>> thread = api.get_versions_with_http_info(target_id, async_req=True)
280
+ >>> result = thread.get()
281
+
282
+ :param async_req bool
283
+ :param str target_id: The unique target id to wich you want to get the versions. (required)
284
+ :return: list[Version]
285
+ If the method is called asynchronously,
286
+ returns the request thread.
287
+ """
288
+
289
+ all_params = ['target_id'] # noqa: E501
290
+ all_params.append('async_req')
291
+ all_params.append('_return_http_data_only')
292
+ all_params.append('_preload_content')
293
+ all_params.append('_request_timeout')
294
+
295
+ params = locals()
296
+ for key, val in six.iteritems(params['kwargs']):
297
+ if key not in all_params:
298
+ raise TypeError(
299
+ "Got an unexpected keyword argument '%s'"
300
+ " to method get_versions" % key
301
+ )
302
+ params[key] = val
303
+ del params['kwargs']
304
+ # verify the required parameter 'target_id' is set
305
+ if ('target_id' not in params or
306
+ params['target_id'] is None):
307
+ raise ValueError("Missing the required parameter `target_id` when calling `get_versions`") # noqa: E501
308
+
309
+ collection_formats = {}
310
+
311
+ path_params = {}
312
+ if 'target_id' in params:
313
+ path_params['targetId'] = params['target_id'] # noqa: E501
314
+
315
+ query_params = []
316
+
317
+ header_params = {}
318
+
319
+ form_params = []
320
+ local_var_files = {}
321
+
322
+ body_params = None
323
+ # HTTP header `Accept`
324
+ header_params['Accept'] = self.api_client.select_header_accept(
325
+ ['application/json', 'text/json']) # noqa: E501
326
+
327
+ # Authentication setting
328
+ auth_settings = [] # noqa: E501
329
+
330
+ return self.api_client.call_api(
331
+ '/teamdbapi/v2.0/target/{targetId}/versions', 'GET',
332
+ path_params,
333
+ query_params,
334
+ header_params,
335
+ body=body_params,
336
+ post_params=form_params,
337
+ files=local_var_files,
338
+ response_type='list[Version]', # noqa: E501
339
+ auth_settings=auth_settings,
340
+ async_req=params.get('async_req'),
341
+ _return_http_data_only=params.get('_return_http_data_only'),
342
+ _preload_content=params.get('_preload_content', True),
343
+ _request_timeout=params.get('_request_timeout'),
344
+ collection_formats=collection_formats)
345
+
346
+ def update_version(self, body, version_id, **kwargs): # noqa: E501
347
+ """Update an existing version # noqa: E501
348
+
349
+ This method makes a synchronous HTTP request by default. To make an
350
+ asynchronous HTTP request, please pass async_req=True
351
+ >>> thread = api.update_version(body, version_id, async_req=True)
352
+ >>> result = thread.get()
353
+
354
+ :param async_req bool
355
+ :param Version body: The version to update. (required)
356
+ :param str version_id: The version id corresponding to the version you want to update. (required)
357
+ :return: Version
358
+ If the method is called asynchronously,
359
+ returns the request thread.
360
+ """
361
+ kwargs['_return_http_data_only'] = True
362
+ if kwargs.get('async_req'):
363
+ return self.update_version_with_http_info(body, version_id, **kwargs) # noqa: E501
364
+ else:
365
+ (data) = self.update_version_with_http_info(body, version_id, **kwargs) # noqa: E501
366
+ return data
367
+
368
+ def update_version_with_http_info(self, body, version_id, **kwargs): # noqa: E501
369
+ """Update an existing version # noqa: E501
370
+
371
+ This method makes a synchronous HTTP request by default. To make an
372
+ asynchronous HTTP request, please pass async_req=True
373
+ >>> thread = api.update_version_with_http_info(body, version_id, async_req=True)
374
+ >>> result = thread.get()
375
+
376
+ :param async_req bool
377
+ :param Version body: The version to update. (required)
378
+ :param str version_id: The version id corresponding to the version you want to update. (required)
379
+ :return: Version
380
+ If the method is called asynchronously,
381
+ returns the request thread.
382
+ """
383
+
384
+ all_params = ['body', 'version_id'] # noqa: E501
385
+ all_params.append('async_req')
386
+ all_params.append('_return_http_data_only')
387
+ all_params.append('_preload_content')
388
+ all_params.append('_request_timeout')
389
+
390
+ params = locals()
391
+ for key, val in six.iteritems(params['kwargs']):
392
+ if key not in all_params:
393
+ raise TypeError(
394
+ "Got an unexpected keyword argument '%s'"
395
+ " to method update_version" % key
396
+ )
397
+ params[key] = val
398
+ del params['kwargs']
399
+ # verify the required parameter 'body' is set
400
+ if ('body' not in params or
401
+ params['body'] is None):
402
+ raise ValueError("Missing the required parameter `body` when calling `update_version`") # noqa: E501
403
+ # verify the required parameter 'version_id' is set
404
+ if ('version_id' not in params or
405
+ params['version_id'] is None):
406
+ raise ValueError("Missing the required parameter `version_id` when calling `update_version`") # noqa: E501
407
+
408
+ collection_formats = {}
409
+
410
+ path_params = {}
411
+ if 'version_id' in params:
412
+ path_params['versionId'] = params['version_id'] # noqa: E501
413
+
414
+ query_params = []
415
+
416
+ header_params = {}
417
+
418
+ form_params = []
419
+ local_var_files = {}
420
+
421
+ body_params = None
422
+ if 'body' in params:
423
+ body_params = params['body']
424
+ # HTTP header `Accept`
425
+ header_params['Accept'] = self.api_client.select_header_accept(
426
+ ['application/json', 'text/json']) # noqa: E501
427
+
428
+ # HTTP header `Content-Type`
429
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
430
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
431
+
432
+ # Authentication setting
433
+ auth_settings = [] # noqa: E501
434
+
435
+ return self.api_client.call_api(
436
+ '/teamdbapi/v2.0/version/{versionId}', 'PUT',
437
+ path_params,
438
+ query_params,
439
+ header_params,
440
+ body=body_params,
441
+ post_params=form_params,
442
+ files=local_var_files,
443
+ response_type='Version', # noqa: E501
444
+ auth_settings=auth_settings,
445
+ async_req=params.get('async_req'),
446
+ _return_http_data_only=params.get('_return_http_data_only'),
447
+ _preload_content=params.get('_preload_content', True),
448
+ _request_timeout=params.get('_request_timeout'),
449
+ collection_formats=collection_formats)