pinecone.core.client.model.single_query_results
Pinecone API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: version not set Contact: support@pinecone.io Generated by: https://openapi-generator.tech
1""" 2 Pinecone API 3 4 No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 5 6 The version of the OpenAPI document: version not set 7 Contact: support@pinecone.io 8 Generated by: https://openapi-generator.tech 9""" 10 11 12import re # noqa: F401 13import sys # noqa: F401 14 15from pinecone.core.client.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) 29from ..model_utils import OpenApiModel 30from pinecone.core.client.exceptions import ApiAttributeError 31 32 33def lazy_import(): 34 from pinecone.core.client.model.scored_vector import ScoredVector 35 36 globals()["ScoredVector"] = ScoredVector 37 38 39class SingleQueryResults(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 validations = {} 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 ( 75 bool, 76 date, 77 datetime, 78 dict, 79 float, 80 int, 81 list, 82 str, 83 none_type, 84 ) # noqa: E501 85 86 _nullable = False 87 88 @cached_property 89 def openapi_types(): 90 """ 91 This must be a method because a model may have properties that are 92 of type self, this must run after the class is loaded 93 94 Returns 95 openapi_types (dict): The key is attribute name 96 and the value is attribute type. 97 """ 98 lazy_import() 99 return { 100 "matches": ([ScoredVector],), # noqa: E501 101 "namespace": (str,), # noqa: E501 102 } 103 104 @cached_property 105 def discriminator(): 106 return None 107 108 attribute_map = { 109 "matches": "matches", # noqa: E501 110 "namespace": "namespace", # noqa: E501 111 } 112 113 read_only_vars = {} 114 115 _composed_schemas = {} 116 117 @classmethod 118 @convert_js_args_to_python_args 119 def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 120 """SingleQueryResults - a model defined in OpenAPI 121 122 Keyword Args: 123 _check_type (bool): if True, values for parameters in openapi_types 124 will be type checked and a TypeError will be 125 raised if the wrong type is input. 126 Defaults to True 127 _path_to_item (tuple/list): This is a list of keys or values to 128 drill down to the model in received_data 129 when deserializing a response 130 _spec_property_naming (bool): True if the variable names in the input data 131 are serialized names, as specified in the OpenAPI document. 132 False if the variable names in the input data 133 are pythonic names, e.g. snake case (default) 134 _configuration (Configuration): the instance to use when 135 deserializing a file_type parameter. 136 If passed, type conversion is attempted 137 If omitted no type conversion is done. 138 _visited_composed_classes (tuple): This stores a tuple of 139 classes that we have traveled through so that 140 if we see that class again we will not use its 141 discriminator again. 142 When traveling through a discriminator, the 143 composed schema that is 144 is traveled through is added to this set. 145 For example if Animal has a discriminator 146 petType and we pass in "Dog", and the class Dog 147 allOf includes Animal, we move through Animal 148 once using the discriminator, and pick Dog. 149 Then in Dog, we will make an instance of the 150 Animal class but this time we won't travel 151 through its discriminator because we passed in 152 _visited_composed_classes = (Animal,) 153 matches ([ScoredVector]): The matches for the vectors.. [optional] # noqa: E501 154 namespace (str): The namespace for the vectors.. [optional] # noqa: E501 155 """ 156 157 _check_type = kwargs.pop("_check_type", True) 158 _spec_property_naming = kwargs.pop("_spec_property_naming", False) 159 _path_to_item = kwargs.pop("_path_to_item", ()) 160 _configuration = kwargs.pop("_configuration", None) 161 _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 162 163 self = super(OpenApiModel, cls).__new__(cls) 164 165 if args: 166 raise ApiTypeError( 167 "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 168 % ( 169 args, 170 self.__class__.__name__, 171 ), 172 path_to_item=_path_to_item, 173 valid_classes=(self.__class__,), 174 ) 175 176 self._data_store = {} 177 self._check_type = _check_type 178 self._spec_property_naming = _spec_property_naming 179 self._path_to_item = _path_to_item 180 self._configuration = _configuration 181 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 182 183 for var_name, var_value in kwargs.items(): 184 if ( 185 var_name not in self.attribute_map 186 and self._configuration is not None 187 and self._configuration.discard_unknown_keys 188 and self.additional_properties_type is None 189 ): 190 # discard variable. 191 continue 192 setattr(self, var_name, var_value) 193 return self 194 195 required_properties = set( 196 [ 197 "_data_store", 198 "_check_type", 199 "_spec_property_naming", 200 "_path_to_item", 201 "_configuration", 202 "_visited_composed_classes", 203 ] 204 ) 205 206 @convert_js_args_to_python_args 207 def __init__(self, *args, **kwargs): # noqa: E501 208 """SingleQueryResults - 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 matches ([ScoredVector]): The matches for the vectors.. [optional] # noqa: E501 242 namespace (str): The namespace for the vectors.. [optional] # noqa: E501 243 """ 244 245 _check_type = kwargs.pop("_check_type", True) 246 _spec_property_naming = kwargs.pop("_spec_property_naming", False) 247 _path_to_item = kwargs.pop("_path_to_item", ()) 248 _configuration = kwargs.pop("_configuration", None) 249 _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 250 251 if args: 252 raise ApiTypeError( 253 "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 254 % ( 255 args, 256 self.__class__.__name__, 257 ), 258 path_to_item=_path_to_item, 259 valid_classes=(self.__class__,), 260 ) 261 262 self._data_store = {} 263 self._check_type = _check_type 264 self._spec_property_naming = _spec_property_naming 265 self._path_to_item = _path_to_item 266 self._configuration = _configuration 267 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 268 269 for var_name, var_value in kwargs.items(): 270 if ( 271 var_name not in self.attribute_map 272 and self._configuration is not None 273 and self._configuration.discard_unknown_keys 274 and self.additional_properties_type is None 275 ): 276 # discard variable. 277 continue 278 setattr(self, var_name, var_value) 279 if var_name in self.read_only_vars: 280 raise ApiAttributeError( 281 f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 282 f"class with read only attributes." 283 )
40class SingleQueryResults(ModelNormal): 41 """NOTE: This class is auto generated by OpenAPI Generator. 42 Ref: https://openapi-generator.tech 43 44 Do not edit the class manually. 45 46 Attributes: 47 allowed_values (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 with a capitalized key describing the allowed value and an allowed 50 value. These dicts store the allowed enum values. 51 attribute_map (dict): The key is attribute name 52 and the value is json key in definition. 53 discriminator_value_class_map (dict): A dict to go from the discriminator 54 variable value to the discriminator class name. 55 validations (dict): The key is the tuple path to the attribute 56 and the for var_name this is (var_name,). The value is a dict 57 that stores validations for max_length, min_length, max_items, 58 min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 59 inclusive_minimum, and regex. 60 additional_properties_type (tuple): A tuple of classes accepted 61 as additional properties values. 62 """ 63 64 allowed_values = {} 65 66 validations = {} 67 68 @cached_property 69 def additional_properties_type(): 70 """ 71 This must be a method because a model may have properties that are 72 of type self, this must run after the class is loaded 73 """ 74 lazy_import() 75 return ( 76 bool, 77 date, 78 datetime, 79 dict, 80 float, 81 int, 82 list, 83 str, 84 none_type, 85 ) # noqa: E501 86 87 _nullable = False 88 89 @cached_property 90 def openapi_types(): 91 """ 92 This must be a method because a model may have properties that are 93 of type self, this must run after the class is loaded 94 95 Returns 96 openapi_types (dict): The key is attribute name 97 and the value is attribute type. 98 """ 99 lazy_import() 100 return { 101 "matches": ([ScoredVector],), # noqa: E501 102 "namespace": (str,), # noqa: E501 103 } 104 105 @cached_property 106 def discriminator(): 107 return None 108 109 attribute_map = { 110 "matches": "matches", # noqa: E501 111 "namespace": "namespace", # noqa: E501 112 } 113 114 read_only_vars = {} 115 116 _composed_schemas = {} 117 118 @classmethod 119 @convert_js_args_to_python_args 120 def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 121 """SingleQueryResults - a model defined in OpenAPI 122 123 Keyword Args: 124 _check_type (bool): if True, values for parameters in openapi_types 125 will be type checked and a TypeError will be 126 raised if the wrong type is input. 127 Defaults to True 128 _path_to_item (tuple/list): This is a list of keys or values to 129 drill down to the model in received_data 130 when deserializing a response 131 _spec_property_naming (bool): True if the variable names in the input data 132 are serialized names, as specified in the OpenAPI document. 133 False if the variable names in the input data 134 are pythonic names, e.g. snake case (default) 135 _configuration (Configuration): the instance to use when 136 deserializing a file_type parameter. 137 If passed, type conversion is attempted 138 If omitted no type conversion is done. 139 _visited_composed_classes (tuple): This stores a tuple of 140 classes that we have traveled through so that 141 if we see that class again we will not use its 142 discriminator again. 143 When traveling through a discriminator, the 144 composed schema that is 145 is traveled through is added to this set. 146 For example if Animal has a discriminator 147 petType and we pass in "Dog", and the class Dog 148 allOf includes Animal, we move through Animal 149 once using the discriminator, and pick Dog. 150 Then in Dog, we will make an instance of the 151 Animal class but this time we won't travel 152 through its discriminator because we passed in 153 _visited_composed_classes = (Animal,) 154 matches ([ScoredVector]): The matches for the vectors.. [optional] # noqa: E501 155 namespace (str): The namespace for the vectors.. [optional] # noqa: E501 156 """ 157 158 _check_type = kwargs.pop("_check_type", True) 159 _spec_property_naming = kwargs.pop("_spec_property_naming", False) 160 _path_to_item = kwargs.pop("_path_to_item", ()) 161 _configuration = kwargs.pop("_configuration", None) 162 _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 163 164 self = super(OpenApiModel, cls).__new__(cls) 165 166 if args: 167 raise ApiTypeError( 168 "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 169 % ( 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 184 for var_name, var_value in kwargs.items(): 185 if ( 186 var_name not in self.attribute_map 187 and self._configuration is not None 188 and self._configuration.discard_unknown_keys 189 and self.additional_properties_type is None 190 ): 191 # discard variable. 192 continue 193 setattr(self, var_name, var_value) 194 return self 195 196 required_properties = set( 197 [ 198 "_data_store", 199 "_check_type", 200 "_spec_property_naming", 201 "_path_to_item", 202 "_configuration", 203 "_visited_composed_classes", 204 ] 205 ) 206 207 @convert_js_args_to_python_args 208 def __init__(self, *args, **kwargs): # noqa: E501 209 """SingleQueryResults - 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 matches ([ScoredVector]): The matches for the vectors.. [optional] # noqa: E501 243 namespace (str): The namespace for the vectors.. [optional] # noqa: E501 244 """ 245 246 _check_type = kwargs.pop("_check_type", True) 247 _spec_property_naming = kwargs.pop("_spec_property_naming", False) 248 _path_to_item = kwargs.pop("_path_to_item", ()) 249 _configuration = kwargs.pop("_configuration", None) 250 _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 251 252 if args: 253 raise ApiTypeError( 254 "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 255 % ( 256 args, 257 self.__class__.__name__, 258 ), 259 path_to_item=_path_to_item, 260 valid_classes=(self.__class__,), 261 ) 262 263 self._data_store = {} 264 self._check_type = _check_type 265 self._spec_property_naming = _spec_property_naming 266 self._path_to_item = _path_to_item 267 self._configuration = _configuration 268 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 269 270 for var_name, var_value in kwargs.items(): 271 if ( 272 var_name not in self.attribute_map 273 and self._configuration is not None 274 and self._configuration.discard_unknown_keys 275 and self.additional_properties_type is None 276 ): 277 # discard variable. 278 continue 279 setattr(self, var_name, var_value) 280 if var_name in self.read_only_vars: 281 raise ApiAttributeError( 282 f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 283 f"class with read only attributes." 284 )
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
- allowed_values (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the allowed value and an allowed value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted as additional properties values.
207 @convert_js_args_to_python_args 208 def __init__(self, *args, **kwargs): # noqa: E501 209 """SingleQueryResults - 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 matches ([ScoredVector]): The matches for the vectors.. [optional] # noqa: E501 243 namespace (str): The namespace for the vectors.. [optional] # noqa: E501 244 """ 245 246 _check_type = kwargs.pop("_check_type", True) 247 _spec_property_naming = kwargs.pop("_spec_property_naming", False) 248 _path_to_item = kwargs.pop("_path_to_item", ()) 249 _configuration = kwargs.pop("_configuration", None) 250 _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 251 252 if args: 253 raise ApiTypeError( 254 "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 255 % ( 256 args, 257 self.__class__.__name__, 258 ), 259 path_to_item=_path_to_item, 260 valid_classes=(self.__class__,), 261 ) 262 263 self._data_store = {} 264 self._check_type = _check_type 265 self._spec_property_naming = _spec_property_naming 266 self._path_to_item = _path_to_item 267 self._configuration = _configuration 268 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 269 270 for var_name, var_value in kwargs.items(): 271 if ( 272 var_name not in self.attribute_map 273 and self._configuration is not None 274 and self._configuration.discard_unknown_keys 275 and self.additional_properties_type is None 276 ): 277 # discard variable. 278 continue 279 setattr(self, var_name, var_value) 280 if var_name in self.read_only_vars: 281 raise ApiAttributeError( 282 f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 283 f"class with read only attributes." 284 )
SingleQueryResults - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. Defaults to True _path_to_item (tuple/list): This is a list of keys or values to drill down to the model in received_data when deserializing a response _spec_property_naming (bool): True if the variable names in the input data are serialized names, as specified in the OpenAPI document. False if the variable names in the input data are pythonic names, e.g. snake case (default) _configuration (Configuration): the instance to use when deserializing a file_type parameter. If passed, type conversion is attempted If omitted no type conversion is done. _visited_composed_classes (tuple): This stores a tuple of classes that we have traveled through so that if we see that class again we will not use its discriminator again. When traveling through a discriminator, the composed schema that is is traveled through is added to this set. For example if Animal has a discriminator petType and we pass in "Dog", and the class Dog allOf includes Animal, we move through Animal once using the discriminator, and pick Dog. Then in Dog, we will make an instance of the Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) matches ([ScoredVector]): The matches for the vectors.. [optional] # noqa: E501 namespace (str): The namespace for the vectors.. [optional] # noqa: E501
This must be a method because a model may have properties that are of type self, this must run after the class is loaded
This must be a method because a model may have properties that are of type self, this must run after the class is loaded
Returns openapi_types (dict): The key is attribute name and the value is attribute type.