From 21a154bc73ea8f04b12250f1f48b2b17c4329c43 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:05:16 -0400 Subject: [PATCH] feat: return listing information for subscriptions created via Analytics Hub (#7682) PiperOrigin-RevId: 676126585 Source-Link: https://github.com/googleapis/googleapis/commit/de3b4b32cdf9edbe6ed687a985af393769052972 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c3df55162ccc9929c97bfec9fa1d5bcd3b65af4a Copy-Tag: eyJwIjoiUHViU3ViLy5Pd2xCb3QueWFtbCIsImgiOiJjM2RmNTUxNjJjY2M5OTI5Yzk3YmZlYzlmYTFkNWJjZDNiNjVhZjRhIn0= --- PubSub/metadata/V1/Pubsub.php | Bin 15748 -> 15936 bytes PubSub/src/V1/Subscription.php | 48 +++++++ .../AnalyticsHubSubscriptionInfo.php | 119 ++++++++++++++++++ 3 files changed, 167 insertions(+) create mode 100644 PubSub/src/V1/Subscription/AnalyticsHubSubscriptionInfo.php diff --git a/PubSub/metadata/V1/Pubsub.php b/PubSub/metadata/V1/Pubsub.php index 24fe3d2dfabe8a8d697094b489e35d38dec86645..9e49363c323964924dd1b54fb00f6b2bd7f44838 100644 GIT binary patch delta 208 zcmZpvK2WpaEHl%BlFjFtzwj`v=GuHzU>UQvP$rjrVqRiSWl3goaePK;Qhae~QgL!o zW3{DxH`gI5JE5bIIUSBqYMc zo|9Qzl9`t-!3Z>&6Qqk#NRo>O*=7kQxRjJG7q?GhQff}IYu@Bub(PJtMP6zE0QB5P ASO5S3 delta 32 qcmV+*0N?+>e1vx4Da.google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $state = 0; + /** + * Output only. Information about the associated Analytics Hub subscription. + * Only set if the subscritpion is created by Analytics Hub. + * + * Generated from protobuf field .google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo analytics_hub_subscription_info = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $analytics_hub_subscription_info = null; /** * @param string $name Required. The name of the subscription. It must have the format @@ -373,6 +380,9 @@ public static function build(string $name, string $topic, \Google\Cloud\PubSub\V * @type int $state * Output only. An output-only field indicating whether or not the * subscription can receive messages. + * @type \Google\Cloud\PubSub\V1\Subscription\AnalyticsHubSubscriptionInfo $analytics_hub_subscription_info + * Output only. Information about the associated Analytics Hub subscription. + * Only set if the subscritpion is created by Analytics Hub. * } */ public function __construct($data = NULL) { @@ -1086,5 +1096,43 @@ public function setState($var) return $this; } + /** + * Output only. Information about the associated Analytics Hub subscription. + * Only set if the subscritpion is created by Analytics Hub. + * + * Generated from protobuf field .google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo analytics_hub_subscription_info = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\PubSub\V1\Subscription\AnalyticsHubSubscriptionInfo|null + */ + public function getAnalyticsHubSubscriptionInfo() + { + return $this->analytics_hub_subscription_info; + } + + public function hasAnalyticsHubSubscriptionInfo() + { + return isset($this->analytics_hub_subscription_info); + } + + public function clearAnalyticsHubSubscriptionInfo() + { + unset($this->analytics_hub_subscription_info); + } + + /** + * Output only. Information about the associated Analytics Hub subscription. + * Only set if the subscritpion is created by Analytics Hub. + * + * Generated from protobuf field .google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo analytics_hub_subscription_info = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\PubSub\V1\Subscription\AnalyticsHubSubscriptionInfo $var + * @return $this + */ + public function setAnalyticsHubSubscriptionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Subscription\AnalyticsHubSubscriptionInfo::class); + $this->analytics_hub_subscription_info = $var; + + return $this; + } + } diff --git a/PubSub/src/V1/Subscription/AnalyticsHubSubscriptionInfo.php b/PubSub/src/V1/Subscription/AnalyticsHubSubscriptionInfo.php new file mode 100644 index 000000000000..4ff191f3f46d --- /dev/null +++ b/PubSub/src/V1/Subscription/AnalyticsHubSubscriptionInfo.php @@ -0,0 +1,119 @@ +google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo + */ +class AnalyticsHubSubscriptionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The name of the associated Analytics Hub listing resource. + * Pattern: + * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" + * + * Generated from protobuf field string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $listing = ''; + /** + * Optional. The name of the associated Analytics Hub subscription resource. + * Pattern: + * "projects/{project}/locations/{location}/subscriptions/{subscription}" + * + * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $subscription = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $listing + * Optional. The name of the associated Analytics Hub listing resource. + * Pattern: + * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" + * @type string $subscription + * Optional. The name of the associated Analytics Hub subscription resource. + * Pattern: + * "projects/{project}/locations/{location}/subscriptions/{subscription}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The name of the associated Analytics Hub listing resource. + * Pattern: + * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" + * + * Generated from protobuf field string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getListing() + { + return $this->listing; + } + + /** + * Optional. The name of the associated Analytics Hub listing resource. + * Pattern: + * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" + * + * Generated from protobuf field string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setListing($var) + { + GPBUtil::checkString($var, True); + $this->listing = $var; + + return $this; + } + + /** + * Optional. The name of the associated Analytics Hub subscription resource. + * Pattern: + * "projects/{project}/locations/{location}/subscriptions/{subscription}" + * + * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubscription() + { + return $this->subscription; + } + + /** + * Optional. The name of the associated Analytics Hub subscription resource. + * Pattern: + * "projects/{project}/locations/{location}/subscriptions/{subscription}" + * + * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubscription($var) + { + GPBUtil::checkString($var, True); + $this->subscription = $var; + + return $this; + } + +} + +