O:39:"phpDocumentor\Descriptor\FileDescriptor":20:{s:7:" * hash";s:32:"9ab8c277a4111fe01a1800ddb7aca63f";s:9:" * source";s:1240:"<?php

namespace OpenCloud\CloudMonitoring\Resource;

use OpenCloud\Common\PersistentObject;
use OpenCloud\CloudMonitoring\Exception;

/**
 * Agent class.
 * 
 * @extends ReadOnlyResource
 * @implements ResourceInterface
 */
class AgentHost extends ReadOnlyResource implements ResourceInterface
{
    
    public $token;
    public $label;
    
    protected static $json_name = false;
    protected static $json_collection_name = 'info';
    protected static $url_resource = 'host_info';

    private $allowedTypes = array(
        'cpus',
        'disks',
        'filesystems',
        'memory',
        'network_interfaces',
        'processes',
        'system',
        'who'
    );

    public function baseUrl()
    {
        return $this->Parent()->Url($this->Parent()->id . '/' . $this->ResourceName());
    }

    public function info($type)
    {
        if (!in_array($type, $this->allowedTypes)) {
            throw new Exception\AgentException(sprintf(
                'Incorrect info type. Please specify one of the following: %s',
                implode(', ', $this->allowedTypes)
            ));
        }

        return $this->Service()->Collection(__NAMESPACE__ . '\AgentHostInfo', $this->Url($type));
    }    
    
}";s:20:" * namespace_aliases";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:11:" * includes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:12:" * constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:12:" * functions";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:10:" * classes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:9:"AgentHost";O:40:"phpDocumentor\Descriptor\ClassDescriptor":17:{s:9:" * parent";s:52:"\OpenCloud\CloudMonitoring\Resource\ReadOnlyResource";s:13:" * implements";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:53:"\OpenCloud\CloudMonitoring\Resource\ResourceInterface";s:53:"\OpenCloud\CloudMonitoring\Resource\ResourceInterface";}}s:11:" * abstract";b:0;s:8:" * final";b:0;s:12:" * constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:13:" * properties";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:6:{s:5:"token";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";N;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:8:" * fqsen";s:52:"\OpenCloud\CloudMonitoring\Resource\AgentHost::token";s:7:" * name";s:5:"token";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:17;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50007";s:7:" * line";i:17;s:10:" * context";a:1:{i:0;s:6:"$token";}}}}}s:5:"label";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";N;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:8:" * fqsen";s:52:"\OpenCloud\CloudMonitoring\Resource\AgentHost::label";s:7:" * name";s:5:"label";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:18;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50007";s:7:" * line";i:18;s:10:" * context";a:1:{i:0;s:6:"$label";}}}}}s:9:"json_name";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";s:5:"false";s:9:" * static";b:1;s:13:" * visibility";s:9:"protected";s:8:" * fqsen";s:56:"\OpenCloud\CloudMonitoring\Resource\AgentHost::json_name";s:7:" * name";s:9:"json_name";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:20;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50007";s:7:" * line";i:20;s:10:" * context";a:1:{i:0;s:10:"$json_name";}}}}}s:20:"json_collection_name";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";s:6:"'info'";s:9:" * static";b:1;s:13:" * visibility";s:9:"protected";s:8:" * fqsen";s:67:"\OpenCloud\CloudMonitoring\Resource\AgentHost::json_collection_name";s:7:" * name";s:20:"json_collection_name";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:21;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50007";s:7:" * line";i:21;s:10:" * context";a:1:{i:0;s:21:"$json_collection_name";}}}}}s:12:"url_resource";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";s:11:"'host_info'";s:9:" * static";b:1;s:13:" * visibility";s:9:"protected";s:8:" * fqsen";s:59:"\OpenCloud\CloudMonitoring\Resource\AgentHost::url_resource";s:7:" * name";s:12:"url_resource";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:22;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50007";s:7:" * line";i:22;s:10:" * context";a:1:{i:0;s:13:"$url_resource";}}}}}s:12:"allowedTypes";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";s:99:"array('cpus', 'disks', 'filesystems', 'memory', 'network_interfaces', 'processes', 'system', 'who')";s:9:" * static";b:0;s:13:" * visibility";s:7:"private";s:8:" * fqsen";s:59:"\OpenCloud\CloudMonitoring\Resource\AgentHost::allowedTypes";s:7:" * name";s:12:"allowedTypes";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:24;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50007";s:7:" * line";i:24;s:10:" * context";a:1:{i:0;s:13:"$allowedTypes";}}}}}}}s:10:" * methods";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:2:{s:7:"baseUrl";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:56:"\OpenCloud\CloudMonitoring\Resource\AgentHost::baseUrl()";s:7:" * name";s:7:"baseUrl";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:35;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50008";s:7:" * line";i:35;s:10:" * context";a:1:{i:0;s:9:"baseUrl()";}}}}}s:4:"info";O:41:"phpDocumentor\Descriptor\MethodDescriptor":16:{s:9:" * parent";r:14;s:11:" * abstract";b:0;s:8:" * final";b:0;s:9:" * static";b:0;s:13:" * visibility";s:6:"public";s:12:" * arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{s:5:"$type";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":13:{s:8:" * types";a:0:{}s:10:" * default";N;s:14:" * byReference";b:0;s:8:" * fqsen";s:0:"";s:7:" * name";s:5:"$type";s:12:" * namespace";N;s:10:" * package";N;s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:8:" * fqsen";s:53:"\OpenCloud\CloudMonitoring\Resource\AgentHost::info()";s:7:" * name";s:4:"info";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:0:"";s:7:" * line";i:40;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:2:{s:5:"param";a:0:{}s:8:"internal";N;}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:" * severity";s:5:"error";s:7:" * code";s:13:"PPC:ERR-50008";s:7:" * line";i:40;s:10:" * context";a:1:{i:0;s:6:"info()";}}}}}}}s:8:" * fqsen";s:45:"\OpenCloud\CloudMonitoring\Resource\AgentHost";s:7:" * name";s:9:"AgentHost";s:12:" * namespace";s:35:"\OpenCloud\CloudMonitoring\Resource";s:10:" * package";s:0:"";s:10:" * summary";s:12:"Agent class.";s:14:" * description";s:0:"";s:7:" * path";r:1;s:7:" * line";i:14;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:2:{s:7:"extends";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":2:{s:7:" * name";s:7:"extends";s:14:" * description";s:16:"ReadOnlyResource";}}}s:10:"implements";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":2:{s:7:" * name";s:10:"implements";s:14:" * description";s:17:"ResourceInterface";}}}}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}}}s:13:" * interfaces";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * traits";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:10:" * markers";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:8:" * fqsen";s:0:"";s:7:" * name";s:13:"AgentHost.php";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:48:"OpenCloud/CloudMonitoring/Resource/AgentHost.php";s:7:" * line";i:0;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}s:9:" * errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:0:{}}}