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