pinecone.core.client.model.rpc_status

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

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

RpcStatus - 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,) code (int): [optional] # noqa: E501 message (str): [optional] # noqa: E501 details ([ProtobufAny]): [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 = {'code': 'code', 'message': 'message', 'details': 'details'}
read_only_vars = {}
required_properties = {'_spec_property_naming', '_data_store', '_check_type', '_visited_composed_classes', '_configuration', '_path_to_item'}