1: <?php
2: /**
3: * PHP OpenCloud library.
4: *
5: * @copyright 2013 Rackspace Hosting, Inc. See LICENSE for information.
6: * @license https://www.apache.org/licenses/LICENSE-2.0
7: * @author Glen Campbell <glen.campbell@rackspace.com>
8: * @author Jamie Hannaford <jamie.hannaford@rackspace.com>
9: */
10:
11: namespace OpenCloud\CloudMonitoring\Resource;
12:
13: /**
14: * View class.
15: */
16: class View extends ReadOnlyResource
17: {
18: private $timestamp;
19: private $entity;
20: private $alarms;
21: private $checks;
22: private $latest_alarm_states;
23:
24: protected static $json_name = false;
25: protected static $json_collection_name = 'values';
26: protected static $url_resource = 'views/overview';
27:
28: protected $associatedResources = array(
29: 'entity' => 'Entity'
30: );
31:
32: protected $associatedCollections = array(
33: 'alarms' => 'Alarm',
34: 'checks' => 'Check'
35: );
36:
37: public function getAlarm($info = null)
38: {
39: return $this->getService()->resource('Alarm', $info);
40: }
41:
42: public function getCheck($info = null)
43: {
44: return $this->getService()->resource('Check', $info);
45: }
46:
47: }