26
26
none_type ,
27
27
validate_and_convert_types
28
28
)
29
+ from pinecone .core .client .model .delete_request import DeleteRequest
29
30
from pinecone .core .client .model .describe_index_stats_response import DescribeIndexStatsResponse
30
31
from pinecone .core .client .model .fetch_response import FetchResponse
31
32
from pinecone .core .client .model .query_request import QueryRequest
@@ -50,6 +51,7 @@ def __init__(self, api_client=None):
50
51
51
52
def __delete (
52
53
self ,
54
+ delete_request ,
53
55
** kwargs
54
56
):
55
57
"""Delete # noqa: E501
@@ -58,7 +60,126 @@ def __delete(
58
60
This method makes a synchronous HTTP request by default. To make an
59
61
asynchronous HTTP request, please pass async_req=True
60
62
61
- >>> thread = api.delete(async_req=True)
63
+ >>> thread = api.delete(delete_request, async_req=True)
64
+ >>> result = thread.get()
65
+
66
+ Args:
67
+ delete_request (DeleteRequest):
68
+
69
+ Keyword Args:
70
+ _return_http_data_only (bool): response data without head status
71
+ code and headers. Default is True.
72
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
73
+ will be returned without reading/decoding response data.
74
+ Default is True.
75
+ _request_timeout (int/float/tuple): timeout setting for this request. If
76
+ one number provided, it will be total request timeout. It can also
77
+ be a pair (tuple) of (connection, read) timeouts.
78
+ Default is None.
79
+ _check_input_type (bool): specifies if type checking
80
+ should be done one the data sent to the server.
81
+ Default is True.
82
+ _check_return_type (bool): specifies if type checking
83
+ should be done one the data received from the server.
84
+ Default is True.
85
+ _host_index (int/None): specifies the index of the server
86
+ that we want to use.
87
+ Default is read from the configuration.
88
+ async_req (bool): execute request asynchronously
89
+
90
+ Returns:
91
+ {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
92
+ If the method is called asynchronously, returns the request
93
+ thread.
94
+ """
95
+ kwargs ['async_req' ] = kwargs .get (
96
+ 'async_req' , False
97
+ )
98
+ kwargs ['_return_http_data_only' ] = kwargs .get (
99
+ '_return_http_data_only' , True
100
+ )
101
+ kwargs ['_preload_content' ] = kwargs .get (
102
+ '_preload_content' , True
103
+ )
104
+ kwargs ['_request_timeout' ] = kwargs .get (
105
+ '_request_timeout' , None
106
+ )
107
+ kwargs ['_check_input_type' ] = kwargs .get (
108
+ '_check_input_type' , True
109
+ )
110
+ kwargs ['_check_return_type' ] = kwargs .get (
111
+ '_check_return_type' , True
112
+ )
113
+ kwargs ['_host_index' ] = kwargs .get ('_host_index' )
114
+ kwargs ['delete_request' ] = \
115
+ delete_request
116
+ return self .call_with_http_info (** kwargs )
117
+
118
+ self .delete = _Endpoint (
119
+ settings = {
120
+ 'response_type' : ({str : (bool , date , datetime , dict , float , int , list , str , none_type )},),
121
+ 'auth' : [
122
+ 'ApiKeyAuth'
123
+ ],
124
+ 'endpoint_path' : '/vectors/delete' ,
125
+ 'operation_id' : 'delete' ,
126
+ 'http_method' : 'POST' ,
127
+ 'servers' : None ,
128
+ },
129
+ params_map = {
130
+ 'all' : [
131
+ 'delete_request' ,
132
+ ],
133
+ 'required' : [
134
+ 'delete_request' ,
135
+ ],
136
+ 'nullable' : [
137
+ ],
138
+ 'enum' : [
139
+ ],
140
+ 'validation' : [
141
+ ]
142
+ },
143
+ root_map = {
144
+ 'validations' : {
145
+ },
146
+ 'allowed_values' : {
147
+ },
148
+ 'openapi_types' : {
149
+ 'delete_request' :
150
+ (DeleteRequest ,),
151
+ },
152
+ 'attribute_map' : {
153
+ },
154
+ 'location_map' : {
155
+ 'delete_request' : 'body' ,
156
+ },
157
+ 'collection_format_map' : {
158
+ }
159
+ },
160
+ headers_map = {
161
+ 'accept' : [
162
+ 'application/json'
163
+ ],
164
+ 'content_type' : [
165
+ 'application/json'
166
+ ]
167
+ },
168
+ api_client = api_client ,
169
+ callable = __delete
170
+ )
171
+
172
+ def __delete1 (
173
+ self ,
174
+ ** kwargs
175
+ ):
176
+ """Delete # noqa: E501
177
+
178
+ The `Delete` operation deletes vectors, by id, from a single namespace. You can delete items by their id, from a single namespace. # noqa: E501
179
+ This method makes a synchronous HTTP request by default. To make an
180
+ asynchronous HTTP request, please pass async_req=True
181
+
182
+ >>> thread = api.delete1(async_req=True)
62
183
>>> result = thread.get()
63
184
64
185
@@ -112,14 +233,14 @@ def __delete(
112
233
kwargs ['_host_index' ] = kwargs .get ('_host_index' )
113
234
return self .call_with_http_info (** kwargs )
114
235
115
- self .delete = _Endpoint (
236
+ self .delete1 = _Endpoint (
116
237
settings = {
117
238
'response_type' : ({str : (bool , date , datetime , dict , float , int , list , str , none_type )},),
118
239
'auth' : [
119
240
'ApiKeyAuth'
120
241
],
121
242
'endpoint_path' : '/vectors/delete' ,
122
- 'operation_id' : 'delete ' ,
243
+ 'operation_id' : 'delete1 ' ,
123
244
'http_method' : 'DELETE' ,
124
245
'servers' : None ,
125
246
},
@@ -171,7 +292,7 @@ def __delete(
171
292
'content_type' : [],
172
293
},
173
294
api_client = api_client ,
174
- callable = __delete
295
+ callable = __delete1
175
296
)
176
297
177
298
def __describe_index_stats (
0 commit comments