From b50623101b8fd18433ee2223a82e576d83e2eba2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 14:30:32 -0700 Subject: [PATCH] feat: add max messages batching for Cloud Storage subscriptions PiperOrigin-RevId: 651799920 Source-Link: https://github.com/googleapis/googleapis/commit/8148b2fde13d3ed79cf285e9c529572aa8cf6ef7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1a41634b2c8b7c5c7ea79e9d86f514b532f17d08 Copy-Tag: eyJwIjoiUHViU3ViLy5Pd2xCb3QueWFtbCIsImgiOiIxYTQxNjM0YjJjOGI3YzVjN2VhNzllOWQ4NmY1MTRiNTMyZjE3ZDA4In0= chore(php): update pubsub migration mode to NEW_SURFACE_ONLY (#7526) PiperOrigin-RevId: 652501410 Source-Link: https://github.com/googleapis/googleapis/commit/e3838fbf057c3b69efc1e0b8e1a5a288ee91a00d Source-Link: https://github.com/googleapis/googleapis-gen/commit/136a3099370aa97d852e26fc964a7f4cf7de14ea Copy-Tag: eyJwIjoiUHViU3ViLy5Pd2xCb3QueWFtbCIsImgiOiIxMzZhMzA5OTM3MGFhOTdkODUyZTI2ZmM5NjRhN2Y0Y2Y3ZGUxNGVhIn0= Co-authored-by: Brent Shaffer --- PubSub/metadata/V1/Pubsub.php | Bin 15721 -> 15748 bytes PubSub/src/V1/CloudStorageConfig.php | 38 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/PubSub/metadata/V1/Pubsub.php b/PubSub/metadata/V1/Pubsub.php index 493b7610f5b5d4d680f0156ba5f5e1a8d836fff7..24fe3d2dfabe8a8d697094b489e35d38dec86645 100644 GIT binary patch delta 44 zcmaD^)l$9TEHmSi&F7f)#TZ|1{wG<+C@9Irlbcu(pPO1-oS2?kEWxokOZvYe0H$^k AaR2}S delta 26 icmZpvep$8QEHmTD&F7f)#Td_R{wG<+xVc~Yt0DlZMhp1> diff --git a/PubSub/src/V1/CloudStorageConfig.php b/PubSub/src/V1/CloudStorageConfig.php index 59bd8903f91..8c3594eb92d 100644 --- a/PubSub/src/V1/CloudStorageConfig.php +++ b/PubSub/src/V1/CloudStorageConfig.php @@ -63,6 +63,13 @@ class CloudStorageConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field int64 max_bytes = 7 [(.google.api.field_behavior) = OPTIONAL]; */ private $max_bytes = 0; + /** + * Optional. The maximum number of messages that can be written to a Cloud + * Storage file before a new file is created. Min 1000 messages. + * + * Generated from protobuf field int64 max_messages = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $max_messages = 0; /** * Output only. An output-only field that indicates whether or not the * subscription can receive messages. @@ -119,6 +126,9 @@ class CloudStorageConfig extends \Google\Protobuf\Internal\Message * Optional. The maximum bytes that can be written to a Cloud Storage file * before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may * be exceeded in cases where messages are larger than the limit. + * @type int|string $max_messages + * Optional. The maximum number of messages that can be written to a Cloud + * Storage file before a new file is created. Min 1000 messages. * @type int $state * Output only. An output-only field that indicates whether or not the * subscription can receive messages. @@ -392,6 +402,34 @@ public function setMaxBytes($var) return $this; } + /** + * Optional. The maximum number of messages that can be written to a Cloud + * Storage file before a new file is created. Min 1000 messages. + * + * Generated from protobuf field int64 max_messages = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxMessages() + { + return $this->max_messages; + } + + /** + * Optional. The maximum number of messages that can be written to a Cloud + * Storage file before a new file is created. Min 1000 messages. + * + * Generated from protobuf field int64 max_messages = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxMessages($var) + { + GPBUtil::checkInt64($var); + $this->max_messages = $var; + + return $this; + } + /** * Output only. An output-only field that indicates whether or not the * subscription can receive messages.