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,1420 +1,1420 @@
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 RevisionApi(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_revision(self, body, version_id, **kwargs): # noqa: E501
36
- """Create a revision. You have to specify a version id to which the revision is created. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
37
-
38
- Set the Revision.Id to empty (00000000-0000-0000-0000-000000000000), it will be generated by the server. # noqa: E501
39
- This method makes a synchronous HTTP request by default. To make an
40
- asynchronous HTTP request, please pass async_req=True
41
- >>> thread = api.create_revision(body, version_id, async_req=True)
42
- >>> result = thread.get()
43
-
44
- :param async_req bool
45
- :param Revision body: The revision you want to create (required)
46
- :param str version_id: The version id to which the revision was created (required)
47
- :return: Revision
48
- If the method is called asynchronously,
49
- returns the request thread.
50
- """
51
- kwargs['_return_http_data_only'] = True
52
- if kwargs.get('async_req'):
53
- return self.create_revision_with_http_info(body, version_id, **kwargs) # noqa: E501
54
- else:
55
- (data) = self.create_revision_with_http_info(body, version_id, **kwargs) # noqa: E501
56
- return data
57
-
58
- def create_revision_with_http_info(self, body, version_id, **kwargs): # noqa: E501
59
- """Create a revision. You have to specify a version id to which the revision is created. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
60
-
61
- Set the Revision.Id to empty (00000000-0000-0000-0000-000000000000), it will be generated by the server. # noqa: E501
62
- This method makes a synchronous HTTP request by default. To make an
63
- asynchronous HTTP request, please pass async_req=True
64
- >>> thread = api.create_revision_with_http_info(body, version_id, async_req=True)
65
- >>> result = thread.get()
66
-
67
- :param async_req bool
68
- :param Revision body: The revision you want to create (required)
69
- :param str version_id: The version id to which the revision was created (required)
70
- :return: Revision
71
- If the method is called asynchronously,
72
- returns the request thread.
73
- """
74
-
75
- all_params = ['body', 'version_id'] # noqa: E501
76
- all_params.append('async_req')
77
- all_params.append('_return_http_data_only')
78
- all_params.append('_preload_content')
79
- all_params.append('_request_timeout')
80
-
81
- params = locals()
82
- for key, val in six.iteritems(params['kwargs']):
83
- if key not in all_params:
84
- raise TypeError(
85
- "Got an unexpected keyword argument '%s'"
86
- " to method create_revision" % key
87
- )
88
- params[key] = val
89
- del params['kwargs']
90
- # verify the required parameter 'body' is set
91
- if ('body' not in params or
92
- params['body'] is None):
93
- raise ValueError("Missing the required parameter `body` when calling `create_revision`") # noqa: E501
94
- # verify the required parameter 'version_id' is set
95
- if ('version_id' not in params or
96
- params['version_id'] is None):
97
- raise ValueError("Missing the required parameter `version_id` when calling `create_revision`") # noqa: E501
98
-
99
- collection_formats = {}
100
-
101
- path_params = {}
102
- if 'version_id' in params:
103
- path_params['versionId'] = params['version_id'] # noqa: E501
104
-
105
- query_params = []
106
-
107
- header_params = {}
108
-
109
- form_params = []
110
- local_var_files = {}
111
-
112
- body_params = None
113
- if 'body' in params:
114
- body_params = params['body']
115
- # HTTP header `Accept`
116
- header_params['Accept'] = self.api_client.select_header_accept(
117
- ['application/json', 'text/json']) # noqa: E501
118
-
119
- # HTTP header `Content-Type`
120
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
121
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
122
-
123
- # Authentication setting
124
- auth_settings = [] # noqa: E501
125
-
126
- return self.api_client.call_api(
127
- '/teamdbapi/v2.0/version/{versionId}/revision', 'POST',
128
- path_params,
129
- query_params,
130
- header_params,
131
- body=body_params,
132
- post_params=form_params,
133
- files=local_var_files,
134
- response_type='Revision', # noqa: E501
135
- auth_settings=auth_settings,
136
- async_req=params.get('async_req'),
137
- _return_http_data_only=params.get('_return_http_data_only'),
138
- _preload_content=params.get('_preload_content', True),
139
- _request_timeout=params.get('_request_timeout'),
140
- collection_formats=collection_formats)
141
-
142
- def create_revision_for_component(self, body, part_number, serial_number, parameter_path, target_name, **kwargs): # noqa: E501
143
- """Create a revision for a Lifing component identified with its partNumber and serial number. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
144
-
145
- This method makes a synchronous HTTP request by default. To make an
146
- asynchronous HTTP request, please pass async_req=True
147
- >>> thread = api.create_revision_for_component(body, part_number, serial_number, parameter_path, target_name, async_req=True)
148
- >>> result = thread.get()
149
-
150
- :param async_req bool
151
- :param RevisionValue body: The revision value you want to create (required)
152
- :param str part_number: The lifing component's part number (required)
153
- :param str serial_number: The lifing component's serial number (required)
154
- :param str parameter_path: The parameter path identifying the parameter. You have to double de path separator. For instance: system//sensor/Oil (required)
155
- :param str target_name: The target to which the parameter is associated (required)
156
- :return: Revision
157
- If the method is called asynchronously,
158
- returns the request thread.
159
- """
160
- kwargs['_return_http_data_only'] = True
161
- if kwargs.get('async_req'):
162
- return self.create_revision_for_component_with_http_info(body, part_number, serial_number, parameter_path, target_name, **kwargs) # noqa: E501
163
- else:
164
- (data) = self.create_revision_for_component_with_http_info(body, part_number, serial_number, parameter_path, target_name, **kwargs) # noqa: E501
165
- return data
166
-
167
- def create_revision_for_component_with_http_info(self, body, part_number, serial_number, parameter_path, target_name, **kwargs): # noqa: E501
168
- """Create a revision for a Lifing component identified with its partNumber and serial number. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
169
-
170
- This method makes a synchronous HTTP request by default. To make an
171
- asynchronous HTTP request, please pass async_req=True
172
- >>> thread = api.create_revision_for_component_with_http_info(body, part_number, serial_number, parameter_path, target_name, async_req=True)
173
- >>> result = thread.get()
174
-
175
- :param async_req bool
176
- :param RevisionValue body: The revision value you want to create (required)
177
- :param str part_number: The lifing component's part number (required)
178
- :param str serial_number: The lifing component's serial number (required)
179
- :param str parameter_path: The parameter path identifying the parameter. You have to double de path separator. For instance: system//sensor/Oil (required)
180
- :param str target_name: The target to which the parameter is associated (required)
181
- :return: Revision
182
- If the method is called asynchronously,
183
- returns the request thread.
184
- """
185
-
186
- all_params = ['body', 'part_number', 'serial_number', 'parameter_path', 'target_name'] # noqa: E501
187
- all_params.append('async_req')
188
- all_params.append('_return_http_data_only')
189
- all_params.append('_preload_content')
190
- all_params.append('_request_timeout')
191
-
192
- params = locals()
193
- for key, val in six.iteritems(params['kwargs']):
194
- if key not in all_params:
195
- raise TypeError(
196
- "Got an unexpected keyword argument '%s'"
197
- " to method create_revision_for_component" % key
198
- )
199
- params[key] = val
200
- del params['kwargs']
201
- # verify the required parameter 'body' is set
202
- if ('body' not in params or
203
- params['body'] is None):
204
- raise ValueError("Missing the required parameter `body` when calling `create_revision_for_component`") # noqa: E501
205
- # verify the required parameter 'part_number' is set
206
- if ('part_number' not in params or
207
- params['part_number'] is None):
208
- raise ValueError("Missing the required parameter `part_number` when calling `create_revision_for_component`") # noqa: E501
209
- # verify the required parameter 'serial_number' is set
210
- if ('serial_number' not in params or
211
- params['serial_number'] is None):
212
- raise ValueError("Missing the required parameter `serial_number` when calling `create_revision_for_component`") # noqa: E501
213
- # verify the required parameter 'parameter_path' is set
214
- if ('parameter_path' not in params or
215
- params['parameter_path'] is None):
216
- raise ValueError("Missing the required parameter `parameter_path` when calling `create_revision_for_component`") # noqa: E501
217
- # verify the required parameter 'target_name' is set
218
- if ('target_name' not in params or
219
- params['target_name'] is None):
220
- raise ValueError("Missing the required parameter `target_name` when calling `create_revision_for_component`") # noqa: E501
221
-
222
- collection_formats = {}
223
-
224
- path_params = {}
225
- if 'part_number' in params:
226
- path_params['partNumber'] = params['part_number'] # noqa: E501
227
- if 'serial_number' in params:
228
- path_params['serialNumber'] = params['serial_number'] # noqa: E501
229
- if 'parameter_path' in params:
230
- path_params['parameterPath'] = params['parameter_path'] # noqa: E501
231
- if 'target_name' in params:
232
- path_params['targetName'] = params['target_name'] # noqa: E501
233
-
234
- query_params = []
235
-
236
- header_params = {}
237
-
238
- form_params = []
239
- local_var_files = {}
240
-
241
- body_params = None
242
- if 'body' in params:
243
- body_params = params['body']
244
- # HTTP header `Accept`
245
- header_params['Accept'] = self.api_client.select_header_accept(
246
- ['application/json', 'text/json']) # noqa: E501
247
-
248
- # HTTP header `Content-Type`
249
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
250
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
251
-
252
- # Authentication setting
253
- auth_settings = [] # noqa: E501
254
-
255
- return self.api_client.call_api(
256
- '/teamdbapi/v2.0/partNumber/{partNumber}/serialNumber/{serialNumber}/parameterPath/{parameterPath}/targetName/{targetName}/revision', 'POST',
257
- path_params,
258
- query_params,
259
- header_params,
260
- body=body_params,
261
- post_params=form_params,
262
- files=local_var_files,
263
- response_type='Revision', # noqa: E501
264
- auth_settings=auth_settings,
265
- async_req=params.get('async_req'),
266
- _return_http_data_only=params.get('_return_http_data_only'),
267
- _preload_content=params.get('_preload_content', True),
268
- _request_timeout=params.get('_request_timeout'),
269
- collection_formats=collection_formats)
270
-
271
- def delete_revision(self, revision_id, **kwargs): # noqa: E501
272
- """Remove a revision corresponding to a given id. # noqa: E501
273
-
274
- This method makes a synchronous HTTP request by default. To make an
275
- asynchronous HTTP request, please pass async_req=True
276
- >>> thread = api.delete_revision(revision_id, async_req=True)
277
- >>> result = thread.get()
278
-
279
- :param async_req bool
280
- :param str revision_id: The revision id you want to remove (required)
281
- :return: None
282
- If the method is called asynchronously,
283
- returns the request thread.
284
- """
285
- kwargs['_return_http_data_only'] = True
286
- if kwargs.get('async_req'):
287
- return self.delete_revision_with_http_info(revision_id, **kwargs) # noqa: E501
288
- else:
289
- (data) = self.delete_revision_with_http_info(revision_id, **kwargs) # noqa: E501
290
- return data
291
-
292
- def delete_revision_with_http_info(self, revision_id, **kwargs): # noqa: E501
293
- """Remove a revision corresponding to a given id. # noqa: E501
294
-
295
- This method makes a synchronous HTTP request by default. To make an
296
- asynchronous HTTP request, please pass async_req=True
297
- >>> thread = api.delete_revision_with_http_info(revision_id, async_req=True)
298
- >>> result = thread.get()
299
-
300
- :param async_req bool
301
- :param str revision_id: The revision id you want to remove (required)
302
- :return: None
303
- If the method is called asynchronously,
304
- returns the request thread.
305
- """
306
-
307
- all_params = ['revision_id'] # noqa: E501
308
- all_params.append('async_req')
309
- all_params.append('_return_http_data_only')
310
- all_params.append('_preload_content')
311
- all_params.append('_request_timeout')
312
-
313
- params = locals()
314
- for key, val in six.iteritems(params['kwargs']):
315
- if key not in all_params:
316
- raise TypeError(
317
- "Got an unexpected keyword argument '%s'"
318
- " to method delete_revision" % key
319
- )
320
- params[key] = val
321
- del params['kwargs']
322
- # verify the required parameter 'revision_id' is set
323
- if ('revision_id' not in params or
324
- params['revision_id'] is None):
325
- raise ValueError("Missing the required parameter `revision_id` when calling `delete_revision`") # noqa: E501
326
-
327
- collection_formats = {}
328
-
329
- path_params = {}
330
- if 'revision_id' in params:
331
- path_params['revisionId'] = params['revision_id'] # noqa: E501
332
-
333
- query_params = []
334
-
335
- header_params = {}
336
-
337
- form_params = []
338
- local_var_files = {}
339
-
340
- body_params = None
341
- # HTTP header `Accept`
342
- header_params['Accept'] = self.api_client.select_header_accept(
343
- ['application/json', 'text/json']) # noqa: E501
344
-
345
- # Authentication setting
346
- auth_settings = [] # noqa: E501
347
-
348
- return self.api_client.call_api(
349
- '/teamdbapi/v2.0/revision/{revisionId}', 'DELETE',
350
- path_params,
351
- query_params,
352
- header_params,
353
- body=body_params,
354
- post_params=form_params,
355
- files=local_var_files,
356
- response_type=None, # noqa: E501
357
- auth_settings=auth_settings,
358
- async_req=params.get('async_req'),
359
- _return_http_data_only=params.get('_return_http_data_only'),
360
- _preload_content=params.get('_preload_content', True),
361
- _request_timeout=params.get('_request_timeout'),
362
- collection_formats=collection_formats)
363
-
364
- def export_revision(self, revision_id, version_id, output_file_path, **kwargs): # noqa: E501
365
- """[Command] Export a revision into a file. You need to specify the version to which you want to export the revision value. # noqa: E501
366
-
367
- This method makes a synchronous HTTP request by default. To make an
368
- asynchronous HTTP request, please pass async_req=True
369
- >>> thread = api.export_revision(revision_id, version_id, output_file_path, async_req=True)
370
- >>> result = thread.get()
371
-
372
- :param async_req bool
373
- :param str revision_id: The revision id to export. (required)
374
- :param str version_id: The version id to which you want to export the revision value. (required)
375
- :param str output_file_path: The path to the file to create. You have to provide the file extension for example : MyFile.m (required)
376
- :return: bool
377
- If the method is called asynchronously,
378
- returns the request thread.
379
- """
380
- kwargs['_return_http_data_only'] = True
381
- if kwargs.get('async_req'):
382
- return self.export_revision_with_http_info(revision_id, version_id, output_file_path, **kwargs) # noqa: E501
383
- else:
384
- (data) = self.export_revision_with_http_info(revision_id, version_id, output_file_path, **kwargs) # noqa: E501
385
- return data
386
-
387
- def export_revision_with_http_info(self, revision_id, version_id, output_file_path, **kwargs): # noqa: E501
388
- """[Command] Export a revision into a file. You need to specify the version to which you want to export the revision value. # noqa: E501
389
-
390
- This method makes a synchronous HTTP request by default. To make an
391
- asynchronous HTTP request, please pass async_req=True
392
- >>> thread = api.export_revision_with_http_info(revision_id, version_id, output_file_path, async_req=True)
393
- >>> result = thread.get()
394
-
395
- :param async_req bool
396
- :param str revision_id: The revision id to export. (required)
397
- :param str version_id: The version id to which you want to export the revision value. (required)
398
- :param str output_file_path: The path to the file to create. You have to provide the file extension for example : MyFile.m (required)
399
- :return: bool
400
- If the method is called asynchronously,
401
- returns the request thread.
402
- """
403
-
404
- all_params = ['revision_id', 'version_id', 'output_file_path'] # noqa: E501
405
- all_params.append('async_req')
406
- all_params.append('_return_http_data_only')
407
- all_params.append('_preload_content')
408
- all_params.append('_request_timeout')
409
-
410
- params = locals()
411
- for key, val in six.iteritems(params['kwargs']):
412
- if key not in all_params:
413
- raise TypeError(
414
- "Got an unexpected keyword argument '%s'"
415
- " to method export_revision" % key
416
- )
417
- params[key] = val
418
- del params['kwargs']
419
- # verify the required parameter 'revision_id' is set
420
- if ('revision_id' not in params or
421
- params['revision_id'] is None):
422
- raise ValueError("Missing the required parameter `revision_id` when calling `export_revision`") # noqa: E501
423
- # verify the required parameter 'version_id' is set
424
- if ('version_id' not in params or
425
- params['version_id'] is None):
426
- raise ValueError("Missing the required parameter `version_id` when calling `export_revision`") # noqa: E501
427
- # verify the required parameter 'output_file_path' is set
428
- if ('output_file_path' not in params or
429
- params['output_file_path'] is None):
430
- raise ValueError("Missing the required parameter `output_file_path` when calling `export_revision`") # noqa: E501
431
-
432
- collection_formats = {}
433
-
434
- path_params = {}
435
- if 'revision_id' in params:
436
- path_params['revisionId'] = params['revision_id'] # noqa: E501
437
-
438
- query_params = []
439
- if 'version_id' in params:
440
- query_params.append(('versionId', params['version_id'])) # noqa: E501
441
- if 'output_file_path' in params:
442
- query_params.append(('outputFilePath', params['output_file_path'])) # noqa: E501
443
-
444
- header_params = {}
445
-
446
- form_params = []
447
- local_var_files = {}
448
-
449
- body_params = None
450
- # HTTP header `Accept`
451
- header_params['Accept'] = self.api_client.select_header_accept(
452
- ['application/json', 'text/json']) # noqa: E501
453
-
454
- # Authentication setting
455
- auth_settings = [] # noqa: E501
456
-
457
- return self.api_client.call_api(
458
- '/teamdbapi/v2.0/revision/{revisionId}/export', 'POST',
459
- path_params,
460
- query_params,
461
- header_params,
462
- body=body_params,
463
- post_params=form_params,
464
- files=local_var_files,
465
- response_type='bool', # noqa: E501
466
- auth_settings=auth_settings,
467
- async_req=params.get('async_req'),
468
- _return_http_data_only=params.get('_return_http_data_only'),
469
- _preload_content=params.get('_preload_content', True),
470
- _request_timeout=params.get('_request_timeout'),
471
- collection_formats=collection_formats)
472
-
473
- def get_component_revisions(self, part_number, serial_number, **kwargs): # noqa: E501
474
- """Get all the revisions associated with a Lifing component. You need to specify the part number, the component serial number to identify the component for which you want all the revisions associated with. # noqa: E501
475
-
476
- This method makes a synchronous HTTP request by default. To make an
477
- asynchronous HTTP request, please pass async_req=True
478
- >>> thread = api.get_component_revisions(part_number, serial_number, async_req=True)
479
- >>> result = thread.get()
480
-
481
- :param async_req bool
482
- :param str part_number: The lifing component's part number (required)
483
- :param str serial_number: The lifing component's serial number (required)
484
- :return: list[Revision]
485
- If the method is called asynchronously,
486
- returns the request thread.
487
- """
488
- kwargs['_return_http_data_only'] = True
489
- if kwargs.get('async_req'):
490
- return self.get_component_revisions_with_http_info(part_number, serial_number, **kwargs) # noqa: E501
491
- else:
492
- (data) = self.get_component_revisions_with_http_info(part_number, serial_number, **kwargs) # noqa: E501
493
- return data
494
-
495
- def get_component_revisions_with_http_info(self, part_number, serial_number, **kwargs): # noqa: E501
496
- """Get all the revisions associated with a Lifing component. You need to specify the part number, the component serial number to identify the component for which you want all the revisions associated with. # noqa: E501
497
-
498
- This method makes a synchronous HTTP request by default. To make an
499
- asynchronous HTTP request, please pass async_req=True
500
- >>> thread = api.get_component_revisions_with_http_info(part_number, serial_number, async_req=True)
501
- >>> result = thread.get()
502
-
503
- :param async_req bool
504
- :param str part_number: The lifing component's part number (required)
505
- :param str serial_number: The lifing component's serial number (required)
506
- :return: list[Revision]
507
- If the method is called asynchronously,
508
- returns the request thread.
509
- """
510
-
511
- all_params = ['part_number', 'serial_number'] # noqa: E501
512
- all_params.append('async_req')
513
- all_params.append('_return_http_data_only')
514
- all_params.append('_preload_content')
515
- all_params.append('_request_timeout')
516
-
517
- params = locals()
518
- for key, val in six.iteritems(params['kwargs']):
519
- if key not in all_params:
520
- raise TypeError(
521
- "Got an unexpected keyword argument '%s'"
522
- " to method get_component_revisions" % key
523
- )
524
- params[key] = val
525
- del params['kwargs']
526
- # verify the required parameter 'part_number' is set
527
- if ('part_number' not in params or
528
- params['part_number'] is None):
529
- raise ValueError("Missing the required parameter `part_number` when calling `get_component_revisions`") # noqa: E501
530
- # verify the required parameter 'serial_number' is set
531
- if ('serial_number' not in params or
532
- params['serial_number'] is None):
533
- raise ValueError("Missing the required parameter `serial_number` when calling `get_component_revisions`") # noqa: E501
534
-
535
- collection_formats = {}
536
-
537
- path_params = {}
538
- if 'part_number' in params:
539
- path_params['partNumber'] = params['part_number'] # noqa: E501
540
- if 'serial_number' in params:
541
- path_params['serialNumber'] = params['serial_number'] # noqa: E501
542
-
543
- query_params = []
544
-
545
- header_params = {}
546
-
547
- form_params = []
548
- local_var_files = {}
549
-
550
- body_params = None
551
- # HTTP header `Accept`
552
- header_params['Accept'] = self.api_client.select_header_accept(
553
- ['application/json', 'text/json']) # noqa: E501
554
-
555
- # Authentication setting
556
- auth_settings = [] # noqa: E501
557
-
558
- return self.api_client.call_api(
559
- '/teamdbapi/v2.0/partNumber/{partNumber}/serialNumber/{serialNumber}/revisions', 'GET',
560
- path_params,
561
- query_params,
562
- header_params,
563
- body=body_params,
564
- post_params=form_params,
565
- files=local_var_files,
566
- response_type='list[Revision]', # noqa: E501
567
- auth_settings=auth_settings,
568
- async_req=params.get('async_req'),
569
- _return_http_data_only=params.get('_return_http_data_only'),
570
- _preload_content=params.get('_preload_content', True),
571
- _request_timeout=params.get('_request_timeout'),
572
- collection_formats=collection_formats)
573
-
574
- def get_component_revisions_by_parameter(self, part_number, serial_number, parameter_path, target_name, **kwargs): # noqa: E501
575
- """Get all component's revisions for a given parameter and target. You need to specify the part number, the component serial number, a target and the parameter path for which you want the revisions. # noqa: E501
576
-
577
- This method makes a synchronous HTTP request by default. To make an
578
- asynchronous HTTP request, please pass async_req=True
579
- >>> thread = api.get_component_revisions_by_parameter(part_number, serial_number, parameter_path, target_name, async_req=True)
580
- >>> result = thread.get()
581
-
582
- :param async_req bool
583
- :param str part_number: The lifing component's part number (required)
584
- :param str serial_number: The lifing component's serial number (required)
585
- :param str parameter_path: The parameter path identifying the parameter. You have to double de path separator. For instance: system//sensor/Oil (required)
586
- :param str target_name: The target to which the parameter is associated (required)
587
- :return: list[Revision]
588
- If the method is called asynchronously,
589
- returns the request thread.
590
- """
591
- kwargs['_return_http_data_only'] = True
592
- if kwargs.get('async_req'):
593
- return self.get_component_revisions_by_parameter_with_http_info(part_number, serial_number, parameter_path, target_name, **kwargs) # noqa: E501
594
- else:
595
- (data) = self.get_component_revisions_by_parameter_with_http_info(part_number, serial_number, parameter_path, target_name, **kwargs) # noqa: E501
596
- return data
597
-
598
- def get_component_revisions_by_parameter_with_http_info(self, part_number, serial_number, parameter_path, target_name, **kwargs): # noqa: E501
599
- """Get all component's revisions for a given parameter and target. You need to specify the part number, the component serial number, a target and the parameter path for which you want the revisions. # noqa: E501
600
-
601
- This method makes a synchronous HTTP request by default. To make an
602
- asynchronous HTTP request, please pass async_req=True
603
- >>> thread = api.get_component_revisions_by_parameter_with_http_info(part_number, serial_number, parameter_path, target_name, async_req=True)
604
- >>> result = thread.get()
605
-
606
- :param async_req bool
607
- :param str part_number: The lifing component's part number (required)
608
- :param str serial_number: The lifing component's serial number (required)
609
- :param str parameter_path: The parameter path identifying the parameter. You have to double de path separator. For instance: system//sensor/Oil (required)
610
- :param str target_name: The target to which the parameter is associated (required)
611
- :return: list[Revision]
612
- If the method is called asynchronously,
613
- returns the request thread.
614
- """
615
-
616
- all_params = ['part_number', 'serial_number', 'parameter_path', 'target_name'] # noqa: E501
617
- all_params.append('async_req')
618
- all_params.append('_return_http_data_only')
619
- all_params.append('_preload_content')
620
- all_params.append('_request_timeout')
621
-
622
- params = locals()
623
- for key, val in six.iteritems(params['kwargs']):
624
- if key not in all_params:
625
- raise TypeError(
626
- "Got an unexpected keyword argument '%s'"
627
- " to method get_component_revisions_by_parameter" % key
628
- )
629
- params[key] = val
630
- del params['kwargs']
631
- # verify the required parameter 'part_number' is set
632
- if ('part_number' not in params or
633
- params['part_number'] is None):
634
- raise ValueError("Missing the required parameter `part_number` when calling `get_component_revisions_by_parameter`") # noqa: E501
635
- # verify the required parameter 'serial_number' is set
636
- if ('serial_number' not in params or
637
- params['serial_number'] is None):
638
- raise ValueError("Missing the required parameter `serial_number` when calling `get_component_revisions_by_parameter`") # noqa: E501
639
- # verify the required parameter 'parameter_path' is set
640
- if ('parameter_path' not in params or
641
- params['parameter_path'] is None):
642
- raise ValueError("Missing the required parameter `parameter_path` when calling `get_component_revisions_by_parameter`") # noqa: E501
643
- # verify the required parameter 'target_name' is set
644
- if ('target_name' not in params or
645
- params['target_name'] is None):
646
- raise ValueError("Missing the required parameter `target_name` when calling `get_component_revisions_by_parameter`") # noqa: E501
647
-
648
- collection_formats = {}
649
-
650
- path_params = {}
651
- if 'part_number' in params:
652
- path_params['partNumber'] = params['part_number'] # noqa: E501
653
- if 'serial_number' in params:
654
- path_params['serialNumber'] = params['serial_number'] # noqa: E501
655
- if 'parameter_path' in params:
656
- path_params['parameterPath'] = params['parameter_path'] # noqa: E501
657
- if 'target_name' in params:
658
- path_params['targetName'] = params['target_name'] # noqa: E501
659
-
660
- query_params = []
661
-
662
- header_params = {}
663
-
664
- form_params = []
665
- local_var_files = {}
666
-
667
- body_params = None
668
- # HTTP header `Accept`
669
- header_params['Accept'] = self.api_client.select_header_accept(
670
- ['application/json', 'text/json']) # noqa: E501
671
-
672
- # Authentication setting
673
- auth_settings = [] # noqa: E501
674
-
675
- return self.api_client.call_api(
676
- '/teamdbapi/v2.0/partNumber/{partNumber}/serialNumber/{serialNumber}/parameterPath/{parameterPath}/targetName/{targetName}/revisions', 'GET',
677
- path_params,
678
- query_params,
679
- header_params,
680
- body=body_params,
681
- post_params=form_params,
682
- files=local_var_files,
683
- response_type='list[Revision]', # noqa: E501
684
- auth_settings=auth_settings,
685
- async_req=params.get('async_req'),
686
- _return_http_data_only=params.get('_return_http_data_only'),
687
- _preload_content=params.get('_preload_content', True),
688
- _request_timeout=params.get('_request_timeout'),
689
- collection_formats=collection_formats)
690
-
691
- def get_revision(self, revision_id, **kwargs): # noqa: E501
692
- """Get a revision corresponding to a unique Id. # noqa: E501
693
-
694
- This method makes a synchronous HTTP request by default. To make an
695
- asynchronous HTTP request, please pass async_req=True
696
- >>> thread = api.get_revision(revision_id, async_req=True)
697
- >>> result = thread.get()
698
-
699
- :param async_req bool
700
- :param str revision_id: The unique revision id to which you want to get the revision (required)
701
- :return: Revision
702
- If the method is called asynchronously,
703
- returns the request thread.
704
- """
705
- kwargs['_return_http_data_only'] = True
706
- if kwargs.get('async_req'):
707
- return self.get_revision_with_http_info(revision_id, **kwargs) # noqa: E501
708
- else:
709
- (data) = self.get_revision_with_http_info(revision_id, **kwargs) # noqa: E501
710
- return data
711
-
712
- def get_revision_with_http_info(self, revision_id, **kwargs): # noqa: E501
713
- """Get a revision corresponding to a unique Id. # noqa: E501
714
-
715
- This method makes a synchronous HTTP request by default. To make an
716
- asynchronous HTTP request, please pass async_req=True
717
- >>> thread = api.get_revision_with_http_info(revision_id, async_req=True)
718
- >>> result = thread.get()
719
-
720
- :param async_req bool
721
- :param str revision_id: The unique revision id to which you want to get the revision (required)
722
- :return: Revision
723
- If the method is called asynchronously,
724
- returns the request thread.
725
- """
726
-
727
- all_params = ['revision_id'] # noqa: E501
728
- all_params.append('async_req')
729
- all_params.append('_return_http_data_only')
730
- all_params.append('_preload_content')
731
- all_params.append('_request_timeout')
732
-
733
- params = locals()
734
- for key, val in six.iteritems(params['kwargs']):
735
- if key not in all_params:
736
- raise TypeError(
737
- "Got an unexpected keyword argument '%s'"
738
- " to method get_revision" % key
739
- )
740
- params[key] = val
741
- del params['kwargs']
742
- # verify the required parameter 'revision_id' is set
743
- if ('revision_id' not in params or
744
- params['revision_id'] is None):
745
- raise ValueError("Missing the required parameter `revision_id` when calling `get_revision`") # noqa: E501
746
-
747
- collection_formats = {}
748
-
749
- path_params = {}
750
- if 'revision_id' in params:
751
- path_params['revisionId'] = params['revision_id'] # noqa: E501
752
-
753
- query_params = []
754
-
755
- header_params = {}
756
-
757
- form_params = []
758
- local_var_files = {}
759
-
760
- body_params = None
761
- # HTTP header `Accept`
762
- header_params['Accept'] = self.api_client.select_header_accept(
763
- ['application/json', 'text/json']) # noqa: E501
764
-
765
- # Authentication setting
766
- auth_settings = [] # noqa: E501
767
-
768
- return self.api_client.call_api(
769
- '/teamdbapi/v2.0/revision/{revisionId}', 'GET',
770
- path_params,
771
- query_params,
772
- header_params,
773
- body=body_params,
774
- post_params=form_params,
775
- files=local_var_files,
776
- response_type='Revision', # noqa: E501
777
- auth_settings=auth_settings,
778
- async_req=params.get('async_req'),
779
- _return_http_data_only=params.get('_return_http_data_only'),
780
- _preload_content=params.get('_preload_content', True),
781
- _request_timeout=params.get('_request_timeout'),
782
- collection_formats=collection_formats)
783
-
784
- def get_revision_by_param_and_assembly(self, assembly_id, parameter_id, **kwargs): # noqa: E501
785
- """Get the revision selected in an assembly for a given parameter. # noqa: E501
786
-
787
- This method makes a synchronous HTTP request by default. To make an
788
- asynchronous HTTP request, please pass async_req=True
789
- >>> thread = api.get_revision_by_param_and_assembly(assembly_id, parameter_id, async_req=True)
790
- >>> result = thread.get()
791
-
792
- :param async_req bool
793
- :param str assembly_id: The assembly id to which you want to get the revision value (required)
794
- :param str parameter_id: The parameter id to which you want the revisions (required)
795
- :return: Revision
796
- If the method is called asynchronously,
797
- returns the request thread.
798
- """
799
- kwargs['_return_http_data_only'] = True
800
- if kwargs.get('async_req'):
801
- return self.get_revision_by_param_and_assembly_with_http_info(assembly_id, parameter_id, **kwargs) # noqa: E501
802
- else:
803
- (data) = self.get_revision_by_param_and_assembly_with_http_info(assembly_id, parameter_id, **kwargs) # noqa: E501
804
- return data
805
-
806
- def get_revision_by_param_and_assembly_with_http_info(self, assembly_id, parameter_id, **kwargs): # noqa: E501
807
- """Get the revision selected in an assembly for a given parameter. # noqa: E501
808
-
809
- This method makes a synchronous HTTP request by default. To make an
810
- asynchronous HTTP request, please pass async_req=True
811
- >>> thread = api.get_revision_by_param_and_assembly_with_http_info(assembly_id, parameter_id, async_req=True)
812
- >>> result = thread.get()
813
-
814
- :param async_req bool
815
- :param str assembly_id: The assembly id to which you want to get the revision value (required)
816
- :param str parameter_id: The parameter id to which you want the revisions (required)
817
- :return: Revision
818
- If the method is called asynchronously,
819
- returns the request thread.
820
- """
821
-
822
- all_params = ['assembly_id', 'parameter_id'] # noqa: E501
823
- all_params.append('async_req')
824
- all_params.append('_return_http_data_only')
825
- all_params.append('_preload_content')
826
- all_params.append('_request_timeout')
827
-
828
- params = locals()
829
- for key, val in six.iteritems(params['kwargs']):
830
- if key not in all_params:
831
- raise TypeError(
832
- "Got an unexpected keyword argument '%s'"
833
- " to method get_revision_by_param_and_assembly" % key
834
- )
835
- params[key] = val
836
- del params['kwargs']
837
- # verify the required parameter 'assembly_id' is set
838
- if ('assembly_id' not in params or
839
- params['assembly_id'] is None):
840
- raise ValueError("Missing the required parameter `assembly_id` when calling `get_revision_by_param_and_assembly`") # noqa: E501
841
- # verify the required parameter 'parameter_id' is set
842
- if ('parameter_id' not in params or
843
- params['parameter_id'] is None):
844
- raise ValueError("Missing the required parameter `parameter_id` when calling `get_revision_by_param_and_assembly`") # noqa: E501
845
-
846
- collection_formats = {}
847
-
848
- path_params = {}
849
- if 'assembly_id' in params:
850
- path_params['assemblyId'] = params['assembly_id'] # noqa: E501
851
- if 'parameter_id' in params:
852
- path_params['parameterId'] = params['parameter_id'] # noqa: E501
853
-
854
- query_params = []
855
-
856
- header_params = {}
857
-
858
- form_params = []
859
- local_var_files = {}
860
-
861
- body_params = None
862
- # HTTP header `Accept`
863
- header_params['Accept'] = self.api_client.select_header_accept(
864
- ['application/json', 'text/json']) # noqa: E501
865
-
866
- # Authentication setting
867
- auth_settings = [] # noqa: E501
868
-
869
- return self.api_client.call_api(
870
- '/teamdbapi/v2.0/assembly/{assemblyId}/parameter/{parameterId}/revision', 'GET',
871
- path_params,
872
- query_params,
873
- header_params,
874
- body=body_params,
875
- post_params=form_params,
876
- files=local_var_files,
877
- response_type='Revision', # noqa: E501
878
- auth_settings=auth_settings,
879
- async_req=params.get('async_req'),
880
- _return_http_data_only=params.get('_return_http_data_only'),
881
- _preload_content=params.get('_preload_content', True),
882
- _request_timeout=params.get('_request_timeout'),
883
- collection_formats=collection_formats)
884
-
885
- def get_revisions(self, version_id, **kwargs): # noqa: E501
886
- """Get all the revisions for a given version. This will retreive all revisions for all the parameters of a given version. Only revisions that match the version definition will be returned. # noqa: E501
887
-
888
- This method makes a synchronous HTTP request by default. To make an
889
- asynchronous HTTP request, please pass async_req=True
890
- >>> thread = api.get_revisions(version_id, async_req=True)
891
- >>> result = thread.get()
892
-
893
- :param async_req bool
894
- :param str version_id: The version id to which you want all the revisions (required)
895
- :return: list[Revision]
896
- If the method is called asynchronously,
897
- returns the request thread.
898
- """
899
- kwargs['_return_http_data_only'] = True
900
- if kwargs.get('async_req'):
901
- return self.get_revisions_with_http_info(version_id, **kwargs) # noqa: E501
902
- else:
903
- (data) = self.get_revisions_with_http_info(version_id, **kwargs) # noqa: E501
904
- return data
905
-
906
- def get_revisions_with_http_info(self, version_id, **kwargs): # noqa: E501
907
- """Get all the revisions for a given version. This will retreive all revisions for all the parameters of a given version. Only revisions that match the version definition will be returned. # noqa: E501
908
-
909
- This method makes a synchronous HTTP request by default. To make an
910
- asynchronous HTTP request, please pass async_req=True
911
- >>> thread = api.get_revisions_with_http_info(version_id, async_req=True)
912
- >>> result = thread.get()
913
-
914
- :param async_req bool
915
- :param str version_id: The version id to which you want all the revisions (required)
916
- :return: list[Revision]
917
- If the method is called asynchronously,
918
- returns the request thread.
919
- """
920
-
921
- all_params = ['version_id'] # noqa: E501
922
- all_params.append('async_req')
923
- all_params.append('_return_http_data_only')
924
- all_params.append('_preload_content')
925
- all_params.append('_request_timeout')
926
-
927
- params = locals()
928
- for key, val in six.iteritems(params['kwargs']):
929
- if key not in all_params:
930
- raise TypeError(
931
- "Got an unexpected keyword argument '%s'"
932
- " to method get_revisions" % key
933
- )
934
- params[key] = val
935
- del params['kwargs']
936
- # verify the required parameter 'version_id' is set
937
- if ('version_id' not in params or
938
- params['version_id'] is None):
939
- raise ValueError("Missing the required parameter `version_id` when calling `get_revisions`") # noqa: E501
940
-
941
- collection_formats = {}
942
-
943
- path_params = {}
944
- if 'version_id' in params:
945
- path_params['versionId'] = params['version_id'] # noqa: E501
946
-
947
- query_params = []
948
-
949
- header_params = {}
950
-
951
- form_params = []
952
- local_var_files = {}
953
-
954
- body_params = None
955
- # HTTP header `Accept`
956
- header_params['Accept'] = self.api_client.select_header_accept(
957
- ['application/json', 'text/json']) # noqa: E501
958
-
959
- # Authentication setting
960
- auth_settings = [] # noqa: E501
961
-
962
- return self.api_client.call_api(
963
- '/teamdbapi/v2.0/version/{versionId}/revisions', 'GET',
964
- path_params,
965
- query_params,
966
- header_params,
967
- body=body_params,
968
- post_params=form_params,
969
- files=local_var_files,
970
- response_type='list[Revision]', # noqa: E501
971
- auth_settings=auth_settings,
972
- async_req=params.get('async_req'),
973
- _return_http_data_only=params.get('_return_http_data_only'),
974
- _preload_content=params.get('_preload_content', True),
975
- _request_timeout=params.get('_request_timeout'),
976
- collection_formats=collection_formats)
977
-
978
- def get_revisions_by_parameter(self, parameter_id, version_id, **kwargs): # noqa: E501
979
- """Get all revisions for a given parameter and version. You need to specify a version in order to get the revisions that match the version definition (size, format...) # noqa: E501
980
-
981
- This method makes a synchronous HTTP request by default. To make an
982
- asynchronous HTTP request, please pass async_req=True
983
- >>> thread = api.get_revisions_by_parameter(parameter_id, version_id, async_req=True)
984
- >>> result = thread.get()
985
-
986
- :param async_req bool
987
- :param str parameter_id: The parameter id to which you want the revisions (required)
988
- :param str version_id: The version id to which you want to get the revision value (required)
989
- :return: list[Revision]
990
- If the method is called asynchronously,
991
- returns the request thread.
992
- """
993
- kwargs['_return_http_data_only'] = True
994
- if kwargs.get('async_req'):
995
- return self.get_revisions_by_parameter_with_http_info(parameter_id, version_id, **kwargs) # noqa: E501
996
- else:
997
- (data) = self.get_revisions_by_parameter_with_http_info(parameter_id, version_id, **kwargs) # noqa: E501
998
- return data
999
-
1000
- def get_revisions_by_parameter_with_http_info(self, parameter_id, version_id, **kwargs): # noqa: E501
1001
- """Get all revisions for a given parameter and version. You need to specify a version in order to get the revisions that match the version definition (size, format...) # noqa: E501
1002
-
1003
- This method makes a synchronous HTTP request by default. To make an
1004
- asynchronous HTTP request, please pass async_req=True
1005
- >>> thread = api.get_revisions_by_parameter_with_http_info(parameter_id, version_id, async_req=True)
1006
- >>> result = thread.get()
1007
-
1008
- :param async_req bool
1009
- :param str parameter_id: The parameter id to which you want the revisions (required)
1010
- :param str version_id: The version id to which you want to get the revision value (required)
1011
- :return: list[Revision]
1012
- If the method is called asynchronously,
1013
- returns the request thread.
1014
- """
1015
-
1016
- all_params = ['parameter_id', 'version_id'] # noqa: E501
1017
- all_params.append('async_req')
1018
- all_params.append('_return_http_data_only')
1019
- all_params.append('_preload_content')
1020
- all_params.append('_request_timeout')
1021
-
1022
- params = locals()
1023
- for key, val in six.iteritems(params['kwargs']):
1024
- if key not in all_params:
1025
- raise TypeError(
1026
- "Got an unexpected keyword argument '%s'"
1027
- " to method get_revisions_by_parameter" % key
1028
- )
1029
- params[key] = val
1030
- del params['kwargs']
1031
- # verify the required parameter 'parameter_id' is set
1032
- if ('parameter_id' not in params or
1033
- params['parameter_id'] is None):
1034
- raise ValueError("Missing the required parameter `parameter_id` when calling `get_revisions_by_parameter`") # noqa: E501
1035
- # verify the required parameter 'version_id' is set
1036
- if ('version_id' not in params or
1037
- params['version_id'] is None):
1038
- raise ValueError("Missing the required parameter `version_id` when calling `get_revisions_by_parameter`") # noqa: E501
1039
-
1040
- collection_formats = {}
1041
-
1042
- path_params = {}
1043
- if 'parameter_id' in params:
1044
- path_params['parameterId'] = params['parameter_id'] # noqa: E501
1045
- if 'version_id' in params:
1046
- path_params['versionId'] = params['version_id'] # noqa: E501
1047
-
1048
- query_params = []
1049
-
1050
- header_params = {}
1051
-
1052
- form_params = []
1053
- local_var_files = {}
1054
-
1055
- body_params = None
1056
- # HTTP header `Accept`
1057
- header_params['Accept'] = self.api_client.select_header_accept(
1058
- ['application/json', 'text/json']) # noqa: E501
1059
-
1060
- # Authentication setting
1061
- auth_settings = [] # noqa: E501
1062
-
1063
- return self.api_client.call_api(
1064
- '/teamdbapi/v2.0/version/{versionId}/parameter/{parameterId}/revisions', 'GET',
1065
- path_params,
1066
- query_params,
1067
- header_params,
1068
- body=body_params,
1069
- post_params=form_params,
1070
- files=local_var_files,
1071
- response_type='list[Revision]', # noqa: E501
1072
- auth_settings=auth_settings,
1073
- async_req=params.get('async_req'),
1074
- _return_http_data_only=params.get('_return_http_data_only'),
1075
- _preload_content=params.get('_preload_content', True),
1076
- _request_timeout=params.get('_request_timeout'),
1077
- collection_formats=collection_formats)
1078
-
1079
- def import_revision_from_parameter_list(self, body, version_from_id, version_to_id, copy_group_revisions, **kwargs): # noqa: E501
1080
- """Import all revisions from a version to another version for a given cross table parameters list # noqa: E501
1081
-
1082
- This method makes a synchronous HTTP request by default. To make an
1083
- asynchronous HTTP request, please pass async_req=True
1084
- >>> thread = api.import_revision_from_parameter_list(body, version_from_id, version_to_id, copy_group_revisions, async_req=True)
1085
- >>> result = thread.get()
1086
-
1087
- :param async_req bool
1088
- :param list[ParameterCrossTable] body: The parameters crosstable that provides the mapping between the parameters From and To (required)
1089
- :param str version_from_id: The version id from which the revisions come from (required)
1090
- :param str version_to_id: The version id to which the revisions are created (required)
1091
- :param bool copy_group_revisions: True to update the group revisions involved by the reivisions copy (required)
1092
- :return: list[Revision]
1093
- If the method is called asynchronously,
1094
- returns the request thread.
1095
- """
1096
- kwargs['_return_http_data_only'] = True
1097
- if kwargs.get('async_req'):
1098
- return self.import_revision_from_parameter_list_with_http_info(body, version_from_id, version_to_id, copy_group_revisions, **kwargs) # noqa: E501
1099
- else:
1100
- (data) = self.import_revision_from_parameter_list_with_http_info(body, version_from_id, version_to_id, copy_group_revisions, **kwargs) # noqa: E501
1101
- return data
1102
-
1103
- def import_revision_from_parameter_list_with_http_info(self, body, version_from_id, version_to_id, copy_group_revisions, **kwargs): # noqa: E501
1104
- """Import all revisions from a version to another version for a given cross table parameters list # noqa: E501
1105
-
1106
- This method makes a synchronous HTTP request by default. To make an
1107
- asynchronous HTTP request, please pass async_req=True
1108
- >>> thread = api.import_revision_from_parameter_list_with_http_info(body, version_from_id, version_to_id, copy_group_revisions, async_req=True)
1109
- >>> result = thread.get()
1110
-
1111
- :param async_req bool
1112
- :param list[ParameterCrossTable] body: The parameters crosstable that provides the mapping between the parameters From and To (required)
1113
- :param str version_from_id: The version id from which the revisions come from (required)
1114
- :param str version_to_id: The version id to which the revisions are created (required)
1115
- :param bool copy_group_revisions: True to update the group revisions involved by the reivisions copy (required)
1116
- :return: list[Revision]
1117
- If the method is called asynchronously,
1118
- returns the request thread.
1119
- """
1120
-
1121
- all_params = ['body', 'version_from_id', 'version_to_id', 'copy_group_revisions'] # noqa: E501
1122
- all_params.append('async_req')
1123
- all_params.append('_return_http_data_only')
1124
- all_params.append('_preload_content')
1125
- all_params.append('_request_timeout')
1126
-
1127
- params = locals()
1128
- for key, val in six.iteritems(params['kwargs']):
1129
- if key not in all_params:
1130
- raise TypeError(
1131
- "Got an unexpected keyword argument '%s'"
1132
- " to method import_revision_from_parameter_list" % key
1133
- )
1134
- params[key] = val
1135
- del params['kwargs']
1136
- # verify the required parameter 'body' is set
1137
- if ('body' not in params or
1138
- params['body'] is None):
1139
- raise ValueError("Missing the required parameter `body` when calling `import_revision_from_parameter_list`") # noqa: E501
1140
- # verify the required parameter 'version_from_id' is set
1141
- if ('version_from_id' not in params or
1142
- params['version_from_id'] is None):
1143
- raise ValueError("Missing the required parameter `version_from_id` when calling `import_revision_from_parameter_list`") # noqa: E501
1144
- # verify the required parameter 'version_to_id' is set
1145
- if ('version_to_id' not in params or
1146
- params['version_to_id'] is None):
1147
- raise ValueError("Missing the required parameter `version_to_id` when calling `import_revision_from_parameter_list`") # noqa: E501
1148
- # verify the required parameter 'copy_group_revisions' is set
1149
- if ('copy_group_revisions' not in params or
1150
- params['copy_group_revisions'] is None):
1151
- raise ValueError("Missing the required parameter `copy_group_revisions` when calling `import_revision_from_parameter_list`") # noqa: E501
1152
-
1153
- collection_formats = {}
1154
-
1155
- path_params = {}
1156
- if 'version_from_id' in params:
1157
- path_params['versionFromId'] = params['version_from_id'] # noqa: E501
1158
- if 'version_to_id' in params:
1159
- path_params['versionToId'] = params['version_to_id'] # noqa: E501
1160
- if 'copy_group_revisions' in params:
1161
- path_params['copyGroupRevisions'] = params['copy_group_revisions'] # noqa: E501
1162
-
1163
- query_params = []
1164
-
1165
- header_params = {}
1166
-
1167
- form_params = []
1168
- local_var_files = {}
1169
-
1170
- body_params = None
1171
- if 'body' in params:
1172
- body_params = params['body']
1173
- # HTTP header `Accept`
1174
- header_params['Accept'] = self.api_client.select_header_accept(
1175
- ['application/json', 'text/json']) # noqa: E501
1176
-
1177
- # HTTP header `Content-Type`
1178
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1179
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
1180
-
1181
- # Authentication setting
1182
- auth_settings = [] # noqa: E501
1183
-
1184
- return self.api_client.call_api(
1185
- '/teamdbapi/v2.0/versionFrom/{versionFromId}/versionTo/{versionToId}/withGroupRevisionCopy/{copyGroupRevisions}/revisions', 'POST',
1186
- path_params,
1187
- query_params,
1188
- header_params,
1189
- body=body_params,
1190
- post_params=form_params,
1191
- files=local_var_files,
1192
- response_type='list[Revision]', # noqa: E501
1193
- auth_settings=auth_settings,
1194
- async_req=params.get('async_req'),
1195
- _return_http_data_only=params.get('_return_http_data_only'),
1196
- _preload_content=params.get('_preload_content', True),
1197
- _request_timeout=params.get('_request_timeout'),
1198
- collection_formats=collection_formats)
1199
-
1200
- def try_get_revision(self, body, version_id, **kwargs): # noqa: E501
1201
- """Check whether the revision with the same data already exists for a given version. Returns the revision unique ID already existing or empty (00000000-0000-0000-0000-000000000000) if not found. # noqa: E501
1202
-
1203
- This method makes a synchronous HTTP request by default. To make an
1204
- asynchronous HTTP request, please pass async_req=True
1205
- >>> thread = api.try_get_revision(body, version_id, async_req=True)
1206
- >>> result = thread.get()
1207
-
1208
- :param async_req bool
1209
- :param Revision body: The revision you want to check. The research is based on the data not the revision id. (required)
1210
- :param str version_id: The version id to which the revision must belong (required)
1211
- :return: str
1212
- If the method is called asynchronously,
1213
- returns the request thread.
1214
- """
1215
- kwargs['_return_http_data_only'] = True
1216
- if kwargs.get('async_req'):
1217
- return self.try_get_revision_with_http_info(body, version_id, **kwargs) # noqa: E501
1218
- else:
1219
- (data) = self.try_get_revision_with_http_info(body, version_id, **kwargs) # noqa: E501
1220
- return data
1221
-
1222
- def try_get_revision_with_http_info(self, body, version_id, **kwargs): # noqa: E501
1223
- """Check whether the revision with the same data already exists for a given version. Returns the revision unique ID already existing or empty (00000000-0000-0000-0000-000000000000) if not found. # noqa: E501
1224
-
1225
- This method makes a synchronous HTTP request by default. To make an
1226
- asynchronous HTTP request, please pass async_req=True
1227
- >>> thread = api.try_get_revision_with_http_info(body, version_id, async_req=True)
1228
- >>> result = thread.get()
1229
-
1230
- :param async_req bool
1231
- :param Revision body: The revision you want to check. The research is based on the data not the revision id. (required)
1232
- :param str version_id: The version id to which the revision must belong (required)
1233
- :return: str
1234
- If the method is called asynchronously,
1235
- returns the request thread.
1236
- """
1237
-
1238
- all_params = ['body', 'version_id'] # noqa: E501
1239
- all_params.append('async_req')
1240
- all_params.append('_return_http_data_only')
1241
- all_params.append('_preload_content')
1242
- all_params.append('_request_timeout')
1243
-
1244
- params = locals()
1245
- for key, val in six.iteritems(params['kwargs']):
1246
- if key not in all_params:
1247
- raise TypeError(
1248
- "Got an unexpected keyword argument '%s'"
1249
- " to method try_get_revision" % key
1250
- )
1251
- params[key] = val
1252
- del params['kwargs']
1253
- # verify the required parameter 'body' is set
1254
- if ('body' not in params or
1255
- params['body'] is None):
1256
- raise ValueError("Missing the required parameter `body` when calling `try_get_revision`") # noqa: E501
1257
- # verify the required parameter 'version_id' is set
1258
- if ('version_id' not in params or
1259
- params['version_id'] is None):
1260
- raise ValueError("Missing the required parameter `version_id` when calling `try_get_revision`") # noqa: E501
1261
-
1262
- collection_formats = {}
1263
-
1264
- path_params = {}
1265
- if 'version_id' in params:
1266
- path_params['versionId'] = params['version_id'] # noqa: E501
1267
-
1268
- query_params = []
1269
-
1270
- header_params = {}
1271
-
1272
- form_params = []
1273
- local_var_files = {}
1274
-
1275
- body_params = None
1276
- if 'body' in params:
1277
- body_params = params['body']
1278
- # HTTP header `Accept`
1279
- header_params['Accept'] = self.api_client.select_header_accept(
1280
- ['application/json', 'text/json']) # noqa: E501
1281
-
1282
- # HTTP header `Content-Type`
1283
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1284
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
1285
-
1286
- # Authentication setting
1287
- auth_settings = [] # noqa: E501
1288
-
1289
- return self.api_client.call_api(
1290
- '/teamdbapi/v2.0/version/{versionId}/revision/exists', 'POST',
1291
- path_params,
1292
- query_params,
1293
- header_params,
1294
- body=body_params,
1295
- post_params=form_params,
1296
- files=local_var_files,
1297
- response_type='str', # noqa: E501
1298
- auth_settings=auth_settings,
1299
- async_req=params.get('async_req'),
1300
- _return_http_data_only=params.get('_return_http_data_only'),
1301
- _preload_content=params.get('_preload_content', True),
1302
- _request_timeout=params.get('_request_timeout'),
1303
- collection_formats=collection_formats)
1304
-
1305
- def update_revision(self, body, revision_id, version_id, **kwargs): # noqa: E501
1306
- """Update a revision. You have to specify a version id to which the revision is updated. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
1307
-
1308
- This method makes a synchronous HTTP request by default. To make an
1309
- asynchronous HTTP request, please pass async_req=True
1310
- >>> thread = api.update_revision(body, revision_id, version_id, async_req=True)
1311
- >>> result = thread.get()
1312
-
1313
- :param async_req bool
1314
- :param Revision body: The revision you want to update (required)
1315
- :param str revision_id: The revision id corresponding to the revision you want to update (required)
1316
- :param str version_id: The version id to which the revision was created (required)
1317
- :param bool allow_update_revision_fields: Allows to update the all the revision description fields except the data from a locked revision.
1318
- :return: Revision
1319
- If the method is called asynchronously,
1320
- returns the request thread.
1321
- """
1322
- kwargs['_return_http_data_only'] = True
1323
- if kwargs.get('async_req'):
1324
- return self.update_revision_with_http_info(body, revision_id, version_id, **kwargs) # noqa: E501
1325
- else:
1326
- (data) = self.update_revision_with_http_info(body, revision_id, version_id, **kwargs) # noqa: E501
1327
- return data
1328
-
1329
- def update_revision_with_http_info(self, body, revision_id, version_id, **kwargs): # noqa: E501
1330
- """Update a revision. You have to specify a version id to which the revision is updated. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
1331
-
1332
- This method makes a synchronous HTTP request by default. To make an
1333
- asynchronous HTTP request, please pass async_req=True
1334
- >>> thread = api.update_revision_with_http_info(body, revision_id, version_id, async_req=True)
1335
- >>> result = thread.get()
1336
-
1337
- :param async_req bool
1338
- :param Revision body: The revision you want to update (required)
1339
- :param str revision_id: The revision id corresponding to the revision you want to update (required)
1340
- :param str version_id: The version id to which the revision was created (required)
1341
- :param bool allow_update_revision_fields: Allows to update the all the revision description fields except the data from a locked revision.
1342
- :return: Revision
1343
- If the method is called asynchronously,
1344
- returns the request thread.
1345
- """
1346
-
1347
- all_params = ['body', 'revision_id', 'version_id', 'allow_update_revision_fields'] # noqa: E501
1348
- all_params.append('async_req')
1349
- all_params.append('_return_http_data_only')
1350
- all_params.append('_preload_content')
1351
- all_params.append('_request_timeout')
1352
-
1353
- params = locals()
1354
- for key, val in six.iteritems(params['kwargs']):
1355
- if key not in all_params:
1356
- raise TypeError(
1357
- "Got an unexpected keyword argument '%s'"
1358
- " to method update_revision" % key
1359
- )
1360
- params[key] = val
1361
- del params['kwargs']
1362
- # verify the required parameter 'body' is set
1363
- if ('body' not in params or
1364
- params['body'] is None):
1365
- raise ValueError("Missing the required parameter `body` when calling `update_revision`") # noqa: E501
1366
- # verify the required parameter 'revision_id' is set
1367
- if ('revision_id' not in params or
1368
- params['revision_id'] is None):
1369
- raise ValueError("Missing the required parameter `revision_id` when calling `update_revision`") # noqa: E501
1370
- # verify the required parameter 'version_id' is set
1371
- if ('version_id' not in params or
1372
- params['version_id'] is None):
1373
- raise ValueError("Missing the required parameter `version_id` when calling `update_revision`") # noqa: E501
1374
-
1375
- collection_formats = {}
1376
-
1377
- path_params = {}
1378
- if 'revision_id' in params:
1379
- path_params['revisionId'] = params['revision_id'] # noqa: E501
1380
- if 'version_id' in params:
1381
- path_params['versionId'] = params['version_id'] # noqa: E501
1382
-
1383
- query_params = []
1384
- if 'allow_update_revision_fields' in params:
1385
- query_params.append(('allowUpdateRevisionFields', params['allow_update_revision_fields'])) # noqa: E501
1386
-
1387
- header_params = {}
1388
-
1389
- form_params = []
1390
- local_var_files = {}
1391
-
1392
- body_params = None
1393
- if 'body' in params:
1394
- body_params = params['body']
1395
- # HTTP header `Accept`
1396
- header_params['Accept'] = self.api_client.select_header_accept(
1397
- ['application/json', 'text/json']) # noqa: E501
1398
-
1399
- # HTTP header `Content-Type`
1400
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1401
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
1402
-
1403
- # Authentication setting
1404
- auth_settings = [] # noqa: E501
1405
-
1406
- return self.api_client.call_api(
1407
- '/teamdbapi/v2.0/version/{versionId}/revision/{revisionId}', 'PUT',
1408
- path_params,
1409
- query_params,
1410
- header_params,
1411
- body=body_params,
1412
- post_params=form_params,
1413
- files=local_var_files,
1414
- response_type='Revision', # noqa: E501
1415
- auth_settings=auth_settings,
1416
- async_req=params.get('async_req'),
1417
- _return_http_data_only=params.get('_return_http_data_only'),
1418
- _preload_content=params.get('_preload_content', True),
1419
- _request_timeout=params.get('_request_timeout'),
1420
- 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 RevisionApi(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_revision(self, body, version_id, **kwargs): # noqa: E501
36
+ """Create a revision. You have to specify a version id to which the revision is created. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
37
+
38
+ Set the Revision.Id to empty (00000000-0000-0000-0000-000000000000), it will be generated by the server. # noqa: E501
39
+ This method makes a synchronous HTTP request by default. To make an
40
+ asynchronous HTTP request, please pass async_req=True
41
+ >>> thread = api.create_revision(body, version_id, async_req=True)
42
+ >>> result = thread.get()
43
+
44
+ :param async_req bool
45
+ :param Revision body: The revision you want to create (required)
46
+ :param str version_id: The version id to which the revision was created (required)
47
+ :return: Revision
48
+ If the method is called asynchronously,
49
+ returns the request thread.
50
+ """
51
+ kwargs['_return_http_data_only'] = True
52
+ if kwargs.get('async_req'):
53
+ return self.create_revision_with_http_info(body, version_id, **kwargs) # noqa: E501
54
+ else:
55
+ (data) = self.create_revision_with_http_info(body, version_id, **kwargs) # noqa: E501
56
+ return data
57
+
58
+ def create_revision_with_http_info(self, body, version_id, **kwargs): # noqa: E501
59
+ """Create a revision. You have to specify a version id to which the revision is created. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
60
+
61
+ Set the Revision.Id to empty (00000000-0000-0000-0000-000000000000), it will be generated by the server. # noqa: E501
62
+ This method makes a synchronous HTTP request by default. To make an
63
+ asynchronous HTTP request, please pass async_req=True
64
+ >>> thread = api.create_revision_with_http_info(body, version_id, async_req=True)
65
+ >>> result = thread.get()
66
+
67
+ :param async_req bool
68
+ :param Revision body: The revision you want to create (required)
69
+ :param str version_id: The version id to which the revision was created (required)
70
+ :return: Revision
71
+ If the method is called asynchronously,
72
+ returns the request thread.
73
+ """
74
+
75
+ all_params = ['body', 'version_id'] # noqa: E501
76
+ all_params.append('async_req')
77
+ all_params.append('_return_http_data_only')
78
+ all_params.append('_preload_content')
79
+ all_params.append('_request_timeout')
80
+
81
+ params = locals()
82
+ for key, val in six.iteritems(params['kwargs']):
83
+ if key not in all_params:
84
+ raise TypeError(
85
+ "Got an unexpected keyword argument '%s'"
86
+ " to method create_revision" % key
87
+ )
88
+ params[key] = val
89
+ del params['kwargs']
90
+ # verify the required parameter 'body' is set
91
+ if ('body' not in params or
92
+ params['body'] is None):
93
+ raise ValueError("Missing the required parameter `body` when calling `create_revision`") # noqa: E501
94
+ # verify the required parameter 'version_id' is set
95
+ if ('version_id' not in params or
96
+ params['version_id'] is None):
97
+ raise ValueError("Missing the required parameter `version_id` when calling `create_revision`") # noqa: E501
98
+
99
+ collection_formats = {}
100
+
101
+ path_params = {}
102
+ if 'version_id' in params:
103
+ path_params['versionId'] = params['version_id'] # noqa: E501
104
+
105
+ query_params = []
106
+
107
+ header_params = {}
108
+
109
+ form_params = []
110
+ local_var_files = {}
111
+
112
+ body_params = None
113
+ if 'body' in params:
114
+ body_params = params['body']
115
+ # HTTP header `Accept`
116
+ header_params['Accept'] = self.api_client.select_header_accept(
117
+ ['application/json', 'text/json']) # noqa: E501
118
+
119
+ # HTTP header `Content-Type`
120
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
121
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
122
+
123
+ # Authentication setting
124
+ auth_settings = [] # noqa: E501
125
+
126
+ return self.api_client.call_api(
127
+ '/teamdbapi/v2.0/version/{versionId}/revision', 'POST',
128
+ path_params,
129
+ query_params,
130
+ header_params,
131
+ body=body_params,
132
+ post_params=form_params,
133
+ files=local_var_files,
134
+ response_type='Revision', # noqa: E501
135
+ auth_settings=auth_settings,
136
+ async_req=params.get('async_req'),
137
+ _return_http_data_only=params.get('_return_http_data_only'),
138
+ _preload_content=params.get('_preload_content', True),
139
+ _request_timeout=params.get('_request_timeout'),
140
+ collection_formats=collection_formats)
141
+
142
+ def create_revision_for_component(self, body, part_number, serial_number, parameter_path, target_name, **kwargs): # noqa: E501
143
+ """Create a revision for a Lifing component identified with its partNumber and serial number. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
144
+
145
+ This method makes a synchronous HTTP request by default. To make an
146
+ asynchronous HTTP request, please pass async_req=True
147
+ >>> thread = api.create_revision_for_component(body, part_number, serial_number, parameter_path, target_name, async_req=True)
148
+ >>> result = thread.get()
149
+
150
+ :param async_req bool
151
+ :param RevisionValue body: The revision value you want to create (required)
152
+ :param str part_number: The lifing component's part number (required)
153
+ :param str serial_number: The lifing component's serial number (required)
154
+ :param str parameter_path: The parameter path identifying the parameter. You have to double de path separator. For instance: system//sensor/Oil (required)
155
+ :param str target_name: The target to which the parameter is associated (required)
156
+ :return: Revision
157
+ If the method is called asynchronously,
158
+ returns the request thread.
159
+ """
160
+ kwargs['_return_http_data_only'] = True
161
+ if kwargs.get('async_req'):
162
+ return self.create_revision_for_component_with_http_info(body, part_number, serial_number, parameter_path, target_name, **kwargs) # noqa: E501
163
+ else:
164
+ (data) = self.create_revision_for_component_with_http_info(body, part_number, serial_number, parameter_path, target_name, **kwargs) # noqa: E501
165
+ return data
166
+
167
+ def create_revision_for_component_with_http_info(self, body, part_number, serial_number, parameter_path, target_name, **kwargs): # noqa: E501
168
+ """Create a revision for a Lifing component identified with its partNumber and serial number. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
169
+
170
+ This method makes a synchronous HTTP request by default. To make an
171
+ asynchronous HTTP request, please pass async_req=True
172
+ >>> thread = api.create_revision_for_component_with_http_info(body, part_number, serial_number, parameter_path, target_name, async_req=True)
173
+ >>> result = thread.get()
174
+
175
+ :param async_req bool
176
+ :param RevisionValue body: The revision value you want to create (required)
177
+ :param str part_number: The lifing component's part number (required)
178
+ :param str serial_number: The lifing component's serial number (required)
179
+ :param str parameter_path: The parameter path identifying the parameter. You have to double de path separator. For instance: system//sensor/Oil (required)
180
+ :param str target_name: The target to which the parameter is associated (required)
181
+ :return: Revision
182
+ If the method is called asynchronously,
183
+ returns the request thread.
184
+ """
185
+
186
+ all_params = ['body', 'part_number', 'serial_number', 'parameter_path', 'target_name'] # noqa: E501
187
+ all_params.append('async_req')
188
+ all_params.append('_return_http_data_only')
189
+ all_params.append('_preload_content')
190
+ all_params.append('_request_timeout')
191
+
192
+ params = locals()
193
+ for key, val in six.iteritems(params['kwargs']):
194
+ if key not in all_params:
195
+ raise TypeError(
196
+ "Got an unexpected keyword argument '%s'"
197
+ " to method create_revision_for_component" % key
198
+ )
199
+ params[key] = val
200
+ del params['kwargs']
201
+ # verify the required parameter 'body' is set
202
+ if ('body' not in params or
203
+ params['body'] is None):
204
+ raise ValueError("Missing the required parameter `body` when calling `create_revision_for_component`") # noqa: E501
205
+ # verify the required parameter 'part_number' is set
206
+ if ('part_number' not in params or
207
+ params['part_number'] is None):
208
+ raise ValueError("Missing the required parameter `part_number` when calling `create_revision_for_component`") # noqa: E501
209
+ # verify the required parameter 'serial_number' is set
210
+ if ('serial_number' not in params or
211
+ params['serial_number'] is None):
212
+ raise ValueError("Missing the required parameter `serial_number` when calling `create_revision_for_component`") # noqa: E501
213
+ # verify the required parameter 'parameter_path' is set
214
+ if ('parameter_path' not in params or
215
+ params['parameter_path'] is None):
216
+ raise ValueError("Missing the required parameter `parameter_path` when calling `create_revision_for_component`") # noqa: E501
217
+ # verify the required parameter 'target_name' is set
218
+ if ('target_name' not in params or
219
+ params['target_name'] is None):
220
+ raise ValueError("Missing the required parameter `target_name` when calling `create_revision_for_component`") # noqa: E501
221
+
222
+ collection_formats = {}
223
+
224
+ path_params = {}
225
+ if 'part_number' in params:
226
+ path_params['partNumber'] = params['part_number'] # noqa: E501
227
+ if 'serial_number' in params:
228
+ path_params['serialNumber'] = params['serial_number'] # noqa: E501
229
+ if 'parameter_path' in params:
230
+ path_params['parameterPath'] = params['parameter_path'] # noqa: E501
231
+ if 'target_name' in params:
232
+ path_params['targetName'] = params['target_name'] # noqa: E501
233
+
234
+ query_params = []
235
+
236
+ header_params = {}
237
+
238
+ form_params = []
239
+ local_var_files = {}
240
+
241
+ body_params = None
242
+ if 'body' in params:
243
+ body_params = params['body']
244
+ # HTTP header `Accept`
245
+ header_params['Accept'] = self.api_client.select_header_accept(
246
+ ['application/json', 'text/json']) # noqa: E501
247
+
248
+ # HTTP header `Content-Type`
249
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
250
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
251
+
252
+ # Authentication setting
253
+ auth_settings = [] # noqa: E501
254
+
255
+ return self.api_client.call_api(
256
+ '/teamdbapi/v2.0/partNumber/{partNumber}/serialNumber/{serialNumber}/parameterPath/{parameterPath}/targetName/{targetName}/revision', 'POST',
257
+ path_params,
258
+ query_params,
259
+ header_params,
260
+ body=body_params,
261
+ post_params=form_params,
262
+ files=local_var_files,
263
+ response_type='Revision', # noqa: E501
264
+ auth_settings=auth_settings,
265
+ async_req=params.get('async_req'),
266
+ _return_http_data_only=params.get('_return_http_data_only'),
267
+ _preload_content=params.get('_preload_content', True),
268
+ _request_timeout=params.get('_request_timeout'),
269
+ collection_formats=collection_formats)
270
+
271
+ def delete_revision(self, revision_id, **kwargs): # noqa: E501
272
+ """Remove a revision corresponding to a given id. # noqa: E501
273
+
274
+ This method makes a synchronous HTTP request by default. To make an
275
+ asynchronous HTTP request, please pass async_req=True
276
+ >>> thread = api.delete_revision(revision_id, async_req=True)
277
+ >>> result = thread.get()
278
+
279
+ :param async_req bool
280
+ :param str revision_id: The revision id you want to remove (required)
281
+ :return: None
282
+ If the method is called asynchronously,
283
+ returns the request thread.
284
+ """
285
+ kwargs['_return_http_data_only'] = True
286
+ if kwargs.get('async_req'):
287
+ return self.delete_revision_with_http_info(revision_id, **kwargs) # noqa: E501
288
+ else:
289
+ (data) = self.delete_revision_with_http_info(revision_id, **kwargs) # noqa: E501
290
+ return data
291
+
292
+ def delete_revision_with_http_info(self, revision_id, **kwargs): # noqa: E501
293
+ """Remove a revision corresponding to a given id. # noqa: E501
294
+
295
+ This method makes a synchronous HTTP request by default. To make an
296
+ asynchronous HTTP request, please pass async_req=True
297
+ >>> thread = api.delete_revision_with_http_info(revision_id, async_req=True)
298
+ >>> result = thread.get()
299
+
300
+ :param async_req bool
301
+ :param str revision_id: The revision id you want to remove (required)
302
+ :return: None
303
+ If the method is called asynchronously,
304
+ returns the request thread.
305
+ """
306
+
307
+ all_params = ['revision_id'] # noqa: E501
308
+ all_params.append('async_req')
309
+ all_params.append('_return_http_data_only')
310
+ all_params.append('_preload_content')
311
+ all_params.append('_request_timeout')
312
+
313
+ params = locals()
314
+ for key, val in six.iteritems(params['kwargs']):
315
+ if key not in all_params:
316
+ raise TypeError(
317
+ "Got an unexpected keyword argument '%s'"
318
+ " to method delete_revision" % key
319
+ )
320
+ params[key] = val
321
+ del params['kwargs']
322
+ # verify the required parameter 'revision_id' is set
323
+ if ('revision_id' not in params or
324
+ params['revision_id'] is None):
325
+ raise ValueError("Missing the required parameter `revision_id` when calling `delete_revision`") # noqa: E501
326
+
327
+ collection_formats = {}
328
+
329
+ path_params = {}
330
+ if 'revision_id' in params:
331
+ path_params['revisionId'] = params['revision_id'] # noqa: E501
332
+
333
+ query_params = []
334
+
335
+ header_params = {}
336
+
337
+ form_params = []
338
+ local_var_files = {}
339
+
340
+ body_params = None
341
+ # HTTP header `Accept`
342
+ header_params['Accept'] = self.api_client.select_header_accept(
343
+ ['application/json', 'text/json']) # noqa: E501
344
+
345
+ # Authentication setting
346
+ auth_settings = [] # noqa: E501
347
+
348
+ return self.api_client.call_api(
349
+ '/teamdbapi/v2.0/revision/{revisionId}', 'DELETE',
350
+ path_params,
351
+ query_params,
352
+ header_params,
353
+ body=body_params,
354
+ post_params=form_params,
355
+ files=local_var_files,
356
+ response_type=None, # noqa: E501
357
+ auth_settings=auth_settings,
358
+ async_req=params.get('async_req'),
359
+ _return_http_data_only=params.get('_return_http_data_only'),
360
+ _preload_content=params.get('_preload_content', True),
361
+ _request_timeout=params.get('_request_timeout'),
362
+ collection_formats=collection_formats)
363
+
364
+ def export_revision(self, revision_id, version_id, output_file_path, **kwargs): # noqa: E501
365
+ """[Command] Export a revision into a file. You need to specify the version to which you want to export the revision value. # noqa: E501
366
+
367
+ This method makes a synchronous HTTP request by default. To make an
368
+ asynchronous HTTP request, please pass async_req=True
369
+ >>> thread = api.export_revision(revision_id, version_id, output_file_path, async_req=True)
370
+ >>> result = thread.get()
371
+
372
+ :param async_req bool
373
+ :param str revision_id: The revision id to export. (required)
374
+ :param str version_id: The version id to which you want to export the revision value. (required)
375
+ :param str output_file_path: The path to the file to create. You have to provide the file extension for example : MyFile.m (required)
376
+ :return: bool
377
+ If the method is called asynchronously,
378
+ returns the request thread.
379
+ """
380
+ kwargs['_return_http_data_only'] = True
381
+ if kwargs.get('async_req'):
382
+ return self.export_revision_with_http_info(revision_id, version_id, output_file_path, **kwargs) # noqa: E501
383
+ else:
384
+ (data) = self.export_revision_with_http_info(revision_id, version_id, output_file_path, **kwargs) # noqa: E501
385
+ return data
386
+
387
+ def export_revision_with_http_info(self, revision_id, version_id, output_file_path, **kwargs): # noqa: E501
388
+ """[Command] Export a revision into a file. You need to specify the version to which you want to export the revision value. # noqa: E501
389
+
390
+ This method makes a synchronous HTTP request by default. To make an
391
+ asynchronous HTTP request, please pass async_req=True
392
+ >>> thread = api.export_revision_with_http_info(revision_id, version_id, output_file_path, async_req=True)
393
+ >>> result = thread.get()
394
+
395
+ :param async_req bool
396
+ :param str revision_id: The revision id to export. (required)
397
+ :param str version_id: The version id to which you want to export the revision value. (required)
398
+ :param str output_file_path: The path to the file to create. You have to provide the file extension for example : MyFile.m (required)
399
+ :return: bool
400
+ If the method is called asynchronously,
401
+ returns the request thread.
402
+ """
403
+
404
+ all_params = ['revision_id', 'version_id', 'output_file_path'] # noqa: E501
405
+ all_params.append('async_req')
406
+ all_params.append('_return_http_data_only')
407
+ all_params.append('_preload_content')
408
+ all_params.append('_request_timeout')
409
+
410
+ params = locals()
411
+ for key, val in six.iteritems(params['kwargs']):
412
+ if key not in all_params:
413
+ raise TypeError(
414
+ "Got an unexpected keyword argument '%s'"
415
+ " to method export_revision" % key
416
+ )
417
+ params[key] = val
418
+ del params['kwargs']
419
+ # verify the required parameter 'revision_id' is set
420
+ if ('revision_id' not in params or
421
+ params['revision_id'] is None):
422
+ raise ValueError("Missing the required parameter `revision_id` when calling `export_revision`") # noqa: E501
423
+ # verify the required parameter 'version_id' is set
424
+ if ('version_id' not in params or
425
+ params['version_id'] is None):
426
+ raise ValueError("Missing the required parameter `version_id` when calling `export_revision`") # noqa: E501
427
+ # verify the required parameter 'output_file_path' is set
428
+ if ('output_file_path' not in params or
429
+ params['output_file_path'] is None):
430
+ raise ValueError("Missing the required parameter `output_file_path` when calling `export_revision`") # noqa: E501
431
+
432
+ collection_formats = {}
433
+
434
+ path_params = {}
435
+ if 'revision_id' in params:
436
+ path_params['revisionId'] = params['revision_id'] # noqa: E501
437
+
438
+ query_params = []
439
+ if 'version_id' in params:
440
+ query_params.append(('versionId', params['version_id'])) # noqa: E501
441
+ if 'output_file_path' in params:
442
+ query_params.append(('outputFilePath', params['output_file_path'])) # noqa: E501
443
+
444
+ header_params = {}
445
+
446
+ form_params = []
447
+ local_var_files = {}
448
+
449
+ body_params = None
450
+ # HTTP header `Accept`
451
+ header_params['Accept'] = self.api_client.select_header_accept(
452
+ ['application/json', 'text/json']) # noqa: E501
453
+
454
+ # Authentication setting
455
+ auth_settings = [] # noqa: E501
456
+
457
+ return self.api_client.call_api(
458
+ '/teamdbapi/v2.0/revision/{revisionId}/export', 'POST',
459
+ path_params,
460
+ query_params,
461
+ header_params,
462
+ body=body_params,
463
+ post_params=form_params,
464
+ files=local_var_files,
465
+ response_type='bool', # noqa: E501
466
+ auth_settings=auth_settings,
467
+ async_req=params.get('async_req'),
468
+ _return_http_data_only=params.get('_return_http_data_only'),
469
+ _preload_content=params.get('_preload_content', True),
470
+ _request_timeout=params.get('_request_timeout'),
471
+ collection_formats=collection_formats)
472
+
473
+ def get_component_revisions(self, part_number, serial_number, **kwargs): # noqa: E501
474
+ """Get all the revisions associated with a Lifing component. You need to specify the part number, the component serial number to identify the component for which you want all the revisions associated with. # noqa: E501
475
+
476
+ This method makes a synchronous HTTP request by default. To make an
477
+ asynchronous HTTP request, please pass async_req=True
478
+ >>> thread = api.get_component_revisions(part_number, serial_number, async_req=True)
479
+ >>> result = thread.get()
480
+
481
+ :param async_req bool
482
+ :param str part_number: The lifing component's part number (required)
483
+ :param str serial_number: The lifing component's serial number (required)
484
+ :return: list[Revision]
485
+ If the method is called asynchronously,
486
+ returns the request thread.
487
+ """
488
+ kwargs['_return_http_data_only'] = True
489
+ if kwargs.get('async_req'):
490
+ return self.get_component_revisions_with_http_info(part_number, serial_number, **kwargs) # noqa: E501
491
+ else:
492
+ (data) = self.get_component_revisions_with_http_info(part_number, serial_number, **kwargs) # noqa: E501
493
+ return data
494
+
495
+ def get_component_revisions_with_http_info(self, part_number, serial_number, **kwargs): # noqa: E501
496
+ """Get all the revisions associated with a Lifing component. You need to specify the part number, the component serial number to identify the component for which you want all the revisions associated with. # noqa: E501
497
+
498
+ This method makes a synchronous HTTP request by default. To make an
499
+ asynchronous HTTP request, please pass async_req=True
500
+ >>> thread = api.get_component_revisions_with_http_info(part_number, serial_number, async_req=True)
501
+ >>> result = thread.get()
502
+
503
+ :param async_req bool
504
+ :param str part_number: The lifing component's part number (required)
505
+ :param str serial_number: The lifing component's serial number (required)
506
+ :return: list[Revision]
507
+ If the method is called asynchronously,
508
+ returns the request thread.
509
+ """
510
+
511
+ all_params = ['part_number', 'serial_number'] # noqa: E501
512
+ all_params.append('async_req')
513
+ all_params.append('_return_http_data_only')
514
+ all_params.append('_preload_content')
515
+ all_params.append('_request_timeout')
516
+
517
+ params = locals()
518
+ for key, val in six.iteritems(params['kwargs']):
519
+ if key not in all_params:
520
+ raise TypeError(
521
+ "Got an unexpected keyword argument '%s'"
522
+ " to method get_component_revisions" % key
523
+ )
524
+ params[key] = val
525
+ del params['kwargs']
526
+ # verify the required parameter 'part_number' is set
527
+ if ('part_number' not in params or
528
+ params['part_number'] is None):
529
+ raise ValueError("Missing the required parameter `part_number` when calling `get_component_revisions`") # noqa: E501
530
+ # verify the required parameter 'serial_number' is set
531
+ if ('serial_number' not in params or
532
+ params['serial_number'] is None):
533
+ raise ValueError("Missing the required parameter `serial_number` when calling `get_component_revisions`") # noqa: E501
534
+
535
+ collection_formats = {}
536
+
537
+ path_params = {}
538
+ if 'part_number' in params:
539
+ path_params['partNumber'] = params['part_number'] # noqa: E501
540
+ if 'serial_number' in params:
541
+ path_params['serialNumber'] = params['serial_number'] # noqa: E501
542
+
543
+ query_params = []
544
+
545
+ header_params = {}
546
+
547
+ form_params = []
548
+ local_var_files = {}
549
+
550
+ body_params = None
551
+ # HTTP header `Accept`
552
+ header_params['Accept'] = self.api_client.select_header_accept(
553
+ ['application/json', 'text/json']) # noqa: E501
554
+
555
+ # Authentication setting
556
+ auth_settings = [] # noqa: E501
557
+
558
+ return self.api_client.call_api(
559
+ '/teamdbapi/v2.0/partNumber/{partNumber}/serialNumber/{serialNumber}/revisions', 'GET',
560
+ path_params,
561
+ query_params,
562
+ header_params,
563
+ body=body_params,
564
+ post_params=form_params,
565
+ files=local_var_files,
566
+ response_type='list[Revision]', # noqa: E501
567
+ auth_settings=auth_settings,
568
+ async_req=params.get('async_req'),
569
+ _return_http_data_only=params.get('_return_http_data_only'),
570
+ _preload_content=params.get('_preload_content', True),
571
+ _request_timeout=params.get('_request_timeout'),
572
+ collection_formats=collection_formats)
573
+
574
+ def get_component_revisions_by_parameter(self, part_number, serial_number, parameter_path, target_name, **kwargs): # noqa: E501
575
+ """Get all component's revisions for a given parameter and target. You need to specify the part number, the component serial number, a target and the parameter path for which you want the revisions. # noqa: E501
576
+
577
+ This method makes a synchronous HTTP request by default. To make an
578
+ asynchronous HTTP request, please pass async_req=True
579
+ >>> thread = api.get_component_revisions_by_parameter(part_number, serial_number, parameter_path, target_name, async_req=True)
580
+ >>> result = thread.get()
581
+
582
+ :param async_req bool
583
+ :param str part_number: The lifing component's part number (required)
584
+ :param str serial_number: The lifing component's serial number (required)
585
+ :param str parameter_path: The parameter path identifying the parameter. You have to double de path separator. For instance: system//sensor/Oil (required)
586
+ :param str target_name: The target to which the parameter is associated (required)
587
+ :return: list[Revision]
588
+ If the method is called asynchronously,
589
+ returns the request thread.
590
+ """
591
+ kwargs['_return_http_data_only'] = True
592
+ if kwargs.get('async_req'):
593
+ return self.get_component_revisions_by_parameter_with_http_info(part_number, serial_number, parameter_path, target_name, **kwargs) # noqa: E501
594
+ else:
595
+ (data) = self.get_component_revisions_by_parameter_with_http_info(part_number, serial_number, parameter_path, target_name, **kwargs) # noqa: E501
596
+ return data
597
+
598
+ def get_component_revisions_by_parameter_with_http_info(self, part_number, serial_number, parameter_path, target_name, **kwargs): # noqa: E501
599
+ """Get all component's revisions for a given parameter and target. You need to specify the part number, the component serial number, a target and the parameter path for which you want the revisions. # noqa: E501
600
+
601
+ This method makes a synchronous HTTP request by default. To make an
602
+ asynchronous HTTP request, please pass async_req=True
603
+ >>> thread = api.get_component_revisions_by_parameter_with_http_info(part_number, serial_number, parameter_path, target_name, async_req=True)
604
+ >>> result = thread.get()
605
+
606
+ :param async_req bool
607
+ :param str part_number: The lifing component's part number (required)
608
+ :param str serial_number: The lifing component's serial number (required)
609
+ :param str parameter_path: The parameter path identifying the parameter. You have to double de path separator. For instance: system//sensor/Oil (required)
610
+ :param str target_name: The target to which the parameter is associated (required)
611
+ :return: list[Revision]
612
+ If the method is called asynchronously,
613
+ returns the request thread.
614
+ """
615
+
616
+ all_params = ['part_number', 'serial_number', 'parameter_path', 'target_name'] # noqa: E501
617
+ all_params.append('async_req')
618
+ all_params.append('_return_http_data_only')
619
+ all_params.append('_preload_content')
620
+ all_params.append('_request_timeout')
621
+
622
+ params = locals()
623
+ for key, val in six.iteritems(params['kwargs']):
624
+ if key not in all_params:
625
+ raise TypeError(
626
+ "Got an unexpected keyword argument '%s'"
627
+ " to method get_component_revisions_by_parameter" % key
628
+ )
629
+ params[key] = val
630
+ del params['kwargs']
631
+ # verify the required parameter 'part_number' is set
632
+ if ('part_number' not in params or
633
+ params['part_number'] is None):
634
+ raise ValueError("Missing the required parameter `part_number` when calling `get_component_revisions_by_parameter`") # noqa: E501
635
+ # verify the required parameter 'serial_number' is set
636
+ if ('serial_number' not in params or
637
+ params['serial_number'] is None):
638
+ raise ValueError("Missing the required parameter `serial_number` when calling `get_component_revisions_by_parameter`") # noqa: E501
639
+ # verify the required parameter 'parameter_path' is set
640
+ if ('parameter_path' not in params or
641
+ params['parameter_path'] is None):
642
+ raise ValueError("Missing the required parameter `parameter_path` when calling `get_component_revisions_by_parameter`") # noqa: E501
643
+ # verify the required parameter 'target_name' is set
644
+ if ('target_name' not in params or
645
+ params['target_name'] is None):
646
+ raise ValueError("Missing the required parameter `target_name` when calling `get_component_revisions_by_parameter`") # noqa: E501
647
+
648
+ collection_formats = {}
649
+
650
+ path_params = {}
651
+ if 'part_number' in params:
652
+ path_params['partNumber'] = params['part_number'] # noqa: E501
653
+ if 'serial_number' in params:
654
+ path_params['serialNumber'] = params['serial_number'] # noqa: E501
655
+ if 'parameter_path' in params:
656
+ path_params['parameterPath'] = params['parameter_path'] # noqa: E501
657
+ if 'target_name' in params:
658
+ path_params['targetName'] = params['target_name'] # noqa: E501
659
+
660
+ query_params = []
661
+
662
+ header_params = {}
663
+
664
+ form_params = []
665
+ local_var_files = {}
666
+
667
+ body_params = None
668
+ # HTTP header `Accept`
669
+ header_params['Accept'] = self.api_client.select_header_accept(
670
+ ['application/json', 'text/json']) # noqa: E501
671
+
672
+ # Authentication setting
673
+ auth_settings = [] # noqa: E501
674
+
675
+ return self.api_client.call_api(
676
+ '/teamdbapi/v2.0/partNumber/{partNumber}/serialNumber/{serialNumber}/parameterPath/{parameterPath}/targetName/{targetName}/revisions', 'GET',
677
+ path_params,
678
+ query_params,
679
+ header_params,
680
+ body=body_params,
681
+ post_params=form_params,
682
+ files=local_var_files,
683
+ response_type='list[Revision]', # noqa: E501
684
+ auth_settings=auth_settings,
685
+ async_req=params.get('async_req'),
686
+ _return_http_data_only=params.get('_return_http_data_only'),
687
+ _preload_content=params.get('_preload_content', True),
688
+ _request_timeout=params.get('_request_timeout'),
689
+ collection_formats=collection_formats)
690
+
691
+ def get_revision(self, revision_id, **kwargs): # noqa: E501
692
+ """Get a revision corresponding to a unique Id. # noqa: E501
693
+
694
+ This method makes a synchronous HTTP request by default. To make an
695
+ asynchronous HTTP request, please pass async_req=True
696
+ >>> thread = api.get_revision(revision_id, async_req=True)
697
+ >>> result = thread.get()
698
+
699
+ :param async_req bool
700
+ :param str revision_id: The unique revision id to which you want to get the revision (required)
701
+ :return: Revision
702
+ If the method is called asynchronously,
703
+ returns the request thread.
704
+ """
705
+ kwargs['_return_http_data_only'] = True
706
+ if kwargs.get('async_req'):
707
+ return self.get_revision_with_http_info(revision_id, **kwargs) # noqa: E501
708
+ else:
709
+ (data) = self.get_revision_with_http_info(revision_id, **kwargs) # noqa: E501
710
+ return data
711
+
712
+ def get_revision_with_http_info(self, revision_id, **kwargs): # noqa: E501
713
+ """Get a revision corresponding to a unique Id. # noqa: E501
714
+
715
+ This method makes a synchronous HTTP request by default. To make an
716
+ asynchronous HTTP request, please pass async_req=True
717
+ >>> thread = api.get_revision_with_http_info(revision_id, async_req=True)
718
+ >>> result = thread.get()
719
+
720
+ :param async_req bool
721
+ :param str revision_id: The unique revision id to which you want to get the revision (required)
722
+ :return: Revision
723
+ If the method is called asynchronously,
724
+ returns the request thread.
725
+ """
726
+
727
+ all_params = ['revision_id'] # noqa: E501
728
+ all_params.append('async_req')
729
+ all_params.append('_return_http_data_only')
730
+ all_params.append('_preload_content')
731
+ all_params.append('_request_timeout')
732
+
733
+ params = locals()
734
+ for key, val in six.iteritems(params['kwargs']):
735
+ if key not in all_params:
736
+ raise TypeError(
737
+ "Got an unexpected keyword argument '%s'"
738
+ " to method get_revision" % key
739
+ )
740
+ params[key] = val
741
+ del params['kwargs']
742
+ # verify the required parameter 'revision_id' is set
743
+ if ('revision_id' not in params or
744
+ params['revision_id'] is None):
745
+ raise ValueError("Missing the required parameter `revision_id` when calling `get_revision`") # noqa: E501
746
+
747
+ collection_formats = {}
748
+
749
+ path_params = {}
750
+ if 'revision_id' in params:
751
+ path_params['revisionId'] = params['revision_id'] # noqa: E501
752
+
753
+ query_params = []
754
+
755
+ header_params = {}
756
+
757
+ form_params = []
758
+ local_var_files = {}
759
+
760
+ body_params = None
761
+ # HTTP header `Accept`
762
+ header_params['Accept'] = self.api_client.select_header_accept(
763
+ ['application/json', 'text/json']) # noqa: E501
764
+
765
+ # Authentication setting
766
+ auth_settings = [] # noqa: E501
767
+
768
+ return self.api_client.call_api(
769
+ '/teamdbapi/v2.0/revision/{revisionId}', 'GET',
770
+ path_params,
771
+ query_params,
772
+ header_params,
773
+ body=body_params,
774
+ post_params=form_params,
775
+ files=local_var_files,
776
+ response_type='Revision', # noqa: E501
777
+ auth_settings=auth_settings,
778
+ async_req=params.get('async_req'),
779
+ _return_http_data_only=params.get('_return_http_data_only'),
780
+ _preload_content=params.get('_preload_content', True),
781
+ _request_timeout=params.get('_request_timeout'),
782
+ collection_formats=collection_formats)
783
+
784
+ def get_revision_by_param_and_assembly(self, assembly_id, parameter_id, **kwargs): # noqa: E501
785
+ """Get the revision selected in an assembly for a given parameter. # noqa: E501
786
+
787
+ This method makes a synchronous HTTP request by default. To make an
788
+ asynchronous HTTP request, please pass async_req=True
789
+ >>> thread = api.get_revision_by_param_and_assembly(assembly_id, parameter_id, async_req=True)
790
+ >>> result = thread.get()
791
+
792
+ :param async_req bool
793
+ :param str assembly_id: The assembly id to which you want to get the revision value (required)
794
+ :param str parameter_id: The parameter id to which you want the revisions (required)
795
+ :return: Revision
796
+ If the method is called asynchronously,
797
+ returns the request thread.
798
+ """
799
+ kwargs['_return_http_data_only'] = True
800
+ if kwargs.get('async_req'):
801
+ return self.get_revision_by_param_and_assembly_with_http_info(assembly_id, parameter_id, **kwargs) # noqa: E501
802
+ else:
803
+ (data) = self.get_revision_by_param_and_assembly_with_http_info(assembly_id, parameter_id, **kwargs) # noqa: E501
804
+ return data
805
+
806
+ def get_revision_by_param_and_assembly_with_http_info(self, assembly_id, parameter_id, **kwargs): # noqa: E501
807
+ """Get the revision selected in an assembly for a given parameter. # noqa: E501
808
+
809
+ This method makes a synchronous HTTP request by default. To make an
810
+ asynchronous HTTP request, please pass async_req=True
811
+ >>> thread = api.get_revision_by_param_and_assembly_with_http_info(assembly_id, parameter_id, async_req=True)
812
+ >>> result = thread.get()
813
+
814
+ :param async_req bool
815
+ :param str assembly_id: The assembly id to which you want to get the revision value (required)
816
+ :param str parameter_id: The parameter id to which you want the revisions (required)
817
+ :return: Revision
818
+ If the method is called asynchronously,
819
+ returns the request thread.
820
+ """
821
+
822
+ all_params = ['assembly_id', 'parameter_id'] # noqa: E501
823
+ all_params.append('async_req')
824
+ all_params.append('_return_http_data_only')
825
+ all_params.append('_preload_content')
826
+ all_params.append('_request_timeout')
827
+
828
+ params = locals()
829
+ for key, val in six.iteritems(params['kwargs']):
830
+ if key not in all_params:
831
+ raise TypeError(
832
+ "Got an unexpected keyword argument '%s'"
833
+ " to method get_revision_by_param_and_assembly" % key
834
+ )
835
+ params[key] = val
836
+ del params['kwargs']
837
+ # verify the required parameter 'assembly_id' is set
838
+ if ('assembly_id' not in params or
839
+ params['assembly_id'] is None):
840
+ raise ValueError("Missing the required parameter `assembly_id` when calling `get_revision_by_param_and_assembly`") # noqa: E501
841
+ # verify the required parameter 'parameter_id' is set
842
+ if ('parameter_id' not in params or
843
+ params['parameter_id'] is None):
844
+ raise ValueError("Missing the required parameter `parameter_id` when calling `get_revision_by_param_and_assembly`") # noqa: E501
845
+
846
+ collection_formats = {}
847
+
848
+ path_params = {}
849
+ if 'assembly_id' in params:
850
+ path_params['assemblyId'] = params['assembly_id'] # noqa: E501
851
+ if 'parameter_id' in params:
852
+ path_params['parameterId'] = params['parameter_id'] # noqa: E501
853
+
854
+ query_params = []
855
+
856
+ header_params = {}
857
+
858
+ form_params = []
859
+ local_var_files = {}
860
+
861
+ body_params = None
862
+ # HTTP header `Accept`
863
+ header_params['Accept'] = self.api_client.select_header_accept(
864
+ ['application/json', 'text/json']) # noqa: E501
865
+
866
+ # Authentication setting
867
+ auth_settings = [] # noqa: E501
868
+
869
+ return self.api_client.call_api(
870
+ '/teamdbapi/v2.0/assembly/{assemblyId}/parameter/{parameterId}/revision', 'GET',
871
+ path_params,
872
+ query_params,
873
+ header_params,
874
+ body=body_params,
875
+ post_params=form_params,
876
+ files=local_var_files,
877
+ response_type='Revision', # noqa: E501
878
+ auth_settings=auth_settings,
879
+ async_req=params.get('async_req'),
880
+ _return_http_data_only=params.get('_return_http_data_only'),
881
+ _preload_content=params.get('_preload_content', True),
882
+ _request_timeout=params.get('_request_timeout'),
883
+ collection_formats=collection_formats)
884
+
885
+ def get_revisions(self, version_id, **kwargs): # noqa: E501
886
+ """Get all the revisions for a given version. This will retreive all revisions for all the parameters of a given version. Only revisions that match the version definition will be returned. # noqa: E501
887
+
888
+ This method makes a synchronous HTTP request by default. To make an
889
+ asynchronous HTTP request, please pass async_req=True
890
+ >>> thread = api.get_revisions(version_id, async_req=True)
891
+ >>> result = thread.get()
892
+
893
+ :param async_req bool
894
+ :param str version_id: The version id to which you want all the revisions (required)
895
+ :return: list[Revision]
896
+ If the method is called asynchronously,
897
+ returns the request thread.
898
+ """
899
+ kwargs['_return_http_data_only'] = True
900
+ if kwargs.get('async_req'):
901
+ return self.get_revisions_with_http_info(version_id, **kwargs) # noqa: E501
902
+ else:
903
+ (data) = self.get_revisions_with_http_info(version_id, **kwargs) # noqa: E501
904
+ return data
905
+
906
+ def get_revisions_with_http_info(self, version_id, **kwargs): # noqa: E501
907
+ """Get all the revisions for a given version. This will retreive all revisions for all the parameters of a given version. Only revisions that match the version definition will be returned. # noqa: E501
908
+
909
+ This method makes a synchronous HTTP request by default. To make an
910
+ asynchronous HTTP request, please pass async_req=True
911
+ >>> thread = api.get_revisions_with_http_info(version_id, async_req=True)
912
+ >>> result = thread.get()
913
+
914
+ :param async_req bool
915
+ :param str version_id: The version id to which you want all the revisions (required)
916
+ :return: list[Revision]
917
+ If the method is called asynchronously,
918
+ returns the request thread.
919
+ """
920
+
921
+ all_params = ['version_id'] # noqa: E501
922
+ all_params.append('async_req')
923
+ all_params.append('_return_http_data_only')
924
+ all_params.append('_preload_content')
925
+ all_params.append('_request_timeout')
926
+
927
+ params = locals()
928
+ for key, val in six.iteritems(params['kwargs']):
929
+ if key not in all_params:
930
+ raise TypeError(
931
+ "Got an unexpected keyword argument '%s'"
932
+ " to method get_revisions" % key
933
+ )
934
+ params[key] = val
935
+ del params['kwargs']
936
+ # verify the required parameter 'version_id' is set
937
+ if ('version_id' not in params or
938
+ params['version_id'] is None):
939
+ raise ValueError("Missing the required parameter `version_id` when calling `get_revisions`") # noqa: E501
940
+
941
+ collection_formats = {}
942
+
943
+ path_params = {}
944
+ if 'version_id' in params:
945
+ path_params['versionId'] = params['version_id'] # noqa: E501
946
+
947
+ query_params = []
948
+
949
+ header_params = {}
950
+
951
+ form_params = []
952
+ local_var_files = {}
953
+
954
+ body_params = None
955
+ # HTTP header `Accept`
956
+ header_params['Accept'] = self.api_client.select_header_accept(
957
+ ['application/json', 'text/json']) # noqa: E501
958
+
959
+ # Authentication setting
960
+ auth_settings = [] # noqa: E501
961
+
962
+ return self.api_client.call_api(
963
+ '/teamdbapi/v2.0/version/{versionId}/revisions', 'GET',
964
+ path_params,
965
+ query_params,
966
+ header_params,
967
+ body=body_params,
968
+ post_params=form_params,
969
+ files=local_var_files,
970
+ response_type='list[Revision]', # noqa: E501
971
+ auth_settings=auth_settings,
972
+ async_req=params.get('async_req'),
973
+ _return_http_data_only=params.get('_return_http_data_only'),
974
+ _preload_content=params.get('_preload_content', True),
975
+ _request_timeout=params.get('_request_timeout'),
976
+ collection_formats=collection_formats)
977
+
978
+ def get_revisions_by_parameter(self, parameter_id, version_id, **kwargs): # noqa: E501
979
+ """Get all revisions for a given parameter and version. You need to specify a version in order to get the revisions that match the version definition (size, format...) # noqa: E501
980
+
981
+ This method makes a synchronous HTTP request by default. To make an
982
+ asynchronous HTTP request, please pass async_req=True
983
+ >>> thread = api.get_revisions_by_parameter(parameter_id, version_id, async_req=True)
984
+ >>> result = thread.get()
985
+
986
+ :param async_req bool
987
+ :param str parameter_id: The parameter id to which you want the revisions (required)
988
+ :param str version_id: The version id to which you want to get the revision value (required)
989
+ :return: list[Revision]
990
+ If the method is called asynchronously,
991
+ returns the request thread.
992
+ """
993
+ kwargs['_return_http_data_only'] = True
994
+ if kwargs.get('async_req'):
995
+ return self.get_revisions_by_parameter_with_http_info(parameter_id, version_id, **kwargs) # noqa: E501
996
+ else:
997
+ (data) = self.get_revisions_by_parameter_with_http_info(parameter_id, version_id, **kwargs) # noqa: E501
998
+ return data
999
+
1000
+ def get_revisions_by_parameter_with_http_info(self, parameter_id, version_id, **kwargs): # noqa: E501
1001
+ """Get all revisions for a given parameter and version. You need to specify a version in order to get the revisions that match the version definition (size, format...) # noqa: E501
1002
+
1003
+ This method makes a synchronous HTTP request by default. To make an
1004
+ asynchronous HTTP request, please pass async_req=True
1005
+ >>> thread = api.get_revisions_by_parameter_with_http_info(parameter_id, version_id, async_req=True)
1006
+ >>> result = thread.get()
1007
+
1008
+ :param async_req bool
1009
+ :param str parameter_id: The parameter id to which you want the revisions (required)
1010
+ :param str version_id: The version id to which you want to get the revision value (required)
1011
+ :return: list[Revision]
1012
+ If the method is called asynchronously,
1013
+ returns the request thread.
1014
+ """
1015
+
1016
+ all_params = ['parameter_id', 'version_id'] # noqa: E501
1017
+ all_params.append('async_req')
1018
+ all_params.append('_return_http_data_only')
1019
+ all_params.append('_preload_content')
1020
+ all_params.append('_request_timeout')
1021
+
1022
+ params = locals()
1023
+ for key, val in six.iteritems(params['kwargs']):
1024
+ if key not in all_params:
1025
+ raise TypeError(
1026
+ "Got an unexpected keyword argument '%s'"
1027
+ " to method get_revisions_by_parameter" % key
1028
+ )
1029
+ params[key] = val
1030
+ del params['kwargs']
1031
+ # verify the required parameter 'parameter_id' is set
1032
+ if ('parameter_id' not in params or
1033
+ params['parameter_id'] is None):
1034
+ raise ValueError("Missing the required parameter `parameter_id` when calling `get_revisions_by_parameter`") # noqa: E501
1035
+ # verify the required parameter 'version_id' is set
1036
+ if ('version_id' not in params or
1037
+ params['version_id'] is None):
1038
+ raise ValueError("Missing the required parameter `version_id` when calling `get_revisions_by_parameter`") # noqa: E501
1039
+
1040
+ collection_formats = {}
1041
+
1042
+ path_params = {}
1043
+ if 'parameter_id' in params:
1044
+ path_params['parameterId'] = params['parameter_id'] # noqa: E501
1045
+ if 'version_id' in params:
1046
+ path_params['versionId'] = params['version_id'] # noqa: E501
1047
+
1048
+ query_params = []
1049
+
1050
+ header_params = {}
1051
+
1052
+ form_params = []
1053
+ local_var_files = {}
1054
+
1055
+ body_params = None
1056
+ # HTTP header `Accept`
1057
+ header_params['Accept'] = self.api_client.select_header_accept(
1058
+ ['application/json', 'text/json']) # noqa: E501
1059
+
1060
+ # Authentication setting
1061
+ auth_settings = [] # noqa: E501
1062
+
1063
+ return self.api_client.call_api(
1064
+ '/teamdbapi/v2.0/version/{versionId}/parameter/{parameterId}/revisions', 'GET',
1065
+ path_params,
1066
+ query_params,
1067
+ header_params,
1068
+ body=body_params,
1069
+ post_params=form_params,
1070
+ files=local_var_files,
1071
+ response_type='list[Revision]', # noqa: E501
1072
+ auth_settings=auth_settings,
1073
+ async_req=params.get('async_req'),
1074
+ _return_http_data_only=params.get('_return_http_data_only'),
1075
+ _preload_content=params.get('_preload_content', True),
1076
+ _request_timeout=params.get('_request_timeout'),
1077
+ collection_formats=collection_formats)
1078
+
1079
+ def import_revision_from_parameter_list(self, body, version_from_id, version_to_id, copy_group_revisions, **kwargs): # noqa: E501
1080
+ """Import all revisions from a version to another version for a given cross table parameters list # noqa: E501
1081
+
1082
+ This method makes a synchronous HTTP request by default. To make an
1083
+ asynchronous HTTP request, please pass async_req=True
1084
+ >>> thread = api.import_revision_from_parameter_list(body, version_from_id, version_to_id, copy_group_revisions, async_req=True)
1085
+ >>> result = thread.get()
1086
+
1087
+ :param async_req bool
1088
+ :param list[ParameterCrossTable] body: The parameters crosstable that provides the mapping between the parameters From and To (required)
1089
+ :param str version_from_id: The version id from which the revisions come from (required)
1090
+ :param str version_to_id: The version id to which the revisions are created (required)
1091
+ :param bool copy_group_revisions: True to update the group revisions involved by the reivisions copy (required)
1092
+ :return: list[Revision]
1093
+ If the method is called asynchronously,
1094
+ returns the request thread.
1095
+ """
1096
+ kwargs['_return_http_data_only'] = True
1097
+ if kwargs.get('async_req'):
1098
+ return self.import_revision_from_parameter_list_with_http_info(body, version_from_id, version_to_id, copy_group_revisions, **kwargs) # noqa: E501
1099
+ else:
1100
+ (data) = self.import_revision_from_parameter_list_with_http_info(body, version_from_id, version_to_id, copy_group_revisions, **kwargs) # noqa: E501
1101
+ return data
1102
+
1103
+ def import_revision_from_parameter_list_with_http_info(self, body, version_from_id, version_to_id, copy_group_revisions, **kwargs): # noqa: E501
1104
+ """Import all revisions from a version to another version for a given cross table parameters list # noqa: E501
1105
+
1106
+ This method makes a synchronous HTTP request by default. To make an
1107
+ asynchronous HTTP request, please pass async_req=True
1108
+ >>> thread = api.import_revision_from_parameter_list_with_http_info(body, version_from_id, version_to_id, copy_group_revisions, async_req=True)
1109
+ >>> result = thread.get()
1110
+
1111
+ :param async_req bool
1112
+ :param list[ParameterCrossTable] body: The parameters crosstable that provides the mapping between the parameters From and To (required)
1113
+ :param str version_from_id: The version id from which the revisions come from (required)
1114
+ :param str version_to_id: The version id to which the revisions are created (required)
1115
+ :param bool copy_group_revisions: True to update the group revisions involved by the reivisions copy (required)
1116
+ :return: list[Revision]
1117
+ If the method is called asynchronously,
1118
+ returns the request thread.
1119
+ """
1120
+
1121
+ all_params = ['body', 'version_from_id', 'version_to_id', 'copy_group_revisions'] # noqa: E501
1122
+ all_params.append('async_req')
1123
+ all_params.append('_return_http_data_only')
1124
+ all_params.append('_preload_content')
1125
+ all_params.append('_request_timeout')
1126
+
1127
+ params = locals()
1128
+ for key, val in six.iteritems(params['kwargs']):
1129
+ if key not in all_params:
1130
+ raise TypeError(
1131
+ "Got an unexpected keyword argument '%s'"
1132
+ " to method import_revision_from_parameter_list" % key
1133
+ )
1134
+ params[key] = val
1135
+ del params['kwargs']
1136
+ # verify the required parameter 'body' is set
1137
+ if ('body' not in params or
1138
+ params['body'] is None):
1139
+ raise ValueError("Missing the required parameter `body` when calling `import_revision_from_parameter_list`") # noqa: E501
1140
+ # verify the required parameter 'version_from_id' is set
1141
+ if ('version_from_id' not in params or
1142
+ params['version_from_id'] is None):
1143
+ raise ValueError("Missing the required parameter `version_from_id` when calling `import_revision_from_parameter_list`") # noqa: E501
1144
+ # verify the required parameter 'version_to_id' is set
1145
+ if ('version_to_id' not in params or
1146
+ params['version_to_id'] is None):
1147
+ raise ValueError("Missing the required parameter `version_to_id` when calling `import_revision_from_parameter_list`") # noqa: E501
1148
+ # verify the required parameter 'copy_group_revisions' is set
1149
+ if ('copy_group_revisions' not in params or
1150
+ params['copy_group_revisions'] is None):
1151
+ raise ValueError("Missing the required parameter `copy_group_revisions` when calling `import_revision_from_parameter_list`") # noqa: E501
1152
+
1153
+ collection_formats = {}
1154
+
1155
+ path_params = {}
1156
+ if 'version_from_id' in params:
1157
+ path_params['versionFromId'] = params['version_from_id'] # noqa: E501
1158
+ if 'version_to_id' in params:
1159
+ path_params['versionToId'] = params['version_to_id'] # noqa: E501
1160
+ if 'copy_group_revisions' in params:
1161
+ path_params['copyGroupRevisions'] = params['copy_group_revisions'] # noqa: E501
1162
+
1163
+ query_params = []
1164
+
1165
+ header_params = {}
1166
+
1167
+ form_params = []
1168
+ local_var_files = {}
1169
+
1170
+ body_params = None
1171
+ if 'body' in params:
1172
+ body_params = params['body']
1173
+ # HTTP header `Accept`
1174
+ header_params['Accept'] = self.api_client.select_header_accept(
1175
+ ['application/json', 'text/json']) # noqa: E501
1176
+
1177
+ # HTTP header `Content-Type`
1178
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1179
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
1180
+
1181
+ # Authentication setting
1182
+ auth_settings = [] # noqa: E501
1183
+
1184
+ return self.api_client.call_api(
1185
+ '/teamdbapi/v2.0/versionFrom/{versionFromId}/versionTo/{versionToId}/withGroupRevisionCopy/{copyGroupRevisions}/revisions', 'POST',
1186
+ path_params,
1187
+ query_params,
1188
+ header_params,
1189
+ body=body_params,
1190
+ post_params=form_params,
1191
+ files=local_var_files,
1192
+ response_type='list[Revision]', # noqa: E501
1193
+ auth_settings=auth_settings,
1194
+ async_req=params.get('async_req'),
1195
+ _return_http_data_only=params.get('_return_http_data_only'),
1196
+ _preload_content=params.get('_preload_content', True),
1197
+ _request_timeout=params.get('_request_timeout'),
1198
+ collection_formats=collection_formats)
1199
+
1200
+ def try_get_revision(self, body, version_id, **kwargs): # noqa: E501
1201
+ """Check whether the revision with the same data already exists for a given version. Returns the revision unique ID already existing or empty (00000000-0000-0000-0000-000000000000) if not found. # noqa: E501
1202
+
1203
+ This method makes a synchronous HTTP request by default. To make an
1204
+ asynchronous HTTP request, please pass async_req=True
1205
+ >>> thread = api.try_get_revision(body, version_id, async_req=True)
1206
+ >>> result = thread.get()
1207
+
1208
+ :param async_req bool
1209
+ :param Revision body: The revision you want to check. The research is based on the data not the revision id. (required)
1210
+ :param str version_id: The version id to which the revision must belong (required)
1211
+ :return: str
1212
+ If the method is called asynchronously,
1213
+ returns the request thread.
1214
+ """
1215
+ kwargs['_return_http_data_only'] = True
1216
+ if kwargs.get('async_req'):
1217
+ return self.try_get_revision_with_http_info(body, version_id, **kwargs) # noqa: E501
1218
+ else:
1219
+ (data) = self.try_get_revision_with_http_info(body, version_id, **kwargs) # noqa: E501
1220
+ return data
1221
+
1222
+ def try_get_revision_with_http_info(self, body, version_id, **kwargs): # noqa: E501
1223
+ """Check whether the revision with the same data already exists for a given version. Returns the revision unique ID already existing or empty (00000000-0000-0000-0000-000000000000) if not found. # noqa: E501
1224
+
1225
+ This method makes a synchronous HTTP request by default. To make an
1226
+ asynchronous HTTP request, please pass async_req=True
1227
+ >>> thread = api.try_get_revision_with_http_info(body, version_id, async_req=True)
1228
+ >>> result = thread.get()
1229
+
1230
+ :param async_req bool
1231
+ :param Revision body: The revision you want to check. The research is based on the data not the revision id. (required)
1232
+ :param str version_id: The version id to which the revision must belong (required)
1233
+ :return: str
1234
+ If the method is called asynchronously,
1235
+ returns the request thread.
1236
+ """
1237
+
1238
+ all_params = ['body', 'version_id'] # noqa: E501
1239
+ all_params.append('async_req')
1240
+ all_params.append('_return_http_data_only')
1241
+ all_params.append('_preload_content')
1242
+ all_params.append('_request_timeout')
1243
+
1244
+ params = locals()
1245
+ for key, val in six.iteritems(params['kwargs']):
1246
+ if key not in all_params:
1247
+ raise TypeError(
1248
+ "Got an unexpected keyword argument '%s'"
1249
+ " to method try_get_revision" % key
1250
+ )
1251
+ params[key] = val
1252
+ del params['kwargs']
1253
+ # verify the required parameter 'body' is set
1254
+ if ('body' not in params or
1255
+ params['body'] is None):
1256
+ raise ValueError("Missing the required parameter `body` when calling `try_get_revision`") # noqa: E501
1257
+ # verify the required parameter 'version_id' is set
1258
+ if ('version_id' not in params or
1259
+ params['version_id'] is None):
1260
+ raise ValueError("Missing the required parameter `version_id` when calling `try_get_revision`") # noqa: E501
1261
+
1262
+ collection_formats = {}
1263
+
1264
+ path_params = {}
1265
+ if 'version_id' in params:
1266
+ path_params['versionId'] = params['version_id'] # noqa: E501
1267
+
1268
+ query_params = []
1269
+
1270
+ header_params = {}
1271
+
1272
+ form_params = []
1273
+ local_var_files = {}
1274
+
1275
+ body_params = None
1276
+ if 'body' in params:
1277
+ body_params = params['body']
1278
+ # HTTP header `Accept`
1279
+ header_params['Accept'] = self.api_client.select_header_accept(
1280
+ ['application/json', 'text/json']) # noqa: E501
1281
+
1282
+ # HTTP header `Content-Type`
1283
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1284
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
1285
+
1286
+ # Authentication setting
1287
+ auth_settings = [] # noqa: E501
1288
+
1289
+ return self.api_client.call_api(
1290
+ '/teamdbapi/v2.0/version/{versionId}/revision/exists', 'POST',
1291
+ path_params,
1292
+ query_params,
1293
+ header_params,
1294
+ body=body_params,
1295
+ post_params=form_params,
1296
+ files=local_var_files,
1297
+ response_type='str', # noqa: E501
1298
+ auth_settings=auth_settings,
1299
+ async_req=params.get('async_req'),
1300
+ _return_http_data_only=params.get('_return_http_data_only'),
1301
+ _preload_content=params.get('_preload_content', True),
1302
+ _request_timeout=params.get('_request_timeout'),
1303
+ collection_formats=collection_formats)
1304
+
1305
+ def update_revision(self, body, revision_id, version_id, **kwargs): # noqa: E501
1306
+ """Update a revision. You have to specify a version id to which the revision is updated. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
1307
+
1308
+ This method makes a synchronous HTTP request by default. To make an
1309
+ asynchronous HTTP request, please pass async_req=True
1310
+ >>> thread = api.update_revision(body, revision_id, version_id, async_req=True)
1311
+ >>> result = thread.get()
1312
+
1313
+ :param async_req bool
1314
+ :param Revision body: The revision you want to update (required)
1315
+ :param str revision_id: The revision id corresponding to the revision you want to update (required)
1316
+ :param str version_id: The version id to which the revision was created (required)
1317
+ :param bool allow_update_revision_fields: Allows to update the all the revision description fields except the data from a locked revision.
1318
+ :return: Revision
1319
+ If the method is called asynchronously,
1320
+ returns the request thread.
1321
+ """
1322
+ kwargs['_return_http_data_only'] = True
1323
+ if kwargs.get('async_req'):
1324
+ return self.update_revision_with_http_info(body, revision_id, version_id, **kwargs) # noqa: E501
1325
+ else:
1326
+ (data) = self.update_revision_with_http_info(body, revision_id, version_id, **kwargs) # noqa: E501
1327
+ return data
1328
+
1329
+ def update_revision_with_http_info(self, body, revision_id, version_id, **kwargs): # noqa: E501
1330
+ """Update a revision. You have to specify a version id to which the revision is updated. This is mandatory because the system needs to ensure that the revision data are consistent with the version definition. # noqa: E501
1331
+
1332
+ This method makes a synchronous HTTP request by default. To make an
1333
+ asynchronous HTTP request, please pass async_req=True
1334
+ >>> thread = api.update_revision_with_http_info(body, revision_id, version_id, async_req=True)
1335
+ >>> result = thread.get()
1336
+
1337
+ :param async_req bool
1338
+ :param Revision body: The revision you want to update (required)
1339
+ :param str revision_id: The revision id corresponding to the revision you want to update (required)
1340
+ :param str version_id: The version id to which the revision was created (required)
1341
+ :param bool allow_update_revision_fields: Allows to update the all the revision description fields except the data from a locked revision.
1342
+ :return: Revision
1343
+ If the method is called asynchronously,
1344
+ returns the request thread.
1345
+ """
1346
+
1347
+ all_params = ['body', 'revision_id', 'version_id', 'allow_update_revision_fields'] # noqa: E501
1348
+ all_params.append('async_req')
1349
+ all_params.append('_return_http_data_only')
1350
+ all_params.append('_preload_content')
1351
+ all_params.append('_request_timeout')
1352
+
1353
+ params = locals()
1354
+ for key, val in six.iteritems(params['kwargs']):
1355
+ if key not in all_params:
1356
+ raise TypeError(
1357
+ "Got an unexpected keyword argument '%s'"
1358
+ " to method update_revision" % key
1359
+ )
1360
+ params[key] = val
1361
+ del params['kwargs']
1362
+ # verify the required parameter 'body' is set
1363
+ if ('body' not in params or
1364
+ params['body'] is None):
1365
+ raise ValueError("Missing the required parameter `body` when calling `update_revision`") # noqa: E501
1366
+ # verify the required parameter 'revision_id' is set
1367
+ if ('revision_id' not in params or
1368
+ params['revision_id'] is None):
1369
+ raise ValueError("Missing the required parameter `revision_id` when calling `update_revision`") # noqa: E501
1370
+ # verify the required parameter 'version_id' is set
1371
+ if ('version_id' not in params or
1372
+ params['version_id'] is None):
1373
+ raise ValueError("Missing the required parameter `version_id` when calling `update_revision`") # noqa: E501
1374
+
1375
+ collection_formats = {}
1376
+
1377
+ path_params = {}
1378
+ if 'revision_id' in params:
1379
+ path_params['revisionId'] = params['revision_id'] # noqa: E501
1380
+ if 'version_id' in params:
1381
+ path_params['versionId'] = params['version_id'] # noqa: E501
1382
+
1383
+ query_params = []
1384
+ if 'allow_update_revision_fields' in params:
1385
+ query_params.append(('allowUpdateRevisionFields', params['allow_update_revision_fields'])) # noqa: E501
1386
+
1387
+ header_params = {}
1388
+
1389
+ form_params = []
1390
+ local_var_files = {}
1391
+
1392
+ body_params = None
1393
+ if 'body' in params:
1394
+ body_params = params['body']
1395
+ # HTTP header `Accept`
1396
+ header_params['Accept'] = self.api_client.select_header_accept(
1397
+ ['application/json', 'text/json']) # noqa: E501
1398
+
1399
+ # HTTP header `Content-Type`
1400
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1401
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
1402
+
1403
+ # Authentication setting
1404
+ auth_settings = [] # noqa: E501
1405
+
1406
+ return self.api_client.call_api(
1407
+ '/teamdbapi/v2.0/version/{versionId}/revision/{revisionId}', 'PUT',
1408
+ path_params,
1409
+ query_params,
1410
+ header_params,
1411
+ body=body_params,
1412
+ post_params=form_params,
1413
+ files=local_var_files,
1414
+ response_type='Revision', # noqa: E501
1415
+ auth_settings=auth_settings,
1416
+ async_req=params.get('async_req'),
1417
+ _return_http_data_only=params.get('_return_http_data_only'),
1418
+ _preload_content=params.get('_preload_content', True),
1419
+ _request_timeout=params.get('_request_timeout'),
1420
+ collection_formats=collection_formats)