Skip to content

Commit ec1a676

Browse files
authored
chore: librarian generate pull request: 20260311T104913Z (#16073)
PR created by the Librarian CLI to generate Cloud Client Libraries code from protos. BEGIN_COMMIT BEGIN_NESTED_COMMIT feat: Add BigtableConfig type PiperOrigin-RevId: 878685355 Library-IDs: google-cloud-pubsub Source-link: [googleapis/googleapis@23ec7b6e](googleapis/googleapis@23ec7b6e) END_NESTED_COMMIT END_COMMIT This pull request is generated with proto changes between [googleapis/googleapis@ce8678a9](googleapis/googleapis@ce8678a) (exclusive) and [googleapis/googleapis@23ec7b6e](googleapis/googleapis@23ec7b6) (inclusive). Librarian Version: v1.0.2-0.20260309131826-42ac5c451239 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:160860d189ff1c2f7515638478823712fa5b243e27ccc33a2728669fa1e2ed0c
2 parents 4c02726 + a2fc584 commit ec1a676

File tree

5 files changed

+134
-1
lines changed

5 files changed

+134
-1
lines changed

.librarian/state.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2750,7 +2750,7 @@ libraries:
27502750
tag_format: '{id}-v{version}'
27512751
- id: google-cloud-pubsub
27522752
version: 2.35.0
2753-
last_generated_commit: ce8678a96c8e1fc0d870d80fcf062e5be2b12877
2753+
last_generated_commit: 256b575f6915282b20795c13414b21f2c0af65db
27542754
apis:
27552755
- path: google/pubsub/v1
27562756
service_config: pubsub_v1.yaml

packages/google-cloud-pubsub/google/pubsub/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
AcknowledgeRequest,
3131
AIInference,
3232
BigQueryConfig,
33+
BigtableConfig,
3334
CloudStorageConfig,
3435
CreateSnapshotRequest,
3536
DeadLetterPolicy,
@@ -110,6 +111,7 @@
110111
"AcknowledgeRequest",
111112
"AIInference",
112113
"BigQueryConfig",
114+
"BigtableConfig",
113115
"CloudStorageConfig",
114116
"CreateSnapshotRequest",
115117
"DeadLetterPolicy",

packages/google-cloud-pubsub/google/pubsub_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
AcknowledgeRequest,
3737
AIInference,
3838
BigQueryConfig,
39+
BigtableConfig,
3940
CloudStorageConfig,
4041
CreateSnapshotRequest,
4142
DeadLetterPolicy,
@@ -207,6 +208,7 @@ def _get_version(dependency_name):
207208
"AIInference",
208209
"AcknowledgeRequest",
209210
"BigQueryConfig",
211+
"BigtableConfig",
210212
"CloudStorageConfig",
211213
"CommitSchemaRequest",
212214
"CreateSchemaRequest",

packages/google-cloud-pubsub/google/pubsub_v1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
AcknowledgeRequest,
2020
AIInference,
2121
BigQueryConfig,
22+
BigtableConfig,
2223
CloudStorageConfig,
2324
CreateSnapshotRequest,
2425
DeadLetterPolicy,
@@ -102,6 +103,7 @@
102103
"AcknowledgeRequest",
103104
"AIInference",
104105
"BigQueryConfig",
106+
"BigtableConfig",
105107
"CloudStorageConfig",
106108
"CreateSnapshotRequest",
107109
"DeadLetterPolicy",

packages/google-cloud-pubsub/google/pubsub_v1/types/pubsub.py

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"ExpirationPolicy",
5858
"PushConfig",
5959
"BigQueryConfig",
60+
"BigtableConfig",
6061
"CloudStorageConfig",
6162
"ReceivedMessage",
6263
"GetSubscriptionRequest",
@@ -2010,6 +2011,10 @@ class Subscription(proto.Message):
20102011
Optional. If delivery to Google Cloud Storage
20112012
is used with this subscription, this field is
20122013
used to configure it.
2014+
bigtable_config (google.pubsub_v1.types.BigtableConfig):
2015+
Optional. If delivery to Bigtable is used
2016+
with this subscription, this field is used to
2017+
configure it.
20132018
ack_deadline_seconds (int):
20142019
Optional. The approximate amount of time (on a best-effort
20152020
basis) Pub/Sub waits for the subscriber to acknowledge
@@ -2224,6 +2229,11 @@ class AnalyticsHubSubscriptionInfo(proto.Message):
22242229
number=22,
22252230
message="CloudStorageConfig",
22262231
)
2232+
bigtable_config: "BigtableConfig" = proto.Field(
2233+
proto.MESSAGE,
2234+
number=27,
2235+
message="BigtableConfig",
2236+
)
22272237
ack_deadline_seconds: int = proto.Field(
22282238
proto.INT32,
22292239
number=5,
@@ -2674,6 +2684,123 @@ class State(proto.Enum):
26742684
)
26752685

26762686

2687+
class BigtableConfig(proto.Message):
2688+
r"""Configuration for a Bigtable subscription. The Pub/Sub
2689+
message will be written to a Bigtable row as follows:
2690+
2691+
- row key: subscription name and message ID delimited by #.
2692+
- columns: message bytes written to a single column family
2693+
"data" with an empty-string column qualifier.
2694+
- cell timestamp: the message publish timestamp.
2695+
2696+
Attributes:
2697+
table (str):
2698+
Optional. The unique name of the table to write messages to.
2699+
2700+
Values are of the form
2701+
``projects/<project>/instances/<instance>/tables/<table>``.
2702+
app_profile_id (str):
2703+
Optional. The app profile to use for the
2704+
Bigtable writes. If not specified, the "default"
2705+
application profile will be used. The app
2706+
profile must use single-cluster routing.
2707+
service_account_email (str):
2708+
Optional. The service account to use to write to Bigtable.
2709+
The subscription creator or updater that specifies this
2710+
field must have ``iam.serviceAccounts.actAs`` permission on
2711+
the service account. If not specified, the Pub/Sub `service
2712+
agent <https://cloud.google.com/iam/docs/service-agents>`__,
2713+
service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com,
2714+
is used.
2715+
write_metadata (bool):
2716+
Optional. When true, write the subscription name,
2717+
message_id, publish_time, attributes, and ordering_key to
2718+
additional columns in the table under the pubsub_metadata
2719+
column family. The subscription name, message_id, and
2720+
publish_time fields are put in their own columns while all
2721+
other message properties (other than data) are written to a
2722+
JSON object in the attributes column.
2723+
state (google.pubsub_v1.types.BigtableConfig.State):
2724+
Output only. An output-only field that
2725+
indicates whether or not the subscription can
2726+
receive messages.
2727+
"""
2728+
2729+
class State(proto.Enum):
2730+
r"""Possible states for a Bigtable subscription.
2731+
Note: more states could be added in the future. Please code
2732+
accordingly.
2733+
2734+
Values:
2735+
STATE_UNSPECIFIED (0):
2736+
Default value. This value is unused.
2737+
ACTIVE (1):
2738+
The subscription can actively send messages
2739+
to Bigtable.
2740+
NOT_FOUND (2):
2741+
Cannot write to Bigtable because the
2742+
instance, table, or app profile does not exist.
2743+
APP_PROFILE_MISCONFIGURED (3):
2744+
Cannot write to Bigtable because the app
2745+
profile is not configured for single-cluster
2746+
routing.
2747+
PERMISSION_DENIED (4):
2748+
Cannot write to Bigtable because of permission denied
2749+
errors. This can happen if:
2750+
2751+
- The Pub/Sub service agent has not been granted the
2752+
`appropriate Bigtable IAM permission
2753+
bigtable.tables.mutateRows <{$universe.dns_names.final_documentation_domain}/bigtable/docs/access-control#permissions>`__
2754+
- The bigtable.googleapis.com API is not enabled for the
2755+
project
2756+
(`instructions <{$universe.dns_names.final_documentation_domain}/service-usage/docs/enable-disable>`__)
2757+
SCHEMA_MISMATCH (5):
2758+
Cannot write to Bigtable because of a missing
2759+
column family ("data") or if there is no
2760+
structured row key for the subscription name +
2761+
message ID.
2762+
IN_TRANSIT_LOCATION_RESTRICTION (6):
2763+
Cannot write to the destination because enforce_in_transit
2764+
is set to true and the destination locations are not in the
2765+
allowed regions.
2766+
VERTEX_AI_LOCATION_RESTRICTION (7):
2767+
Cannot write to Bigtable because the table is not in the
2768+
same location as where Vertex AI models used in
2769+
``message_transform``\ s are deployed.
2770+
"""
2771+
2772+
STATE_UNSPECIFIED = 0
2773+
ACTIVE = 1
2774+
NOT_FOUND = 2
2775+
APP_PROFILE_MISCONFIGURED = 3
2776+
PERMISSION_DENIED = 4
2777+
SCHEMA_MISMATCH = 5
2778+
IN_TRANSIT_LOCATION_RESTRICTION = 6
2779+
VERTEX_AI_LOCATION_RESTRICTION = 7
2780+
2781+
table: str = proto.Field(
2782+
proto.STRING,
2783+
number=1,
2784+
)
2785+
app_profile_id: str = proto.Field(
2786+
proto.STRING,
2787+
number=2,
2788+
)
2789+
service_account_email: str = proto.Field(
2790+
proto.STRING,
2791+
number=3,
2792+
)
2793+
write_metadata: bool = proto.Field(
2794+
proto.BOOL,
2795+
number=5,
2796+
)
2797+
state: State = proto.Field(
2798+
proto.ENUM,
2799+
number=4,
2800+
enum=State,
2801+
)
2802+
2803+
26772804
class CloudStorageConfig(proto.Message):
26782805
r"""Configuration for a Cloud Storage subscription.
26792806

0 commit comments

Comments
 (0)