Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit b6d29bd

Browse files
1 parent a821356 commit b6d29bd

157 files changed

Lines changed: 233 additions & 77486 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

google/pubsub_v1/services/publisher/async_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ class PublisherAsyncClient:
8080
_DEFAULT_ENDPOINT_TEMPLATE = PublisherClient._DEFAULT_ENDPOINT_TEMPLATE
8181
_DEFAULT_UNIVERSE = PublisherClient._DEFAULT_UNIVERSE
8282

83+
crypto_key_path = staticmethod(PublisherClient.crypto_key_path)
84+
parse_crypto_key_path = staticmethod(PublisherClient.parse_crypto_key_path)
8385
schema_path = staticmethod(PublisherClient.schema_path)
8486
parse_schema_path = staticmethod(PublisherClient.parse_schema_path)
87+
snapshot_path = staticmethod(PublisherClient.snapshot_path)
88+
parse_snapshot_path = staticmethod(PublisherClient.parse_snapshot_path)
8589
subscription_path = staticmethod(PublisherClient.subscription_path)
8690
parse_subscription_path = staticmethod(PublisherClient.parse_subscription_path)
8791
topic_path = staticmethod(PublisherClient.topic_path)

google/pubsub_v1/services/publisher/client.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,30 @@ def transport(self) -> PublisherTransport:
215215
"""
216216
return self._transport
217217

218+
@staticmethod
219+
def crypto_key_path(
220+
project: str,
221+
location: str,
222+
key_ring: str,
223+
crypto_key: str,
224+
) -> str:
225+
"""Returns a fully-qualified crypto_key string."""
226+
return "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format(
227+
project=project,
228+
location=location,
229+
key_ring=key_ring,
230+
crypto_key=crypto_key,
231+
)
232+
233+
@staticmethod
234+
def parse_crypto_key_path(path: str) -> Dict[str, str]:
235+
"""Parses a crypto_key path into its component segments."""
236+
m = re.match(
237+
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/keyRings/(?P<key_ring>.+?)/cryptoKeys/(?P<crypto_key>.+?)$",
238+
path,
239+
)
240+
return m.groupdict() if m else {}
241+
218242
@staticmethod
219243
def schema_path(
220244
project: str,
@@ -232,6 +256,23 @@ def parse_schema_path(path: str) -> Dict[str, str]:
232256
m = re.match(r"^projects/(?P<project>.+?)/schemas/(?P<schema>.+?)$", path)
233257
return m.groupdict() if m else {}
234258

259+
@staticmethod
260+
def snapshot_path(
261+
project: str,
262+
snapshot: str,
263+
) -> str:
264+
"""Returns a fully-qualified snapshot string."""
265+
return "projects/{project}/snapshots/{snapshot}".format(
266+
project=project,
267+
snapshot=snapshot,
268+
)
269+
270+
@staticmethod
271+
def parse_snapshot_path(path: str) -> Dict[str, str]:
272+
"""Parses a snapshot path into its component segments."""
273+
m = re.match(r"^projects/(?P<project>.+?)/snapshots/(?P<snapshot>.+?)$", path)
274+
return m.groupdict() if m else {}
275+
235276
@staticmethod
236277
def subscription_path(
237278
project: str,

google/pubsub_v1/services/subscriber/async_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ class SubscriberAsyncClient:
8686
_DEFAULT_ENDPOINT_TEMPLATE = SubscriberClient._DEFAULT_ENDPOINT_TEMPLATE
8787
_DEFAULT_UNIVERSE = SubscriberClient._DEFAULT_UNIVERSE
8888

89+
listing_path = staticmethod(SubscriberClient.listing_path)
90+
parse_listing_path = staticmethod(SubscriberClient.parse_listing_path)
8991
snapshot_path = staticmethod(SubscriberClient.snapshot_path)
9092
parse_snapshot_path = staticmethod(SubscriberClient.parse_snapshot_path)
9193
subscription_path = staticmethod(SubscriberClient.subscription_path)

google/pubsub_v1/services/subscriber/client.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,30 @@ def transport(self) -> SubscriberTransport:
219219
"""
220220
return self._transport
221221

222+
@staticmethod
223+
def listing_path(
224+
project: str,
225+
location: str,
226+
data_exchange: str,
227+
listing: str,
228+
) -> str:
229+
"""Returns a fully-qualified listing string."""
230+
return "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}".format(
231+
project=project,
232+
location=location,
233+
data_exchange=data_exchange,
234+
listing=listing,
235+
)
236+
237+
@staticmethod
238+
def parse_listing_path(path: str) -> Dict[str, str]:
239+
"""Parses a listing path into its component segments."""
240+
m = re.match(
241+
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/dataExchanges/(?P<data_exchange>.+?)/listings/(?P<listing>.+?)$",
242+
path,
243+
)
244+
return m.groupdict() if m else {}
245+
222246
@staticmethod
223247
def snapshot_path(
224248
project: str,

google/pubsub_v1/types/pubsub.py

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,13 @@ class AwsKinesisFailureReason(proto.Message):
12101210
Optional. Failure encountered when applying a
12111211
message transformation to the Pub/Sub message.
12121212
1213+
This field is a member of `oneof`_ ``reason``.
1214+
api_violation_reason (google.pubsub_v1.types.IngestionFailureEvent.ApiViolationReason):
1215+
Optional. The message failed to be published
1216+
due to an API violation. This is only set when
1217+
the size of the data field of the Kinesis record
1218+
is zero.
1219+
12131220
This field is a member of `oneof`_ ``reason``.
12141221
"""
12151222

@@ -1239,6 +1246,12 @@ class AwsKinesisFailureReason(proto.Message):
12391246
oneof="reason",
12401247
message="IngestionFailureEvent.MessageTransformationFailureReason",
12411248
)
1249+
api_violation_reason: "IngestionFailureEvent.ApiViolationReason" = proto.Field(
1250+
proto.MESSAGE,
1251+
number=6,
1252+
oneof="reason",
1253+
message="IngestionFailureEvent.ApiViolationReason",
1254+
)
12421255

12431256
topic: str = proto.Field(
12441257
proto.STRING,
@@ -1423,6 +1436,13 @@ class Topic(proto.Message):
14231436
Optional. Transforms to be applied to
14241437
messages published to the topic. Transforms are
14251438
applied in the order specified.
1439+
tags (MutableMapping[str, str]):
1440+
Optional. Input only. Immutable. Tag
1441+
keys/values directly bound to this resource. For
1442+
example:
1443+
1444+
"123/environment": "production",
1445+
"123/costCenter": "marketing".
14261446
"""
14271447

14281448
class State(proto.Enum):
@@ -1491,6 +1511,11 @@ class State(proto.Enum):
14911511
number=13,
14921512
message="MessageTransform",
14931513
)
1514+
tags: MutableMapping[str, str] = proto.MapField(
1515+
proto.STRING,
1516+
proto.STRING,
1517+
number=14,
1518+
)
14941519

14951520

14961521
class PubsubMessage(proto.Message):
@@ -2024,6 +2049,13 @@ class Subscription(proto.Message):
20242049
messages before they are delivered to
20252050
subscribers. Transforms are applied in the order
20262051
specified.
2052+
tags (MutableMapping[str, str]):
2053+
Optional. Input only. Immutable. Tag
2054+
keys/values directly bound to this resource. For
2055+
example:
2056+
2057+
"123/environment": "production",
2058+
"123/costCenter": "marketing".
20272059
"""
20282060

20292061
class State(proto.Enum):
@@ -2162,6 +2194,11 @@ class AnalyticsHubSubscriptionInfo(proto.Message):
21622194
number=25,
21632195
message="MessageTransform",
21642196
)
2197+
tags: MutableMapping[str, str] = proto.MapField(
2198+
proto.STRING,
2199+
proto.STRING,
2200+
number=26,
2201+
)
21652202

21662203

21672204
class RetryPolicy(proto.Message):
@@ -3161,8 +3198,7 @@ class StreamingPullResponse(proto.Message):
31613198
31623199
Attributes:
31633200
received_messages (MutableSequence[google.pubsub_v1.types.ReceivedMessage]):
3164-
Optional. Received Pub/Sub messages. This
3165-
will not be empty.
3201+
Optional. Received Pub/Sub messages.
31663202
acknowledge_confirmation (google.pubsub_v1.types.StreamingPullResponse.AcknowledgeConfirmation):
31673203
Optional. This field will only be set if
31683204
``enable_exactly_once_delivery`` is set to ``true`` and is
@@ -3312,6 +3348,13 @@ class CreateSnapshotRequest(proto.Message):
33123348
labels (MutableMapping[str, str]):
33133349
Optional. See `Creating and managing
33143350
labels <https://cloud.google.com/pubsub/docs/labels>`__.
3351+
tags (MutableMapping[str, str]):
3352+
Optional. Input only. Immutable. Tag
3353+
keys/values directly bound to this resource. For
3354+
example:
3355+
3356+
"123/environment": "production",
3357+
"123/costCenter": "marketing".
33153358
"""
33163359

33173360
name: str = proto.Field(
@@ -3327,6 +3370,11 @@ class CreateSnapshotRequest(proto.Message):
33273370
proto.STRING,
33283371
number=3,
33293372
)
3373+
tags: MutableMapping[str, str] = proto.MapField(
3374+
proto.STRING,
3375+
proto.STRING,
3376+
number=4,
3377+
)
33303378

33313379

33323380
class UpdateSnapshotRequest(proto.Message):

owl-bot-staging/v1/.coveragerc

Lines changed: 0 additions & 13 deletions
This file was deleted.

owl-bot-staging/v1/.flake8

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)