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

IndexMeta - 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,) database (IndexMetaDatabase): [optional] # noqa: E501

allowed_values = {}
validations = {}
def additional_properties_type(unknown):

This must be a method because a model may have properties that are of type self, this must run after the class is loaded

def openapi_types(unknown):

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.

def discriminator(unknown):
attribute_map = {'database': 'database'}
read_only_vars = {}
required_properties = {'_spec_property_naming', '_data_store', '_check_type', '_visited_composed_classes', '_configuration', '_path_to_item'}