You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Problem
Deletion protection was not implemented.
## Solution
We updated the OpenAPI code to include deletion protection. This changed
the parameters for several structs and functions, so all this code was
updated to reflect the changes.
## Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Infrastructure change (CI configs, etc)
- [ ] Non-code change (docs, etc)
- [ ] None of the above: (explain here)
## Test Plan
Test cases should still pass.
---------
Co-authored-by: Emily Yu <emily.y@pinecone.io>
Copy file name to clipboardExpand all lines: src/openapi/apis/manage_indexes_api.rs
+37-37
Original file line number
Diff line number
Diff line change
@@ -19,103 +19,103 @@ use super::{Error, configuration};
19
19
#[derive(Debug,Clone,Serialize,Deserialize)]
20
20
#[serde(untagged)]
21
21
pubenumConfigureIndexError{
22
-
Status400(models::ListIndexes401Response),
23
-
Status401(models::ListIndexes401Response),
24
-
Status403(models::ListIndexes401Response),
25
-
Status404(models::ListIndexes401Response),
26
-
Status422(models::ListIndexes401Response),
27
-
Status500(models::ListIndexes401Response),
22
+
Status400(models::ErrorResponse),
23
+
Status401(models::ErrorResponse),
24
+
Status403(models::ErrorResponse),
25
+
Status404(models::ErrorResponse),
26
+
Status422(models::ErrorResponse),
27
+
Status500(models::ErrorResponse),
28
28
UnknownValue(serde_json::Value),
29
29
}
30
30
31
31
/// struct for typed errors of method [`create_collection`]
32
32
#[derive(Debug,Clone,Serialize,Deserialize)]
33
33
#[serde(untagged)]
34
34
pubenumCreateCollectionError{
35
-
Status400(models::ListIndexes401Response),
36
-
Status401(models::ListIndexes401Response),
37
-
Status403(models::ListIndexes401Response),
38
-
Status409(models::ListIndexes401Response),
39
-
Status422(models::ListIndexes401Response),
40
-
Status500(models::ListIndexes401Response),
35
+
Status400(models::ErrorResponse),
36
+
Status401(models::ErrorResponse),
37
+
Status403(models::ErrorResponse),
38
+
Status409(models::ErrorResponse),
39
+
Status422(models::ErrorResponse),
40
+
Status500(models::ErrorResponse),
41
41
UnknownValue(serde_json::Value),
42
42
}
43
43
44
44
/// struct for typed errors of method [`create_index`]
45
45
#[derive(Debug,Clone,Serialize,Deserialize)]
46
46
#[serde(untagged)]
47
47
pubenumCreateIndexError{
48
-
Status400(models::ListIndexes401Response),
49
-
Status401(models::ListIndexes401Response),
50
-
Status403(models::ListIndexes401Response),
51
-
Status404(models::ListIndexes401Response),
52
-
Status422(models::ListIndexes401Response),
53
-
Status409(models::ListIndexes401Response),
54
-
Status500(models::ListIndexes401Response),
48
+
Status400(models::ErrorResponse),
49
+
Status401(models::ErrorResponse),
50
+
Status403(models::ErrorResponse),
51
+
Status404(models::ErrorResponse),
52
+
Status422(models::ErrorResponse),
53
+
Status409(models::ErrorResponse),
54
+
Status500(models::ErrorResponse),
55
55
UnknownValue(serde_json::Value),
56
56
}
57
57
58
58
/// struct for typed errors of method [`delete_collection`]
59
59
#[derive(Debug,Clone,Serialize,Deserialize)]
60
60
#[serde(untagged)]
61
61
pubenumDeleteCollectionError{
62
-
Status401(models::ListIndexes401Response),
63
-
Status404(models::ListIndexes401Response),
64
-
Status500(models::ListIndexes401Response),
62
+
Status401(models::ErrorResponse),
63
+
Status404(models::ErrorResponse),
64
+
Status500(models::ErrorResponse),
65
65
UnknownValue(serde_json::Value),
66
66
}
67
67
68
68
/// struct for typed errors of method [`delete_index`]
69
69
#[derive(Debug,Clone,Serialize,Deserialize)]
70
70
#[serde(untagged)]
71
71
pubenumDeleteIndexError{
72
-
Status401(models::ListIndexes401Response),
73
-
Status404(models::ListIndexes401Response),
74
-
Status412(models::ListIndexes401Response),
75
-
Status500(models::ListIndexes401Response),
72
+
Status401(models::ErrorResponse),
73
+
Status404(models::ErrorResponse),
74
+
Status412(models::ErrorResponse),
75
+
Status500(models::ErrorResponse),
76
76
UnknownValue(serde_json::Value),
77
77
}
78
78
79
79
/// struct for typed errors of method [`describe_collection`]
80
80
#[derive(Debug,Clone,Serialize,Deserialize)]
81
81
#[serde(untagged)]
82
82
pubenumDescribeCollectionError{
83
-
Status401(models::ListIndexes401Response),
84
-
Status404(models::ListIndexes401Response),
85
-
Status500(models::ListIndexes401Response),
83
+
Status401(models::ErrorResponse),
84
+
Status404(models::ErrorResponse),
85
+
Status500(models::ErrorResponse),
86
86
UnknownValue(serde_json::Value),
87
87
}
88
88
89
89
/// struct for typed errors of method [`describe_index`]
90
90
#[derive(Debug,Clone,Serialize,Deserialize)]
91
91
#[serde(untagged)]
92
92
pubenumDescribeIndexError{
93
-
Status401(models::ListIndexes401Response),
94
-
Status404(models::ListIndexes401Response),
95
-
Status500(models::ListIndexes401Response),
93
+
Status401(models::ErrorResponse),
94
+
Status404(models::ErrorResponse),
95
+
Status500(models::ErrorResponse),
96
96
UnknownValue(serde_json::Value),
97
97
}
98
98
99
99
/// struct for typed errors of method [`list_collections`]
100
100
#[derive(Debug,Clone,Serialize,Deserialize)]
101
101
#[serde(untagged)]
102
102
pubenumListCollectionsError{
103
-
Status401(models::ListIndexes401Response),
104
-
Status500(models::ListIndexes401Response),
103
+
Status401(models::ErrorResponse),
104
+
Status500(models::ErrorResponse),
105
105
UnknownValue(serde_json::Value),
106
106
}
107
107
108
108
/// struct for typed errors of method [`list_indexes`]
109
109
#[derive(Debug,Clone,Serialize,Deserialize)]
110
110
#[serde(untagged)]
111
111
pubenumListIndexesError{
112
-
Status401(models::ListIndexes401Response),
113
-
Status500(models::ListIndexes401Response),
112
+
Status401(models::ErrorResponse),
113
+
Status500(models::ErrorResponse),
114
114
UnknownValue(serde_json::Value),
115
115
}
116
116
117
117
118
-
/// This operation specifies the pod type and number of replicas for an index. It applies to pod-based indexes only. Serverless indexes scale automatically based on usage.
118
+
/// This operation configures an existing index. For serverless indexes, you can configure only index deletion protection. For pod-based indexes, you can configure the pod size, number of replicas, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/create-an-index#create-an-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/configure-an-index).
* Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors.
5
+
*
6
+
* The version of the OpenAPI document: 2024-07
7
+
* Contact: support@pinecone.io
8
+
* Generated by: https://openapi-generator.tech
9
+
*/
10
+
11
+
usecrate::openapi::models;
12
+
use serde::{Deserialize,Serialize};
13
+
14
+
/// DeletionProtection : Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index.
15
+
/// Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index.
0 commit comments