31
31
"MessageStoragePolicy" ,
32
32
"SchemaSettings" ,
33
33
"IngestionDataSourceSettings" ,
34
+ "PlatformLogsSettings" ,
34
35
"Topic" ,
35
36
"PubsubMessage" ,
36
37
"GetTopicRequest" ,
@@ -160,13 +161,25 @@ class SchemaSettings(proto.Message):
160
161
class IngestionDataSourceSettings (proto .Message ):
161
162
r"""Settings for an ingestion data source on a topic.
162
163
164
+ This message has `oneof`_ fields (mutually exclusive fields).
165
+ For each oneof, at most one member field can be set at the same time.
166
+ Setting any member of the oneof automatically clears all other
167
+ members.
168
+
163
169
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
164
170
165
171
Attributes:
166
172
aws_kinesis (google.pubsub_v1.types.IngestionDataSourceSettings.AwsKinesis):
167
173
Optional. Amazon Kinesis Data Streams.
168
174
169
175
This field is a member of `oneof`_ ``source``.
176
+ cloud_storage (google.pubsub_v1.types.IngestionDataSourceSettings.CloudStorage):
177
+ Optional. Cloud Storage.
178
+
179
+ This field is a member of `oneof`_ ``source``.
180
+ platform_logs_settings (google.pubsub_v1.types.PlatformLogsSettings):
181
+ Optional. Platform Logs settings. If unset,
182
+ no Platform Logs will be generated.
170
183
"""
171
184
172
185
class AwsKinesis (proto .Message ):
@@ -259,12 +272,227 @@ class State(proto.Enum):
259
272
number = 5 ,
260
273
)
261
274
275
+ class CloudStorage (proto .Message ):
276
+ r"""Ingestion settings for Cloud Storage.
277
+
278
+ This message has `oneof`_ fields (mutually exclusive fields).
279
+ For each oneof, at most one member field can be set at the same time.
280
+ Setting any member of the oneof automatically clears all other
281
+ members.
282
+
283
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
284
+
285
+ Attributes:
286
+ state (google.pubsub_v1.types.IngestionDataSourceSettings.CloudStorage.State):
287
+ Output only. An output-only field that
288
+ indicates the state of the Cloud Storage
289
+ ingestion source.
290
+ bucket (str):
291
+ Optional. Cloud Storage bucket. The bucket name must be
292
+ without any prefix like "gs://". See the [bucket naming
293
+ requirements]
294
+ (https://cloud.google.com/storage/docs/buckets#naming).
295
+ text_format (google.pubsub_v1.types.IngestionDataSourceSettings.CloudStorage.TextFormat):
296
+ Optional. Data from Cloud Storage will be
297
+ interpreted as text.
298
+
299
+ This field is a member of `oneof`_ ``input_format``.
300
+ avro_format (google.pubsub_v1.types.IngestionDataSourceSettings.CloudStorage.AvroFormat):
301
+ Optional. Data from Cloud Storage will be
302
+ interpreted in Avro format.
303
+
304
+ This field is a member of `oneof`_ ``input_format``.
305
+ pubsub_avro_format (google.pubsub_v1.types.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat):
306
+ Optional. It will be assumed data from Cloud Storage was
307
+ written via `Cloud Storage
308
+ subscriptions <https://cloud.google.com/pubsub/docs/cloudstorage>`__.
309
+
310
+ This field is a member of `oneof`_ ``input_format``.
311
+ minimum_object_create_time (google.protobuf.timestamp_pb2.Timestamp):
312
+ Optional. Only objects with a larger or equal
313
+ creation timestamp will be ingested.
314
+ match_glob (str):
315
+ Optional. Glob pattern used to match objects that will be
316
+ ingested. If unset, all objects will be ingested. See the
317
+ `supported
318
+ patterns <https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob>`__.
319
+ """
320
+
321
+ class State (proto .Enum ):
322
+ r"""Possible states for ingestion from Cloud Storage.
323
+
324
+ Values:
325
+ STATE_UNSPECIFIED (0):
326
+ Default value. This value is unused.
327
+ ACTIVE (1):
328
+ Ingestion is active.
329
+ CLOUD_STORAGE_PERMISSION_DENIED (2):
330
+ Permission denied encountered while calling the Cloud
331
+ Storage API. This can happen if the Pub/Sub SA has not been
332
+ granted the `appropriate
333
+ permissions <https://cloud.google.com/storage/docs/access-control/iam-permissions>`__:
334
+
335
+ - storage.objects.list: to list the objects in a bucket.
336
+ - storage.objects.get: to read the objects in a bucket.
337
+ - storage.buckets.get: to verify the bucket exists.
338
+ PUBLISH_PERMISSION_DENIED (3):
339
+ Permission denied encountered while publishing to the topic.
340
+ This can happen if the Pub/Sub SA has not been granted the
341
+ `appropriate publish
342
+ permissions <https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher>`__
343
+ BUCKET_NOT_FOUND (4):
344
+ The provided Cloud Storage bucket doesn't
345
+ exist.
346
+ TOO_MANY_OBJECTS (5):
347
+ The Cloud Storage bucket has too many
348
+ objects, ingestion will be paused.
349
+ """
350
+ STATE_UNSPECIFIED = 0
351
+ ACTIVE = 1
352
+ CLOUD_STORAGE_PERMISSION_DENIED = 2
353
+ PUBLISH_PERMISSION_DENIED = 3
354
+ BUCKET_NOT_FOUND = 4
355
+ TOO_MANY_OBJECTS = 5
356
+
357
+ class TextFormat (proto .Message ):
358
+ r"""Configuration for reading Cloud Storage data in text format. Each
359
+ line of text as specified by the delimiter will be set to the
360
+ ``data`` field of a Pub/Sub message.
361
+
362
+
363
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
364
+
365
+ Attributes:
366
+ delimiter (str):
367
+ Optional. When unset, '\n' is used.
368
+
369
+ This field is a member of `oneof`_ ``_delimiter``.
370
+ """
371
+
372
+ delimiter : str = proto .Field (
373
+ proto .STRING ,
374
+ number = 1 ,
375
+ optional = True ,
376
+ )
377
+
378
+ class AvroFormat (proto .Message ):
379
+ r"""Configuration for reading Cloud Storage data in Avro binary format.
380
+ The bytes of each object will be set to the ``data`` field of a
381
+ Pub/Sub message.
382
+
383
+ """
384
+
385
+ class PubSubAvroFormat (proto .Message ):
386
+ r"""Configuration for reading Cloud Storage data written via `Cloud
387
+ Storage
388
+ subscriptions <https://cloud.google.com/pubsub/docs/cloudstorage>`__.
389
+ The data and attributes fields of the originally exported Pub/Sub
390
+ message will be restored when publishing.
391
+
392
+ """
393
+
394
+ state : "IngestionDataSourceSettings.CloudStorage.State" = proto .Field (
395
+ proto .ENUM ,
396
+ number = 1 ,
397
+ enum = "IngestionDataSourceSettings.CloudStorage.State" ,
398
+ )
399
+ bucket : str = proto .Field (
400
+ proto .STRING ,
401
+ number = 2 ,
402
+ )
403
+ text_format : "IngestionDataSourceSettings.CloudStorage.TextFormat" = (
404
+ proto .Field (
405
+ proto .MESSAGE ,
406
+ number = 3 ,
407
+ oneof = "input_format" ,
408
+ message = "IngestionDataSourceSettings.CloudStorage.TextFormat" ,
409
+ )
410
+ )
411
+ avro_format : "IngestionDataSourceSettings.CloudStorage.AvroFormat" = (
412
+ proto .Field (
413
+ proto .MESSAGE ,
414
+ number = 4 ,
415
+ oneof = "input_format" ,
416
+ message = "IngestionDataSourceSettings.CloudStorage.AvroFormat" ,
417
+ )
418
+ )
419
+ pubsub_avro_format : "IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat" = proto .Field (
420
+ proto .MESSAGE ,
421
+ number = 5 ,
422
+ oneof = "input_format" ,
423
+ message = "IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat" ,
424
+ )
425
+ minimum_object_create_time : timestamp_pb2 .Timestamp = proto .Field (
426
+ proto .MESSAGE ,
427
+ number = 6 ,
428
+ message = timestamp_pb2 .Timestamp ,
429
+ )
430
+ match_glob : str = proto .Field (
431
+ proto .STRING ,
432
+ number = 9 ,
433
+ )
434
+
262
435
aws_kinesis : AwsKinesis = proto .Field (
263
436
proto .MESSAGE ,
264
437
number = 1 ,
265
438
oneof = "source" ,
266
439
message = AwsKinesis ,
267
440
)
441
+ cloud_storage : CloudStorage = proto .Field (
442
+ proto .MESSAGE ,
443
+ number = 2 ,
444
+ oneof = "source" ,
445
+ message = CloudStorage ,
446
+ )
447
+ platform_logs_settings : "PlatformLogsSettings" = proto .Field (
448
+ proto .MESSAGE ,
449
+ number = 4 ,
450
+ message = "PlatformLogsSettings" ,
451
+ )
452
+
453
+
454
+ class PlatformLogsSettings (proto .Message ):
455
+ r"""Settings for Platform Logs produced by Pub/Sub.
456
+
457
+ Attributes:
458
+ severity (google.pubsub_v1.types.PlatformLogsSettings.Severity):
459
+ Optional. The minimum severity level of
460
+ Platform Logs that will be written.
461
+ """
462
+
463
+ class Severity (proto .Enum ):
464
+ r"""Severity levels of Platform Logs.
465
+
466
+ Values:
467
+ SEVERITY_UNSPECIFIED (0):
468
+ Default value. Logs level is unspecified.
469
+ Logs will be disabled.
470
+ DISABLED (1):
471
+ Logs will be disabled.
472
+ DEBUG (2):
473
+ Debug logs and higher-severity logs will be
474
+ written.
475
+ INFO (3):
476
+ Info logs and higher-severity logs will be
477
+ written.
478
+ WARNING (4):
479
+ Warning logs and higher-severity logs will be
480
+ written.
481
+ ERROR (5):
482
+ Only error logs will be written.
483
+ """
484
+ SEVERITY_UNSPECIFIED = 0
485
+ DISABLED = 1
486
+ DEBUG = 2
487
+ INFO = 3
488
+ WARNING = 4
489
+ ERROR = 5
490
+
491
+ severity : Severity = proto .Field (
492
+ proto .ENUM ,
493
+ number = 1 ,
494
+ enum = Severity ,
495
+ )
268
496
269
497
270
498
class Topic (proto .Message ):
@@ -821,7 +1049,7 @@ class Subscription(proto.Message):
821
1049
published. If ``retain_acked_messages`` is true, then this
822
1050
also configures the retention of acknowledged messages, and
823
1051
thus configures how far back in time a ``Seek`` can be done.
824
- Defaults to 7 days. Cannot be more than 7 days or less than
1052
+ Defaults to 7 days. Cannot be more than 31 days or less than
825
1053
10 minutes.
826
1054
labels (MutableMapping[str, str]):
827
1055
Optional. See `Creating and managing
@@ -906,6 +1134,10 @@ class Subscription(proto.Message):
906
1134
Output only. An output-only field indicating
907
1135
whether or not the subscription can receive
908
1136
messages.
1137
+ analytics_hub_subscription_info (google.pubsub_v1.types.Subscription.AnalyticsHubSubscriptionInfo):
1138
+ Output only. Information about the associated
1139
+ Analytics Hub subscription. Only set if the
1140
+ subscritpion is created by Analytics Hub.
909
1141
"""
910
1142
911
1143
class State (proto .Enum ):
@@ -927,6 +1159,31 @@ class State(proto.Enum):
927
1159
ACTIVE = 1
928
1160
RESOURCE_ERROR = 2
929
1161
1162
+ class AnalyticsHubSubscriptionInfo (proto .Message ):
1163
+ r"""Information about an associated Analytics Hub subscription
1164
+ (https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
1165
+
1166
+ Attributes:
1167
+ listing (str):
1168
+ Optional. The name of the associated Analytics Hub listing
1169
+ resource. Pattern:
1170
+ "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}".
1171
+ subscription (str):
1172
+ Optional. The name of the associated
1173
+ Analytics Hub subscription resource. Pattern:
1174
+
1175
+ "projects/{project}/locations/{location}/subscriptions/{subscription}".
1176
+ """
1177
+
1178
+ listing : str = proto .Field (
1179
+ proto .STRING ,
1180
+ number = 1 ,
1181
+ )
1182
+ subscription : str = proto .Field (
1183
+ proto .STRING ,
1184
+ number = 2 ,
1185
+ )
1186
+
930
1187
name : str = proto .Field (
931
1188
proto .STRING ,
932
1189
number = 1 ,
@@ -1009,6 +1266,11 @@ class State(proto.Enum):
1009
1266
number = 19 ,
1010
1267
enum = State ,
1011
1268
)
1269
+ analytics_hub_subscription_info : AnalyticsHubSubscriptionInfo = proto .Field (
1270
+ proto .MESSAGE ,
1271
+ number = 23 ,
1272
+ message = AnalyticsHubSubscriptionInfo ,
1273
+ )
1012
1274
1013
1275
1014
1276
class RetryPolicy (proto .Message ):
0 commit comments