'domainId', 'default_project_id' => 'defaultProjectId', ]; protected $resourceKey = 'user'; protected $resourcesKey = 'users'; /** * {@inheritdoc} * * @param array $data {@see \OpenStack\Identity\v3\Api::postUsers} */ public function create(array $data): Creatable { $response = $this->execute($this->api->postUsers(), $data); return $this->populateFromResponse($response); } /** * {@inheritdoc} */ public function retrieve() { $response = $this->execute($this->api->getUser(), ['id' => $this->id]); $this->populateFromResponse($response); } /** * {@inheritdoc} */ public function update() { $response = $this->executeWithState($this->api->patchUser()); $this->populateFromResponse($response); } /** * {@inheritdoc} */ public function delete() { $this->execute($this->api->deleteUser(), ['id' => $this->id]); } public function listGroups(): \Generator { $options['id'] = $this->id; return $this->model(Group::class)->enumerate($this->api->getUserGroups(), $options); } public function listProjects(): \Generator { return $this->model(Project::class)->enumerate($this->api->getUserProjects(), ['id' => $this->id]); } }