diff --git a/metadata/Admin/V2/Instance.php b/metadata/Admin/V2/Instance.php index 51e9f0c..7cfcef6 100644 Binary files a/metadata/Admin/V2/Instance.php and b/metadata/Admin/V2/Instance.php differ diff --git a/src/Admin/V2/Cluster.php b/src/Admin/V2/Cluster.php index 4039b9c..f85b6bc 100644 --- a/src/Admin/V2/Cluster.php +++ b/src/Admin/V2/Cluster.php @@ -46,6 +46,12 @@ class Cluster extends \Google\Protobuf\Internal\Message * Generated from protobuf field int32 serve_nodes = 4; */ protected $serve_nodes = 0; + /** + * Immutable. The node scaling factor of this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $node_scaling_factor = 0; /** * Immutable. The type of storage used by this cluster to serve its * parent instance's tables, unless explicitly overridden. @@ -80,6 +86,8 @@ class Cluster extends \Google\Protobuf\Internal\Message * @type int $serve_nodes * The number of nodes allocated to this cluster. More nodes enable higher * throughput and more consistent performance. + * @type int $node_scaling_factor + * Immutable. The node scaling factor of this cluster. * @type \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig $cluster_config * Configuration for this cluster. * @type int $default_storage_type @@ -208,6 +216,32 @@ public function setServeNodes($var) return $this; } + /** + * Immutable. The node scaling factor of this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getNodeScalingFactor() + { + return $this->node_scaling_factor; + } + + /** + * Immutable. The node scaling factor of this cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setNodeScalingFactor($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\NodeScalingFactor::class); + $this->node_scaling_factor = $var; + + return $this; + } + /** * Configuration for this cluster. * diff --git a/src/Admin/V2/Cluster/NodeScalingFactor.php b/src/Admin/V2/Cluster/NodeScalingFactor.php new file mode 100644 index 0000000..c5f625f --- /dev/null +++ b/src/Admin/V2/Cluster/NodeScalingFactor.php @@ -0,0 +1,67 @@ +google.bigtable.admin.v2.Cluster.NodeScalingFactor + */ +class NodeScalingFactor +{ + /** + * No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X. + * + * Generated from protobuf enum NODE_SCALING_FACTOR_UNSPECIFIED = 0; + */ + const NODE_SCALING_FACTOR_UNSPECIFIED = 0; + /** + * The cluster is running with a scaling factor of 1. + * + * Generated from protobuf enum NODE_SCALING_FACTOR_1X = 1; + */ + const NODE_SCALING_FACTOR_1X = 1; + /** + * The cluster is running with a scaling factor of 2. + * All node count values must be in increments of 2 with this scaling factor + * enabled, otherwise an INVALID_ARGUMENT error will be returned. + * + * Generated from protobuf enum NODE_SCALING_FACTOR_2X = 2; + */ + const NODE_SCALING_FACTOR_2X = 2; + + private static $valueToName = [ + self::NODE_SCALING_FACTOR_UNSPECIFIED => 'NODE_SCALING_FACTOR_UNSPECIFIED', + self::NODE_SCALING_FACTOR_1X => 'NODE_SCALING_FACTOR_1X', + self::NODE_SCALING_FACTOR_2X => 'NODE_SCALING_FACTOR_2X', + ]; + + 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(NodeScalingFactor::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_NodeScalingFactor::class); +