Skip to content

Commit

Permalink
feat: add custom datetime format for Cloud Storage subscriptions (#1131)
Browse files Browse the repository at this point in the history
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Mar 26, 2024
1 parent cfcca73 commit 4da6744
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion google/pubsub_v1/types/pubsub.py
Expand Up @@ -222,7 +222,7 @@ class State(proto.Enum):
``gcp_service_account``.
PUBLISH_PERMISSION_DENIED (3):
Permission denied encountered while publishing to the topic.
This can happen due to Pub/Sub SA has not been granted the
This can happen if the Pub/Sub SA has not been granted the
`appropriate publish
permissions <https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher>`__
STREAM_NOT_FOUND (4):
Expand Down Expand Up @@ -1394,6 +1394,11 @@ class CloudStorageConfig(proto.Message):
See the `object naming
requirements <https://cloud.google.com/storage/docs/objects#naming>`__.
Must not end in "/".
filename_datetime_format (str):
Optional. User-provided format string specifying how to
represent datetimes in Cloud Storage filenames. See the
`datetime format
guidance <https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names>`__.
text_config (google.pubsub_v1.types.CloudStorageConfig.TextConfig):
Optional. If set, message data will be
written to Cloud Storage in text format.
Expand Down Expand Up @@ -1487,6 +1492,10 @@ class AvroConfig(proto.Message):
proto.STRING,
number=3,
)
filename_datetime_format: str = proto.Field(
proto.STRING,
number=10,
)
text_config: TextConfig = proto.Field(
proto.MESSAGE,
number=4,
Expand Down

0 comments on commit 4da6744

Please sign in to comment.