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