ultracart-rest-sdk 4.1.22__py3-none-any.whl → 4.1.23__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.
@@ -0,0 +1,298 @@
1
+ """
2
+ UltraCart Rest API V2
3
+
4
+ UltraCart REST API Version 2 # noqa: E501
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ """
10
+
11
+
12
+ import re # noqa: F401
13
+ import sys # noqa: F401
14
+
15
+ from ultracart.model_utils import ( # noqa: F401
16
+ ApiTypeError,
17
+ ModelComposed,
18
+ ModelNormal,
19
+ ModelSimple,
20
+ cached_property,
21
+ change_keys_js_to_python,
22
+ convert_js_args_to_python_args,
23
+ date,
24
+ datetime,
25
+ file_type,
26
+ none_type,
27
+ validate_get_composed_info,
28
+ OpenApiModel
29
+ )
30
+ from ultracart.exceptions import ApiAttributeError
31
+
32
+
33
+ def lazy_import():
34
+ from ultracart.model.error import Error
35
+ from ultracart.model.response_metadata import ResponseMetadata
36
+ from ultracart.model.warning import Warning
37
+ globals()['Error'] = Error
38
+ globals()['ResponseMetadata'] = ResponseMetadata
39
+ globals()['Warning'] = Warning
40
+
41
+
42
+ class ConversationInsertKnowledgeBaseDocumentResponse(ModelNormal):
43
+ """NOTE: This class is auto generated by OpenAPI Generator.
44
+ Ref: https://openapi-generator.tech
45
+
46
+ Do not edit the class manually.
47
+
48
+ Attributes:
49
+ allowed_values (dict): The key is the tuple path to the attribute
50
+ and the for var_name this is (var_name,). The value is a dict
51
+ with a capitalized key describing the allowed value and an allowed
52
+ value. These dicts store the allowed enum values.
53
+ attribute_map (dict): The key is attribute name
54
+ and the value is json key in definition.
55
+ discriminator_value_class_map (dict): A dict to go from the discriminator
56
+ variable value to the discriminator class name.
57
+ validations (dict): The key is the tuple path to the attribute
58
+ and the for var_name this is (var_name,). The value is a dict
59
+ that stores validations for max_length, min_length, max_items,
60
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
61
+ inclusive_minimum, and regex.
62
+ additional_properties_type (tuple): A tuple of classes accepted
63
+ as additional properties values.
64
+ """
65
+
66
+ allowed_values = {
67
+ }
68
+
69
+ validations = {
70
+ }
71
+
72
+ @cached_property
73
+ def additional_properties_type():
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
+ lazy_import()
79
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
80
+
81
+ _nullable = False
82
+
83
+ @cached_property
84
+ def openapi_types():
85
+ """
86
+ This must be a method because a model may have properties that are
87
+ of type self, this must run after the class is loaded
88
+
89
+ Returns
90
+ openapi_types (dict): The key is attribute name
91
+ and the value is attribute type.
92
+ """
93
+ lazy_import()
94
+ return {
95
+ 'document_uuid': (str,), # noqa: E501
96
+ 'error': (Error,), # noqa: E501
97
+ 'metadata': (ResponseMetadata,), # noqa: E501
98
+ 's3_key': (str,), # noqa: E501
99
+ 'success': (bool,), # noqa: E501
100
+ 'vector_keys': ([str],), # noqa: E501
101
+ 'warning': (Warning,), # noqa: E501
102
+ }
103
+
104
+ @cached_property
105
+ def discriminator():
106
+ return None
107
+
108
+
109
+ attribute_map = {
110
+ 'document_uuid': 'document_uuid', # noqa: E501
111
+ 'error': 'error', # noqa: E501
112
+ 'metadata': 'metadata', # noqa: E501
113
+ 's3_key': 's3_key', # noqa: E501
114
+ 'success': 'success', # noqa: E501
115
+ 'vector_keys': 'vector_keys', # noqa: E501
116
+ 'warning': 'warning', # noqa: E501
117
+ }
118
+
119
+ read_only_vars = {
120
+ }
121
+
122
+ _composed_schemas = {}
123
+
124
+ @classmethod
125
+ @convert_js_args_to_python_args
126
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
127
+ """ConversationInsertKnowledgeBaseDocumentResponse - a model defined in OpenAPI
128
+
129
+ Keyword Args:
130
+ _check_type (bool): if True, values for parameters in openapi_types
131
+ will be type checked and a TypeError will be
132
+ raised if the wrong type is input.
133
+ Defaults to True
134
+ _path_to_item (tuple/list): This is a list of keys or values to
135
+ drill down to the model in received_data
136
+ when deserializing a response
137
+ _spec_property_naming (bool): True if the variable names in the input data
138
+ are serialized names, as specified in the OpenAPI document.
139
+ False if the variable names in the input data
140
+ are pythonic names, e.g. snake case (default)
141
+ _configuration (Configuration): the instance to use when
142
+ deserializing a file_type parameter.
143
+ If passed, type conversion is attempted
144
+ If omitted no type conversion is done.
145
+ _visited_composed_classes (tuple): This stores a tuple of
146
+ classes that we have traveled through so that
147
+ if we see that class again we will not use its
148
+ discriminator again.
149
+ When traveling through a discriminator, the
150
+ composed schema that is
151
+ is traveled through is added to this set.
152
+ For example if Animal has a discriminator
153
+ petType and we pass in "Dog", and the class Dog
154
+ allOf includes Animal, we move through Animal
155
+ once using the discriminator, and pick Dog.
156
+ Then in Dog, we will make an instance of the
157
+ Animal class but this time we won't travel
158
+ through its discriminator because we passed in
159
+ _visited_composed_classes = (Animal,)
160
+ document_uuid (str): [optional] # noqa: E501
161
+ error (Error): [optional] # noqa: E501
162
+ metadata (ResponseMetadata): [optional] # noqa: E501
163
+ s3_key (str): [optional] # noqa: E501
164
+ success (bool): Indicates if API call was successful. [optional] # noqa: E501
165
+ vector_keys ([str]): [optional] # noqa: E501
166
+ warning (Warning): [optional] # noqa: E501
167
+ """
168
+
169
+ _check_type = kwargs.pop('_check_type', True)
170
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
171
+ _path_to_item = kwargs.pop('_path_to_item', ())
172
+ _configuration = kwargs.pop('_configuration', None)
173
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
174
+
175
+ self = super(OpenApiModel, cls).__new__(cls)
176
+
177
+ if args:
178
+ for arg in args:
179
+ if isinstance(arg, dict):
180
+ kwargs.update(arg)
181
+ else:
182
+ raise ApiTypeError(
183
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
184
+ args,
185
+ self.__class__.__name__,
186
+ ),
187
+ path_to_item=_path_to_item,
188
+ valid_classes=(self.__class__,),
189
+ )
190
+
191
+ self._data_store = {}
192
+ self._check_type = _check_type
193
+ self._spec_property_naming = _spec_property_naming
194
+ self._path_to_item = _path_to_item
195
+ self._configuration = _configuration
196
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
197
+
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, *args, **kwargs): # noqa: E501
219
+ """ConversationInsertKnowledgeBaseDocumentResponse - a model defined in OpenAPI
220
+
221
+ Keyword Args:
222
+ _check_type (bool): if True, values for parameters in openapi_types
223
+ will be type checked and a TypeError will be
224
+ raised if the wrong type is input.
225
+ Defaults to True
226
+ _path_to_item (tuple/list): This is a list of keys or values to
227
+ drill down to the model in received_data
228
+ when deserializing a response
229
+ _spec_property_naming (bool): True if the variable names in the input data
230
+ are serialized names, as specified in the OpenAPI document.
231
+ False if the variable names in the input data
232
+ are pythonic names, e.g. snake case (default)
233
+ _configuration (Configuration): the instance to use when
234
+ deserializing a file_type parameter.
235
+ If passed, type conversion is attempted
236
+ If omitted no type conversion is done.
237
+ _visited_composed_classes (tuple): This stores a tuple of
238
+ classes that we have traveled through so that
239
+ if we see that class again we will not use its
240
+ discriminator again.
241
+ When traveling through a discriminator, the
242
+ composed schema that is
243
+ is traveled through is added to this set.
244
+ For example if Animal has a discriminator
245
+ petType and we pass in "Dog", and the class Dog
246
+ allOf includes Animal, we move through Animal
247
+ once using the discriminator, and pick Dog.
248
+ Then in Dog, we will make an instance of the
249
+ Animal class but this time we won't travel
250
+ through its discriminator because we passed in
251
+ _visited_composed_classes = (Animal,)
252
+ document_uuid (str): [optional] # noqa: E501
253
+ error (Error): [optional] # noqa: E501
254
+ metadata (ResponseMetadata): [optional] # noqa: E501
255
+ s3_key (str): [optional] # noqa: E501
256
+ success (bool): Indicates if API call was successful. [optional] # noqa: E501
257
+ vector_keys ([str]): [optional] # noqa: E501
258
+ warning (Warning): [optional] # noqa: E501
259
+ """
260
+
261
+ _check_type = kwargs.pop('_check_type', True)
262
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
263
+ _path_to_item = kwargs.pop('_path_to_item', ())
264
+ _configuration = kwargs.pop('_configuration', None)
265
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
266
+
267
+ if args:
268
+ for arg in args:
269
+ if isinstance(arg, dict):
270
+ kwargs.update(arg)
271
+ else:
272
+ raise ApiTypeError(
273
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
274
+ args,
275
+ self.__class__.__name__,
276
+ ),
277
+ path_to_item=_path_to_item,
278
+ valid_classes=(self.__class__,),
279
+ )
280
+
281
+ self._data_store = {}
282
+ self._check_type = _check_type
283
+ self._spec_property_naming = _spec_property_naming
284
+ self._path_to_item = _path_to_item
285
+ self._configuration = _configuration
286
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
287
+
288
+ for var_name, var_value in kwargs.items():
289
+ if var_name not in self.attribute_map and \
290
+ self._configuration is not None and \
291
+ self._configuration.discard_unknown_keys and \
292
+ self.additional_properties_type is None:
293
+ # discard variable.
294
+ continue
295
+ setattr(self, var_name, var_value)
296
+ if var_name in self.read_only_vars:
297
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
298
+ f"class with read only attributes.")
@@ -0,0 +1,288 @@
1
+ """
2
+ UltraCart Rest API V2
3
+
4
+ UltraCart REST API Version 2 # noqa: E501
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ """
10
+
11
+
12
+ import re # noqa: F401
13
+ import sys # noqa: F401
14
+
15
+ from ultracart.model_utils import ( # noqa: F401
16
+ ApiTypeError,
17
+ ModelComposed,
18
+ ModelNormal,
19
+ ModelSimple,
20
+ cached_property,
21
+ change_keys_js_to_python,
22
+ convert_js_args_to_python_args,
23
+ date,
24
+ datetime,
25
+ file_type,
26
+ none_type,
27
+ validate_get_composed_info,
28
+ OpenApiModel
29
+ )
30
+ from ultracart.exceptions import ApiAttributeError
31
+
32
+
33
+
34
+ class ConversationKnowledgeBaseDocument(ModelNormal):
35
+ """NOTE: This class is auto generated by OpenAPI Generator.
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+
40
+ Attributes:
41
+ allowed_values (dict): The key is the tuple path to the attribute
42
+ and the for var_name this is (var_name,). The value is a dict
43
+ with a capitalized key describing the allowed value and an allowed
44
+ value. These dicts store the allowed enum values.
45
+ attribute_map (dict): The key is attribute name
46
+ and the value is json key in definition.
47
+ discriminator_value_class_map (dict): A dict to go from the discriminator
48
+ variable value to the discriminator class name.
49
+ validations (dict): The key is the tuple path to the attribute
50
+ and the for var_name this is (var_name,). The value is a dict
51
+ that stores validations for max_length, min_length, max_items,
52
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
53
+ inclusive_minimum, and regex.
54
+ additional_properties_type (tuple): A tuple of classes accepted
55
+ as additional properties values.
56
+ """
57
+
58
+ allowed_values = {
59
+ }
60
+
61
+ validations = {
62
+ }
63
+
64
+ @cached_property
65
+ def additional_properties_type():
66
+ """
67
+ This must be a method because a model may have properties that are
68
+ of type self, this must run after the class is loaded
69
+ """
70
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
71
+
72
+ _nullable = False
73
+
74
+ @cached_property
75
+ def openapi_types():
76
+ """
77
+ This must be a method because a model may have properties that are
78
+ of type self, this must run after the class is loaded
79
+
80
+ Returns
81
+ openapi_types (dict): The key is attribute name
82
+ and the value is attribute type.
83
+ """
84
+ return {
85
+ 'chunk_count': (int,), # noqa: E501
86
+ 'description': (str,), # noqa: E501
87
+ 'document_id': (str,), # noqa: E501
88
+ 'document_uuid': (str,), # noqa: E501
89
+ 'metadata': (str,), # noqa: E501
90
+ 'mime_type': (str,), # noqa: E501
91
+ 's3_key': (str,), # noqa: E501
92
+ }
93
+
94
+ @cached_property
95
+ def discriminator():
96
+ return None
97
+
98
+
99
+ attribute_map = {
100
+ 'chunk_count': 'chunk_count', # noqa: E501
101
+ 'description': 'description', # noqa: E501
102
+ 'document_id': 'document_id', # noqa: E501
103
+ 'document_uuid': 'document_uuid', # noqa: E501
104
+ 'metadata': 'metadata', # noqa: E501
105
+ 'mime_type': 'mime_type', # noqa: E501
106
+ 's3_key': 's3_key', # noqa: E501
107
+ }
108
+
109
+ read_only_vars = {
110
+ }
111
+
112
+ _composed_schemas = {}
113
+
114
+ @classmethod
115
+ @convert_js_args_to_python_args
116
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
117
+ """ConversationKnowledgeBaseDocument - a model defined in OpenAPI
118
+
119
+ Keyword Args:
120
+ _check_type (bool): if True, values for parameters in openapi_types
121
+ will be type checked and a TypeError will be
122
+ raised if the wrong type is input.
123
+ Defaults to True
124
+ _path_to_item (tuple/list): This is a list of keys or values to
125
+ drill down to the model in received_data
126
+ when deserializing a response
127
+ _spec_property_naming (bool): True if the variable names in the input data
128
+ are serialized names, as specified in the OpenAPI document.
129
+ False if the variable names in the input data
130
+ are pythonic names, e.g. snake case (default)
131
+ _configuration (Configuration): the instance to use when
132
+ deserializing a file_type parameter.
133
+ If passed, type conversion is attempted
134
+ If omitted no type conversion is done.
135
+ _visited_composed_classes (tuple): This stores a tuple of
136
+ classes that we have traveled through so that
137
+ if we see that class again we will not use its
138
+ discriminator again.
139
+ When traveling through a discriminator, the
140
+ composed schema that is
141
+ is traveled through is added to this set.
142
+ For example if Animal has a discriminator
143
+ petType and we pass in "Dog", and the class Dog
144
+ allOf includes Animal, we move through Animal
145
+ once using the discriminator, and pick Dog.
146
+ Then in Dog, we will make an instance of the
147
+ Animal class but this time we won't travel
148
+ through its discriminator because we passed in
149
+ _visited_composed_classes = (Animal,)
150
+ chunk_count (int): [optional] # noqa: E501
151
+ description (str): [optional] # noqa: E501
152
+ document_id (str): Human readable identifier. Filename is recommended.. [optional] # noqa: E501
153
+ document_uuid (str): [optional] # noqa: E501
154
+ metadata (str): [optional] # noqa: E501
155
+ mime_type (str): [optional] # noqa: E501
156
+ s3_key (str): [optional] # noqa: E501
157
+ """
158
+
159
+ _check_type = kwargs.pop('_check_type', True)
160
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
161
+ _path_to_item = kwargs.pop('_path_to_item', ())
162
+ _configuration = kwargs.pop('_configuration', None)
163
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
164
+
165
+ self = super(OpenApiModel, cls).__new__(cls)
166
+
167
+ if args:
168
+ for arg in args:
169
+ if isinstance(arg, dict):
170
+ kwargs.update(arg)
171
+ else:
172
+ raise ApiTypeError(
173
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
174
+ args,
175
+ self.__class__.__name__,
176
+ ),
177
+ path_to_item=_path_to_item,
178
+ valid_classes=(self.__class__,),
179
+ )
180
+
181
+ self._data_store = {}
182
+ self._check_type = _check_type
183
+ self._spec_property_naming = _spec_property_naming
184
+ self._path_to_item = _path_to_item
185
+ self._configuration = _configuration
186
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
187
+
188
+ for var_name, var_value in kwargs.items():
189
+ if var_name not in self.attribute_map and \
190
+ self._configuration is not None and \
191
+ self._configuration.discard_unknown_keys and \
192
+ self.additional_properties_type is None:
193
+ # discard variable.
194
+ continue
195
+ setattr(self, var_name, var_value)
196
+ return self
197
+
198
+ required_properties = set([
199
+ '_data_store',
200
+ '_check_type',
201
+ '_spec_property_naming',
202
+ '_path_to_item',
203
+ '_configuration',
204
+ '_visited_composed_classes',
205
+ ])
206
+
207
+ @convert_js_args_to_python_args
208
+ def __init__(self, *args, **kwargs): # noqa: E501
209
+ """ConversationKnowledgeBaseDocument - a model defined in OpenAPI
210
+
211
+ Keyword Args:
212
+ _check_type (bool): if True, values for parameters in openapi_types
213
+ will be type checked and a TypeError will be
214
+ raised if the wrong type is input.
215
+ Defaults to True
216
+ _path_to_item (tuple/list): This is a list of keys or values to
217
+ drill down to the model in received_data
218
+ when deserializing a response
219
+ _spec_property_naming (bool): True if the variable names in the input data
220
+ are serialized names, as specified in the OpenAPI document.
221
+ False if the variable names in the input data
222
+ are pythonic names, e.g. snake case (default)
223
+ _configuration (Configuration): the instance to use when
224
+ deserializing a file_type parameter.
225
+ If passed, type conversion is attempted
226
+ If omitted no type conversion is done.
227
+ _visited_composed_classes (tuple): This stores a tuple of
228
+ classes that we have traveled through so that
229
+ if we see that class again we will not use its
230
+ discriminator again.
231
+ When traveling through a discriminator, the
232
+ composed schema that is
233
+ is traveled through is added to this set.
234
+ For example if Animal has a discriminator
235
+ petType and we pass in "Dog", and the class Dog
236
+ allOf includes Animal, we move through Animal
237
+ once using the discriminator, and pick Dog.
238
+ Then in Dog, we will make an instance of the
239
+ Animal class but this time we won't travel
240
+ through its discriminator because we passed in
241
+ _visited_composed_classes = (Animal,)
242
+ chunk_count (int): [optional] # noqa: E501
243
+ description (str): [optional] # noqa: E501
244
+ document_id (str): Human readable identifier. Filename is recommended.. [optional] # noqa: E501
245
+ document_uuid (str): [optional] # noqa: E501
246
+ metadata (str): [optional] # noqa: E501
247
+ mime_type (str): [optional] # noqa: E501
248
+ s3_key (str): [optional] # noqa: E501
249
+ """
250
+
251
+ _check_type = kwargs.pop('_check_type', True)
252
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
253
+ _path_to_item = kwargs.pop('_path_to_item', ())
254
+ _configuration = kwargs.pop('_configuration', None)
255
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
256
+
257
+ if args:
258
+ for arg in args:
259
+ if isinstance(arg, dict):
260
+ kwargs.update(arg)
261
+ else:
262
+ raise ApiTypeError(
263
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
264
+ args,
265
+ self.__class__.__name__,
266
+ ),
267
+ path_to_item=_path_to_item,
268
+ valid_classes=(self.__class__,),
269
+ )
270
+
271
+ self._data_store = {}
272
+ self._check_type = _check_type
273
+ self._spec_property_naming = _spec_property_naming
274
+ self._path_to_item = _path_to_item
275
+ self._configuration = _configuration
276
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
277
+
278
+ for var_name, var_value in kwargs.items():
279
+ if var_name not in self.attribute_map and \
280
+ self._configuration is not None and \
281
+ self._configuration.discard_unknown_keys and \
282
+ self.additional_properties_type is None:
283
+ # discard variable.
284
+ continue
285
+ setattr(self, var_name, var_value)
286
+ if var_name in self.read_only_vars:
287
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
288
+ f"class with read only attributes.")