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
|
|
|
use Psr\Http\Message\StreamInterface; |
11
|
|
|
|
12
|
|
|
class JobBinary extends OperatorResource implements Listable, Retrievable, Creatable, Deletable |
13
|
|
|
{ |
14
|
|
|
public $description; |
15
|
|
|
public $url; |
16
|
|
|
public $tenantId; |
17
|
|
|
public $createdAt; |
18
|
|
|
public $updatedAt; |
19
|
|
|
public $isProtected; |
20
|
|
|
public $isPublic; |
21
|
|
|
public $id; |
22
|
|
|
public $name; |
23
|
|
|
|
24
|
|
|
protected $resourceKey = 'job_binary'; |
25
|
|
|
protected $resourcesKey = 'binaries'; |
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 retrieve() |
36
|
|
|
{ |
37
|
|
|
$response = $this->execute($this->api->getJobBinary(), $this->getAttrs(['id'])); |
|
|
|
|
38
|
|
|
$this->populateFromResponse($response); |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
public function create(array $userOptions): Creatable |
42
|
|
|
{ |
43
|
|
|
$response = $this->execute($this->api->postJobBinary(), $userOptions); |
|
|
|
|
44
|
|
|
|
45
|
|
|
return $this->populateFromResponse($response); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
public function delete() |
49
|
|
|
{ |
50
|
|
|
$this->execute($this->api->deleteJobBinary(), $this->getAttrs(['id'])); |
|
|
|
|
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
public function update() |
54
|
|
|
{ |
55
|
|
|
$response = $this->execute($this->api->putJobBinary(), $this->getAttrs(['id', 'url', 'name', 'isPublic', 'isProtected', 'description'])); |
|
|
|
|
56
|
|
|
$this->populateFromResponse($response); |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
public function downloadData(): StreamInterface |
60
|
|
|
{ |
61
|
|
|
$response = $this->executeWithState($this->api->getJobBinaryData()); |
|
|
|
|
62
|
|
|
|
63
|
|
|
return $response->getBody(); |
64
|
|
|
} |
65
|
|
|
} |
66
|
|
|
|
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.