@@ -45,6 +45,143 @@ def __init__(self, api_client=None):
4545 api_client = ApiClient ()
4646 self .api_client = api_client
4747
48+ def __configure_index (
49+ self ,
50+ index_name ,
51+ ** kwargs
52+ ):
53+ """configure_index # noqa: E501
54+
55+ Configure index to change pod type and number of replicas. # noqa: E501
56+ This method makes a synchronous HTTP request by default. To make an
57+ asynchronous HTTP request, please pass async_req=True
58+
59+ >>> thread = api.configure_index(index_name, async_req=True)
60+ >>> result = thread.get()
61+
62+ Args:
63+ index_name (str): The name of the index
64+
65+ Keyword Args:
66+ patch_request (PatchRequest): The desired configuration changes for the index.. [optional]
67+ _return_http_data_only (bool): response data without head status
68+ code and headers. Default is True.
69+ _preload_content (bool): if False, the urllib3.HTTPResponse object
70+ will be returned without reading/decoding response data.
71+ Default is True.
72+ _request_timeout (int/float/tuple): timeout setting for this request. If
73+ one number provided, it will be total request timeout. It can also
74+ be a pair (tuple) of (connection, read) timeouts.
75+ Default is None.
76+ _check_input_type (bool): specifies if type checking
77+ should be done one the data sent to the server.
78+ Default is True.
79+ _check_return_type (bool): specifies if type checking
80+ should be done one the data received from the server.
81+ Default is True.
82+ _host_index (int/None): specifies the index of the server
83+ that we want to use.
84+ Default is read from the configuration.
85+ async_req (bool): execute request asynchronously
86+
87+ Returns:
88+ str
89+ If the method is called asynchronously, returns the request
90+ thread.
91+ """
92+ kwargs ['async_req' ] = kwargs .get (
93+ 'async_req' , False
94+ )
95+ kwargs ['_return_http_data_only' ] = kwargs .get (
96+ '_return_http_data_only' , True
97+ )
98+ kwargs ['_preload_content' ] = kwargs .get (
99+ '_preload_content' , True
100+ )
101+ kwargs ['_request_timeout' ] = kwargs .get (
102+ '_request_timeout' , None
103+ )
104+ kwargs ['_check_input_type' ] = kwargs .get (
105+ '_check_input_type' , True
106+ )
107+ kwargs ['_check_return_type' ] = kwargs .get (
108+ '_check_return_type' , True
109+ )
110+ kwargs ['_host_index' ] = kwargs .get ('_host_index' )
111+ kwargs ['index_name' ] = \
112+ index_name
113+ return self .call_with_http_info (** kwargs )
114+
115+ self .configure_index = _Endpoint (
116+ settings = {
117+ 'response_type' : (str ,),
118+ 'auth' : [
119+ 'ApiKeyAuth'
120+ ],
121+ 'endpoint_path' : '/databases/{indexName}' ,
122+ 'operation_id' : 'configure_index' ,
123+ 'http_method' : 'PATCH' ,
124+ 'servers' : [
125+ {
126+ 'url' : "https://controller.{environment}.pinecone.io" ,
127+ 'description' : "No description provided" ,
128+ 'variables' : {
129+ 'environment' : {
130+ 'description' : "No description provided" ,
131+ 'default_value' : "unknown" ,
132+ }
133+ }
134+ },
135+ ]
136+ },
137+ params_map = {
138+ 'all' : [
139+ 'index_name' ,
140+ 'patch_request' ,
141+ ],
142+ 'required' : [
143+ 'index_name' ,
144+ ],
145+ 'nullable' : [
146+ ],
147+ 'enum' : [
148+ ],
149+ 'validation' : [
150+ ]
151+ },
152+ root_map = {
153+ 'validations' : {
154+ },
155+ 'allowed_values' : {
156+ },
157+ 'openapi_types' : {
158+ 'index_name' :
159+ (str ,),
160+ 'patch_request' :
161+ (PatchRequest ,),
162+ },
163+ 'attribute_map' : {
164+ 'index_name' : 'indexName' ,
165+ },
166+ 'location_map' : {
167+ 'index_name' : 'path' ,
168+ 'patch_request' : 'body' ,
169+ },
170+ 'collection_format_map' : {
171+ }
172+ },
173+ headers_map = {
174+ 'accept' : [
175+ 'text/plain'
176+ ],
177+ 'content_type' : [
178+ 'application/json'
179+ ]
180+ },
181+ api_client = api_client ,
182+ callable = __configure_index
183+ )
184+
48185 def __create_collection (
49186 self ,
50187 ** kwargs
@@ -1050,140 +1187,3 @@ def __list_indexes(
10501187 api_client = api_client ,
10511188 callable = __list_indexes
10521189 )
1053-
1054- def __scale_index (
1055- self ,
1056- index_name ,
1057- ** kwargs
1058- ):
1059- """scale_index # noqa: E501
1060-
1061- This operation increases or decreases the number of replicas in an index. # noqa: E501
1062- This method makes a synchronous HTTP request by default. To make an
1063- asynchronous HTTP request, please pass async_req=True
1064-
1065- >>> thread = api.scale_index(index_name, async_req=True)
1066- >>> result = thread.get()
1067-
1068- Args:
1069- index_name (str): The name of the index
1070-
1071- Keyword Args:
1072- patch_request (PatchRequest): The number of replicas. [optional]
1073- _return_http_data_only (bool): response data without head status
1074- code and headers. Default is True.
1075- _preload_content (bool): if False, the urllib3.HTTPResponse object
1076- will be returned without reading/decoding response data.
1077- Default is True.
1078- _request_timeout (int/float/tuple): timeout setting for this request. If
1079- one number provided, it will be total request timeout. It can also
1080- be a pair (tuple) of (connection, read) timeouts.
1081- Default is None.
1082- _check_input_type (bool): specifies if type checking
1083- should be done one the data sent to the server.
1084- Default is True.
1085- _check_return_type (bool): specifies if type checking
1086- should be done one the data received from the server.
1087- Default is True.
1088- _host_index (int/None): specifies the index of the server
1089- that we want to use.
1090- Default is read from the configuration.
1091- async_req (bool): execute request asynchronously
1092-
1093- Returns:
1094- str
1095- If the method is called asynchronously, returns the request
1096- thread.
1097- """
1098- kwargs ['async_req' ] = kwargs .get (
1099- 'async_req' , False
1100- )
1101- kwargs ['_return_http_data_only' ] = kwargs .get (
1102- '_return_http_data_only' , True
1103- )
1104- kwargs ['_preload_content' ] = kwargs .get (
1105- '_preload_content' , True
1106- )
1107- kwargs ['_request_timeout' ] = kwargs .get (
1108- '_request_timeout' , None
1109- )
1110- kwargs ['_check_input_type' ] = kwargs .get (
1111- '_check_input_type' , True
1112- )
1113- kwargs ['_check_return_type' ] = kwargs .get (
1114- '_check_return_type' , True
1115- )
1116- kwargs ['_host_index' ] = kwargs .get ('_host_index' )
1117- kwargs ['index_name' ] = \
1118- index_name
1119- return self .call_with_http_info (** kwargs )
1120-
1121- self .scale_index = _Endpoint (
1122- settings = {
1123- 'response_type' : (str ,),
1124- 'auth' : [
1125- 'ApiKeyAuth'
1126- ],
1127- 'endpoint_path' : '/databases/{indexName}' ,
1128- 'operation_id' : 'scale_index' ,
1129- 'http_method' : 'PATCH' ,
1130- 'servers' : [
1131- {
1132- 'url' : "https://controller.{environment}.pinecone.io" ,
1133- 'description' : "No description provided" ,
1134- 'variables' : {
1135- 'environment' : {
1136- 'description' : "No description provided" ,
1137- 'default_value' : "unknown" ,
1138- }
1139- }
1140- },
1141- ]
1142- },
1143- params_map = {
1144- 'all' : [
1145- 'index_name' ,
1146- 'patch_request' ,
1147- ],
1148- 'required' : [
1149- 'index_name' ,
1150- ],
1151- 'nullable' : [
1152- ],
1153- 'enum' : [
1154- ],
1155- 'validation' : [
1156- ]
1157- },
1158- root_map = {
1159- 'validations' : {
1160- },
1161- 'allowed_values' : {
1162- },
1163- 'openapi_types' : {
1164- 'index_name' :
1165- (str ,),
1166- 'patch_request' :
1167- (PatchRequest ,),
1168- },
1169- 'attribute_map' : {
1170- 'index_name' : 'indexName' ,
1171- },
1172- 'location_map' : {
1173- 'index_name' : 'path' ,
1174- 'patch_request' : 'body' ,
1175- },
1176- 'collection_format_map' : {
1177- }
1178- },
1179- headers_map = {
1180- 'accept' : [
1181- 'text/plain'
1182- ],
1183- 'content_type' : [
1184- 'application/json'
1185- ]
1186- },
1187- api_client = api_client ,
1188- callable = __scale_index
1189- )
0 commit comments