1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace OpenStack\DataProcessing\v1\Models; |
4
|
|
|
|
5
|
|
|
use OpenStack\Common\Resource\Creatable; |
6
|
|
|
use OpenStack\Common\Resource\Deletable; |
7
|
|
|
use OpenStack\Common\Resource\Listable; |
8
|
|
|
use OpenStack\Common\Resource\OperatorResource; |
9
|
|
|
use OpenStack\Common\Resource\Retrievable; |
10
|
|
|
|
11
|
|
|
class DataSource extends OperatorResource implements Listable, Retrievable, Creatable, Deletable |
12
|
|
|
{ |
13
|
|
|
public $description; |
14
|
|
|
public $url; |
15
|
|
|
public $tenantId; |
16
|
|
|
public $createdAt; |
17
|
|
|
public $updatedAt; |
18
|
|
|
public $isProtected; |
19
|
|
|
public $isPublic; |
20
|
|
|
public $type; |
21
|
|
|
public $id; |
22
|
|
|
public $name; |
23
|
|
|
|
24
|
|
|
protected $resourceKey = 'data_source'; |
25
|
|
|
protected $resourcesKey = 'data_sources'; |
26
|
|
|
|
27
|
|
|
protected $aliases = [ |
28
|
|
|
'tenant_id' => 'tenantId', |
29
|
|
|
'created_at' => 'createdAt', |
30
|
|
|
'updated_at' => 'updatedAt', |
31
|
|
|
'is_protected' => 'isProtected', |
32
|
|
|
'is_public' => 'isPublic', |
33
|
|
|
]; |
34
|
|
|
|
35
|
|
|
public function create(array $userOptions): Creatable |
36
|
|
|
{ |
37
|
|
|
$response = $this->execute($this->api->postDataSource(), $userOptions); |
|
|
|
|
38
|
|
|
|
39
|
|
|
return $this->populateFromResponse($response); |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
public function retrieve() |
43
|
|
|
{ |
44
|
|
|
$response = $this->execute($this->api->getDataSource(), $this->getAttrs(['id'])); |
|
|
|
|
45
|
|
|
$this->populateFromResponse($response); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
public function delete() |
49
|
|
|
{ |
50
|
|
|
$this->execute($this->api->deleteDataSource(), $this->getAttrs(['id'])); |
|
|
|
|
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
public function update() |
54
|
|
|
{ |
55
|
|
|
$response = $this->execute($this->api->putDataSource(), $this->getAttrs(['id', 'description', 'name', 'isPublic', 'isProtected', 'url', 'type'])); |
|
|
|
|
56
|
|
|
$this->populateFromResponse($response); |
57
|
|
|
} |
58
|
|
|
} |
59
|
|
|
|
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.