Skip to content

Commit f6a55e3

Browse files
feat: [google-cloud-bigquery-analyticshub] Support new feature Sharing Cloud Pubsub Streams via AH (GA) and Subscriber Email logging feature (googleapis#13713)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 740660889 Source-Link: googleapis/googleapis@b64f36a Source-Link: https://github.com/googleapis/googleapis-gen/commit/287281224e62b313c0aebd87967b72655c772ccb Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWFuYWx5dGljc2h1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjg3MjgxMjI0ZTYyYjMxM2MwYWViZDg3OTY3YjcyNjU1Yzc3MmNjYiJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 8bdf223 commit f6a55e3

File tree

11 files changed

+1209
-44
lines changed

11 files changed

+1209
-44
lines changed

packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
DeleteSubscriptionRequest,
3535
DestinationDataset,
3636
DestinationDatasetReference,
37+
DestinationPubSubSubscription,
3738
DiscoveryType,
3839
GetDataExchangeRequest,
3940
GetListingRequest,
@@ -55,6 +56,7 @@
5556
RefreshSubscriptionResponse,
5657
RevokeSubscriptionRequest,
5758
RevokeSubscriptionResponse,
59+
SharedResourceType,
5860
SharingEnvironmentConfig,
5961
SubscribeDataExchangeRequest,
6062
SubscribeDataExchangeResponse,
@@ -64,6 +66,17 @@
6466
UpdateDataExchangeRequest,
6567
UpdateListingRequest,
6668
)
69+
from google.cloud.bigquery_analyticshub_v1.types.pubsub import (
70+
BigQueryConfig,
71+
CloudStorageConfig,
72+
DeadLetterPolicy,
73+
ExpirationPolicy,
74+
JavaScriptUDF,
75+
MessageTransform,
76+
PubSubSubscription,
77+
PushConfig,
78+
RetryPolicy,
79+
)
6780

6881
__all__ = (
6982
"AnalyticsHubServiceClient",
@@ -77,6 +90,7 @@
7790
"DeleteSubscriptionRequest",
7891
"DestinationDataset",
7992
"DestinationDatasetReference",
93+
"DestinationPubSubSubscription",
8094
"GetDataExchangeRequest",
8195
"GetListingRequest",
8296
"GetSubscriptionRequest",
@@ -106,4 +120,14 @@
106120
"UpdateDataExchangeRequest",
107121
"UpdateListingRequest",
108122
"DiscoveryType",
123+
"SharedResourceType",
124+
"BigQueryConfig",
125+
"CloudStorageConfig",
126+
"DeadLetterPolicy",
127+
"ExpirationPolicy",
128+
"JavaScriptUDF",
129+
"MessageTransform",
130+
"PubSubSubscription",
131+
"PushConfig",
132+
"RetryPolicy",
109133
)

packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
DeleteSubscriptionRequest,
3333
DestinationDataset,
3434
DestinationDatasetReference,
35+
DestinationPubSubSubscription,
3536
DiscoveryType,
3637
GetDataExchangeRequest,
3738
GetListingRequest,
@@ -53,6 +54,7 @@
5354
RefreshSubscriptionResponse,
5455
RevokeSubscriptionRequest,
5556
RevokeSubscriptionResponse,
57+
SharedResourceType,
5658
SharingEnvironmentConfig,
5759
SubscribeDataExchangeRequest,
5860
SubscribeDataExchangeResponse,
@@ -62,23 +64,40 @@
6264
UpdateDataExchangeRequest,
6365
UpdateListingRequest,
6466
)
67+
from .types.pubsub import (
68+
BigQueryConfig,
69+
CloudStorageConfig,
70+
DeadLetterPolicy,
71+
ExpirationPolicy,
72+
JavaScriptUDF,
73+
MessageTransform,
74+
PubSubSubscription,
75+
PushConfig,
76+
RetryPolicy,
77+
)
6578

6679
__all__ = (
6780
"AnalyticsHubServiceAsyncClient",
6881
"AnalyticsHubServiceClient",
82+
"BigQueryConfig",
83+
"CloudStorageConfig",
6984
"CreateDataExchangeRequest",
7085
"CreateListingRequest",
7186
"DataExchange",
7287
"DataProvider",
88+
"DeadLetterPolicy",
7389
"DeleteDataExchangeRequest",
7490
"DeleteListingRequest",
7591
"DeleteSubscriptionRequest",
7692
"DestinationDataset",
7793
"DestinationDatasetReference",
94+
"DestinationPubSubSubscription",
7895
"DiscoveryType",
96+
"ExpirationPolicy",
7997
"GetDataExchangeRequest",
8098
"GetListingRequest",
8199
"GetSubscriptionRequest",
100+
"JavaScriptUDF",
82101
"ListDataExchangesRequest",
83102
"ListDataExchangesResponse",
84103
"ListListingsRequest",
@@ -90,12 +109,17 @@
90109
"ListSubscriptionsRequest",
91110
"ListSubscriptionsResponse",
92111
"Listing",
112+
"MessageTransform",
93113
"OperationMetadata",
114+
"PubSubSubscription",
94115
"Publisher",
116+
"PushConfig",
95117
"RefreshSubscriptionRequest",
96118
"RefreshSubscriptionResponse",
119+
"RetryPolicy",
97120
"RevokeSubscriptionRequest",
98121
"RevokeSubscriptionResponse",
122+
"SharedResourceType",
99123
"SharingEnvironmentConfig",
100124
"SubscribeDataExchangeRequest",
101125
"SubscribeDataExchangeResponse",

packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/services/analytics_hub_service/async_client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ class AnalyticsHubServiceAsyncClient:
102102
)
103103
table_path = staticmethod(AnalyticsHubServiceClient.table_path)
104104
parse_table_path = staticmethod(AnalyticsHubServiceClient.parse_table_path)
105+
topic_path = staticmethod(AnalyticsHubServiceClient.topic_path)
106+
parse_topic_path = staticmethod(AnalyticsHubServiceClient.parse_topic_path)
105107
common_billing_account_path = staticmethod(
106108
AnalyticsHubServiceClient.common_billing_account_path
107109
)
@@ -1776,8 +1778,8 @@ async def subscribe_data_exchange(
17761778
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
17771779
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
17781780
) -> operation_async.AsyncOperation:
1779-
r"""Creates a Subscription to a Data Exchange. This is a
1780-
long-running operation as it will create one or more
1781+
r"""Creates a Subscription to a Data Clean Room. This is
1782+
a long-running operation as it will create one or more
17811783
linked datasets.
17821784
17831785
.. code-block:: python
@@ -2461,7 +2463,7 @@ async def sample_revoke_subscription():
24612463
Returns:
24622464
google.cloud.bigquery_analyticshub_v1.types.RevokeSubscriptionResponse:
24632465
Message for response when you revoke
2464-
a subscription.
2466+
a subscription. Empty for now.
24652467
24662468
"""
24672469
# Create or coerce a protobuf request object.

packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/services/analytics_hub_service/client.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,23 @@ def parse_table_path(path: str) -> Dict[str, str]:
316316
)
317317
return m.groupdict() if m else {}
318318

319+
@staticmethod
320+
def topic_path(
321+
project: str,
322+
topic: str,
323+
) -> str:
324+
"""Returns a fully-qualified topic string."""
325+
return "projects/{project}/topics/{topic}".format(
326+
project=project,
327+
topic=topic,
328+
)
329+
330+
@staticmethod
331+
def parse_topic_path(path: str) -> Dict[str, str]:
332+
"""Parses a topic path into its component segments."""
333+
m = re.match(r"^projects/(?P<project>.+?)/topics/(?P<topic>.+?)$", path)
334+
return m.groupdict() if m else {}
335+
319336
@staticmethod
320337
def common_billing_account_path(
321338
billing_account: str,
@@ -2235,8 +2252,8 @@ def subscribe_data_exchange(
22352252
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
22362253
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
22372254
) -> operation.Operation:
2238-
r"""Creates a Subscription to a Data Exchange. This is a
2239-
long-running operation as it will create one or more
2255+
r"""Creates a Subscription to a Data Clean Room. This is
2256+
a long-running operation as it will create one or more
22402257
linked datasets.
22412258
22422259
.. code-block:: python
@@ -2907,7 +2924,7 @@ def sample_revoke_subscription():
29072924
Returns:
29082925
google.cloud.bigquery_analyticshub_v1.types.RevokeSubscriptionResponse:
29092926
Message for response when you revoke
2910-
a subscription.
2927+
a subscription. Empty for now.
29112928
29122929
"""
29132930
# Create or coerce a protobuf request object.

packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/services/analytics_hub_service/transports/grpc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,8 @@ def subscribe_data_exchange(
684684
]:
685685
r"""Return a callable for the subscribe data exchange method over gRPC.
686686
687-
Creates a Subscription to a Data Exchange. This is a
688-
long-running operation as it will create one or more
687+
Creates a Subscription to a Data Clean Room. This is
688+
a long-running operation as it will create one or more
689689
linked datasets.
690690
691691
Returns:

packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/services/analytics_hub_service/transports/grpc_asyncio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,8 @@ def subscribe_data_exchange(
699699
]:
700700
r"""Return a callable for the subscribe data exchange method over gRPC.
701701
702-
Creates a Subscription to a Data Exchange. This is a
703-
long-running operation as it will create one or more
702+
Creates a Subscription to a Data Clean Room. This is
703+
a long-running operation as it will create one or more
704704
linked datasets.
705705
706706
Returns:

packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/types/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
DeleteSubscriptionRequest,
2424
DestinationDataset,
2525
DestinationDatasetReference,
26+
DestinationPubSubSubscription,
2627
DiscoveryType,
2728
GetDataExchangeRequest,
2829
GetListingRequest,
@@ -44,6 +45,7 @@
4445
RefreshSubscriptionResponse,
4546
RevokeSubscriptionRequest,
4647
RevokeSubscriptionResponse,
48+
SharedResourceType,
4749
SharingEnvironmentConfig,
4850
SubscribeDataExchangeRequest,
4951
SubscribeDataExchangeResponse,
@@ -53,6 +55,17 @@
5355
UpdateDataExchangeRequest,
5456
UpdateListingRequest,
5557
)
58+
from .pubsub import (
59+
BigQueryConfig,
60+
CloudStorageConfig,
61+
DeadLetterPolicy,
62+
ExpirationPolicy,
63+
JavaScriptUDF,
64+
MessageTransform,
65+
PubSubSubscription,
66+
PushConfig,
67+
RetryPolicy,
68+
)
5669

5770
__all__ = (
5871
"CreateDataExchangeRequest",
@@ -64,6 +77,7 @@
6477
"DeleteSubscriptionRequest",
6578
"DestinationDataset",
6679
"DestinationDatasetReference",
80+
"DestinationPubSubSubscription",
6781
"GetDataExchangeRequest",
6882
"GetListingRequest",
6983
"GetSubscriptionRequest",
@@ -93,4 +107,14 @@
93107
"UpdateDataExchangeRequest",
94108
"UpdateListingRequest",
95109
"DiscoveryType",
110+
"SharedResourceType",
111+
"BigQueryConfig",
112+
"CloudStorageConfig",
113+
"DeadLetterPolicy",
114+
"ExpirationPolicy",
115+
"JavaScriptUDF",
116+
"MessageTransform",
117+
"PubSubSubscription",
118+
"PushConfig",
119+
"RetryPolicy",
96120
)

0 commit comments

Comments
 (0)