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