diff --git a/PubSub/metadata/V1/Pubsub.php b/PubSub/metadata/V1/Pubsub.php
index 24fe3d2dfabe..9e49363c3239 100644
Binary files a/PubSub/metadata/V1/Pubsub.php and b/PubSub/metadata/V1/Pubsub.php differ
diff --git a/PubSub/src/V1/Subscription.php b/PubSub/src/V1/Subscription.php
index 8da1510c8e87..52ca9166c850 100644
--- a/PubSub/src/V1/Subscription.php
+++ b/PubSub/src/V1/Subscription.php
@@ -204,6 +204,13 @@ class Subscription extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .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;
+ }
+
+}
+
+