diff --git a/Monitoring/metadata/V3/Alert.php b/Monitoring/metadata/V3/Alert.php
index 2e0a701bd4c8..29347f288bbf 100644
--- a/Monitoring/metadata/V3/Alert.php
+++ b/Monitoring/metadata/V3/Alert.php
@@ -87,7 +87,7 @@ public static function initOnce() {
"69746f72696e672f76333b6d6f6e69746f72696e67aa021a476f6f676c65" .
"2e436c6f75642e4d6f6e69746f72696e672e5633ca021a476f6f676c655c" .
"436c6f75645c4d6f6e69746f72696e675c5633620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/AlertService.php b/Monitoring/metadata/V3/AlertService.php
index 20e6c3274ced..b39317f644ca 100644
--- a/Monitoring/metadata/V3/AlertService.php
+++ b/Monitoring/metadata/V3/AlertService.php
@@ -76,7 +76,7 @@ public static function initOnce() {
"72696e672f76333b6d6f6e69746f72696e67aa021a476f6f676c652e436c" .
"6f75642e4d6f6e69746f72696e672e5633ca021a476f6f676c655c436c6f" .
"75645c4d6f6e69746f72696e675c5633620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/Common.php b/Monitoring/metadata/V3/Common.php
index 28287ba488a0..31eba26ad5f6 100644
--- a/Monitoring/metadata/V3/Common.php
+++ b/Monitoring/metadata/V3/Common.php
@@ -80,7 +80,7 @@ public static function initOnce() {
"3b6d6f6e69746f72696e67aa021a476f6f676c652e436c6f75642e4d6f6e" .
"69746f72696e672e5633ca021a476f6f676c655c436c6f75645c4d6f6e69" .
"746f72696e675c5633620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/DroppedLabels.php b/Monitoring/metadata/V3/DroppedLabels.php
index 7a222fd83354..f24daef58011 100644
--- a/Monitoring/metadata/V3/DroppedLabels.php
+++ b/Monitoring/metadata/V3/DroppedLabels.php
@@ -27,7 +27,7 @@ public static function initOnce() {
"746f50015a3e676f6f676c652e676f6c616e672e6f72672f67656e70726f" .
"746f2f676f6f676c65617069732f6d6f6e69746f72696e672f76333b6d6f" .
"6e69746f72696e67620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/Group.php b/Monitoring/metadata/V3/Group.php
index 7a5fb4893b01..21a980d38454 100644
--- a/Monitoring/metadata/V3/Group.php
+++ b/Monitoring/metadata/V3/Group.php
@@ -27,7 +27,7 @@ public static function initOnce() {
"1a476f6f676c652e436c6f75642e4d6f6e69746f72696e672e5633ca021a" .
"476f6f676c655c436c6f75645c4d6f6e69746f72696e675c563362067072" .
"6f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/GroupService.php b/Monitoring/metadata/V3/GroupService.php
index 8e3fdfda30e1..5e89212b190b 100644
--- a/Monitoring/metadata/V3/GroupService.php
+++ b/Monitoring/metadata/V3/GroupService.php
@@ -88,7 +88,7 @@ public static function initOnce() {
"6f6f676c652e436c6f75642e4d6f6e69746f72696e672e5633ca021a476f" .
"6f676c655c436c6f75645c4d6f6e69746f72696e675c5633620670726f74" .
"6f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/Metric.php b/Monitoring/metadata/V3/Metric.php
index f72ee8cc5915..f6e32739826b 100644
--- a/Monitoring/metadata/V3/Metric.php
+++ b/Monitoring/metadata/V3/Metric.php
@@ -47,7 +47,7 @@ public static function initOnce() {
"6f72696e67aa021a476f6f676c652e436c6f75642e4d6f6e69746f72696e" .
"672e5633ca021a476f6f676c655c436c6f75645c4d6f6e69746f72696e67" .
"5c5633620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/MetricService.php b/Monitoring/metadata/V3/MetricService.php
index d3daaead48c4..da327d15c1c4 100644
--- a/Monitoring/metadata/V3/MetricService.php
+++ b/Monitoring/metadata/V3/MetricService.php
@@ -133,7 +133,7 @@ public static function initOnce() {
"2f76333b6d6f6e69746f72696e67aa021a476f6f676c652e436c6f75642e" .
"4d6f6e69746f72696e672e5633ca021a476f6f676c655c436c6f75645c4d" .
"6f6e69746f72696e675c5633620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/MutationRecord.php b/Monitoring/metadata/V3/MutationRecord.php
index 36abc86fa6ae..5df510f24c52 100644
--- a/Monitoring/metadata/V3/MutationRecord.php
+++ b/Monitoring/metadata/V3/MutationRecord.php
@@ -28,7 +28,7 @@ public static function initOnce() {
"6e67aa021a476f6f676c652e436c6f75642e4d6f6e69746f72696e672e56" .
"33ca021a476f6f676c655c436c6f75645c4d6f6e69746f72696e675c5633" .
"620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/Notification.php b/Monitoring/metadata/V3/Notification.php
index 8c8af782a43c..7e69a00d8ef8 100644
--- a/Monitoring/metadata/V3/Notification.php
+++ b/Monitoring/metadata/V3/Notification.php
@@ -57,7 +57,7 @@ public static function initOnce() {
"72696e67aa021a476f6f676c652e436c6f75642e4d6f6e69746f72696e67" .
"2e5633ca021a476f6f676c655c436c6f75645c4d6f6e69746f72696e675c" .
"5633620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/NotificationService.php b/Monitoring/metadata/V3/NotificationService.php
index 6a117d25403b..00f0bb169582 100644
--- a/Monitoring/metadata/V3/NotificationService.php
+++ b/Monitoring/metadata/V3/NotificationService.php
@@ -150,7 +150,7 @@ public static function initOnce() {
"746f72696e67aa021a476f6f676c652e436c6f75642e4d6f6e69746f7269" .
"6e672e5633ca021a476f6f676c655c436c6f75645c4d6f6e69746f72696e" .
"675c5633620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/SpanContext.php b/Monitoring/metadata/V3/SpanContext.php
index 2f55b4b770e3..7a1cfcafab43 100644
--- a/Monitoring/metadata/V3/SpanContext.php
+++ b/Monitoring/metadata/V3/SpanContext.php
@@ -25,7 +25,7 @@ public static function initOnce() {
"696e67aa021a476f6f676c652e436c6f75642e4d6f6e69746f72696e672e" .
"5633ca021a476f6f676c655c436c6f75645c4d6f6e69746f72696e675c56" .
"33620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/Uptime.php b/Monitoring/metadata/V3/Uptime.php
index 6fa0eeda1e15..c1e594124210 100644
--- a/Monitoring/metadata/V3/Uptime.php
+++ b/Monitoring/metadata/V3/Uptime.php
@@ -81,7 +81,7 @@ public static function initOnce() {
"76333b6d6f6e69746f72696e67aa021a476f6f676c652e436c6f75642e4d" .
"6f6e69746f72696e672e5633ca021a476f6f676c655c436c6f75645c4d6f" .
"6e69746f72696e675c5633620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/metadata/V3/UptimeService.php b/Monitoring/metadata/V3/UptimeService.php
index c3b06af3fe5a..c9d0a91da0d4 100644
--- a/Monitoring/metadata/V3/UptimeService.php
+++ b/Monitoring/metadata/V3/UptimeService.php
@@ -94,7 +94,7 @@ public static function initOnce() {
"3b6d6f6e69746f72696e67aa021a476f6f676c652e436c6f75642e4d6f6e" .
"69746f72696e672e5633ca021a476f6f676c655c436c6f75645c4d6f6e69" .
"746f72696e675c5633620670726f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Monitoring/src/V3/Aggregation/Aligner.php b/Monitoring/src/V3/Aggregation/Aligner.php
index eaee3871ee89..b0c1bc46b4a2 100644
--- a/Monitoring/src/V3/Aggregation/Aligner.php
+++ b/Monitoring/src/V3/Aggregation/Aligner.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Monitoring\V3\Aggregation;
+use UnexpectedValueException;
+
/**
* The Aligner describes how to bring the data points in a single
* time series into temporal alignment.
@@ -215,6 +217,48 @@ class Aligner
* Generated from protobuf enum ALIGN_PERCENT_CHANGE = 23;
*/
const ALIGN_PERCENT_CHANGE = 23;
+
+ private static $valueToName = [
+ self::ALIGN_NONE => 'ALIGN_NONE',
+ self::ALIGN_DELTA => 'ALIGN_DELTA',
+ self::ALIGN_RATE => 'ALIGN_RATE',
+ self::ALIGN_INTERPOLATE => 'ALIGN_INTERPOLATE',
+ self::ALIGN_NEXT_OLDER => 'ALIGN_NEXT_OLDER',
+ self::ALIGN_MIN => 'ALIGN_MIN',
+ self::ALIGN_MAX => 'ALIGN_MAX',
+ self::ALIGN_MEAN => 'ALIGN_MEAN',
+ self::ALIGN_COUNT => 'ALIGN_COUNT',
+ self::ALIGN_SUM => 'ALIGN_SUM',
+ self::ALIGN_STDDEV => 'ALIGN_STDDEV',
+ self::ALIGN_COUNT_TRUE => 'ALIGN_COUNT_TRUE',
+ self::ALIGN_COUNT_FALSE => 'ALIGN_COUNT_FALSE',
+ self::ALIGN_FRACTION_TRUE => 'ALIGN_FRACTION_TRUE',
+ self::ALIGN_PERCENTILE_99 => 'ALIGN_PERCENTILE_99',
+ self::ALIGN_PERCENTILE_95 => 'ALIGN_PERCENTILE_95',
+ self::ALIGN_PERCENTILE_50 => 'ALIGN_PERCENTILE_50',
+ self::ALIGN_PERCENTILE_05 => 'ALIGN_PERCENTILE_05',
+ self::ALIGN_PERCENT_CHANGE => 'ALIGN_PERCENT_CHANGE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
}
// Adding a class alias for backwards compatibility with the previous class name.
diff --git a/Monitoring/src/V3/Aggregation/Reducer.php b/Monitoring/src/V3/Aggregation/Reducer.php
index 8980a8822c0c..b7b3e3ffbd01 100644
--- a/Monitoring/src/V3/Aggregation/Reducer.php
+++ b/Monitoring/src/V3/Aggregation/Reducer.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Monitoring\V3\Aggregation;
+use UnexpectedValueException;
+
/**
* A Reducer describes how to aggregate data points from multiple
* time series into a single time series.
@@ -138,6 +140,43 @@ class Reducer
* Generated from protobuf enum REDUCE_PERCENTILE_05 = 12;
*/
const REDUCE_PERCENTILE_05 = 12;
+
+ private static $valueToName = [
+ self::REDUCE_NONE => 'REDUCE_NONE',
+ self::REDUCE_MEAN => 'REDUCE_MEAN',
+ self::REDUCE_MIN => 'REDUCE_MIN',
+ self::REDUCE_MAX => 'REDUCE_MAX',
+ self::REDUCE_SUM => 'REDUCE_SUM',
+ self::REDUCE_STDDEV => 'REDUCE_STDDEV',
+ self::REDUCE_COUNT => 'REDUCE_COUNT',
+ self::REDUCE_COUNT_TRUE => 'REDUCE_COUNT_TRUE',
+ self::REDUCE_COUNT_FALSE => 'REDUCE_COUNT_FALSE',
+ self::REDUCE_FRACTION_TRUE => 'REDUCE_FRACTION_TRUE',
+ self::REDUCE_PERCENTILE_99 => 'REDUCE_PERCENTILE_99',
+ self::REDUCE_PERCENTILE_95 => 'REDUCE_PERCENTILE_95',
+ self::REDUCE_PERCENTILE_50 => 'REDUCE_PERCENTILE_50',
+ self::REDUCE_PERCENTILE_05 => 'REDUCE_PERCENTILE_05',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
}
// Adding a class alias for backwards compatibility with the previous class name.
diff --git a/Monitoring/src/V3/AlertPolicy.php b/Monitoring/src/V3/AlertPolicy.php
index 6f29acc7d9f5..28f91f3ccd9b 100644
--- a/Monitoring/src/V3/AlertPolicy.php
+++ b/Monitoring/src/V3/AlertPolicy.php
@@ -403,6 +403,24 @@ public function getEnabled()
return $this->enabled;
}
+ /**
+ * Returns the unboxed value from getEnabled()
+
+ * Whether or not the policy is enabled. On write, the default interpretation
+ * if unset is that the policy is enabled. On read, clients should not make
+ * any assumption about the state if it has not been populated. The
+ * field should always be populated on List and Get operations, unless
+ * a field projection has been specified that strips it out.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enabled = 17;
+ * @return bool|null
+ */
+ public function getEnabledValue()
+ {
+ $wrapper = $this->getEnabled();
+ return is_null($wrapper) ? null : $wrapper->getValue();
+ }
+
/**
* Whether or not the policy is enabled. On write, the default interpretation
* if unset is that the policy is enabled. On read, clients should not make
@@ -422,6 +440,25 @@ public function setEnabled($var)
return $this;
}
+ /**
+ * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
+
+ * Whether or not the policy is enabled. On write, the default interpretation
+ * if unset is that the policy is enabled. On read, clients should not make
+ * any assumption about the state if it has not been populated. The
+ * field should always be populated on List and Get operations, unless
+ * a field projection has been specified that strips it out.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enabled = 17;
+ * @param bool|null $var
+ * @return $this
+ */
+ public function setEnabledValue($var)
+ {
+ $wrappedVar = is_null($var) ? null : new \Google\Protobuf\BoolValue(['value' => $var]);
+ return $this->setEnabled($wrappedVar);
+ }
+
/**
* Identifies the notification channels to which notifications should be sent
* when incidents are opened or closed or when new violations occur on
diff --git a/Monitoring/src/V3/AlertPolicy/ConditionCombinerType.php b/Monitoring/src/V3/AlertPolicy/ConditionCombinerType.php
index 0123d90cf008..45b2cbba3a00 100644
--- a/Monitoring/src/V3/AlertPolicy/ConditionCombinerType.php
+++ b/Monitoring/src/V3/AlertPolicy/ConditionCombinerType.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Monitoring\V3\AlertPolicy;
+use UnexpectedValueException;
+
/**
* Operators for combining conditions.
*
@@ -41,6 +43,33 @@ class ConditionCombinerType
* Generated from protobuf enum AND_WITH_MATCHING_RESOURCE = 3;
*/
const AND_WITH_MATCHING_RESOURCE = 3;
+
+ private static $valueToName = [
+ self::COMBINE_UNSPECIFIED => 'COMBINE_UNSPECIFIED',
+ self::PBAND => 'PBAND',
+ self::PBOR => 'PBOR',
+ self::AND_WITH_MATCHING_RESOURCE => 'AND_WITH_MATCHING_RESOURCE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
}
// Adding a class alias for backwards compatibility with the previous class name.
diff --git a/Monitoring/src/V3/ComparisonType.php b/Monitoring/src/V3/ComparisonType.php
index abb843f14d36..443acd3388cf 100644
--- a/Monitoring/src/V3/ComparisonType.php
+++ b/Monitoring/src/V3/ComparisonType.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Monitoring\V3;
+use UnexpectedValueException;
+
/**
* Specifies an ordering relationship on two arguments, here called left and
* right.
@@ -54,5 +56,35 @@ class ComparisonType
* Generated from protobuf enum COMPARISON_NE = 6;
*/
const COMPARISON_NE = 6;
+
+ private static $valueToName = [
+ self::COMPARISON_UNSPECIFIED => 'COMPARISON_UNSPECIFIED',
+ self::COMPARISON_GT => 'COMPARISON_GT',
+ self::COMPARISON_GE => 'COMPARISON_GE',
+ self::COMPARISON_LT => 'COMPARISON_LT',
+ self::COMPARISON_LE => 'COMPARISON_LE',
+ self::COMPARISON_EQ => 'COMPARISON_EQ',
+ self::COMPARISON_NE => 'COMPARISON_NE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
}
diff --git a/Monitoring/src/V3/GroupResourceType.php b/Monitoring/src/V3/GroupResourceType.php
index 7b08ec497b07..ddf9d0eee1a8 100644
--- a/Monitoring/src/V3/GroupResourceType.php
+++ b/Monitoring/src/V3/GroupResourceType.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Monitoring\V3;
+use UnexpectedValueException;
+
/**
* The supported resource types that can be used as values of
* `group_resource.resource_type`.
@@ -34,5 +36,31 @@ class GroupResourceType
* Generated from protobuf enum AWS_ELB_LOAD_BALANCER = 2;
*/
const AWS_ELB_LOAD_BALANCER = 2;
+
+ private static $valueToName = [
+ self::RESOURCE_TYPE_UNSPECIFIED => 'RESOURCE_TYPE_UNSPECIFIED',
+ self::INSTANCE => 'INSTANCE',
+ self::AWS_ELB_LOAD_BALANCER => 'AWS_ELB_LOAD_BALANCER',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
}
diff --git a/Monitoring/src/V3/ListTimeSeriesRequest/TimeSeriesView.php b/Monitoring/src/V3/ListTimeSeriesRequest/TimeSeriesView.php
index 5d641ced36d2..4055777eb6db 100644
--- a/Monitoring/src/V3/ListTimeSeriesRequest/TimeSeriesView.php
+++ b/Monitoring/src/V3/ListTimeSeriesRequest/TimeSeriesView.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Monitoring\V3\ListTimeSeriesRequest;
+use UnexpectedValueException;
+
/**
* Controls which fields are returned by `ListTimeSeries`.
*
@@ -25,6 +27,31 @@ class TimeSeriesView
* Generated from protobuf enum HEADERS = 1;
*/
const HEADERS = 1;
+
+ private static $valueToName = [
+ self::FULL => 'FULL',
+ self::HEADERS => 'HEADERS',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
}
// Adding a class alias for backwards compatibility with the previous class name.
diff --git a/Monitoring/src/V3/NotificationChannel.php b/Monitoring/src/V3/NotificationChannel.php
index 9106f0928a59..9e6a4bdba225 100644
--- a/Monitoring/src/V3/NotificationChannel.php
+++ b/Monitoring/src/V3/NotificationChannel.php
@@ -445,6 +445,25 @@ public function getEnabled()
return $this->enabled;
}
+ /**
+ * Returns the unboxed value from getEnabled()
+
+ * Whether notifications are forwarded to the described channel. This makes
+ * it possible to disable delivery of notifications to a particular channel
+ * without removing the channel from all alerting policies that reference
+ * the channel. This is a more convenient approach when the change is
+ * temporary and you want to receive notifications from the same set
+ * of alerting policies on the channel at some point in the future.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enabled = 11;
+ * @return bool|null
+ */
+ public function getEnabledValue()
+ {
+ $wrapper = $this->getEnabled();
+ return is_null($wrapper) ? null : $wrapper->getValue();
+ }
+
/**
* Whether notifications are forwarded to the described channel. This makes
* it possible to disable delivery of notifications to a particular channel
@@ -465,5 +484,25 @@ public function setEnabled($var)
return $this;
}
+ /**
+ * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
+
+ * Whether notifications are forwarded to the described channel. This makes
+ * it possible to disable delivery of notifications to a particular channel
+ * without removing the channel from all alerting policies that reference
+ * the channel. This is a more convenient approach when the change is
+ * temporary and you want to receive notifications from the same set
+ * of alerting policies on the channel at some point in the future.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enabled = 11;
+ * @param bool|null $var
+ * @return $this
+ */
+ public function setEnabledValue($var)
+ {
+ $wrappedVar = is_null($var) ? null : new \Google\Protobuf\BoolValue(['value' => $var]);
+ return $this->setEnabled($wrappedVar);
+ }
+
}
diff --git a/Monitoring/src/V3/NotificationChannel/VerificationStatus.php b/Monitoring/src/V3/NotificationChannel/VerificationStatus.php
index 12df1b11799f..2b70fa842873 100644
--- a/Monitoring/src/V3/NotificationChannel/VerificationStatus.php
+++ b/Monitoring/src/V3/NotificationChannel/VerificationStatus.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Monitoring\V3\NotificationChannel;
+use UnexpectedValueException;
+
/**
* Indicates whether the channel has been verified or not. It is illegal
* to specify this field in a
@@ -41,6 +43,32 @@ class VerificationStatus
* Generated from protobuf enum VERIFIED = 2;
*/
const VERIFIED = 2;
+
+ private static $valueToName = [
+ self::VERIFICATION_STATUS_UNSPECIFIED => 'VERIFICATION_STATUS_UNSPECIFIED',
+ self::UNVERIFIED => 'UNVERIFIED',
+ self::VERIFIED => 'VERIFIED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
}
// Adding a class alias for backwards compatibility with the previous class name.
diff --git a/Monitoring/src/V3/ServiceTier.php b/Monitoring/src/V3/ServiceTier.php
index 232e88e917e6..36bc80c2aed7 100644
--- a/Monitoring/src/V3/ServiceTier.php
+++ b/Monitoring/src/V3/ServiceTier.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Monitoring\V3;
+use UnexpectedValueException;
+
/**
* The tier of service for a Workspace. Please see the
* [service tiers
@@ -41,5 +43,31 @@ class ServiceTier
* Generated from protobuf enum SERVICE_TIER_PREMIUM = 2;
*/
const SERVICE_TIER_PREMIUM = 2;
+
+ private static $valueToName = [
+ self::SERVICE_TIER_UNSPECIFIED => 'SERVICE_TIER_UNSPECIFIED',
+ self::SERVICE_TIER_BASIC => 'SERVICE_TIER_BASIC',
+ self::SERVICE_TIER_PREMIUM => 'SERVICE_TIER_PREMIUM',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
}
diff --git a/Monitoring/src/V3/UptimeCheckRegion.php b/Monitoring/src/V3/UptimeCheckRegion.php
index ecca47e8317a..c70f31fdbefd 100644
--- a/Monitoring/src/V3/UptimeCheckRegion.php
+++ b/Monitoring/src/V3/UptimeCheckRegion.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Monitoring\V3;
+use UnexpectedValueException;
+
/**
* The regions from which an uptime check can be run.
*
@@ -44,5 +46,33 @@ class UptimeCheckRegion
* Generated from protobuf enum ASIA_PACIFIC = 4;
*/
const ASIA_PACIFIC = 4;
+
+ private static $valueToName = [
+ self::REGION_UNSPECIFIED => 'REGION_UNSPECIFIED',
+ self::USA => 'USA',
+ self::EUROPE => 'EUROPE',
+ self::SOUTH_AMERICA => 'SOUTH_AMERICA',
+ self::ASIA_PACIFIC => 'ASIA_PACIFIC',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
}
diff --git a/Monitoring/synth.metadata b/Monitoring/synth.metadata
index 249167115cfd..71199ce4f978 100644
--- a/Monitoring/synth.metadata
+++ b/Monitoring/synth.metadata
@@ -1,19 +1,19 @@
{
- "updateTime": "2019-03-28T10:02:26.522025Z",
+ "updateTime": "2019-03-30T10:01:57.072926Z",
"sources": [
{
"generator": {
"name": "artman",
- "version": "0.16.20",
- "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e"
+ "version": "0.16.21",
+ "dockerImage": "googleapis/artman@sha256:854131ec1af7b3a313253474c24748dc0acd217a58a0b74dbfb559f340a15d78"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "6a84b3267b0a95e922608b9891219075047eee29",
- "internalRef": "240640999"
+ "sha": "fd67be4b51a8c809b97100ccf1c3cffd15b85d7b",
+ "internalRef": "241096997"
}
}
],