From 7f79cb6c7bba5a5c39184433017ebaf678485304 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 06:18:37 -0800 Subject: [PATCH] feat: support manual instance count in Cloud Run for manual scaling feature (#7844) PiperOrigin-RevId: 697723876 Source-Link: https://github.com/googleapis/googleapis/commit/c6eb517e76204c0cd71ab298c165eebbf12682eb Source-Link: https://github.com/googleapis/googleapis-gen/commit/7dd2077b5bcab9d8d72d1c0e38c5241435ec616d Copy-Tag: eyJwIjoiUnVuLy5Pd2xCb3QueWFtbCIsImgiOiI3ZGQyMDc3YjViY2FiOWQ4ZDcyZDFjMGUzOGM1MjQxNDM1ZWM2MTZkIn0= --- Run/metadata/V2/VendorSettings.php | Bin 2442 -> 2510 bytes Run/src/V2/ServiceScaling.php | 52 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/Run/metadata/V2/VendorSettings.php b/Run/metadata/V2/VendorSettings.php index c96bdb10ec7926db738b43f24ea381b84394ff92..5504bca48fbb4fb082ec617d7bef602dfd51f869 100644 GIT binary patch delta 113 zcmeAYJ}11vpNVNJ-{wFj17_|HCN93<)S|M?n+$FrhpNZ)c@8&=z17_}{j9h%dsYPX($*Ge+uxL)+%IZB?i_K$m51SJ+07gg- AQ2+n{ diff --git a/Run/src/V2/ServiceScaling.php b/Run/src/V2/ServiceScaling.php index eff3cf1badc1..7fa643373a05 100644 --- a/Run/src/V2/ServiceScaling.php +++ b/Run/src/V2/ServiceScaling.php @@ -30,6 +30,14 @@ class ServiceScaling extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; */ protected $scaling_mode = 0; + /** + * Optional. total instance count for the service in manual scaling mode. This + * number of instances is divided among all revisions with specified traffic + * based on the percent of traffic they are receiving. + * + * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $manual_instance_count = null; /** * Constructor. @@ -43,6 +51,10 @@ class ServiceScaling extends \Google\Protobuf\Internal\Message * of traffic they are receiving. * @type int $scaling_mode * Optional. The scaling mode for the service. + * @type int $manual_instance_count + * Optional. total instance count for the service in manual scaling mode. This + * number of instances is divided among all revisions with specified traffic + * based on the percent of traffic they are receiving. * } */ public function __construct($data = NULL) { @@ -106,5 +118,45 @@ public function setScalingMode($var) return $this; } + /** + * Optional. total instance count for the service in manual scaling mode. This + * number of instances is divided among all revisions with specified traffic + * based on the percent of traffic they are receiving. + * + * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getManualInstanceCount() + { + return isset($this->manual_instance_count) ? $this->manual_instance_count : 0; + } + + public function hasManualInstanceCount() + { + return isset($this->manual_instance_count); + } + + public function clearManualInstanceCount() + { + unset($this->manual_instance_count); + } + + /** + * Optional. total instance count for the service in manual scaling mode. This + * number of instances is divided among all revisions with specified traffic + * based on the percent of traffic they are receiving. + * + * Generated from protobuf field optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setManualInstanceCount($var) + { + GPBUtil::checkInt32($var); + $this->manual_instance_count = $var; + + return $this; + } + }