From 3d95034f94426cdcf5b87323b9e463a7e8ce4f91 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 26 Jul 2023 13:54:22 -0400 Subject: [PATCH] docs: clarified where ordering_key will be written if write_metadata is set (#965) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: clarified where ordering_key will be written if write_metadata is set PiperOrigin-RevId: 551210991 Source-Link: https://github.com/googleapis/googleapis/commit/7c762d770a82da397956b80379a6fb73505835af Source-Link: https://github.com/googleapis/googleapis-gen/commit/15fe4c5ff5ebd52911b429b05b992e232f53351e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTVmZTRjNWZmNWViZDUyOTExYjQyOWIwNWI5OTJlMjMyZjUzMzUxZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- google/pubsub_v1/types/pubsub.py | 6 +++++- .../snippet_metadata_google.pubsub.v1.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/google/pubsub_v1/types/pubsub.py b/google/pubsub_v1/types/pubsub.py index 3c1d2b9f9..0331d0c97 100644 --- a/google/pubsub_v1/types/pubsub.py +++ b/google/pubsub_v1/types/pubsub.py @@ -1277,7 +1277,11 @@ class AvroConfig(proto.Message): write_metadata (bool): When true, write the subscription name, message_id, publish_time, attributes, and ordering_key as additional - fields in the output. + fields in the output. The subscription name, message_id, and + publish_time fields are put in their own fields while all + other message properties other than data (for example, an + ordering_key, if present) are added as entries in the + attributes map. """ write_metadata: bool = proto.Field( diff --git a/samples/generated_samples/snippet_metadata_google.pubsub.v1.json b/samples/generated_samples/snippet_metadata_google.pubsub.v1.json index 6ddc3f01b..d66015ac4 100644 --- a/samples/generated_samples/snippet_metadata_google.pubsub.v1.json +++ b/samples/generated_samples/snippet_metadata_google.pubsub.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-pubsub", - "version": "2.18.0" + "version": "0.1.0" }, "snippets": [ {