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\Namespaces\AbstractNamespace;
19:
20: /**
21: * Class FlowFrameworkNamespace
22: *
23: * NOTE: This file is autogenerated using util/GenerateEndpoints.php
24: */
25: class FlowFrameworkNamespace extends AbstractNamespace
26: {
27: /**
28: * Create a workflow.
29: *
30: * $params['provision'] = (boolean) (Default = false)
31: * $params['reprovision'] = (boolean) (Default = false)
32: * $params['update_fields'] = (boolean) (Default = false)
33: * $params['use_case'] = (string) To use a workflow template, specify it in the use_case query parameter when creating a workflow.
34: * $params['validation'] = (string) (Default = all)
35: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
36: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
37: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
38: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
40: *
41: * @param array $params Associative array of parameters
42: * @return array
43: */
44: public function create(array $params = [])
45: {
46: $body = $this->extractArgument($params, 'body');
47:
48: $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\FlowFramework\Create::class);
49: $endpoint->setParams($params);
50: $endpoint->setBody($body);
51:
52: return $this->performRequest($endpoint);
53: }
54:
55: /**
56: * Delete a workflow.
57: *
58: * $params['workflow_id'] = (string)
59: * $params['clear_status'] = (boolean) (Default = false)
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 = true)
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) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
65: *
66: * @param array $params Associative array of parameters
67: * @return array
68: */
69: public function delete(array $params = [])
70: {
71: $workflow_id = $this->extractArgument($params, 'workflow_id');
72:
73: $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\FlowFramework\Delete::class);
74: $endpoint->setParams($params);
75: $endpoint->setWorkflowId($workflow_id);
76:
77: return $this->performRequest($endpoint);
78: }
79:
80: /**
81: * Deprovision workflow's resources when you no longer need it.
82: *
83: * $params['workflow_id'] = (string)
84: * $params['allow_delete'] = (string)
85: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
86: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
87: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
88: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
89: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
90: *
91: * @param array $params Associative array of parameters
92: * @return array
93: */
94: public function deprovision(array $params = [])
95: {
96: $workflow_id = $this->extractArgument($params, 'workflow_id');
97:
98: $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\FlowFramework\Deprovision::class);
99: $endpoint->setParams($params);
100: $endpoint->setWorkflowId($workflow_id);
101:
102: return $this->performRequest($endpoint);
103: }
104:
105: /**
106: * Get a workflow.
107: *
108: * $params['workflow_id'] = (string)
109: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
110: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
111: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
112: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
113: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
114: *
115: * @param array $params Associative array of parameters
116: * @return array
117: */
118: public function get(array $params = [])
119: {
120: $workflow_id = $this->extractArgument($params, 'workflow_id');
121:
122: $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\FlowFramework\Get::class);
123: $endpoint->setParams($params);
124: $endpoint->setWorkflowId($workflow_id);
125:
126: return $this->performRequest($endpoint);
127: }
128:
129: /**
130: * Get the provisioning deployment status until it is complete.
131: *
132: * $params['workflow_id'] = (string)
133: * $params['all'] = (boolean) The all parameter specifies whether the response should return all fields. (Default = false)
134: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
135: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
136: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
137: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
138: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
139: *
140: * @param array $params Associative array of parameters
141: * @return array
142: */
143: public function getStatus(array $params = [])
144: {
145: $workflow_id = $this->extractArgument($params, 'workflow_id');
146:
147: $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\FlowFramework\GetStatus::class);
148: $endpoint->setParams($params);
149: $endpoint->setWorkflowId($workflow_id);
150:
151: return $this->performRequest($endpoint);
152: }
153:
154: /**
155: * Get a list of workflow steps.
156: *
157: * $params['workflow_step'] = (string)
158: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
159: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
160: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
161: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
162: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
163: *
164: * @param array $params Associative array of parameters
165: * @return array
166: */
167: public function getSteps(array $params = [])
168: {
169: $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\FlowFramework\GetSteps::class);
170: $endpoint->setParams($params);
171:
172: return $this->performRequest($endpoint);
173: }
174:
175: /**
176: * Provisioning a workflow. This API is also executed when the Create or Update Workflow API is called with the provision parameter set to true.
177: *
178: * $params['workflow_id'] = (string)
179: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
180: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
181: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
182: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
183: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
184: *
185: * @param array $params Associative array of parameters
186: * @return array
187: */
188: public function provision(array $params = [])
189: {
190: $workflow_id = $this->extractArgument($params, 'workflow_id');
191: $body = $this->extractArgument($params, 'body');
192:
193: $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\FlowFramework\Provision::class);
194: $endpoint->setParams($params);
195: $endpoint->setWorkflowId($workflow_id);
196: $endpoint->setBody($body);
197:
198: return $this->performRequest($endpoint);
199: }
200:
201: /**
202: * Search for workflows by using a query matching a field.
203: *
204: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
205: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
206: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
207: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
208: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
209: *
210: * @param array $params Associative array of parameters
211: * @return array
212: */
213: public function search(array $params = [])
214: {
215: $body = $this->extractArgument($params, 'body');
216:
217: $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\FlowFramework\Search::class);
218: $endpoint->setParams($params);
219: $endpoint->setBody($body);
220:
221: return $this->performRequest($endpoint);
222: }
223:
224: /**
225: * Search for workflows by using a query matching a field.
226: *
227: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
228: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
229: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
230: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
231: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
232: *
233: * @param array $params Associative array of parameters
234: * @return array
235: */
236: public function searchState(array $params = [])
237: {
238: $body = $this->extractArgument($params, 'body');
239:
240: $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\FlowFramework\SearchState::class);
241: $endpoint->setParams($params);
242: $endpoint->setBody($body);
243:
244: return $this->performRequest($endpoint);
245: }
246:
247: /**
248: * Update a workflow. You can only update a complete workflow if it has not yet been provisioned.
249: *
250: * $params['workflow_id'] = (string)
251: * $params['provision'] = (boolean) (Default = false)
252: * $params['reprovision'] = (boolean) (Default = false)
253: * $params['update_fields'] = (boolean) (Default = false)
254: * $params['use_case'] = (string) To use a workflow template, specify it in the use_case query parameter when creating a workflow.
255: * $params['validation'] = (string) (Default = all)
256: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
257: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
258: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
259: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
260: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
261: *
262: * @param array $params Associative array of parameters
263: * @return array
264: */
265: public function update(array $params = [])
266: {
267: $workflow_id = $this->extractArgument($params, 'workflow_id');
268: $body = $this->extractArgument($params, 'body');
269:
270: $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\FlowFramework\Update::class);
271: $endpoint->setParams($params);
272: $endpoint->setWorkflowId($workflow_id);
273: $endpoint->setBody($body);
274:
275: return $this->performRequest($endpoint);
276: }
277:
278: }
279: