Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add custom datetime format for Cloud Storage subscriptions #1131

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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