diff --git a/Container/metadata/V1/ClusterService.php b/Container/metadata/V1/ClusterService.php index 718fffcb4a98..36b49e5bae55 100644 Binary files a/Container/metadata/V1/ClusterService.php and b/Container/metadata/V1/ClusterService.php differ diff --git a/Container/src/V1/Cluster.php b/Container/src/V1/Cluster.php index ccf038711910..d49351ecef09 100644 --- a/Container/src/V1/Cluster.php +++ b/Container/src/V1/Cluster.php @@ -537,6 +537,12 @@ class Cluster extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.container.v1.K8sBetaAPIConfig enable_k8s_beta_apis = 143; */ private $enable_k8s_beta_apis = null; + /** + * GKE Enterprise Configuration. + * + * Generated from protobuf field .google.container.v1.EnterpriseConfig enterprise_config = 149; + */ + private $enterprise_config = null; /** * Constructor. @@ -795,6 +801,8 @@ class Cluster extends \Google\Protobuf\Internal\Message * Enable/Disable Security Posture API features for the cluster. * @type \Google\Cloud\Container\V1\K8sBetaAPIConfig $enable_k8s_beta_apis * Beta APIs Config + * @type \Google\Cloud\Container\V1\EnterpriseConfig $enterprise_config + * GKE Enterprise Configuration. * } */ public function __construct($data = NULL) { @@ -3116,5 +3124,41 @@ public function setEnableK8SBetaApis($var) return $this; } + /** + * GKE Enterprise Configuration. + * + * Generated from protobuf field .google.container.v1.EnterpriseConfig enterprise_config = 149; + * @return \Google\Cloud\Container\V1\EnterpriseConfig|null + */ + public function getEnterpriseConfig() + { + return $this->enterprise_config; + } + + public function hasEnterpriseConfig() + { + return isset($this->enterprise_config); + } + + public function clearEnterpriseConfig() + { + unset($this->enterprise_config); + } + + /** + * GKE Enterprise Configuration. + * + * Generated from protobuf field .google.container.v1.EnterpriseConfig enterprise_config = 149; + * @param \Google\Cloud\Container\V1\EnterpriseConfig $var + * @return $this + */ + public function setEnterpriseConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\EnterpriseConfig::class); + $this->enterprise_config = $var; + + return $this; + } + } diff --git a/Container/src/V1/EnterpriseConfig.php b/Container/src/V1/EnterpriseConfig.php new file mode 100644 index 000000000000..c0ab85a86448 --- /dev/null +++ b/Container/src/V1/EnterpriseConfig.php @@ -0,0 +1,71 @@ +google.container.v1.EnterpriseConfig + */ +class EnterpriseConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. [Output only] cluster_tier specifies the premium tier of the + * cluster. + * + * Generated from protobuf field .google.container.v1.EnterpriseConfig.ClusterTier cluster_tier = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $cluster_tier = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cluster_tier + * Output only. [Output only] cluster_tier specifies the premium tier of the + * cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Container\V1\ClusterService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. [Output only] cluster_tier specifies the premium tier of the + * cluster. + * + * Generated from protobuf field .google.container.v1.EnterpriseConfig.ClusterTier cluster_tier = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getClusterTier() + { + return $this->cluster_tier; + } + + /** + * Output only. [Output only] cluster_tier specifies the premium tier of the + * cluster. + * + * Generated from protobuf field .google.container.v1.EnterpriseConfig.ClusterTier cluster_tier = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setClusterTier($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\EnterpriseConfig\ClusterTier::class); + $this->cluster_tier = $var; + + return $this; + } + +} + diff --git a/Container/src/V1/EnterpriseConfig/ClusterTier.php b/Container/src/V1/EnterpriseConfig/ClusterTier.php new file mode 100644 index 000000000000..b5705813e917 --- /dev/null +++ b/Container/src/V1/EnterpriseConfig/ClusterTier.php @@ -0,0 +1,64 @@ +google.container.v1.EnterpriseConfig.ClusterTier + */ +class ClusterTier +{ + /** + * CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set. + * + * Generated from protobuf enum CLUSTER_TIER_UNSPECIFIED = 0; + */ + const CLUSTER_TIER_UNSPECIFIED = 0; + /** + * STANDARD indicates a standard GKE cluster. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * ENTERPRISE indicates a GKE Enterprise cluster. + * + * Generated from protobuf enum ENTERPRISE = 2; + */ + const ENTERPRISE = 2; + + private static $valueToName = [ + self::CLUSTER_TIER_UNSPECIFIED => 'CLUSTER_TIER_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::ENTERPRISE => 'ENTERPRISE', + ]; + + 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. +class_alias(ClusterTier::class, \Google\Cloud\Container\V1\EnterpriseConfig_ClusterTier::class); +