diff --git a/Container/metadata/V1/ClusterService.php b/Container/metadata/V1/ClusterService.php
index 8240d9a39b77..a0fec97d577b 100644
--- a/Container/metadata/V1/ClusterService.php
+++ b/Container/metadata/V1/ClusterService.php
@@ -637,7 +637,7 @@ public static function initOnce() {
"aa0219476f6f676c652e436c6f75642e436f6e7461696e65722e5631ca02" .
"19476f6f676c655c436c6f75645c436f6e7461696e65725c563162067072" .
"6f746f33"
- ));
+ ), true);
static::$is_initialized = true;
}
diff --git a/Container/src/V1/Cluster/Status.php b/Container/src/V1/Cluster/Status.php
index 6be0fa10187d..5ab4c4cdd376 100644
--- a/Container/src/V1/Cluster/Status.php
+++ b/Container/src/V1/Cluster/Status.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Container\V1\Cluster;
+use UnexpectedValueException;
+
/**
* The current status of the cluster.
*
@@ -58,6 +60,36 @@ class Status
* Generated from protobuf enum DEGRADED = 6;
*/
const DEGRADED = 6;
+
+ private static $valueToName = [
+ self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED',
+ self::PROVISIONING => 'PROVISIONING',
+ self::RUNNING => 'RUNNING',
+ self::RECONCILING => 'RECONCILING',
+ self::STOPPING => 'STOPPING',
+ self::ERROR => 'ERROR',
+ self::DEGRADED => 'DEGRADED',
+ ];
+
+ 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/Container/src/V1/NetworkPolicy/Provider.php b/Container/src/V1/NetworkPolicy/Provider.php
index 460a8c70d626..ec0b75a7993d 100644
--- a/Container/src/V1/NetworkPolicy/Provider.php
+++ b/Container/src/V1/NetworkPolicy/Provider.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Container\V1\NetworkPolicy;
+use UnexpectedValueException;
+
/**
* Allowed Network Policy providers.
*
@@ -23,6 +25,31 @@ class Provider
* Generated from protobuf enum CALICO = 1;
*/
const CALICO = 1;
+
+ private static $valueToName = [
+ self::PROVIDER_UNSPECIFIED => 'PROVIDER_UNSPECIFIED',
+ self::CALICO => 'CALICO',
+ ];
+
+ 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/Container/src/V1/NodePool/Status.php b/Container/src/V1/NodePool/Status.php
index e19adc8aaf61..76d3391edf7d 100644
--- a/Container/src/V1/NodePool/Status.php
+++ b/Container/src/V1/NodePool/Status.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Container\V1\NodePool;
+use UnexpectedValueException;
+
/**
* The current status of the node pool instance.
*
@@ -60,6 +62,36 @@ class Status
* Generated from protobuf enum ERROR = 6;
*/
const ERROR = 6;
+
+ private static $valueToName = [
+ self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED',
+ self::PROVISIONING => 'PROVISIONING',
+ self::RUNNING => 'RUNNING',
+ self::RUNNING_WITH_ERROR => 'RUNNING_WITH_ERROR',
+ self::RECONCILING => 'RECONCILING',
+ self::STOPPING => 'STOPPING',
+ self::ERROR => 'ERROR',
+ ];
+
+ 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/Container/src/V1/Operation/Status.php b/Container/src/V1/Operation/Status.php
index 34d28751a3af..49c8585d1851 100644
--- a/Container/src/V1/Operation/Status.php
+++ b/Container/src/V1/Operation/Status.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Container\V1\Operation;
+use UnexpectedValueException;
+
/**
* Current status of the operation.
*
@@ -41,6 +43,34 @@ class Status
* Generated from protobuf enum ABORTING = 4;
*/
const ABORTING = 4;
+
+ private static $valueToName = [
+ self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED',
+ self::PENDING => 'PENDING',
+ self::RUNNING => 'RUNNING',
+ self::DONE => 'DONE',
+ self::ABORTING => 'ABORTING',
+ ];
+
+ 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/Container/src/V1/Operation/Type.php b/Container/src/V1/Operation/Type.php
index 26f085d68ff1..4992d7cf2186 100644
--- a/Container/src/V1/Operation/Type.php
+++ b/Container/src/V1/Operation/Type.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Container\V1\Operation;
+use UnexpectedValueException;
+
/**
* Operation type.
*
@@ -113,6 +115,46 @@ class Type
* Generated from protobuf enum SET_MAINTENANCE_POLICY = 16;
*/
const SET_MAINTENANCE_POLICY = 16;
+
+ private static $valueToName = [
+ self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED',
+ self::CREATE_CLUSTER => 'CREATE_CLUSTER',
+ self::DELETE_CLUSTER => 'DELETE_CLUSTER',
+ self::UPGRADE_MASTER => 'UPGRADE_MASTER',
+ self::UPGRADE_NODES => 'UPGRADE_NODES',
+ self::REPAIR_CLUSTER => 'REPAIR_CLUSTER',
+ self::UPDATE_CLUSTER => 'UPDATE_CLUSTER',
+ self::CREATE_NODE_POOL => 'CREATE_NODE_POOL',
+ self::DELETE_NODE_POOL => 'DELETE_NODE_POOL',
+ self::SET_NODE_POOL_MANAGEMENT => 'SET_NODE_POOL_MANAGEMENT',
+ self::AUTO_REPAIR_NODES => 'AUTO_REPAIR_NODES',
+ self::AUTO_UPGRADE_NODES => 'AUTO_UPGRADE_NODES',
+ self::SET_LABELS => 'SET_LABELS',
+ self::SET_MASTER_AUTH => 'SET_MASTER_AUTH',
+ self::SET_NODE_POOL_SIZE => 'SET_NODE_POOL_SIZE',
+ self::SET_NETWORK_POLICY => 'SET_NETWORK_POLICY',
+ self::SET_MAINTENANCE_POLICY => 'SET_MAINTENANCE_POLICY',
+ ];
+
+ 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/Container/src/V1/SetMasterAuthRequest/Action.php b/Container/src/V1/SetMasterAuthRequest/Action.php
index 103fd2fa49cd..f05c2c752248 100644
--- a/Container/src/V1/SetMasterAuthRequest/Action.php
+++ b/Container/src/V1/SetMasterAuthRequest/Action.php
@@ -4,6 +4,8 @@
namespace Google\Cloud\Container\V1\SetMasterAuthRequest;
+use UnexpectedValueException;
+
/**
* Operation type: what type update to perform.
*
@@ -38,6 +40,33 @@ class Action
* Generated from protobuf enum SET_USERNAME = 3;
*/
const SET_USERNAME = 3;
+
+ private static $valueToName = [
+ self::UNKNOWN => 'UNKNOWN',
+ self::SET_PASSWORD => 'SET_PASSWORD',
+ self::GENERATE_PASSWORD => 'GENERATE_PASSWORD',
+ self::SET_USERNAME => 'SET_USERNAME',
+ ];
+
+ 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/Container/synth.metadata b/Container/synth.metadata
index dbe260e8c2aa..1c4e2dee1ccf 100644
--- a/Container/synth.metadata
+++ b/Container/synth.metadata
@@ -1,19 +1,19 @@
{
- "updateTime": "2019-03-28T09:59:19.575594Z",
+ "updateTime": "2019-03-29T09:59:16.145267Z",
"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": "37386f1ebcaed51bcb7d15d00124d22c38606e45",
+ "internalRef": "240841842"
}
}
],