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,317 @@
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.repository_type import RepositoryType
34
+ from dm_cli.dmss_api.model.storage_data_types import StorageDataTypes
35
+ globals()['RepositoryType'] = RepositoryType
36
+ globals()['StorageDataTypes'] = StorageDataTypes
37
+
38
+
39
+ class Repository(ModelNormal):
40
+ """NOTE: This class is auto generated by OpenAPI Generator.
41
+ Ref: https://openapi-generator.tech
42
+
43
+ Do not edit the class manually.
44
+
45
+ Attributes:
46
+ allowed_values (dict): The key is the tuple path to the attribute
47
+ and the for var_name this is (var_name,). The value is a dict
48
+ with a capitalized key describing the allowed value and an allowed
49
+ value. These dicts store the allowed enum values.
50
+ attribute_map (dict): The key is attribute name
51
+ and the value is json key in definition.
52
+ discriminator_value_class_map (dict): A dict to go from the discriminator
53
+ variable value to the discriminator class name.
54
+ validations (dict): The key is the tuple path to the attribute
55
+ and the for var_name this is (var_name,). The value is a dict
56
+ that stores validations for max_length, min_length, max_items,
57
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
58
+ inclusive_minimum, and regex.
59
+ additional_properties_type (tuple): A tuple of classes accepted
60
+ as additional properties values.
61
+ """
62
+
63
+ allowed_values = {
64
+ }
65
+
66
+ validations = {
67
+ }
68
+
69
+ @cached_property
70
+ def additional_properties_type():
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
+ lazy_import()
76
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
77
+
78
+ _nullable = False
79
+
80
+ @cached_property
81
+ def openapi_types():
82
+ """
83
+ This must be a method because a model may have properties that are
84
+ of type self, this must run after the class is loaded
85
+
86
+ Returns
87
+ openapi_types (dict): The key is attribute name
88
+ and the value is attribute type.
89
+ """
90
+ lazy_import()
91
+ return {
92
+ 'type': (RepositoryType,), # noqa: E501
93
+ 'data_types': ([StorageDataTypes],), # noqa: E501
94
+ 'host': (str,), # noqa: E501
95
+ 'port': (int,), # noqa: E501
96
+ 'username': (str,), # noqa: E501
97
+ 'password': (str,), # noqa: E501
98
+ 'database': (str,), # noqa: E501
99
+ 'collection': (str,), # noqa: E501
100
+ 'account_url': (str,), # noqa: E501
101
+ 'container': (str,), # noqa: E501
102
+ 'tls': (bool,), # noqa: E501
103
+ }
104
+
105
+ @cached_property
106
+ def discriminator():
107
+ return None
108
+
109
+
110
+ attribute_map = {
111
+ 'type': 'type', # noqa: E501
112
+ 'data_types': 'data_types', # noqa: E501
113
+ 'host': 'host', # noqa: E501
114
+ 'port': 'port', # noqa: E501
115
+ 'username': 'username', # noqa: E501
116
+ 'password': 'password', # noqa: E501
117
+ 'database': 'database', # noqa: E501
118
+ 'collection': 'collection', # noqa: E501
119
+ 'account_url': 'account_url', # noqa: E501
120
+ 'container': 'container', # noqa: E501
121
+ 'tls': 'tls', # noqa: E501
122
+ }
123
+
124
+ read_only_vars = {
125
+ }
126
+
127
+ _composed_schemas = {}
128
+
129
+ @classmethod
130
+ @convert_js_args_to_python_args
131
+ def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501
132
+ """Repository - a model defined in OpenAPI
133
+
134
+ Args:
135
+ type (RepositoryType):
136
+
137
+ Keyword Args:
138
+ _check_type (bool): if True, values for parameters in openapi_types
139
+ will be type checked and a TypeError will be
140
+ raised if the wrong type is input.
141
+ Defaults to True
142
+ _path_to_item (tuple/list): This is a list of keys or values to
143
+ drill down to the model in received_data
144
+ when deserializing a response
145
+ _spec_property_naming (bool): True if the variable names in the input data
146
+ are serialized names, as specified in the OpenAPI document.
147
+ False if the variable names in the input data
148
+ are pythonic names, e.g. snake case (default)
149
+ _configuration (Configuration): the instance to use when
150
+ deserializing a file_type parameter.
151
+ If passed, type conversion is attempted
152
+ If omitted no type conversion is done.
153
+ _visited_composed_classes (tuple): This stores a tuple of
154
+ classes that we have traveled through so that
155
+ if we see that class again we will not use its
156
+ discriminator again.
157
+ When traveling through a discriminator, the
158
+ composed schema that is
159
+ is traveled through is added to this set.
160
+ For example if Animal has a discriminator
161
+ petType and we pass in "Dog", and the class Dog
162
+ allOf includes Animal, we move through Animal
163
+ once using the discriminator, and pick Dog.
164
+ Then in Dog, we will make an instance of the
165
+ Animal class but this time we won't travel
166
+ through its discriminator because we passed in
167
+ _visited_composed_classes = (Animal,)
168
+ data_types ([StorageDataTypes]): [optional] # noqa: E501
169
+ host (str): [optional] # noqa: E501
170
+ port (int): [optional] # noqa: E501
171
+ username (str): [optional] # noqa: E501
172
+ password (str): [optional] # noqa: E501
173
+ database (str): [optional] # noqa: E501
174
+ collection (str): [optional] # noqa: E501
175
+ account_url (str): [optional] # noqa: E501
176
+ container (str): [optional] # noqa: E501
177
+ tls (bool): [optional] if omitted the server will use the default value of True # noqa: E501
178
+ """
179
+
180
+ _check_type = kwargs.pop('_check_type', True)
181
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
182
+ _path_to_item = kwargs.pop('_path_to_item', ())
183
+ _configuration = kwargs.pop('_configuration', None)
184
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
185
+
186
+ self = super(OpenApiModel, cls).__new__(cls)
187
+
188
+ if args:
189
+ for arg in args:
190
+ if isinstance(arg, dict):
191
+ kwargs.update(arg)
192
+ else:
193
+ raise ApiTypeError(
194
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
195
+ args,
196
+ self.__class__.__name__,
197
+ ),
198
+ path_to_item=_path_to_item,
199
+ valid_classes=(self.__class__,),
200
+ )
201
+
202
+ self._data_store = {}
203
+ self._check_type = _check_type
204
+ self._spec_property_naming = _spec_property_naming
205
+ self._path_to_item = _path_to_item
206
+ self._configuration = _configuration
207
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
208
+
209
+ self.type = type
210
+ for var_name, var_value in kwargs.items():
211
+ if var_name not in self.attribute_map and \
212
+ self._configuration is not None and \
213
+ self._configuration.discard_unknown_keys and \
214
+ self.additional_properties_type is None:
215
+ # discard variable.
216
+ continue
217
+ setattr(self, var_name, var_value)
218
+ return self
219
+
220
+ required_properties = set([
221
+ '_data_store',
222
+ '_check_type',
223
+ '_spec_property_naming',
224
+ '_path_to_item',
225
+ '_configuration',
226
+ '_visited_composed_classes',
227
+ ])
228
+
229
+ @convert_js_args_to_python_args
230
+ def __init__(self, type, *args, **kwargs): # noqa: E501
231
+ """Repository - a model defined in OpenAPI
232
+
233
+ Args:
234
+ type (RepositoryType):
235
+
236
+ Keyword Args:
237
+ _check_type (bool): if True, values for parameters in openapi_types
238
+ will be type checked and a TypeError will be
239
+ raised if the wrong type is input.
240
+ Defaults to True
241
+ _path_to_item (tuple/list): This is a list of keys or values to
242
+ drill down to the model in received_data
243
+ when deserializing a response
244
+ _spec_property_naming (bool): True if the variable names in the input data
245
+ are serialized names, as specified in the OpenAPI document.
246
+ False if the variable names in the input data
247
+ are pythonic names, e.g. snake case (default)
248
+ _configuration (Configuration): the instance to use when
249
+ deserializing a file_type parameter.
250
+ If passed, type conversion is attempted
251
+ If omitted no type conversion is done.
252
+ _visited_composed_classes (tuple): This stores a tuple of
253
+ classes that we have traveled through so that
254
+ if we see that class again we will not use its
255
+ discriminator again.
256
+ When traveling through a discriminator, the
257
+ composed schema that is
258
+ is traveled through is added to this set.
259
+ For example if Animal has a discriminator
260
+ petType and we pass in "Dog", and the class Dog
261
+ allOf includes Animal, we move through Animal
262
+ once using the discriminator, and pick Dog.
263
+ Then in Dog, we will make an instance of the
264
+ Animal class but this time we won't travel
265
+ through its discriminator because we passed in
266
+ _visited_composed_classes = (Animal,)
267
+ data_types ([StorageDataTypes]): [optional] # noqa: E501
268
+ host (str): [optional] # noqa: E501
269
+ port (int): [optional] # noqa: E501
270
+ username (str): [optional] # noqa: E501
271
+ password (str): [optional] # noqa: E501
272
+ database (str): [optional] # noqa: E501
273
+ collection (str): [optional] # noqa: E501
274
+ account_url (str): [optional] # noqa: E501
275
+ container (str): [optional] # noqa: E501
276
+ tls (bool): [optional] if omitted the server will use the default value of True # noqa: E501
277
+ """
278
+
279
+ _check_type = kwargs.pop('_check_type', True)
280
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
281
+ _path_to_item = kwargs.pop('_path_to_item', ())
282
+ _configuration = kwargs.pop('_configuration', None)
283
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
284
+
285
+ if args:
286
+ for arg in args:
287
+ if isinstance(arg, dict):
288
+ kwargs.update(arg)
289
+ else:
290
+ raise ApiTypeError(
291
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
292
+ args,
293
+ self.__class__.__name__,
294
+ ),
295
+ path_to_item=_path_to_item,
296
+ valid_classes=(self.__class__,),
297
+ )
298
+
299
+ self._data_store = {}
300
+ self._check_type = _check_type
301
+ self._spec_property_naming = _spec_property_naming
302
+ self._path_to_item = _path_to_item
303
+ self._configuration = _configuration
304
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
305
+
306
+ self.type = type
307
+ for var_name, var_value in kwargs.items():
308
+ if var_name not in self.attribute_map and \
309
+ self._configuration is not None and \
310
+ self._configuration.discard_unknown_keys and \
311
+ self.additional_properties_type is None:
312
+ # discard variable.
313
+ continue
314
+ setattr(self, var_name, var_value)
315
+ if var_name in self.read_only_vars:
316
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
317
+ f"class with read only attributes.")
@@ -0,0 +1,290 @@
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 RepositoryType(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
+ 'MONGO-DB': "mongo-db",
55
+ 'AZURE-BLOB-STORAGE': "azure-blob-storage",
56
+ 'LOCALSTORAGE': "localStorage",
57
+ },
58
+ }
59
+
60
+ validations = {
61
+ }
62
+
63
+ additional_properties_type = None
64
+
65
+ _nullable = False
66
+
67
+ @cached_property
68
+ def openapi_types():
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
+ Returns
74
+ openapi_types (dict): The key is attribute name
75
+ and the value is attribute type.
76
+ """
77
+ return {
78
+ 'value': (str,),
79
+ }
80
+
81
+ @cached_property
82
+ def discriminator():
83
+ return None
84
+
85
+
86
+ attribute_map = {}
87
+
88
+ read_only_vars = set()
89
+
90
+ _composed_schemas = None
91
+
92
+ required_properties = set([
93
+ '_data_store',
94
+ '_check_type',
95
+ '_spec_property_naming',
96
+ '_path_to_item',
97
+ '_configuration',
98
+ '_visited_composed_classes',
99
+ ])
100
+
101
+ @convert_js_args_to_python_args
102
+ def __init__(self, *args, **kwargs):
103
+ """RepositoryType - a model defined in OpenAPI
104
+
105
+ Note that value can be passed either in args or in kwargs, but not in both.
106
+
107
+ Args:
108
+ args[0] (str): An enumeration.., must be one of ["mongo-db", "azure-blob-storage", "localStorage", ] # noqa: E501
109
+
110
+ Keyword Args:
111
+ value (str): An enumeration.., must be one of ["mongo-db", "azure-blob-storage", "localStorage", ] # noqa: E501
112
+ _check_type (bool): if True, values for parameters in openapi_types
113
+ will be type checked and a TypeError will be
114
+ raised if the wrong type is input.
115
+ Defaults to True
116
+ _path_to_item (tuple/list): This is a list of keys or values to
117
+ drill down to the model in received_data
118
+ when deserializing a response
119
+ _spec_property_naming (bool): True if the variable names in the input data
120
+ are serialized names, as specified in the OpenAPI document.
121
+ False if the variable names in the input data
122
+ are pythonic names, e.g. snake case (default)
123
+ _configuration (Configuration): the instance to use when
124
+ deserializing a file_type parameter.
125
+ If passed, type conversion is attempted
126
+ If omitted no type conversion is done.
127
+ _visited_composed_classes (tuple): This stores a tuple of
128
+ classes that we have traveled through so that
129
+ if we see that class again we will not use its
130
+ discriminator again.
131
+ When traveling through a discriminator, the
132
+ composed schema that is
133
+ is traveled through is added to this set.
134
+ For example if Animal has a discriminator
135
+ petType and we pass in "Dog", and the class Dog
136
+ allOf includes Animal, we move through Animal
137
+ once using the discriminator, and pick Dog.
138
+ Then in Dog, we will make an instance of the
139
+ Animal class but this time we won't travel
140
+ through its discriminator because we passed in
141
+ _visited_composed_classes = (Animal,)
142
+ """
143
+ # required up here when default value is not given
144
+ _path_to_item = kwargs.pop('_path_to_item', ())
145
+
146
+ if 'value' in kwargs:
147
+ value = kwargs.pop('value')
148
+ elif args:
149
+ args = list(args)
150
+ value = args.pop(0)
151
+ else:
152
+ raise ApiTypeError(
153
+ "value is required, but not passed in args or kwargs and doesn't have default",
154
+ path_to_item=_path_to_item,
155
+ valid_classes=(self.__class__,),
156
+ )
157
+
158
+ _check_type = kwargs.pop('_check_type', True)
159
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
160
+ _configuration = kwargs.pop('_configuration', None)
161
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
162
+
163
+ if args:
164
+ for arg in args:
165
+ if isinstance(arg, dict):
166
+ kwargs.update(arg)
167
+ else:
168
+ raise ApiTypeError(
169
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
170
+ args,
171
+ self.__class__.__name__,
172
+ ),
173
+ path_to_item=_path_to_item,
174
+ valid_classes=(self.__class__,),
175
+ )
176
+
177
+ self._data_store = {}
178
+ self._check_type = _check_type
179
+ self._spec_property_naming = _spec_property_naming
180
+ self._path_to_item = _path_to_item
181
+ self._configuration = _configuration
182
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
183
+ self.value = value
184
+ if kwargs:
185
+ raise ApiTypeError(
186
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
187
+ kwargs,
188
+ self.__class__.__name__,
189
+ ),
190
+ path_to_item=_path_to_item,
191
+ valid_classes=(self.__class__,),
192
+ )
193
+
194
+ @classmethod
195
+ @convert_js_args_to_python_args
196
+ def _from_openapi_data(cls, *args, **kwargs):
197
+ """RepositoryType - a model defined in OpenAPI
198
+
199
+ Note that value can be passed either in args or in kwargs, but not in both.
200
+
201
+ Args:
202
+ args[0] (str): An enumeration.., must be one of ["mongo-db", "azure-blob-storage", "localStorage", ] # noqa: E501
203
+
204
+ Keyword Args:
205
+ value (str): An enumeration.., must be one of ["mongo-db", "azure-blob-storage", "localStorage", ] # noqa: E501
206
+ _check_type (bool): if True, values for parameters in openapi_types
207
+ will be type checked and a TypeError will be
208
+ raised if the wrong type is input.
209
+ Defaults to True
210
+ _path_to_item (tuple/list): This is a list of keys or values to
211
+ drill down to the model in received_data
212
+ when deserializing a response
213
+ _spec_property_naming (bool): True if the variable names in the input data
214
+ are serialized names, as specified in the OpenAPI document.
215
+ False if the variable names in the input data
216
+ are pythonic names, e.g. snake case (default)
217
+ _configuration (Configuration): the instance to use when
218
+ deserializing a file_type parameter.
219
+ If passed, type conversion is attempted
220
+ If omitted no type conversion is done.
221
+ _visited_composed_classes (tuple): This stores a tuple of
222
+ classes that we have traveled through so that
223
+ if we see that class again we will not use its
224
+ discriminator again.
225
+ When traveling through a discriminator, the
226
+ composed schema that is
227
+ is traveled through is added to this set.
228
+ For example if Animal has a discriminator
229
+ petType and we pass in "Dog", and the class Dog
230
+ allOf includes Animal, we move through Animal
231
+ once using the discriminator, and pick Dog.
232
+ Then in Dog, we will make an instance of the
233
+ Animal class but this time we won't travel
234
+ through its discriminator because we passed in
235
+ _visited_composed_classes = (Animal,)
236
+ """
237
+ # required up here when default value is not given
238
+ _path_to_item = kwargs.pop('_path_to_item', ())
239
+
240
+ self = super(OpenApiModel, cls).__new__(cls)
241
+
242
+ if 'value' in kwargs:
243
+ value = kwargs.pop('value')
244
+ elif args:
245
+ args = list(args)
246
+ value = args.pop(0)
247
+ else:
248
+ raise ApiTypeError(
249
+ "value is required, but not passed in args or kwargs and doesn't have default",
250
+ path_to_item=_path_to_item,
251
+ valid_classes=(self.__class__,),
252
+ )
253
+
254
+ _check_type = kwargs.pop('_check_type', True)
255
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
256
+ _configuration = kwargs.pop('_configuration', None)
257
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
258
+
259
+ if args:
260
+ for arg in args:
261
+ if isinstance(arg, dict):
262
+ kwargs.update(arg)
263
+ else:
264
+ raise ApiTypeError(
265
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
266
+ args,
267
+ self.__class__.__name__,
268
+ ),
269
+ path_to_item=_path_to_item,
270
+ valid_classes=(self.__class__,),
271
+ )
272
+
273
+ self._data_store = {}
274
+ self._check_type = _check_type
275
+ self._spec_property_naming = _spec_property_naming
276
+ self._path_to_item = _path_to_item
277
+ self._configuration = _configuration
278
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
279
+ self.value = value
280
+ if kwargs:
281
+ raise ApiTypeError(
282
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
283
+ kwargs,
284
+ self.__class__.__name__,
285
+ ),
286
+ path_to_item=_path_to_item,
287
+ valid_classes=(self.__class__,),
288
+ )
289
+
290
+ return self