1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * Copyright OpenSearch Contributors
7: * SPDX-License-Identifier: Apache-2.0
8: *
9: * The OpenSearch Contributors require contributions made to
10: * this file be licensed under the Apache-2.0 license or a
11: * compatible open source license.
12: */
13:
14: namespace OpenSearch\Endpoints\Ml;
15:
16: use OpenSearch\Endpoints\AbstractEndpoint;
17:
18: /**
19: * NOTE: This file is autogenerated using util/GenerateEndpoints.php
20: */
21: class CreateConnector extends AbstractEndpoint
22: {
23: public function getURI(): string
24: {
25: return "/_plugins/_ml/connectors/_create";
26: }
27:
28: public function getParamWhitelist(): array
29: {
30: return [
31: 'pretty',
32: 'human',
33: 'error_trace',
34: 'source',
35: 'filter_path'
36: ];
37: }
38:
39: public function getMethod(): string
40: {
41: return 'POST';
42: }
43:
44: public function setBody($body): static
45: {
46: if (isset($body) !== true) {
47: return $this;
48: }
49: $this->body = $body;
50:
51: return $this;
52: }
53: }
54: