pinecone.core.client.model.describe_index_stats_request

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

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
DescribeIndexStatsRequest(*args, **kwargs)
196    @convert_js_args_to_python_args
197    def __init__(self, *args, **kwargs):  # noqa: E501
198        """DescribeIndexStatsRequest - a model defined in OpenAPI
199
200        Keyword Args:
201            _check_type (bool): if True, values for parameters in openapi_types
202                                will be type checked and a TypeError will be
203                                raised if the wrong type is input.
204                                Defaults to True
205            _path_to_item (tuple/list): This is a list of keys or values to
206                                drill down to the model in received_data
207                                when deserializing a response
208            _spec_property_naming (bool): True if the variable names in the input data
209                                are serialized names, as specified in the OpenAPI document.
210                                False if the variable names in the input data
211                                are pythonic names, e.g. snake case (default)
212            _configuration (Configuration): the instance to use when
213                                deserializing a file_type parameter.
214                                If passed, type conversion is attempted
215                                If omitted no type conversion is done.
216            _visited_composed_classes (tuple): This stores a tuple of
217                                classes that we have traveled through so that
218                                if we see that class again we will not use its
219                                discriminator again.
220                                When traveling through a discriminator, the
221                                composed schema that is
222                                is traveled through is added to this set.
223                                For example if Animal has a discriminator
224                                petType and we pass in "Dog", and the class Dog
225                                allOf includes Animal, we move through Animal
226                                once using the discriminator, and pick Dog.
227                                Then in Dog, we will make an instance of the
228                                Animal class but this time we won't travel
229                                through its discriminator because we passed in
230                                _visited_composed_classes = (Animal,)
231            filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): If this parameter is present, the operation only returns statistics for vectors that satisfy the filter. See https://www.pinecone.io/docs/metadata-filtering/.. [optional]  # noqa: E501
232        """
233
234        _check_type = kwargs.pop("_check_type", True)
235        _spec_property_naming = kwargs.pop("_spec_property_naming", False)
236        _path_to_item = kwargs.pop("_path_to_item", ())
237        _configuration = kwargs.pop("_configuration", None)
238        _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
239
240        if args:
241            raise ApiTypeError(
242                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
243                % (
244                    args,
245                    self.__class__.__name__,
246                ),
247                path_to_item=_path_to_item,
248                valid_classes=(self.__class__,),
249            )
250
251        self._data_store = {}
252        self._check_type = _check_type
253        self._spec_property_naming = _spec_property_naming
254        self._path_to_item = _path_to_item
255        self._configuration = _configuration
256        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
257
258        for var_name, var_value in kwargs.items():
259            if (
260                var_name not in self.attribute_map
261                and self._configuration is not None
262                and self._configuration.discard_unknown_keys
263                and self.additional_properties_type is None
264            ):
265                # discard variable.
266                continue
267            setattr(self, var_name, var_value)
268            if var_name in self.read_only_vars:
269                raise ApiAttributeError(
270                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
271                    f"class with read only attributes."
272                )

DescribeIndexStatsRequest - 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,) filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): If this parameter is present, the operation only returns statistics for vectors that satisfy the filter. See https://www.pinecone.io/docs/metadata-filtering/.. [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 = {'filter': 'filter'}
read_only_vars = {}
required_properties = {'_spec_property_naming', '_data_store', '_check_type', '_visited_composed_classes', '_configuration', '_path_to_item'}