Page MenuHomePhabricator

D19363.id46318.diff
No OneTemporary

D19363.id46318.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -96,6 +96,7 @@
'PhobjectTestCase' => 'object/__tests__/PhobjectTestCase.php',
'PhutilAPCKeyValueCache' => 'cache/PhutilAPCKeyValueCache.php',
'PhutilAWSCloudFormationFuture' => 'future/aws/PhutilAWSCloudFormationFuture.php',
+ 'PhutilAWSCloudWatchFuture' => 'future/aws/PhutilAWSCloudWatchFuture.php',
'PhutilAWSEC2Future' => 'future/aws/PhutilAWSEC2Future.php',
'PhutilAWSException' => 'future/aws/PhutilAWSException.php',
'PhutilAWSFuture' => 'future/aws/PhutilAWSFuture.php',
@@ -172,6 +173,7 @@
'PhutilChunkedIterator' => 'utils/PhutilChunkedIterator.php',
'PhutilChunkedIteratorTestCase' => 'utils/__tests__/PhutilChunkedIteratorTestCase.php',
'PhutilClassMapQuery' => 'symbols/PhutilClassMapQuery.php',
+ 'PhutilCloudWatchMetric' => 'future/aws/PhutilCloudWatchMetric.php',
'PhutilCodeSnippetContextFreeGrammar' => 'grammar/code/PhutilCodeSnippetContextFreeGrammar.php',
'PhutilCommandString' => 'xsprintf/PhutilCommandString.php',
'PhutilConsole' => 'console/PhutilConsole.php',
@@ -722,6 +724,7 @@
'PhobjectTestCase' => 'PhutilTestCase',
'PhutilAPCKeyValueCache' => 'PhutilKeyValueCache',
'PhutilAWSCloudFormationFuture' => 'PhutilAWSFuture',
+ 'PhutilAWSCloudWatchFuture' => 'PhutilAWSFuture',
'PhutilAWSEC2Future' => 'PhutilAWSFuture',
'PhutilAWSException' => 'Exception',
'PhutilAWSFuture' => 'FutureProxy',
@@ -808,6 +811,7 @@
),
'PhutilChunkedIteratorTestCase' => 'PhutilTestCase',
'PhutilClassMapQuery' => 'Phobject',
+ 'PhutilCloudWatchMetric' => 'Phobject',
'PhutilCodeSnippetContextFreeGrammar' => 'PhutilContextFreeGrammar',
'PhutilCommandString' => 'Phobject',
'PhutilConsole' => 'Phobject',
diff --git a/src/future/aws/PhutilAWSCloudWatchFuture.php b/src/future/aws/PhutilAWSCloudWatchFuture.php
new file mode 100644
--- /dev/null
+++ b/src/future/aws/PhutilAWSCloudWatchFuture.php
@@ -0,0 +1,19 @@
+<?php
+
+final class PhutilAWSCloudWatchFuture extends PhutilAWSFuture {
+ private $parameters = array();
+
+ public function setParameters($parameters) {
+ $this->parameters = $parameters;
+ return $this;
+ }
+
+ protected function getParameters() {
+ return $this->parameters;
+ }
+
+ public function getServiceName() {
+ return 'monitoring';
+ }
+
+}
diff --git a/src/future/aws/PhutilCloudWatchMetric.php b/src/future/aws/PhutilCloudWatchMetric.php
new file mode 100644
--- /dev/null
+++ b/src/future/aws/PhutilCloudWatchMetric.php
@@ -0,0 +1,50 @@
+<?php
+
+final class PhutilCloudWatchMetric extends Phobject {
+ private $name;
+ private $value;
+ private $unit = 'None';
+ private $dimensions = array();
+
+ public function setName($name) {
+ $this->name = $name;
+ return $this;
+ }
+
+ public function getName() {
+ return $this->name;
+ }
+
+ public function setValue($value) {
+ $this->value = $value;
+ return $this;
+ }
+
+ public function getValue() {
+ return $this->value;
+ }
+
+ public function setUnit($unit) {
+ $this->unit = $unit;
+ return $this;
+ }
+
+ public function getUnit() {
+ return $this->unit;
+ }
+
+ public function setDimensions(array $dimensions) {
+ $this->dimensions = $dimensions;
+ return $this;
+ }
+
+ public function getDimensions() {
+ return $this->dimensions;
+ }
+
+ public function addDimension($name, $value) {
+ $this->dimensions[] = array($name, $value);
+ return $this;
+ }
+
+}

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 17, 1:09 PM (6 d, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7723833
Default Alt Text
D19363.id46318.diff (3 KB)

Event Timeline