| 1 | <?php declare(strict_types=1); |
||
| 13 | class Endpoint extends OperatorResource implements Creatable, Updateable, Deletable |
||
| 14 | { |
||
| 15 | /** @var string */ |
||
| 16 | public $id; |
||
| 17 | |||
| 18 | /** @var string */ |
||
| 19 | public $interface; |
||
| 20 | |||
| 21 | /** @var string */ |
||
| 22 | public $name; |
||
| 23 | |||
| 24 | /** @var string */ |
||
| 25 | public $serviceId; |
||
| 26 | |||
| 27 | /** @var string */ |
||
| 28 | public $region; |
||
| 29 | |||
| 30 | /** @var array */ |
||
| 31 | public $links; |
||
| 32 | |||
| 33 | /** @var string */ |
||
| 34 | public $url; |
||
| 35 | |||
| 36 | protected $resourceKey = 'endpoint'; |
||
| 37 | protected $resourcesKey = 'endpoints'; |
||
| 38 | protected $aliases = ['service_id' => 'serviceId']; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritDoc} |
||
| 42 | * |
||
| 43 | * @param array $data {@see \OpenStack\Identity\v3\Api::postEndpoints} |
||
| 44 | */ |
||
| 45 | 2 | public function create(array $data): Creatable |
|
| 50 | |||
| 51 | /** |
||
| 52 | * {@inheritDoc} |
||
| 53 | */ |
||
| 54 | 1 | public function update() |
|
| 55 | { |
||
| 56 | 1 | $response = $this->executeWithState($this->api->patchEndpoint()); |
|
| 57 | 1 | $this->populateFromResponse($response); |
|
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * {@inheritDoc} |
||
| 62 | */ |
||
| 63 | 1 | public function delete() |
|
| 67 | |||
| 68 | 2 | public function regionMatches(string $value): bool |
|
| 72 | |||
| 73 | 2 | public function interfaceMatches(string $value): bool |
|
| 77 | } |
||
| 78 |