fds.sdk.VectorData 0.0.1__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.
- fds/__init__.py +0 -0
- fds/sdk/VectorData/__init__.py +28 -0
- fds/sdk/VectorData/api/__init__.py +3 -0
- fds/sdk/VectorData/api/meta_api.py +959 -0
- fds/sdk/VectorData/api/vector_api.py +564 -0
- fds/sdk/VectorData/api_client.py +939 -0
- fds/sdk/VectorData/apis/__init__.py +18 -0
- fds/sdk/VectorData/configuration.py +496 -0
- fds/sdk/VectorData/exceptions.py +160 -0
- fds/sdk/VectorData/model/__init__.py +5 -0
- fds/sdk/VectorData/model/chunk_text_response.py +268 -0
- fds/sdk/VectorData/model/chunk_text_response_meta.py +262 -0
- fds/sdk/VectorData/model/chunk_text_response_meta_pagination.py +260 -0
- fds/sdk/VectorData/model/chunk_text_result.py +284 -0
- fds/sdk/VectorData/model/document_types.py +268 -0
- fds/sdk/VectorData/model/document_types_response.py +262 -0
- fds/sdk/VectorData/model/error_object.py +268 -0
- fds/sdk/VectorData/model/error_response.py +262 -0
- fds/sdk/VectorData/model/meta.py +260 -0
- fds/sdk/VectorData/model/schemas.py +274 -0
- fds/sdk/VectorData/model/schemas_response.py +262 -0
- fds/sdk/VectorData/model/source.py +268 -0
- fds/sdk/VectorData/model/source_response.py +262 -0
- fds/sdk/VectorData/model/themes.py +274 -0
- fds/sdk/VectorData/model/themes_response.py +262 -0
- fds/sdk/VectorData/model/vector_data_request.py +274 -0
- fds/sdk/VectorData/model/vector_data_request_data.py +313 -0
- fds/sdk/VectorData/model/vector_data_response.py +268 -0
- fds/sdk/VectorData/model/vector_data_response_meta.py +256 -0
- fds/sdk/VectorData/model/vector_data_result.py +296 -0
- fds/sdk/VectorData/model_utils.py +2062 -0
- fds/sdk/VectorData/models/__init__.py +31 -0
- fds/sdk/VectorData/rest.py +347 -0
- fds/sdk/__init__.py +0 -0
- fds_sdk_vectordata-0.0.1.dist-info/METADATA +349 -0
- fds_sdk_vectordata-0.0.1.dist-info/RECORD +39 -0
- fds_sdk_vectordata-0.0.1.dist-info/WHEEL +5 -0
- fds_sdk_vectordata-0.0.1.dist-info/licenses/LICENSE +202 -0
- fds_sdk_vectordata-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Vector Data API
|
|
3
|
+
|
|
4
|
+
The Vector Data API provides streamlined access to vector data through its defined endpoints. It supports functionalities such as: Retrieving detailed vector data based on user-defined parameters. Efficiently processing associated text data for enhanced performance. This API is designed to enable developers to integrate vector data into their applications, ensuring flexibility and performance while leveraging the specified endpoint functionalities. # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
|
7
|
+
Contact: api@factset.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import re # noqa: F401
|
|
13
|
+
import sys # noqa: F401
|
|
14
|
+
|
|
15
|
+
from fds.sdk.VectorData.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 fds.sdk.VectorData.exceptions import ApiAttributeError
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ChunkTextResponseMetaPagination(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
|
+
'is_estimated_total': (bool,), # noqa: E501
|
|
86
|
+
'total': (int,), # noqa: E501
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@cached_property
|
|
90
|
+
def discriminator():
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
attribute_map = {
|
|
95
|
+
'is_estimated_total': 'isEstimatedTotal', # noqa: E501
|
|
96
|
+
'total': 'total', # noqa: E501
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
read_only_vars = {
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
_composed_schemas = {}
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
@convert_js_args_to_python_args
|
|
106
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
107
|
+
"""ChunkTextResponseMetaPagination - a model defined in OpenAPI
|
|
108
|
+
|
|
109
|
+
Keyword Args:
|
|
110
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
111
|
+
will be type checked and a TypeError will be
|
|
112
|
+
raised if the wrong type is input.
|
|
113
|
+
Defaults to True
|
|
114
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
115
|
+
drill down to the model in received_data
|
|
116
|
+
when deserializing a response
|
|
117
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
118
|
+
are serialized names, as specified in the OpenAPI document.
|
|
119
|
+
False if the variable names in the input data
|
|
120
|
+
are pythonic names, e.g. snake case (default)
|
|
121
|
+
_configuration (Configuration): the instance to use when
|
|
122
|
+
deserializing a file_type parameter.
|
|
123
|
+
If passed, type conversion is attempted
|
|
124
|
+
If omitted no type conversion is done.
|
|
125
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
126
|
+
classes that we have traveled through so that
|
|
127
|
+
if we see that class again we will not use its
|
|
128
|
+
discriminator again.
|
|
129
|
+
When traveling through a discriminator, the
|
|
130
|
+
composed schema that is
|
|
131
|
+
is traveled through is added to this set.
|
|
132
|
+
For example if Animal has a discriminator
|
|
133
|
+
petType and we pass in "Dog", and the class Dog
|
|
134
|
+
allOf includes Animal, we move through Animal
|
|
135
|
+
once using the discriminator, and pick Dog.
|
|
136
|
+
Then in Dog, we will make an instance of the
|
|
137
|
+
Animal class but this time we won't travel
|
|
138
|
+
through its discriminator because we passed in
|
|
139
|
+
_visited_composed_classes = (Animal,)
|
|
140
|
+
is_estimated_total (bool): This field acts as a flag for the exact count of results and is defaulted to false as the API should always return the exact count of results.. [optional] # noqa: E501
|
|
141
|
+
total (int): Total number of files the API returns for a particular query.. [optional] # noqa: E501
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
145
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
146
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
147
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
148
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
149
|
+
|
|
150
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
151
|
+
|
|
152
|
+
if args:
|
|
153
|
+
raise ApiTypeError(
|
|
154
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
155
|
+
args,
|
|
156
|
+
self.__class__.__name__,
|
|
157
|
+
),
|
|
158
|
+
path_to_item=_path_to_item,
|
|
159
|
+
valid_classes=(self.__class__,),
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
self._data_store = {}
|
|
163
|
+
self._check_type = _check_type
|
|
164
|
+
self._spec_property_naming = _spec_property_naming
|
|
165
|
+
self._path_to_item = _path_to_item
|
|
166
|
+
self._configuration = _configuration
|
|
167
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
168
|
+
|
|
169
|
+
for var_name, var_value in kwargs.items():
|
|
170
|
+
if var_name not in self.attribute_map and \
|
|
171
|
+
self._configuration is not None and \
|
|
172
|
+
self._configuration.discard_unknown_keys and \
|
|
173
|
+
self.additional_properties_type is None:
|
|
174
|
+
# discard variable.
|
|
175
|
+
continue
|
|
176
|
+
setattr(self, var_name, var_value)
|
|
177
|
+
return self
|
|
178
|
+
|
|
179
|
+
required_properties = set([
|
|
180
|
+
'_data_store',
|
|
181
|
+
'_check_type',
|
|
182
|
+
'_spec_property_naming',
|
|
183
|
+
'_path_to_item',
|
|
184
|
+
'_configuration',
|
|
185
|
+
'_visited_composed_classes',
|
|
186
|
+
])
|
|
187
|
+
|
|
188
|
+
@convert_js_args_to_python_args
|
|
189
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
190
|
+
"""ChunkTextResponseMetaPagination - a model defined in OpenAPI
|
|
191
|
+
|
|
192
|
+
Keyword Args:
|
|
193
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
194
|
+
will be type checked and a TypeError will be
|
|
195
|
+
raised if the wrong type is input.
|
|
196
|
+
Defaults to True
|
|
197
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
198
|
+
drill down to the model in received_data
|
|
199
|
+
when deserializing a response
|
|
200
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
201
|
+
are serialized names, as specified in the OpenAPI document.
|
|
202
|
+
False if the variable names in the input data
|
|
203
|
+
are pythonic names, e.g. snake case (default)
|
|
204
|
+
_configuration (Configuration): the instance to use when
|
|
205
|
+
deserializing a file_type parameter.
|
|
206
|
+
If passed, type conversion is attempted
|
|
207
|
+
If omitted no type conversion is done.
|
|
208
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
209
|
+
classes that we have traveled through so that
|
|
210
|
+
if we see that class again we will not use its
|
|
211
|
+
discriminator again.
|
|
212
|
+
When traveling through a discriminator, the
|
|
213
|
+
composed schema that is
|
|
214
|
+
is traveled through is added to this set.
|
|
215
|
+
For example if Animal has a discriminator
|
|
216
|
+
petType and we pass in "Dog", and the class Dog
|
|
217
|
+
allOf includes Animal, we move through Animal
|
|
218
|
+
once using the discriminator, and pick Dog.
|
|
219
|
+
Then in Dog, we will make an instance of the
|
|
220
|
+
Animal class but this time we won't travel
|
|
221
|
+
through its discriminator because we passed in
|
|
222
|
+
_visited_composed_classes = (Animal,)
|
|
223
|
+
is_estimated_total (bool): This field acts as a flag for the exact count of results and is defaulted to false as the API should always return the exact count of results.. [optional] # noqa: E501
|
|
224
|
+
total (int): Total number of files the API returns for a particular query.. [optional] # noqa: E501
|
|
225
|
+
"""
|
|
226
|
+
|
|
227
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
228
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
229
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
230
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
231
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
232
|
+
|
|
233
|
+
if args:
|
|
234
|
+
raise ApiTypeError(
|
|
235
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
236
|
+
args,
|
|
237
|
+
self.__class__.__name__,
|
|
238
|
+
),
|
|
239
|
+
path_to_item=_path_to_item,
|
|
240
|
+
valid_classes=(self.__class__,),
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
self._data_store = {}
|
|
244
|
+
self._check_type = _check_type
|
|
245
|
+
self._spec_property_naming = _spec_property_naming
|
|
246
|
+
self._path_to_item = _path_to_item
|
|
247
|
+
self._configuration = _configuration
|
|
248
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
249
|
+
|
|
250
|
+
for var_name, var_value in kwargs.items():
|
|
251
|
+
if var_name not in self.attribute_map and \
|
|
252
|
+
self._configuration is not None and \
|
|
253
|
+
self._configuration.discard_unknown_keys and \
|
|
254
|
+
self.additional_properties_type is None:
|
|
255
|
+
# discard variable.
|
|
256
|
+
continue
|
|
257
|
+
setattr(self, var_name, var_value)
|
|
258
|
+
if var_name in self.read_only_vars:
|
|
259
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
260
|
+
f"class with read only attributes.")
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Vector Data API
|
|
3
|
+
|
|
4
|
+
The Vector Data API provides streamlined access to vector data through its defined endpoints. It supports functionalities such as: Retrieving detailed vector data based on user-defined parameters. Efficiently processing associated text data for enhanced performance. This API is designed to enable developers to integrate vector data into their applications, ensuring flexibility and performance while leveraging the specified endpoint functionalities. # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
|
7
|
+
Contact: api@factset.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import re # noqa: F401
|
|
13
|
+
import sys # noqa: F401
|
|
14
|
+
|
|
15
|
+
from fds.sdk.VectorData.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 fds.sdk.VectorData.exceptions import ApiAttributeError
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ChunkTextResult(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
|
+
'content': (str,), # noqa: E501
|
|
86
|
+
'story_link': (str,), # noqa: E501
|
|
87
|
+
'story_date': (date,), # noqa: E501
|
|
88
|
+
'themes': (str,), # noqa: E501
|
|
89
|
+
'document_type': (str,), # noqa: E501
|
|
90
|
+
'source': (str,), # noqa: E501
|
|
91
|
+
'document_id': (str,), # noqa: E501
|
|
92
|
+
'ids': ([str],), # noqa: E501
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@cached_property
|
|
96
|
+
def discriminator():
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
attribute_map = {
|
|
101
|
+
'content': 'content', # noqa: E501
|
|
102
|
+
'story_link': 'storyLink', # noqa: E501
|
|
103
|
+
'story_date': 'storyDate', # noqa: E501
|
|
104
|
+
'themes': 'themes', # noqa: E501
|
|
105
|
+
'document_type': 'documentType', # noqa: E501
|
|
106
|
+
'source': 'source', # noqa: E501
|
|
107
|
+
'document_id': 'documentID', # noqa: E501
|
|
108
|
+
'ids': 'ids', # noqa: E501
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
read_only_vars = {
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
_composed_schemas = {}
|
|
115
|
+
|
|
116
|
+
@classmethod
|
|
117
|
+
@convert_js_args_to_python_args
|
|
118
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
119
|
+
"""ChunkTextResult - a model defined in OpenAPI
|
|
120
|
+
|
|
121
|
+
Keyword Args:
|
|
122
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
123
|
+
will be type checked and a TypeError will be
|
|
124
|
+
raised if the wrong type is input.
|
|
125
|
+
Defaults to True
|
|
126
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
127
|
+
drill down to the model in received_data
|
|
128
|
+
when deserializing a response
|
|
129
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
130
|
+
are serialized names, as specified in the OpenAPI document.
|
|
131
|
+
False if the variable names in the input data
|
|
132
|
+
are pythonic names, e.g. snake case (default)
|
|
133
|
+
_configuration (Configuration): the instance to use when
|
|
134
|
+
deserializing a file_type parameter.
|
|
135
|
+
If passed, type conversion is attempted
|
|
136
|
+
If omitted no type conversion is done.
|
|
137
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
138
|
+
classes that we have traveled through so that
|
|
139
|
+
if we see that class again we will not use its
|
|
140
|
+
discriminator again.
|
|
141
|
+
When traveling through a discriminator, the
|
|
142
|
+
composed schema that is
|
|
143
|
+
is traveled through is added to this set.
|
|
144
|
+
For example if Animal has a discriminator
|
|
145
|
+
petType and we pass in "Dog", and the class Dog
|
|
146
|
+
allOf includes Animal, we move through Animal
|
|
147
|
+
once using the discriminator, and pick Dog.
|
|
148
|
+
Then in Dog, we will make an instance of the
|
|
149
|
+
Animal class but this time we won't travel
|
|
150
|
+
through its discriminator because we passed in
|
|
151
|
+
_visited_composed_classes = (Animal,)
|
|
152
|
+
content (str): Unique identifier for a document.. [optional] # noqa: E501
|
|
153
|
+
story_link (str): A secure HTTPS link for downloading the associated document.. [optional] # noqa: E501
|
|
154
|
+
story_date (date): Date associated with the story.. [optional] # noqa: E501
|
|
155
|
+
themes (str): Theme of the document.. [optional] # noqa: E501
|
|
156
|
+
document_type (str): Type of the document.. [optional] # noqa: E501
|
|
157
|
+
source (str): Name of the source. [optional] # noqa: E501
|
|
158
|
+
document_id (str): Unique identifier for a document.. [optional] # noqa: E501
|
|
159
|
+
ids ([str]): List of related IDs.. [optional] # noqa: E501
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
163
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
164
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
165
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
166
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
167
|
+
|
|
168
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
169
|
+
|
|
170
|
+
if args:
|
|
171
|
+
raise ApiTypeError(
|
|
172
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
173
|
+
args,
|
|
174
|
+
self.__class__.__name__,
|
|
175
|
+
),
|
|
176
|
+
path_to_item=_path_to_item,
|
|
177
|
+
valid_classes=(self.__class__,),
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
self._data_store = {}
|
|
181
|
+
self._check_type = _check_type
|
|
182
|
+
self._spec_property_naming = _spec_property_naming
|
|
183
|
+
self._path_to_item = _path_to_item
|
|
184
|
+
self._configuration = _configuration
|
|
185
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
186
|
+
|
|
187
|
+
for var_name, var_value in kwargs.items():
|
|
188
|
+
if var_name not in self.attribute_map and \
|
|
189
|
+
self._configuration is not None and \
|
|
190
|
+
self._configuration.discard_unknown_keys and \
|
|
191
|
+
self.additional_properties_type is None:
|
|
192
|
+
# discard variable.
|
|
193
|
+
continue
|
|
194
|
+
setattr(self, var_name, var_value)
|
|
195
|
+
return self
|
|
196
|
+
|
|
197
|
+
required_properties = set([
|
|
198
|
+
'_data_store',
|
|
199
|
+
'_check_type',
|
|
200
|
+
'_spec_property_naming',
|
|
201
|
+
'_path_to_item',
|
|
202
|
+
'_configuration',
|
|
203
|
+
'_visited_composed_classes',
|
|
204
|
+
])
|
|
205
|
+
|
|
206
|
+
@convert_js_args_to_python_args
|
|
207
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
208
|
+
"""ChunkTextResult - a model defined in OpenAPI
|
|
209
|
+
|
|
210
|
+
Keyword Args:
|
|
211
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
212
|
+
will be type checked and a TypeError will be
|
|
213
|
+
raised if the wrong type is input.
|
|
214
|
+
Defaults to True
|
|
215
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
216
|
+
drill down to the model in received_data
|
|
217
|
+
when deserializing a response
|
|
218
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
219
|
+
are serialized names, as specified in the OpenAPI document.
|
|
220
|
+
False if the variable names in the input data
|
|
221
|
+
are pythonic names, e.g. snake case (default)
|
|
222
|
+
_configuration (Configuration): the instance to use when
|
|
223
|
+
deserializing a file_type parameter.
|
|
224
|
+
If passed, type conversion is attempted
|
|
225
|
+
If omitted no type conversion is done.
|
|
226
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
227
|
+
classes that we have traveled through so that
|
|
228
|
+
if we see that class again we will not use its
|
|
229
|
+
discriminator again.
|
|
230
|
+
When traveling through a discriminator, the
|
|
231
|
+
composed schema that is
|
|
232
|
+
is traveled through is added to this set.
|
|
233
|
+
For example if Animal has a discriminator
|
|
234
|
+
petType and we pass in "Dog", and the class Dog
|
|
235
|
+
allOf includes Animal, we move through Animal
|
|
236
|
+
once using the discriminator, and pick Dog.
|
|
237
|
+
Then in Dog, we will make an instance of the
|
|
238
|
+
Animal class but this time we won't travel
|
|
239
|
+
through its discriminator because we passed in
|
|
240
|
+
_visited_composed_classes = (Animal,)
|
|
241
|
+
content (str): Unique identifier for a document.. [optional] # noqa: E501
|
|
242
|
+
story_link (str): A secure HTTPS link for downloading the associated document.. [optional] # noqa: E501
|
|
243
|
+
story_date (date): Date associated with the story.. [optional] # noqa: E501
|
|
244
|
+
themes (str): Theme of the document.. [optional] # noqa: E501
|
|
245
|
+
document_type (str): Type of the document.. [optional] # noqa: E501
|
|
246
|
+
source (str): Name of the source. [optional] # noqa: E501
|
|
247
|
+
document_id (str): Unique identifier for a document.. [optional] # noqa: E501
|
|
248
|
+
ids ([str]): List of related IDs.. [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
|
+
raise ApiTypeError(
|
|
259
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
260
|
+
args,
|
|
261
|
+
self.__class__.__name__,
|
|
262
|
+
),
|
|
263
|
+
path_to_item=_path_to_item,
|
|
264
|
+
valid_classes=(self.__class__,),
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
self._data_store = {}
|
|
268
|
+
self._check_type = _check_type
|
|
269
|
+
self._spec_property_naming = _spec_property_naming
|
|
270
|
+
self._path_to_item = _path_to_item
|
|
271
|
+
self._configuration = _configuration
|
|
272
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
273
|
+
|
|
274
|
+
for var_name, var_value in kwargs.items():
|
|
275
|
+
if var_name not in self.attribute_map and \
|
|
276
|
+
self._configuration is not None and \
|
|
277
|
+
self._configuration.discard_unknown_keys and \
|
|
278
|
+
self.additional_properties_type is None:
|
|
279
|
+
# discard variable.
|
|
280
|
+
continue
|
|
281
|
+
setattr(self, var_name, var_value)
|
|
282
|
+
if var_name in self.read_only_vars:
|
|
283
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
284
|
+
f"class with read only attributes.")
|