1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * SPDX-License-Identifier: Apache-2.0
7: *
8: * The OpenSearch Contributors require contributions made to
9: * this file be licensed under the Apache-2.0 license or a
10: * compatible open source license.
11: *
12: * Modifications Copyright OpenSearch Contributors. See
13: * GitHub history for details.
14: */
15:
16: namespace OpenSearch\Namespaces;
17:
18: use OpenSearch\Endpoints\Ltr\AddFeaturesToSet;
19: use OpenSearch\Endpoints\Ltr\AddFeaturesToSetByQuery;
20: use OpenSearch\Endpoints\Ltr\CacheStats;
21: use OpenSearch\Endpoints\Ltr\ClearCache;
22: use OpenSearch\Endpoints\Ltr\CreateDefaultStore;
23: use OpenSearch\Endpoints\Ltr\CreateFeature;
24: use OpenSearch\Endpoints\Ltr\CreateFeatureset;
25: use OpenSearch\Endpoints\Ltr\CreateModel;
26: use OpenSearch\Endpoints\Ltr\CreateModelFromSet;
27: use OpenSearch\Endpoints\Ltr\CreateStore;
28: use OpenSearch\Endpoints\Ltr\DeleteDefaultStore;
29: use OpenSearch\Endpoints\Ltr\DeleteFeature;
30: use OpenSearch\Endpoints\Ltr\DeleteFeatureset;
31: use OpenSearch\Endpoints\Ltr\DeleteModel;
32: use OpenSearch\Endpoints\Ltr\DeleteStore;
33: use OpenSearch\Endpoints\Ltr\GetFeature;
34: use OpenSearch\Endpoints\Ltr\GetFeatureset;
35: use OpenSearch\Endpoints\Ltr\GetModel;
36: use OpenSearch\Endpoints\Ltr\GetStore;
37: use OpenSearch\Endpoints\Ltr\ListStores;
38: use OpenSearch\Endpoints\Ltr\SearchFeatures;
39: use OpenSearch\Endpoints\Ltr\SearchFeaturesets;
40: use OpenSearch\Endpoints\Ltr\SearchModels;
41: use OpenSearch\Endpoints\Ltr\Stats;
42: use OpenSearch\Endpoints\Ltr\UpdateFeature;
43: use OpenSearch\Endpoints\Ltr\UpdateFeatureset;
44:
45: /**
46: * Class LtrNamespace
47: *
48: * NOTE: This file is autogenerated using util/GenerateEndpoints.php
49: */
50: class LtrNamespace extends AbstractNamespace
51: {
52: /**
53: * Add features to an existing feature set in the default feature store.
54: *
55: * $params['name'] = (string) The name of the feature set to add features to. (Required)
56: * $params['store'] = (string) The name of the feature store.
57: * $params['merge'] = (boolean) Whether to merge the feature list or append only. (Default = false)
58: * $params['routing'] = (string) Specific routing value.
59: * $params['version'] = (integer) Version check to ensure feature set is modified with expected version.
60: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
61: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
62: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
63: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
64: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
65: *
66: * @param array $params Associative array of parameters
67: * @return array
68: */
69: public function addFeaturesToSet(array $params = [])
70: {
71: $name = $this->extractArgument($params, 'name');
72: $store = $this->extractArgument($params, 'store');
73: $body = $this->extractArgument($params, 'body');
74:
75: $endpoint = $this->endpointFactory->getEndpoint(AddFeaturesToSet::class);
76: $endpoint->setParams($params);
77: $endpoint->setName($name);
78: $endpoint->setStore($store);
79: $endpoint->setBody($body);
80:
81: return $this->performRequest($endpoint);
82: }
83:
84: /**
85: * Add features to an existing feature set in the default feature store.
86: *
87: * $params['name'] = (string) The name of the feature set to add features to. (Required)
88: * $params['query'] = (string) Query string to filter existing features from the store by name. When provided, only features matching this query will be added to the feature set, and no request body should be included. (Required)
89: * $params['store'] = (string) The name of the feature store.
90: * $params['merge'] = (boolean) Whether to merge the feature list or append only. (Default = false)
91: * $params['routing'] = (string) Specific routing value.
92: * $params['version'] = (integer) Version check to ensure feature set is modified with expected version.
93: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
94: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
95: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
96: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
97: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
98: *
99: * @param array $params Associative array of parameters
100: * @return array
101: */
102: public function addFeaturesToSetByQuery(array $params = [])
103: {
104: $name = $this->extractArgument($params, 'name');
105: $query = $this->extractArgument($params, 'query');
106: $store = $this->extractArgument($params, 'store');
107:
108: $endpoint = $this->endpointFactory->getEndpoint(AddFeaturesToSetByQuery::class);
109: $endpoint->setParams($params);
110: $endpoint->setName($name);
111: $endpoint->setQuery($query);
112: $endpoint->setStore($store);
113:
114: return $this->performRequest($endpoint);
115: }
116:
117: /**
118: * Retrieves cache statistics for all feature stores.
119: *
120: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
121: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
122: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
123: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
124: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
125: *
126: * @param array $params Associative array of parameters
127: * @return array
128: */
129: public function cacheStats(array $params = [])
130: {
131: $endpoint = $this->endpointFactory->getEndpoint(CacheStats::class);
132: $endpoint->setParams($params);
133:
134: return $this->performRequest($endpoint);
135: }
136:
137: /**
138: * Clears the store caches.
139: *
140: * $params['store'] = (string) The name of the feature store for which to clear the cache.
141: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
142: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
143: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
144: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
145: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
146: *
147: * @param array $params Associative array of parameters
148: * @return array
149: */
150: public function clearCache(array $params = [])
151: {
152: $store = $this->extractArgument($params, 'store');
153:
154: $endpoint = $this->endpointFactory->getEndpoint(ClearCache::class);
155: $endpoint->setParams($params);
156: $endpoint->setStore($store);
157:
158: return $this->performRequest($endpoint);
159: }
160:
161: /**
162: * Creates the default feature store.
163: *
164: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
165: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
166: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
167: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
168: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
169: *
170: * @param array $params Associative array of parameters
171: * @return array
172: */
173: public function createDefaultStore(array $params = [])
174: {
175: $endpoint = $this->endpointFactory->getEndpoint(CreateDefaultStore::class);
176: $endpoint->setParams($params);
177:
178: return $this->performRequest($endpoint);
179: }
180:
181: /**
182: * Create or update a feature in the default feature store.
183: *
184: * $params['id'] = (string) The name of the feature. (Required)
185: * $params['store'] = (string) The name of the feature store.
186: * $params['routing'] = (string) Specific routing value.
187: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
188: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
189: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
190: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
191: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
192: *
193: * @param array $params Associative array of parameters
194: * @return array
195: */
196: public function createFeature(array $params = [])
197: {
198: $id = $this->extractArgument($params, 'id');
199: $store = $this->extractArgument($params, 'store');
200: $body = $this->extractArgument($params, 'body');
201:
202: $endpoint = $this->endpointFactory->getEndpoint(CreateFeature::class);
203: $endpoint->setParams($params);
204: $endpoint->setId($id);
205: $endpoint->setStore($store);
206: $endpoint->setBody($body);
207:
208: return $this->performRequest($endpoint);
209: }
210:
211: /**
212: * Create or update a feature set in the default feature store.
213: *
214: * $params['id'] = (string) The name of the feature set. (Required)
215: * $params['store'] = (string) The name of the feature store.
216: * $params['routing'] = (string) Specific routing value.
217: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
218: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
219: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
220: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
221: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
222: *
223: * @param array $params Associative array of parameters
224: * @return array
225: */
226: public function createFeatureset(array $params = [])
227: {
228: $id = $this->extractArgument($params, 'id');
229: $store = $this->extractArgument($params, 'store');
230: $body = $this->extractArgument($params, 'body');
231:
232: $endpoint = $this->endpointFactory->getEndpoint(CreateFeatureset::class);
233: $endpoint->setParams($params);
234: $endpoint->setId($id);
235: $endpoint->setStore($store);
236: $endpoint->setBody($body);
237:
238: return $this->performRequest($endpoint);
239: }
240:
241: /**
242: * Create or update a model in the default feature store.
243: *
244: * $params['id'] = (string) The name of the model. (Required)
245: * $params['store'] = (string) The name of the feature store.
246: * $params['routing'] = (string) Specific routing value.
247: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
248: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
249: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
250: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
251: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
252: *
253: * @param array $params Associative array of parameters
254: * @return array
255: */
256: public function createModel(array $params = [])
257: {
258: $id = $this->extractArgument($params, 'id');
259: $store = $this->extractArgument($params, 'store');
260: $body = $this->extractArgument($params, 'body');
261:
262: $endpoint = $this->endpointFactory->getEndpoint(CreateModel::class);
263: $endpoint->setParams($params);
264: $endpoint->setId($id);
265: $endpoint->setStore($store);
266: $endpoint->setBody($body);
267:
268: return $this->performRequest($endpoint);
269: }
270:
271: /**
272: * Create a model from an existing feature set in the default feature store.
273: *
274: * $params['name'] = (string) The name of the feature set to use for creating the model. (Required)
275: * $params['store'] = (string) The name of the feature store.
276: * $params['routing'] = (string) Specific routing value.
277: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
278: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
279: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
280: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
281: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
282: *
283: * @param array $params Associative array of parameters
284: * @return array
285: */
286: public function createModelFromSet(array $params = [])
287: {
288: $name = $this->extractArgument($params, 'name');
289: $store = $this->extractArgument($params, 'store');
290: $body = $this->extractArgument($params, 'body');
291:
292: $endpoint = $this->endpointFactory->getEndpoint(CreateModelFromSet::class);
293: $endpoint->setParams($params);
294: $endpoint->setName($name);
295: $endpoint->setStore($store);
296: $endpoint->setBody($body);
297:
298: return $this->performRequest($endpoint);
299: }
300:
301: /**
302: * Creates a new feature store with the specified name.
303: *
304: * $params['store'] = (string) The name of the feature store.
305: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
306: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
307: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
308: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
309: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
310: *
311: * @param array $params Associative array of parameters
312: * @return array
313: */
314: public function createStore(array $params = [])
315: {
316: $store = $this->extractArgument($params, 'store');
317:
318: $endpoint = $this->endpointFactory->getEndpoint(CreateStore::class);
319: $endpoint->setParams($params);
320: $endpoint->setStore($store);
321:
322: return $this->performRequest($endpoint);
323: }
324:
325: /**
326: * Deletes the default feature store.
327: *
328: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
329: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
330: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
331: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
332: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
333: *
334: * @param array $params Associative array of parameters
335: * @return array
336: */
337: public function deleteDefaultStore(array $params = [])
338: {
339: $endpoint = $this->endpointFactory->getEndpoint(DeleteDefaultStore::class);
340: $endpoint->setParams($params);
341:
342: return $this->performRequest($endpoint);
343: }
344:
345: /**
346: * Delete a feature from the default feature store.
347: *
348: * $params['id'] = (string) The name of the feature. (Required)
349: * $params['store'] = (string) The name of the feature store.
350: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
351: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
352: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
353: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
354: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
355: *
356: * @param array $params Associative array of parameters
357: * @return array
358: */
359: public function deleteFeature(array $params = [])
360: {
361: $id = $this->extractArgument($params, 'id');
362: $store = $this->extractArgument($params, 'store');
363:
364: $endpoint = $this->endpointFactory->getEndpoint(DeleteFeature::class);
365: $endpoint->setParams($params);
366: $endpoint->setId($id);
367: $endpoint->setStore($store);
368:
369: return $this->performRequest($endpoint);
370: }
371:
372: /**
373: * Delete a feature set from the default feature store.
374: *
375: * $params['id'] = (string) The name of the feature set. (Required)
376: * $params['store'] = (string) The name of the feature store.
377: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
378: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
379: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
380: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
381: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
382: *
383: * @param array $params Associative array of parameters
384: * @return array
385: */
386: public function deleteFeatureset(array $params = [])
387: {
388: $id = $this->extractArgument($params, 'id');
389: $store = $this->extractArgument($params, 'store');
390:
391: $endpoint = $this->endpointFactory->getEndpoint(DeleteFeatureset::class);
392: $endpoint->setParams($params);
393: $endpoint->setId($id);
394: $endpoint->setStore($store);
395:
396: return $this->performRequest($endpoint);
397: }
398:
399: /**
400: * Delete a model from the default feature store.
401: *
402: * $params['id'] = (string) The name of the model. (Required)
403: * $params['store'] = (string) The name of the feature store.
404: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
405: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
406: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
407: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
408: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
409: *
410: * @param array $params Associative array of parameters
411: * @return array
412: */
413: public function deleteModel(array $params = [])
414: {
415: $id = $this->extractArgument($params, 'id');
416: $store = $this->extractArgument($params, 'store');
417:
418: $endpoint = $this->endpointFactory->getEndpoint(DeleteModel::class);
419: $endpoint->setParams($params);
420: $endpoint->setId($id);
421: $endpoint->setStore($store);
422:
423: return $this->performRequest($endpoint);
424: }
425:
426: /**
427: * Deletes a feature store with the specified name.
428: *
429: * $params['store'] = (string) The name of the feature store.
430: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
431: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
432: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
433: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
434: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
435: *
436: * @param array $params Associative array of parameters
437: * @return array
438: */
439: public function deleteStore(array $params = [])
440: {
441: $store = $this->extractArgument($params, 'store');
442:
443: $endpoint = $this->endpointFactory->getEndpoint(DeleteStore::class);
444: $endpoint->setParams($params);
445: $endpoint->setStore($store);
446:
447: return $this->performRequest($endpoint);
448: }
449:
450: /**
451: * Get a feature from the default feature store.
452: *
453: * $params['id'] = (string) The name of the feature. (Required)
454: * $params['store'] = (string) The name of the feature store.
455: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
456: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
457: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
458: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
459: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
460: *
461: * @param array $params Associative array of parameters
462: * @return array
463: */
464: public function getFeature(array $params = [])
465: {
466: $id = $this->extractArgument($params, 'id');
467: $store = $this->extractArgument($params, 'store');
468:
469: $endpoint = $this->endpointFactory->getEndpoint(GetFeature::class);
470: $endpoint->setParams($params);
471: $endpoint->setId($id);
472: $endpoint->setStore($store);
473:
474: return $this->performRequest($endpoint);
475: }
476:
477: /**
478: * Get a feature set from the default feature store.
479: *
480: * $params['id'] = (string) The name of the feature set. (Required)
481: * $params['store'] = (string) The name of the feature store.
482: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
483: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
484: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
485: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
486: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
487: *
488: * @param array $params Associative array of parameters
489: * @return array
490: */
491: public function getFeatureset(array $params = [])
492: {
493: $id = $this->extractArgument($params, 'id');
494: $store = $this->extractArgument($params, 'store');
495:
496: $endpoint = $this->endpointFactory->getEndpoint(GetFeatureset::class);
497: $endpoint->setParams($params);
498: $endpoint->setId($id);
499: $endpoint->setStore($store);
500:
501: return $this->performRequest($endpoint);
502: }
503:
504: /**
505: * Get a model from the default feature store.
506: *
507: * $params['id'] = (string) The name of the model. (Required)
508: * $params['store'] = (string) The name of the feature store.
509: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
510: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
511: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
512: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
513: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
514: *
515: * @param array $params Associative array of parameters
516: * @return array
517: */
518: public function getModel(array $params = [])
519: {
520: $id = $this->extractArgument($params, 'id');
521: $store = $this->extractArgument($params, 'store');
522:
523: $endpoint = $this->endpointFactory->getEndpoint(GetModel::class);
524: $endpoint->setParams($params);
525: $endpoint->setId($id);
526: $endpoint->setStore($store);
527:
528: return $this->performRequest($endpoint);
529: }
530:
531: /**
532: * Checks if a store exists.
533: *
534: * $params['store'] = (string) The name of the feature store.
535: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
536: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
537: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
538: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
539: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
540: *
541: * @param array $params Associative array of parameters
542: * @return array
543: */
544: public function getStore(array $params = [])
545: {
546: $store = $this->extractArgument($params, 'store');
547:
548: $endpoint = $this->endpointFactory->getEndpoint(GetStore::class);
549: $endpoint->setParams($params);
550: $endpoint->setStore($store);
551:
552: return $this->performRequest($endpoint);
553: }
554:
555: /**
556: * Lists all available feature stores.
557: *
558: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
559: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
560: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
561: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
562: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
563: *
564: * @param array $params Associative array of parameters
565: * @return array
566: */
567: public function listStores(array $params = [])
568: {
569: $endpoint = $this->endpointFactory->getEndpoint(ListStores::class);
570: $endpoint->setParams($params);
571:
572: return $this->performRequest($endpoint);
573: }
574:
575: /**
576: * Search for features in a feature store.
577: *
578: * $params['store'] = (string) The name of the feature store.
579: * $params['from'] = (integer) The offset from the first result (for pagination). (Default = 0)
580: * $params['prefix'] = (string) A name prefix to filter features by.
581: * $params['size'] = (integer) The number of features to return. (Default = 20)
582: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
583: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
584: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
585: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
586: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
587: *
588: * @param array $params Associative array of parameters
589: * @return array
590: */
591: public function searchFeatures(array $params = [])
592: {
593: $store = $this->extractArgument($params, 'store');
594:
595: $endpoint = $this->endpointFactory->getEndpoint(SearchFeatures::class);
596: $endpoint->setParams($params);
597: $endpoint->setStore($store);
598:
599: return $this->performRequest($endpoint);
600: }
601:
602: /**
603: * Search for feature sets in a feature store.
604: *
605: * $params['store'] = (string) The name of the feature store.
606: * $params['from'] = (integer) The offset from the first result (for pagination). (Default = 0)
607: * $params['prefix'] = (string) A name prefix to filter feature sets by.
608: * $params['size'] = (integer) The number of feature sets to return. (Default = 20)
609: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
610: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
611: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
612: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
613: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
614: *
615: * @param array $params Associative array of parameters
616: * @return array
617: */
618: public function searchFeaturesets(array $params = [])
619: {
620: $store = $this->extractArgument($params, 'store');
621:
622: $endpoint = $this->endpointFactory->getEndpoint(SearchFeaturesets::class);
623: $endpoint->setParams($params);
624: $endpoint->setStore($store);
625:
626: return $this->performRequest($endpoint);
627: }
628:
629: /**
630: * Search for models in a feature store.
631: *
632: * $params['store'] = (string) The name of the feature store.
633: * $params['from'] = (integer) The offset from the first result (for pagination). (Default = 0)
634: * $params['prefix'] = (string) A name prefix to filter models by.
635: * $params['size'] = (integer) The number of models to return. (Default = 20)
636: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
637: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
638: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
639: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
640: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
641: *
642: * @param array $params Associative array of parameters
643: * @return array
644: */
645: public function searchModels(array $params = [])
646: {
647: $store = $this->extractArgument($params, 'store');
648:
649: $endpoint = $this->endpointFactory->getEndpoint(SearchModels::class);
650: $endpoint->setParams($params);
651: $endpoint->setStore($store);
652:
653: return $this->performRequest($endpoint);
654: }
655:
656: /**
657: * Provides information about the current status of the LTR plugin.
658: *
659: * $params['node_id'] = (array) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.
660: * $params['stat'] = (array) A comma-separated list of stats to retrieve; use `_all` or empty string to retrieve all stats.
661: * $params['timeout'] = (string) The time in milliseconds to wait for a response.
662: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
663: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
664: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
665: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
666: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
667: *
668: * @param array $params Associative array of parameters
669: * @return array
670: */
671: public function stats(array $params = [])
672: {
673: $node_id = $this->extractArgument($params, 'node_id');
674: $stat = $this->extractArgument($params, 'stat');
675:
676: $endpoint = $this->endpointFactory->getEndpoint(Stats::class);
677: $endpoint->setParams($params);
678: $endpoint->setNodeId($node_id);
679: $endpoint->setStat($stat);
680:
681: return $this->performRequest($endpoint);
682: }
683:
684: /**
685: * Update a feature in the default feature store.
686: *
687: * $params['id'] = (string) The name of the feature. (Required)
688: * $params['store'] = (string) The name of the feature store.
689: * $params['routing'] = (string) Specific routing value.
690: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
691: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
692: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
693: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
694: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
695: *
696: * @param array $params Associative array of parameters
697: * @return array
698: */
699: public function updateFeature(array $params = [])
700: {
701: $id = $this->extractArgument($params, 'id');
702: $store = $this->extractArgument($params, 'store');
703: $body = $this->extractArgument($params, 'body');
704:
705: $endpoint = $this->endpointFactory->getEndpoint(UpdateFeature::class);
706: $endpoint->setParams($params);
707: $endpoint->setId($id);
708: $endpoint->setStore($store);
709: $endpoint->setBody($body);
710:
711: return $this->performRequest($endpoint);
712: }
713:
714: /**
715: * Update a feature set in the default feature store.
716: *
717: * $params['id'] = (string) The name of the feature set. (Required)
718: * $params['store'] = (string) The name of the feature store.
719: * $params['routing'] = (string) Specific routing value.
720: * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false)
721: * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false)
722: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
723: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
724: * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.
725: *
726: * @param array $params Associative array of parameters
727: * @return array
728: */
729: public function updateFeatureset(array $params = [])
730: {
731: $id = $this->extractArgument($params, 'id');
732: $store = $this->extractArgument($params, 'store');
733: $body = $this->extractArgument($params, 'body');
734:
735: $endpoint = $this->endpointFactory->getEndpoint(UpdateFeatureset::class);
736: $endpoint->setParams($params);
737: $endpoint->setId($id);
738: $endpoint->setStore($store);
739: $endpoint->setBody($body);
740:
741: return $this->performRequest($endpoint);
742: }
743:
744: }
745: