development-framework-cli 1.7.3__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 (71) hide show
  1. development_framework_cli-1.7.3.dist-info/METADATA +141 -0
  2. development_framework_cli-1.7.3.dist-info/RECORD +71 -0
  3. development_framework_cli-1.7.3.dist-info/WHEEL +4 -0
  4. development_framework_cli-1.7.3.dist-info/entry_points.txt +2 -0
  5. development_framework_cli-1.7.3.dist-info/licenses/LICENSE +21 -0
  6. dm_cli/__init__.py +1 -0
  7. dm_cli/cli.py +180 -0
  8. dm_cli/command_group/__init__.py +0 -0
  9. dm_cli/command_group/data_source.py +176 -0
  10. dm_cli/command_group/entities.py +116 -0
  11. dm_cli/dmss.py +104 -0
  12. dm_cli/dmss_api/__init__.py +27 -0
  13. dm_cli/dmss_api/api/__init__.py +3 -0
  14. dm_cli/dmss_api/api/access_control_api.py +349 -0
  15. dm_cli/dmss_api/api/attribute_api.py +175 -0
  16. dm_cli/dmss_api/api/blob_api.py +344 -0
  17. dm_cli/dmss_api/api/blueprint_api.py +326 -0
  18. dm_cli/dmss_api/api/datasource_api.py +448 -0
  19. dm_cli/dmss_api/api/default_api.py +4439 -0
  20. dm_cli/dmss_api/api/document_api.py +922 -0
  21. dm_cli/dmss_api/api/entity_api.py +464 -0
  22. dm_cli/dmss_api/api/export_api.py +313 -0
  23. dm_cli/dmss_api/api/file_api.py +197 -0
  24. dm_cli/dmss_api/api/health_check_api.py +160 -0
  25. dm_cli/dmss_api/api/lookup_table_api.py +323 -0
  26. dm_cli/dmss_api/api/meta_api.py +185 -0
  27. dm_cli/dmss_api/api/personal_access_token_api.py +433 -0
  28. dm_cli/dmss_api/api/reference_api.py +174 -0
  29. dm_cli/dmss_api/api/search_api.py +183 -0
  30. dm_cli/dmss_api/api/whoami_api.py +163 -0
  31. dm_cli/dmss_api/api_client.py +896 -0
  32. dm_cli/dmss_api/apis/__init__.py +32 -0
  33. dm_cli/dmss_api/configuration.py +482 -0
  34. dm_cli/dmss_api/exceptions.py +158 -0
  35. dm_cli/dmss_api/model/__init__.py +5 -0
  36. dm_cli/dmss_api/model/access_control_list.py +287 -0
  37. dm_cli/dmss_api/model/access_level.py +290 -0
  38. dm_cli/dmss_api/model/acl.py +287 -0
  39. dm_cli/dmss_api/model/data_source_information.py +282 -0
  40. dm_cli/dmss_api/model/data_source_request.py +281 -0
  41. dm_cli/dmss_api/model/dependency.py +294 -0
  42. dm_cli/dmss_api/model/entity.py +275 -0
  43. dm_cli/dmss_api/model/error_response.py +278 -0
  44. dm_cli/dmss_api/model/export_meta_response.py +277 -0
  45. dm_cli/dmss_api/model/get_blueprint_response.py +280 -0
  46. dm_cli/dmss_api/model/lookup.py +283 -0
  47. dm_cli/dmss_api/model/pat_data.py +299 -0
  48. dm_cli/dmss_api/model/recipe.py +311 -0
  49. dm_cli/dmss_api/model/recipe_attribute.py +304 -0
  50. dm_cli/dmss_api/model/reference.py +280 -0
  51. dm_cli/dmss_api/model/reference_entity.py +288 -0
  52. dm_cli/dmss_api/model/repository.py +317 -0
  53. dm_cli/dmss_api/model/repository_type.py +290 -0
  54. dm_cli/dmss_api/model/storage_attribute.py +295 -0
  55. dm_cli/dmss_api/model/storage_data_types.py +292 -0
  56. dm_cli/dmss_api/model/storage_recipe.py +293 -0
  57. dm_cli/dmss_api/model_utils.py +2057 -0
  58. dm_cli/dmss_api/models/__init__.py +29 -0
  59. dm_cli/dmss_api/rest.py +358 -0
  60. dm_cli/domain.py +166 -0
  61. dm_cli/enums.py +48 -0
  62. dm_cli/import_entity.py +128 -0
  63. dm_cli/import_package.py +173 -0
  64. dm_cli/package_tree_from_zip.py +120 -0
  65. dm_cli/state.py +12 -0
  66. dm_cli/utils/__init__.py +0 -0
  67. dm_cli/utils/file_structure.py +31 -0
  68. dm_cli/utils/reference.py +129 -0
  69. dm_cli/utils/resolve_local_ids.py +142 -0
  70. dm_cli/utils/utils.py +161 -0
  71. dm_cli/utils/zip.py +70 -0
@@ -0,0 +1,295 @@
1
+ """
2
+ Data Modelling Storage Service
3
+
4
+ API for basic data modelling interaction # noqa: E501
5
+
6
+ The version of the OpenAPI document: 1.3.0
7
+ Generated by: https://openapi-generator.tech
8
+ """
9
+
10
+
11
+ import re # noqa: F401
12
+ import sys # noqa: F401
13
+
14
+ from dm_cli.dmss_api.exceptions import ApiAttributeError
15
+ from dm_cli.dmss_api.model_utils import ( # noqa: F401
16
+ ApiTypeError,
17
+ ModelComposed,
18
+ ModelNormal,
19
+ ModelSimple,
20
+ OpenApiModel,
21
+ cached_property,
22
+ change_keys_js_to_python,
23
+ convert_js_args_to_python_args,
24
+ date,
25
+ datetime,
26
+ file_type,
27
+ none_type,
28
+ validate_get_composed_info,
29
+ )
30
+
31
+
32
+ def lazy_import():
33
+ from dm_cli.dmss_api.model.storage_data_types import StorageDataTypes
34
+ globals()['StorageDataTypes'] = StorageDataTypes
35
+
36
+
37
+ class StorageAttribute(ModelNormal):
38
+ """NOTE: This class is auto generated by OpenAPI Generator.
39
+ Ref: https://openapi-generator.tech
40
+
41
+ Do not edit the class manually.
42
+
43
+ Attributes:
44
+ allowed_values (dict): The key is the tuple path to the attribute
45
+ and the for var_name this is (var_name,). The value is a dict
46
+ with a capitalized key describing the allowed value and an allowed
47
+ value. These dicts store the allowed enum values.
48
+ attribute_map (dict): The key is attribute name
49
+ and the value is json key in definition.
50
+ discriminator_value_class_map (dict): A dict to go from the discriminator
51
+ variable value to the discriminator class name.
52
+ validations (dict): The key is the tuple path to the attribute
53
+ and the for var_name this is (var_name,). The value is a dict
54
+ that stores validations for max_length, min_length, max_items,
55
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
56
+ inclusive_minimum, and regex.
57
+ additional_properties_type (tuple): A tuple of classes accepted
58
+ as additional properties values.
59
+ """
60
+
61
+ allowed_values = {
62
+ }
63
+
64
+ validations = {
65
+ }
66
+
67
+ @cached_property
68
+ def additional_properties_type():
69
+ """
70
+ This must be a method because a model may have properties that are
71
+ of type self, this must run after the class is loaded
72
+ """
73
+ lazy_import()
74
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
75
+
76
+ _nullable = False
77
+
78
+ @cached_property
79
+ def openapi_types():
80
+ """
81
+ This must be a method because a model may have properties that are
82
+ of type self, this must run after the class is loaded
83
+
84
+ Returns
85
+ openapi_types (dict): The key is attribute name
86
+ and the value is attribute type.
87
+ """
88
+ lazy_import()
89
+ return {
90
+ 'name': (str,), # noqa: E501
91
+ 'type': (str,), # noqa: E501
92
+ 'contained': (bool,), # noqa: E501
93
+ 'storage_affinity': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
94
+ 'label': (str,), # noqa: E501
95
+ 'description': (str,), # noqa: E501
96
+ }
97
+
98
+ @cached_property
99
+ def discriminator():
100
+ return None
101
+
102
+
103
+ attribute_map = {
104
+ 'name': 'name', # noqa: E501
105
+ 'type': 'type', # noqa: E501
106
+ 'contained': 'contained', # noqa: E501
107
+ 'storage_affinity': 'storageAffinity', # noqa: E501
108
+ 'label': 'label', # noqa: E501
109
+ 'description': 'description', # noqa: E501
110
+ }
111
+
112
+ read_only_vars = {
113
+ }
114
+
115
+ _composed_schemas = {}
116
+
117
+ @classmethod
118
+ @convert_js_args_to_python_args
119
+ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501
120
+ """StorageAttribute - a model defined in OpenAPI
121
+
122
+ Args:
123
+ name (str):
124
+
125
+ Keyword Args:
126
+ _check_type (bool): if True, values for parameters in openapi_types
127
+ will be type checked and a TypeError will be
128
+ raised if the wrong type is input.
129
+ Defaults to True
130
+ _path_to_item (tuple/list): This is a list of keys or values to
131
+ drill down to the model in received_data
132
+ when deserializing a response
133
+ _spec_property_naming (bool): True if the variable names in the input data
134
+ are serialized names, as specified in the OpenAPI document.
135
+ False if the variable names in the input data
136
+ are pythonic names, e.g. snake case (default)
137
+ _configuration (Configuration): the instance to use when
138
+ deserializing a file_type parameter.
139
+ If passed, type conversion is attempted
140
+ If omitted no type conversion is done.
141
+ _visited_composed_classes (tuple): This stores a tuple of
142
+ classes that we have traveled through so that
143
+ if we see that class again we will not use its
144
+ discriminator again.
145
+ When traveling through a discriminator, the
146
+ composed schema that is
147
+ is traveled through is added to this set.
148
+ For example if Animal has a discriminator
149
+ petType and we pass in "Dog", and the class Dog
150
+ allOf includes Animal, we move through Animal
151
+ once using the discriminator, and pick Dog.
152
+ Then in Dog, we will make an instance of the
153
+ Animal class but this time we won't travel
154
+ through its discriminator because we passed in
155
+ _visited_composed_classes = (Animal,)
156
+ type (str): [optional] if omitted the server will use the default value of "dmss://system/SIMOS/StorageAttribute" # noqa: E501
157
+ contained (bool): [optional] if omitted the server will use the default value of True # noqa: E501
158
+ storage_affinity (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
159
+ label (str): [optional] if omitted the server will use the default value of "" # noqa: E501
160
+ description (str): [optional] if omitted the server will use the default value of "" # noqa: E501
161
+ """
162
+
163
+ _check_type = kwargs.pop('_check_type', True)
164
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
165
+ _path_to_item = kwargs.pop('_path_to_item', ())
166
+ _configuration = kwargs.pop('_configuration', None)
167
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
168
+
169
+ self = super(OpenApiModel, cls).__new__(cls)
170
+
171
+ if args:
172
+ for arg in args:
173
+ if isinstance(arg, dict):
174
+ kwargs.update(arg)
175
+ else:
176
+ raise ApiTypeError(
177
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
178
+ args,
179
+ self.__class__.__name__,
180
+ ),
181
+ path_to_item=_path_to_item,
182
+ valid_classes=(self.__class__,),
183
+ )
184
+
185
+ self._data_store = {}
186
+ self._check_type = _check_type
187
+ self._spec_property_naming = _spec_property_naming
188
+ self._path_to_item = _path_to_item
189
+ self._configuration = _configuration
190
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
191
+
192
+ self.name = name
193
+ for var_name, var_value in kwargs.items():
194
+ if var_name not in self.attribute_map and \
195
+ self._configuration is not None and \
196
+ self._configuration.discard_unknown_keys and \
197
+ self.additional_properties_type is None:
198
+ # discard variable.
199
+ continue
200
+ setattr(self, var_name, var_value)
201
+ return self
202
+
203
+ required_properties = set([
204
+ '_data_store',
205
+ '_check_type',
206
+ '_spec_property_naming',
207
+ '_path_to_item',
208
+ '_configuration',
209
+ '_visited_composed_classes',
210
+ ])
211
+
212
+ @convert_js_args_to_python_args
213
+ def __init__(self, name, *args, **kwargs): # noqa: E501
214
+ """StorageAttribute - a model defined in OpenAPI
215
+
216
+ Args:
217
+ name (str):
218
+
219
+ Keyword Args:
220
+ _check_type (bool): if True, values for parameters in openapi_types
221
+ will be type checked and a TypeError will be
222
+ raised if the wrong type is input.
223
+ Defaults to True
224
+ _path_to_item (tuple/list): This is a list of keys or values to
225
+ drill down to the model in received_data
226
+ when deserializing a response
227
+ _spec_property_naming (bool): True if the variable names in the input data
228
+ are serialized names, as specified in the OpenAPI document.
229
+ False if the variable names in the input data
230
+ are pythonic names, e.g. snake case (default)
231
+ _configuration (Configuration): the instance to use when
232
+ deserializing a file_type parameter.
233
+ If passed, type conversion is attempted
234
+ If omitted no type conversion is done.
235
+ _visited_composed_classes (tuple): This stores a tuple of
236
+ classes that we have traveled through so that
237
+ if we see that class again we will not use its
238
+ discriminator again.
239
+ When traveling through a discriminator, the
240
+ composed schema that is
241
+ is traveled through is added to this set.
242
+ For example if Animal has a discriminator
243
+ petType and we pass in "Dog", and the class Dog
244
+ allOf includes Animal, we move through Animal
245
+ once using the discriminator, and pick Dog.
246
+ Then in Dog, we will make an instance of the
247
+ Animal class but this time we won't travel
248
+ through its discriminator because we passed in
249
+ _visited_composed_classes = (Animal,)
250
+ type (str): [optional] if omitted the server will use the default value of "dmss://system/SIMOS/StorageAttribute" # noqa: E501
251
+ contained (bool): [optional] if omitted the server will use the default value of True # noqa: E501
252
+ storage_affinity (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
253
+ label (str): [optional] if omitted the server will use the default value of "" # noqa: E501
254
+ description (str): [optional] if omitted the server will use the default value of "" # noqa: E501
255
+ """
256
+
257
+ _check_type = kwargs.pop('_check_type', True)
258
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
259
+ _path_to_item = kwargs.pop('_path_to_item', ())
260
+ _configuration = kwargs.pop('_configuration', None)
261
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
262
+
263
+ if args:
264
+ for arg in args:
265
+ if isinstance(arg, dict):
266
+ kwargs.update(arg)
267
+ else:
268
+ raise ApiTypeError(
269
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
270
+ args,
271
+ self.__class__.__name__,
272
+ ),
273
+ path_to_item=_path_to_item,
274
+ valid_classes=(self.__class__,),
275
+ )
276
+
277
+ self._data_store = {}
278
+ self._check_type = _check_type
279
+ self._spec_property_naming = _spec_property_naming
280
+ self._path_to_item = _path_to_item
281
+ self._configuration = _configuration
282
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
283
+
284
+ self.name = name
285
+ for var_name, var_value in kwargs.items():
286
+ if var_name not in self.attribute_map and \
287
+ self._configuration is not None and \
288
+ self._configuration.discard_unknown_keys and \
289
+ self.additional_properties_type is None:
290
+ # discard variable.
291
+ continue
292
+ setattr(self, var_name, var_value)
293
+ if var_name in self.read_only_vars:
294
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
295
+ f"class with read only attributes.")
@@ -0,0 +1,292 @@
1
+ """
2
+ Data Modelling Storage Service
3
+
4
+ API for basic data modelling interaction # noqa: E501
5
+
6
+ The version of the OpenAPI document: 1.3.0
7
+ Generated by: https://openapi-generator.tech
8
+ """
9
+
10
+
11
+ import re # noqa: F401
12
+ import sys # noqa: F401
13
+
14
+ from dm_cli.dmss_api.exceptions import ApiAttributeError
15
+ from dm_cli.dmss_api.model_utils import ( # noqa: F401
16
+ ApiTypeError,
17
+ ModelComposed,
18
+ ModelNormal,
19
+ ModelSimple,
20
+ OpenApiModel,
21
+ cached_property,
22
+ change_keys_js_to_python,
23
+ convert_js_args_to_python_args,
24
+ date,
25
+ datetime,
26
+ file_type,
27
+ none_type,
28
+ validate_get_composed_info,
29
+ )
30
+
31
+
32
+ class StorageDataTypes(ModelSimple):
33
+ """NOTE: This class is auto generated by OpenAPI Generator.
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+
38
+ Attributes:
39
+ allowed_values (dict): The key is the tuple path to the attribute
40
+ and the for var_name this is (var_name,). The value is a dict
41
+ with a capitalized key describing the allowed value and an allowed
42
+ value. These dicts store the allowed enum values.
43
+ validations (dict): The key is the tuple path to the attribute
44
+ and the for var_name this is (var_name,). The value is a dict
45
+ that stores validations for max_length, min_length, max_items,
46
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
47
+ inclusive_minimum, and regex.
48
+ additional_properties_type (tuple): A tuple of classes accepted
49
+ as additional properties values.
50
+ """
51
+
52
+ allowed_values = {
53
+ ('value',): {
54
+ 'DEFAULT': "default",
55
+ 'LARGE': "large",
56
+ 'VERYLARGE': "veryLarge",
57
+ 'VIDEO': "video",
58
+ 'BLOB': "blob",
59
+ },
60
+ }
61
+
62
+ validations = {
63
+ }
64
+
65
+ additional_properties_type = None
66
+
67
+ _nullable = False
68
+
69
+ @cached_property
70
+ def openapi_types():
71
+ """
72
+ This must be a method because a model may have properties that are
73
+ of type self, this must run after the class is loaded
74
+
75
+ Returns
76
+ openapi_types (dict): The key is attribute name
77
+ and the value is attribute type.
78
+ """
79
+ return {
80
+ 'value': (str,),
81
+ }
82
+
83
+ @cached_property
84
+ def discriminator():
85
+ return None
86
+
87
+
88
+ attribute_map = {}
89
+
90
+ read_only_vars = set()
91
+
92
+ _composed_schemas = None
93
+
94
+ required_properties = set([
95
+ '_data_store',
96
+ '_check_type',
97
+ '_spec_property_naming',
98
+ '_path_to_item',
99
+ '_configuration',
100
+ '_visited_composed_classes',
101
+ ])
102
+
103
+ @convert_js_args_to_python_args
104
+ def __init__(self, *args, **kwargs):
105
+ """StorageDataTypes - a model defined in OpenAPI
106
+
107
+ Note that value can be passed either in args or in kwargs, but not in both.
108
+
109
+ Args:
110
+ args[0] (str): An enumeration.., must be one of ["default", "large", "veryLarge", "video", "blob", ] # noqa: E501
111
+
112
+ Keyword Args:
113
+ value (str): An enumeration.., must be one of ["default", "large", "veryLarge", "video", "blob", ] # noqa: E501
114
+ _check_type (bool): if True, values for parameters in openapi_types
115
+ will be type checked and a TypeError will be
116
+ raised if the wrong type is input.
117
+ Defaults to True
118
+ _path_to_item (tuple/list): This is a list of keys or values to
119
+ drill down to the model in received_data
120
+ when deserializing a response
121
+ _spec_property_naming (bool): True if the variable names in the input data
122
+ are serialized names, as specified in the OpenAPI document.
123
+ False if the variable names in the input data
124
+ are pythonic names, e.g. snake case (default)
125
+ _configuration (Configuration): the instance to use when
126
+ deserializing a file_type parameter.
127
+ If passed, type conversion is attempted
128
+ If omitted no type conversion is done.
129
+ _visited_composed_classes (tuple): This stores a tuple of
130
+ classes that we have traveled through so that
131
+ if we see that class again we will not use its
132
+ discriminator again.
133
+ When traveling through a discriminator, the
134
+ composed schema that is
135
+ is traveled through is added to this set.
136
+ For example if Animal has a discriminator
137
+ petType and we pass in "Dog", and the class Dog
138
+ allOf includes Animal, we move through Animal
139
+ once using the discriminator, and pick Dog.
140
+ Then in Dog, we will make an instance of the
141
+ Animal class but this time we won't travel
142
+ through its discriminator because we passed in
143
+ _visited_composed_classes = (Animal,)
144
+ """
145
+ # required up here when default value is not given
146
+ _path_to_item = kwargs.pop('_path_to_item', ())
147
+
148
+ if 'value' in kwargs:
149
+ value = kwargs.pop('value')
150
+ elif args:
151
+ args = list(args)
152
+ value = args.pop(0)
153
+ else:
154
+ raise ApiTypeError(
155
+ "value is required, but not passed in args or kwargs and doesn't have default",
156
+ path_to_item=_path_to_item,
157
+ valid_classes=(self.__class__,),
158
+ )
159
+
160
+ _check_type = kwargs.pop('_check_type', True)
161
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
162
+ _configuration = kwargs.pop('_configuration', None)
163
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
164
+
165
+ if args:
166
+ for arg in args:
167
+ if isinstance(arg, dict):
168
+ kwargs.update(arg)
169
+ else:
170
+ raise ApiTypeError(
171
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
172
+ args,
173
+ self.__class__.__name__,
174
+ ),
175
+ path_to_item=_path_to_item,
176
+ valid_classes=(self.__class__,),
177
+ )
178
+
179
+ self._data_store = {}
180
+ self._check_type = _check_type
181
+ self._spec_property_naming = _spec_property_naming
182
+ self._path_to_item = _path_to_item
183
+ self._configuration = _configuration
184
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
185
+ self.value = value
186
+ if kwargs:
187
+ raise ApiTypeError(
188
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
189
+ kwargs,
190
+ self.__class__.__name__,
191
+ ),
192
+ path_to_item=_path_to_item,
193
+ valid_classes=(self.__class__,),
194
+ )
195
+
196
+ @classmethod
197
+ @convert_js_args_to_python_args
198
+ def _from_openapi_data(cls, *args, **kwargs):
199
+ """StorageDataTypes - a model defined in OpenAPI
200
+
201
+ Note that value can be passed either in args or in kwargs, but not in both.
202
+
203
+ Args:
204
+ args[0] (str): An enumeration.., must be one of ["default", "large", "veryLarge", "video", "blob", ] # noqa: E501
205
+
206
+ Keyword Args:
207
+ value (str): An enumeration.., must be one of ["default", "large", "veryLarge", "video", "blob", ] # noqa: E501
208
+ _check_type (bool): if True, values for parameters in openapi_types
209
+ will be type checked and a TypeError will be
210
+ raised if the wrong type is input.
211
+ Defaults to True
212
+ _path_to_item (tuple/list): This is a list of keys or values to
213
+ drill down to the model in received_data
214
+ when deserializing a response
215
+ _spec_property_naming (bool): True if the variable names in the input data
216
+ are serialized names, as specified in the OpenAPI document.
217
+ False if the variable names in the input data
218
+ are pythonic names, e.g. snake case (default)
219
+ _configuration (Configuration): the instance to use when
220
+ deserializing a file_type parameter.
221
+ If passed, type conversion is attempted
222
+ If omitted no type conversion is done.
223
+ _visited_composed_classes (tuple): This stores a tuple of
224
+ classes that we have traveled through so that
225
+ if we see that class again we will not use its
226
+ discriminator again.
227
+ When traveling through a discriminator, the
228
+ composed schema that is
229
+ is traveled through is added to this set.
230
+ For example if Animal has a discriminator
231
+ petType and we pass in "Dog", and the class Dog
232
+ allOf includes Animal, we move through Animal
233
+ once using the discriminator, and pick Dog.
234
+ Then in Dog, we will make an instance of the
235
+ Animal class but this time we won't travel
236
+ through its discriminator because we passed in
237
+ _visited_composed_classes = (Animal,)
238
+ """
239
+ # required up here when default value is not given
240
+ _path_to_item = kwargs.pop('_path_to_item', ())
241
+
242
+ self = super(OpenApiModel, cls).__new__(cls)
243
+
244
+ if 'value' in kwargs:
245
+ value = kwargs.pop('value')
246
+ elif args:
247
+ args = list(args)
248
+ value = args.pop(0)
249
+ else:
250
+ raise ApiTypeError(
251
+ "value is required, but not passed in args or kwargs and doesn't have default",
252
+ path_to_item=_path_to_item,
253
+ valid_classes=(self.__class__,),
254
+ )
255
+
256
+ _check_type = kwargs.pop('_check_type', True)
257
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
258
+ _configuration = kwargs.pop('_configuration', None)
259
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
260
+
261
+ if args:
262
+ for arg in args:
263
+ if isinstance(arg, dict):
264
+ kwargs.update(arg)
265
+ else:
266
+ raise ApiTypeError(
267
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
268
+ args,
269
+ self.__class__.__name__,
270
+ ),
271
+ path_to_item=_path_to_item,
272
+ valid_classes=(self.__class__,),
273
+ )
274
+
275
+ self._data_store = {}
276
+ self._check_type = _check_type
277
+ self._spec_property_naming = _spec_property_naming
278
+ self._path_to_item = _path_to_item
279
+ self._configuration = _configuration
280
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
281
+ self.value = value
282
+ if kwargs:
283
+ raise ApiTypeError(
284
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
285
+ kwargs,
286
+ self.__class__.__name__,
287
+ ),
288
+ path_to_item=_path_to_item,
289
+ valid_classes=(self.__class__,),
290
+ )
291
+
292
+ return self