1 | <?php |
||
15 | class Service extends AbstractResource implements Creatable, Listable, Retrievable, Updateable, Deletable |
||
16 | { |
||
17 | /** @var string */ |
||
18 | public $id; |
||
19 | |||
20 | /** @var string */ |
||
21 | public $name; |
||
22 | |||
23 | /** @var string */ |
||
24 | public $type; |
||
25 | |||
26 | /** @var string */ |
||
27 | public $description; |
||
28 | |||
29 | /** @var []Endpoint */ |
||
30 | public $endpoints; |
||
31 | |||
32 | /** @var array */ |
||
33 | public $links; |
||
34 | |||
35 | protected $resourceKey = 'service'; |
||
36 | protected $resourcesKey = 'services'; |
||
37 | |||
38 | /** |
||
39 | * {@inheritDoc} |
||
40 | * |
||
41 | * @param array $data {@see \OpenStack\Identity\v3\Api::postServices} |
||
42 | */ |
||
43 | 1 | public function create(array $data) |
|
48 | |||
49 | /** |
||
50 | * {@inheritDoc} |
||
51 | */ |
||
52 | 1 | public function retrieve() |
|
57 | |||
58 | /** |
||
59 | * {@inheritDoc} |
||
60 | */ |
||
61 | 1 | public function update() |
|
66 | |||
67 | /** |
||
68 | * {@inheritDoc} |
||
69 | */ |
||
70 | 1 | public function delete() |
|
74 | |||
75 | 4 | private function nameMatches($value) |
|
79 | |||
80 | 2 | private function typeMatches($value) |
|
84 | |||
85 | /** |
||
86 | * Retrieve the base URL for a service. |
||
87 | * |
||
88 | * @param string $name The name of the service as it appears in the catalog. |
||
89 | * @param string $type The type of the service as it appears in the catalog. |
||
90 | * @param string $region The region of the service as it appears in the catalog. |
||
91 | * @param string $interface The interface of the service as it appears in the catalog. |
||
92 | * |
||
93 | * @return string|false |
||
94 | */ |
||
95 | 4 | public function getUrl($name, $type, $region, $interface) |
|
109 | } |
||
110 |