pinecone.core.client.model.index_meta_database
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.index_meta_database_status import IndexMetaDatabaseStatus 35 36 globals()["IndexMetaDatabaseStatus"] = IndexMetaDatabaseStatus 37 38 39class IndexMetaDatabase(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 "name": (str,), # noqa: E501 101 "dimensions": (str,), # noqa: E501 102 "index_type": (str,), # noqa: E501 103 "metric": (str,), # noqa: E501 104 "pods": (int,), # noqa: E501 105 "replicas": (int,), # noqa: E501 106 "shards": (int,), # noqa: E501 107 "pod_type": (str,), # noqa: E501 108 "index_config": (dict,), # noqa: E501 109 "metadata_config": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 110 "status": (IndexMetaDatabaseStatus,), # noqa: E501 111 } 112 113 @cached_property 114 def discriminator(): 115 return None 116 117 attribute_map = { 118 "name": "name", # noqa: E501 119 "dimensions": "dimensions", # noqa: E501 120 "index_type": "index_type", # noqa: E501 121 "metric": "metric", # noqa: E501 122 "pods": "pods", # noqa: E501 123 "replicas": "replicas", # noqa: E501 124 "shards": "shards", # noqa: E501 125 "pod_type": "pod_type", # noqa: E501 126 "index_config": "index_config", # noqa: E501 127 "metadata_config": "metadata_config", # noqa: E501 128 "status": "status", # noqa: E501 129 } 130 131 read_only_vars = {} 132 133 _composed_schemas = {} 134 135 @classmethod 136 @convert_js_args_to_python_args 137 def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 138 """IndexMetaDatabase - a model defined in OpenAPI 139 140 Keyword Args: 141 _check_type (bool): if True, values for parameters in openapi_types 142 will be type checked and a TypeError will be 143 raised if the wrong type is input. 144 Defaults to True 145 _path_to_item (tuple/list): This is a list of keys or values to 146 drill down to the model in received_data 147 when deserializing a response 148 _spec_property_naming (bool): True if the variable names in the input data 149 are serialized names, as specified in the OpenAPI document. 150 False if the variable names in the input data 151 are pythonic names, e.g. snake case (default) 152 _configuration (Configuration): the instance to use when 153 deserializing a file_type parameter. 154 If passed, type conversion is attempted 155 If omitted no type conversion is done. 156 _visited_composed_classes (tuple): This stores a tuple of 157 classes that we have traveled through so that 158 if we see that class again we will not use its 159 discriminator again. 160 When traveling through a discriminator, the 161 composed schema that is 162 is traveled through is added to this set. 163 For example if Animal has a discriminator 164 petType and we pass in "Dog", and the class Dog 165 allOf includes Animal, we move through Animal 166 once using the discriminator, and pick Dog. 167 Then in Dog, we will make an instance of the 168 Animal class but this time we won't travel 169 through its discriminator because we passed in 170 _visited_composed_classes = (Animal,) 171 name (str): [optional] # noqa: E501 172 dimensions (str): [optional] # noqa: E501 173 index_type (str): [optional] # noqa: E501 174 metric (str): [optional] # noqa: E501 175 pods (int): [optional] # noqa: E501 176 replicas (int): [optional] # noqa: E501 177 shards (int): [optional] # noqa: E501 178 pod_type (str): [optional] # noqa: E501 179 index_config (dict): [optional] # noqa: E501 180 metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 181 status (IndexMetaDatabaseStatus): [optional] # noqa: E501 182 """ 183 184 _check_type = kwargs.pop("_check_type", True) 185 _spec_property_naming = kwargs.pop("_spec_property_naming", False) 186 _path_to_item = kwargs.pop("_path_to_item", ()) 187 _configuration = kwargs.pop("_configuration", None) 188 _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 189 190 self = super(OpenApiModel, cls).__new__(cls) 191 192 if args: 193 raise ApiTypeError( 194 "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 195 % ( 196 args, 197 self.__class__.__name__, 198 ), 199 path_to_item=_path_to_item, 200 valid_classes=(self.__class__,), 201 ) 202 203 self._data_store = {} 204 self._check_type = _check_type 205 self._spec_property_naming = _spec_property_naming 206 self._path_to_item = _path_to_item 207 self._configuration = _configuration 208 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 209 210 for var_name, var_value in kwargs.items(): 211 if ( 212 var_name not in self.attribute_map 213 and self._configuration is not None 214 and self._configuration.discard_unknown_keys 215 and self.additional_properties_type is None 216 ): 217 # discard variable. 218 continue 219 setattr(self, var_name, var_value) 220 return self 221 222 required_properties = set( 223 [ 224 "_data_store", 225 "_check_type", 226 "_spec_property_naming", 227 "_path_to_item", 228 "_configuration", 229 "_visited_composed_classes", 230 ] 231 ) 232 233 @convert_js_args_to_python_args 234 def __init__(self, *args, **kwargs): # noqa: E501 235 """IndexMetaDatabase - a model defined in OpenAPI 236 237 Keyword Args: 238 _check_type (bool): if True, values for parameters in openapi_types 239 will be type checked and a TypeError will be 240 raised if the wrong type is input. 241 Defaults to True 242 _path_to_item (tuple/list): This is a list of keys or values to 243 drill down to the model in received_data 244 when deserializing a response 245 _spec_property_naming (bool): True if the variable names in the input data 246 are serialized names, as specified in the OpenAPI document. 247 False if the variable names in the input data 248 are pythonic names, e.g. snake case (default) 249 _configuration (Configuration): the instance to use when 250 deserializing a file_type parameter. 251 If passed, type conversion is attempted 252 If omitted no type conversion is done. 253 _visited_composed_classes (tuple): This stores a tuple of 254 classes that we have traveled through so that 255 if we see that class again we will not use its 256 discriminator again. 257 When traveling through a discriminator, the 258 composed schema that is 259 is traveled through is added to this set. 260 For example if Animal has a discriminator 261 petType and we pass in "Dog", and the class Dog 262 allOf includes Animal, we move through Animal 263 once using the discriminator, and pick Dog. 264 Then in Dog, we will make an instance of the 265 Animal class but this time we won't travel 266 through its discriminator because we passed in 267 _visited_composed_classes = (Animal,) 268 name (str): [optional] # noqa: E501 269 dimensions (str): [optional] # noqa: E501 270 index_type (str): [optional] # noqa: E501 271 metric (str): [optional] # noqa: E501 272 pods (int): [optional] # noqa: E501 273 replicas (int): [optional] # noqa: E501 274 shards (int): [optional] # noqa: E501 275 pod_type (str): [optional] # noqa: E501 276 index_config (dict): [optional] # noqa: E501 277 metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 278 status (IndexMetaDatabaseStatus): [optional] # noqa: E501 279 """ 280 281 _check_type = kwargs.pop("_check_type", True) 282 _spec_property_naming = kwargs.pop("_spec_property_naming", False) 283 _path_to_item = kwargs.pop("_path_to_item", ()) 284 _configuration = kwargs.pop("_configuration", None) 285 _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 286 287 if args: 288 raise ApiTypeError( 289 "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 290 % ( 291 args, 292 self.__class__.__name__, 293 ), 294 path_to_item=_path_to_item, 295 valid_classes=(self.__class__,), 296 ) 297 298 self._data_store = {} 299 self._check_type = _check_type 300 self._spec_property_naming = _spec_property_naming 301 self._path_to_item = _path_to_item 302 self._configuration = _configuration 303 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 304 305 for var_name, var_value in kwargs.items(): 306 if ( 307 var_name not in self.attribute_map 308 and self._configuration is not None 309 and self._configuration.discard_unknown_keys 310 and self.additional_properties_type is None 311 ): 312 # discard variable. 313 continue 314 setattr(self, var_name, var_value) 315 if var_name in self.read_only_vars: 316 raise ApiAttributeError( 317 f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 318 f"class with read only attributes." 319 )
40class IndexMetaDatabase(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 "name": (str,), # noqa: E501 102 "dimensions": (str,), # noqa: E501 103 "index_type": (str,), # noqa: E501 104 "metric": (str,), # noqa: E501 105 "pods": (int,), # noqa: E501 106 "replicas": (int,), # noqa: E501 107 "shards": (int,), # noqa: E501 108 "pod_type": (str,), # noqa: E501 109 "index_config": (dict,), # noqa: E501 110 "metadata_config": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 111 "status": (IndexMetaDatabaseStatus,), # noqa: E501 112 } 113 114 @cached_property 115 def discriminator(): 116 return None 117 118 attribute_map = { 119 "name": "name", # noqa: E501 120 "dimensions": "dimensions", # noqa: E501 121 "index_type": "index_type", # noqa: E501 122 "metric": "metric", # noqa: E501 123 "pods": "pods", # noqa: E501 124 "replicas": "replicas", # noqa: E501 125 "shards": "shards", # noqa: E501 126 "pod_type": "pod_type", # noqa: E501 127 "index_config": "index_config", # noqa: E501 128 "metadata_config": "metadata_config", # noqa: E501 129 "status": "status", # noqa: E501 130 } 131 132 read_only_vars = {} 133 134 _composed_schemas = {} 135 136 @classmethod 137 @convert_js_args_to_python_args 138 def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 139 """IndexMetaDatabase - a model defined in OpenAPI 140 141 Keyword Args: 142 _check_type (bool): if True, values for parameters in openapi_types 143 will be type checked and a TypeError will be 144 raised if the wrong type is input. 145 Defaults to True 146 _path_to_item (tuple/list): This is a list of keys or values to 147 drill down to the model in received_data 148 when deserializing a response 149 _spec_property_naming (bool): True if the variable names in the input data 150 are serialized names, as specified in the OpenAPI document. 151 False if the variable names in the input data 152 are pythonic names, e.g. snake case (default) 153 _configuration (Configuration): the instance to use when 154 deserializing a file_type parameter. 155 If passed, type conversion is attempted 156 If omitted no type conversion is done. 157 _visited_composed_classes (tuple): This stores a tuple of 158 classes that we have traveled through so that 159 if we see that class again we will not use its 160 discriminator again. 161 When traveling through a discriminator, the 162 composed schema that is 163 is traveled through is added to this set. 164 For example if Animal has a discriminator 165 petType and we pass in "Dog", and the class Dog 166 allOf includes Animal, we move through Animal 167 once using the discriminator, and pick Dog. 168 Then in Dog, we will make an instance of the 169 Animal class but this time we won't travel 170 through its discriminator because we passed in 171 _visited_composed_classes = (Animal,) 172 name (str): [optional] # noqa: E501 173 dimensions (str): [optional] # noqa: E501 174 index_type (str): [optional] # noqa: E501 175 metric (str): [optional] # noqa: E501 176 pods (int): [optional] # noqa: E501 177 replicas (int): [optional] # noqa: E501 178 shards (int): [optional] # noqa: E501 179 pod_type (str): [optional] # noqa: E501 180 index_config (dict): [optional] # noqa: E501 181 metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 182 status (IndexMetaDatabaseStatus): [optional] # noqa: E501 183 """ 184 185 _check_type = kwargs.pop("_check_type", True) 186 _spec_property_naming = kwargs.pop("_spec_property_naming", False) 187 _path_to_item = kwargs.pop("_path_to_item", ()) 188 _configuration = kwargs.pop("_configuration", None) 189 _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 190 191 self = super(OpenApiModel, cls).__new__(cls) 192 193 if args: 194 raise ApiTypeError( 195 "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 196 % ( 197 args, 198 self.__class__.__name__, 199 ), 200 path_to_item=_path_to_item, 201 valid_classes=(self.__class__,), 202 ) 203 204 self._data_store = {} 205 self._check_type = _check_type 206 self._spec_property_naming = _spec_property_naming 207 self._path_to_item = _path_to_item 208 self._configuration = _configuration 209 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 210 211 for var_name, var_value in kwargs.items(): 212 if ( 213 var_name not in self.attribute_map 214 and self._configuration is not None 215 and self._configuration.discard_unknown_keys 216 and self.additional_properties_type is None 217 ): 218 # discard variable. 219 continue 220 setattr(self, var_name, var_value) 221 return self 222 223 required_properties = set( 224 [ 225 "_data_store", 226 "_check_type", 227 "_spec_property_naming", 228 "_path_to_item", 229 "_configuration", 230 "_visited_composed_classes", 231 ] 232 ) 233 234 @convert_js_args_to_python_args 235 def __init__(self, *args, **kwargs): # noqa: E501 236 """IndexMetaDatabase - a model defined in OpenAPI 237 238 Keyword Args: 239 _check_type (bool): if True, values for parameters in openapi_types 240 will be type checked and a TypeError will be 241 raised if the wrong type is input. 242 Defaults to True 243 _path_to_item (tuple/list): This is a list of keys or values to 244 drill down to the model in received_data 245 when deserializing a response 246 _spec_property_naming (bool): True if the variable names in the input data 247 are serialized names, as specified in the OpenAPI document. 248 False if the variable names in the input data 249 are pythonic names, e.g. snake case (default) 250 _configuration (Configuration): the instance to use when 251 deserializing a file_type parameter. 252 If passed, type conversion is attempted 253 If omitted no type conversion is done. 254 _visited_composed_classes (tuple): This stores a tuple of 255 classes that we have traveled through so that 256 if we see that class again we will not use its 257 discriminator again. 258 When traveling through a discriminator, the 259 composed schema that is 260 is traveled through is added to this set. 261 For example if Animal has a discriminator 262 petType and we pass in "Dog", and the class Dog 263 allOf includes Animal, we move through Animal 264 once using the discriminator, and pick Dog. 265 Then in Dog, we will make an instance of the 266 Animal class but this time we won't travel 267 through its discriminator because we passed in 268 _visited_composed_classes = (Animal,) 269 name (str): [optional] # noqa: E501 270 dimensions (str): [optional] # noqa: E501 271 index_type (str): [optional] # noqa: E501 272 metric (str): [optional] # noqa: E501 273 pods (int): [optional] # noqa: E501 274 replicas (int): [optional] # noqa: E501 275 shards (int): [optional] # noqa: E501 276 pod_type (str): [optional] # noqa: E501 277 index_config (dict): [optional] # noqa: E501 278 metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 279 status (IndexMetaDatabaseStatus): [optional] # noqa: E501 280 """ 281 282 _check_type = kwargs.pop("_check_type", True) 283 _spec_property_naming = kwargs.pop("_spec_property_naming", False) 284 _path_to_item = kwargs.pop("_path_to_item", ()) 285 _configuration = kwargs.pop("_configuration", None) 286 _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 287 288 if args: 289 raise ApiTypeError( 290 "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 291 % ( 292 args, 293 self.__class__.__name__, 294 ), 295 path_to_item=_path_to_item, 296 valid_classes=(self.__class__,), 297 ) 298 299 self._data_store = {} 300 self._check_type = _check_type 301 self._spec_property_naming = _spec_property_naming 302 self._path_to_item = _path_to_item 303 self._configuration = _configuration 304 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 305 306 for var_name, var_value in kwargs.items(): 307 if ( 308 var_name not in self.attribute_map 309 and self._configuration is not None 310 and self._configuration.discard_unknown_keys 311 and self.additional_properties_type is None 312 ): 313 # discard variable. 314 continue 315 setattr(self, var_name, var_value) 316 if var_name in self.read_only_vars: 317 raise ApiAttributeError( 318 f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 319 f"class with read only attributes." 320 )
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.
234 @convert_js_args_to_python_args 235 def __init__(self, *args, **kwargs): # noqa: E501 236 """IndexMetaDatabase - a model defined in OpenAPI 237 238 Keyword Args: 239 _check_type (bool): if True, values for parameters in openapi_types 240 will be type checked and a TypeError will be 241 raised if the wrong type is input. 242 Defaults to True 243 _path_to_item (tuple/list): This is a list of keys or values to 244 drill down to the model in received_data 245 when deserializing a response 246 _spec_property_naming (bool): True if the variable names in the input data 247 are serialized names, as specified in the OpenAPI document. 248 False if the variable names in the input data 249 are pythonic names, e.g. snake case (default) 250 _configuration (Configuration): the instance to use when 251 deserializing a file_type parameter. 252 If passed, type conversion is attempted 253 If omitted no type conversion is done. 254 _visited_composed_classes (tuple): This stores a tuple of 255 classes that we have traveled through so that 256 if we see that class again we will not use its 257 discriminator again. 258 When traveling through a discriminator, the 259 composed schema that is 260 is traveled through is added to this set. 261 For example if Animal has a discriminator 262 petType and we pass in "Dog", and the class Dog 263 allOf includes Animal, we move through Animal 264 once using the discriminator, and pick Dog. 265 Then in Dog, we will make an instance of the 266 Animal class but this time we won't travel 267 through its discriminator because we passed in 268 _visited_composed_classes = (Animal,) 269 name (str): [optional] # noqa: E501 270 dimensions (str): [optional] # noqa: E501 271 index_type (str): [optional] # noqa: E501 272 metric (str): [optional] # noqa: E501 273 pods (int): [optional] # noqa: E501 274 replicas (int): [optional] # noqa: E501 275 shards (int): [optional] # noqa: E501 276 pod_type (str): [optional] # noqa: E501 277 index_config (dict): [optional] # noqa: E501 278 metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 279 status (IndexMetaDatabaseStatus): [optional] # noqa: E501 280 """ 281 282 _check_type = kwargs.pop("_check_type", True) 283 _spec_property_naming = kwargs.pop("_spec_property_naming", False) 284 _path_to_item = kwargs.pop("_path_to_item", ()) 285 _configuration = kwargs.pop("_configuration", None) 286 _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) 287 288 if args: 289 raise ApiTypeError( 290 "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." 291 % ( 292 args, 293 self.__class__.__name__, 294 ), 295 path_to_item=_path_to_item, 296 valid_classes=(self.__class__,), 297 ) 298 299 self._data_store = {} 300 self._check_type = _check_type 301 self._spec_property_naming = _spec_property_naming 302 self._path_to_item = _path_to_item 303 self._configuration = _configuration 304 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 305 306 for var_name, var_value in kwargs.items(): 307 if ( 308 var_name not in self.attribute_map 309 and self._configuration is not None 310 and self._configuration.discard_unknown_keys 311 and self.additional_properties_type is None 312 ): 313 # discard variable. 314 continue 315 setattr(self, var_name, var_value) 316 if var_name in self.read_only_vars: 317 raise ApiAttributeError( 318 f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 319 f"class with read only attributes." 320 )
IndexMetaDatabase - 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 dimensions (str): [optional] # noqa: E501 index_type (str): [optional] # noqa: E501 metric (str): [optional] # noqa: E501 pods (int): [optional] # noqa: E501 replicas (int): [optional] # noqa: E501 shards (int): [optional] # noqa: E501 pod_type (str): [optional] # noqa: E501 index_config (dict): [optional] # noqa: E501 metadata_config ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 status (IndexMetaDatabaseStatus): [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.