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

namespace OpenCloud\CloudMonitoring\Resource;

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

/**
 * Alarm class.
 * 
 * @extends AbstractResource
 */
class Alarm extends AbstractResource implements ResourceInterface
{
    public $id;
	public $check_id;
	public $notification_plan_id;
	public $criteria;
	public $disabled;
	public $label;
	public $metadata;
	
    protected static $json_name = false;
    protected static $json_collection_name = 'values';
    protected static $url_resource = 'alarms';
    
    protected static $requiredKeys = array(
        'check_id',
        'notification_plan_id'
    );
    
    protected static $emptyObject = array(
        'check_id',
        'notification_plan_id',
        'criteria',
        'disabled',
        'label',
        'metadata'
    );
    

    public function baseUrl()
    {
        return $this->Parent()->Url() . '/' . $this->Parent()->id . '/' . $this->ResourceName();
    }
    
    public function createUrl()
    {
        return $this->baseUrl();
    }
    
    public function test($params = array(), $debug = false)
    {
        if (!isset($params['criteria'])) {
            throw new Exception\AlarmException(
                'Please specify a "criteria" value'
            );
        }
        
        if (!isset($params['check_data']) || !is_array($params['check_data'])) {
            throw new Exception\AlarmException(
                'Please specify a "check data" array'
            );
        }
        
        $url = $this->Parent()->Url() . '/' . $this->Parent()->id . '/test-alarm';
        
        return $this->Request($url, 'POST', array(), json_encode((object) $params));
    }	
	
}";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:5:"Alarm";O:40:"phpDocumentor\Descriptor\ClassDescriptor":17:{s:9:" * parent";s:52:"\OpenCloud\CloudMonitoring\Resource\AbstractResource";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:12:{s:2:"id";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:45:"\OpenCloud\CloudMonitoring\Resource\Alarm::id";s:7:" * name";s:2:"id";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:15;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:15;s:10:" * context";a:1:{i:0;s:3:"$id";}}}}}s:8:"check_id";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:51:"\OpenCloud\CloudMonitoring\Resource\Alarm::check_id";s:7:" * name";s:8:"check_id";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:16;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:16;s:10:" * context";a:1:{i:0;s:9:"$check_id";}}}}}s:20:"notification_plan_id";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:63:"\OpenCloud\CloudMonitoring\Resource\Alarm::notification_plan_id";s:7:" * name";s:20:"notification_plan_id";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:21:"$notification_plan_id";}}}}}s:8:"criteria";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:51:"\OpenCloud\CloudMonitoring\Resource\Alarm::criteria";s:7:" * name";s:8:"criteria";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:9:"$criteria";}}}}}s:8:"disabled";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:51:"\OpenCloud\CloudMonitoring\Resource\Alarm::disabled";s:7:" * name";s:8:"disabled";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:19;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:19;s:10:" * context";a:1:{i:0;s:9:"$disabled";}}}}}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:48:"\OpenCloud\CloudMonitoring\Resource\Alarm::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: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:6:"$label";}}}}}s:8:"metadata";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:51:"\OpenCloud\CloudMonitoring\Resource\Alarm::metadata";s:7:" * name";s:8:"metadata";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:9:"$metadata";}}}}}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:52:"\OpenCloud\CloudMonitoring\Resource\Alarm::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:23;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:23;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:8:"'values'";s:9:" * static";b:1;s:13:" * visibility";s:9:"protected";s:8:" * fqsen";s:63:"\OpenCloud\CloudMonitoring\Resource\Alarm::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: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: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:8:"'alarms'";s:9:" * static";b:1;s:13:" * visibility";s:9:"protected";s:8:" * fqsen";s:55:"\OpenCloud\CloudMonitoring\Resource\Alarm::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:25;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:25;s:10:" * context";a:1:{i:0;s:13:"$url_resource";}}}}}s:12:"requiredKeys";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";s:41:"array('check_id', 'notification_plan_id')";s:9:" * static";b:1;s:13:" * visibility";s:9:"protected";s:8:" * fqsen";s:55:"\OpenCloud\CloudMonitoring\Resource\Alarm::requiredKeys";s:7:" * name";s:12:"requiredKeys";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:27;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:27;s:10:" * context";a:1:{i:0;s:13:"$requiredKeys";}}}}}s:11:"emptyObject";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":15:{s:9:" * parent";r:14;s:8:" * types";N;s:10:" * default";s:86:"array('check_id', 'notification_plan_id', 'criteria', 'disabled', 'label', 'metadata')";s:9:" * static";b:1;s:13:" * visibility";s:9:"protected";s:8:" * fqsen";s:54:"\OpenCloud\CloudMonitoring\Resource\Alarm::emptyObject";s:7:" * name";s:11:"emptyObject";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:32;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:32;s:10:" * context";a:1:{i:0;s:12:"$emptyObject";}}}}}}}s:10:" * methods";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:3:{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:52:"\OpenCloud\CloudMonitoring\Resource\Alarm::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:42;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:42;s:10:" * context";a:1:{i:0;s:9:"baseUrl()";}}}}}s:9:"createUrl";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:54:"\OpenCloud\CloudMonitoring\Resource\Alarm::createUrl()";s:7:" * name";s:9:"createUrl";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:47;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:47;s:10:" * context";a:1:{i:0;s:11:"createUrl()";}}}}}s:4:"test";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:2:{s:7:"$params";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":13:{s:8:" * types";a:0:{}s:10:" * default";s:7:"array()";s:14:" * byReference";b:0;s:8:" * fqsen";s:0:"";s:7:" * name";s:7:"$params";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:6:"$debug";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":13:{s:8:" * types";a:0:{}s:10:" * default";s:5:"false";s:14:" * byReference";b:0;s:8:" * fqsen";s:0:"";s:7:" * name";s:6:"$debug";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:49:"\OpenCloud\CloudMonitoring\Resource\Alarm::test()";s:7:" * name";s:4:"test";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:52;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:52;s:10:" * context";a:1:{i:0;s:6:"test()";}}}}}}}s:8:" * fqsen";s:41:"\OpenCloud\CloudMonitoring\Resource\Alarm";s:7:" * name";s:5:"Alarm";s:12:" * namespace";s:35:"\OpenCloud\CloudMonitoring\Resource";s:10:" * package";s:0:"";s:10:" * summary";s:12:"Alarm class.";s:14:" * description";s:0:"";s:7:" * path";r:1;s:7:" * line";i:13;s:7:" * tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:" * items";a:1:{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:"AbstractResource";}}}}}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:9:"Alarm.php";s:12:" * namespace";N;s:10:" * package";s:0:"";s:10:" * summary";s:0:"";s:14:" * description";s:0:"";s:7:" * path";s:44:"OpenCloud/CloudMonitoring/Resource/Alarm.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:{}}}