google-apis-pubsub_v1 0.30.0 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,13 +42,38 @@ module Google
42
42
  end
43
43
  end
44
44
 
45
+ # Configuration for writing message data in Avro format. Message payloads and
46
+ # metadata will be written to files as an Avro binary.
47
+ class AvroConfig
48
+ include Google::Apis::Core::Hashable
49
+
50
+ # Optional. When true, write the subscription name, message_id, publish_time,
51
+ # attributes, and ordering_key as additional fields in the output. The
52
+ # subscription name, message_id, and publish_time fields are put in their own
53
+ # fields while all other message properties other than data (for example, an
54
+ # ordering_key, if present) are added as entries in the attributes map.
55
+ # Corresponds to the JSON property `writeMetadata`
56
+ # @return [Boolean]
57
+ attr_accessor :write_metadata
58
+ alias_method :write_metadata?, :write_metadata
59
+
60
+ def initialize(**args)
61
+ update!(**args)
62
+ end
63
+
64
+ # Update properties of this object
65
+ def update!(**args)
66
+ @write_metadata = args[:write_metadata] if args.key?(:write_metadata)
67
+ end
68
+ end
69
+
45
70
  # Configuration for a BigQuery subscription.
46
71
  class BigQueryConfig
47
72
  include Google::Apis::Core::Hashable
48
73
 
49
- # When true and use_topic_schema is true, any fields that are a part of the
50
- # topic schema that are not part of the BigQuery table schema are dropped when
51
- # writing to BigQuery. Otherwise, the schemas must be kept in sync and any
74
+ # Optional. When true and use_topic_schema is true, any fields that are a part
75
+ # of the topic schema that are not part of the BigQuery table schema are dropped
76
+ # when writing to BigQuery. Otherwise, the schemas must be kept in sync and any
52
77
  # messages with extra fields are not written and remain in the subscription's
53
78
  # backlog.
54
79
  # Corresponds to the JSON property `dropUnknownFields`
@@ -62,24 +87,33 @@ module Google
62
87
  # @return [String]
63
88
  attr_accessor :state
64
89
 
65
- # The name of the table to which to write data, of the form `projectId`.`
66
- # datasetId`.`tableId`
90
+ # Optional. The name of the table to which to write data, of the form `projectId`
91
+ # .`datasetId`.`tableId`
67
92
  # Corresponds to the JSON property `table`
68
93
  # @return [String]
69
94
  attr_accessor :table
70
95
 
71
- # When true, use the topic's schema as the columns to write to in BigQuery, if
72
- # it exists.
96
+ # Optional. When true, use the BigQuery table's schema as the columns to write
97
+ # to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be enabled at
98
+ # the same time.
99
+ # Corresponds to the JSON property `useTableSchema`
100
+ # @return [Boolean]
101
+ attr_accessor :use_table_schema
102
+ alias_method :use_table_schema?, :use_table_schema
103
+
104
+ # Optional. When true, use the topic's schema as the columns to write to in
105
+ # BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be
106
+ # enabled at the same time.
73
107
  # Corresponds to the JSON property `useTopicSchema`
74
108
  # @return [Boolean]
75
109
  attr_accessor :use_topic_schema
76
110
  alias_method :use_topic_schema?, :use_topic_schema
77
111
 
78
- # When true, write the subscription name, message_id, publish_time, attributes,
79
- # and ordering_key to additional columns in the table. The subscription name,
80
- # message_id, and publish_time fields are put in their own columns while all
81
- # other message properties (other than data) are written to a JSON object in the
82
- # attributes column.
112
+ # Optional. When true, write the subscription name, message_id, publish_time,
113
+ # attributes, and ordering_key to additional columns in the table. The
114
+ # subscription name, message_id, and publish_time fields are put in their own
115
+ # columns while all other message properties (other than data) are written to a
116
+ # JSON object in the attributes column.
83
117
  # Corresponds to the JSON property `writeMetadata`
84
118
  # @return [Boolean]
85
119
  attr_accessor :write_metadata
@@ -94,6 +128,7 @@ module Google
94
128
  @drop_unknown_fields = args[:drop_unknown_fields] if args.key?(:drop_unknown_fields)
95
129
  @state = args[:state] if args.key?(:state)
96
130
  @table = args[:table] if args.key?(:table)
131
+ @use_table_schema = args[:use_table_schema] if args.key?(:use_table_schema)
97
132
  @use_topic_schema = args[:use_topic_schema] if args.key?(:use_topic_schema)
98
133
  @write_metadata = args[:write_metadata] if args.key?(:write_metadata)
99
134
  end
@@ -137,7 +172,27 @@ module Google
137
172
  # kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
138
173
  # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
139
174
  # email address that represents a Google group. For example, `admins@example.com`
140
- # . * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
175
+ # . * `domain:`domain``: The G Suite domain (primary) that represents all the
176
+ # users of that domain. For example, `google.com` or `example.com`. * `principal:
177
+ # //iam.googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
178
+ # subject_attribute_value``: A single identity in a workforce identity pool. * `
179
+ # principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/
180
+ # group/`group_id``: All workforce identities in a group. * `principalSet://iam.
181
+ # googleapis.com/locations/global/workforcePools/`pool_id`/attribute.`
182
+ # attribute_name`/`attribute_value``: All workforce identities with a specific
183
+ # attribute value. * `principalSet://iam.googleapis.com/locations/global/
184
+ # workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * `
185
+ # principal://iam.googleapis.com/projects/`project_number`/locations/global/
186
+ # workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single
187
+ # identity in a workload identity pool. * `principalSet://iam.googleapis.com/
188
+ # projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/
189
+ # group/`group_id``: A workload identity pool group. * `principalSet://iam.
190
+ # googleapis.com/projects/`project_number`/locations/global/
191
+ # workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``:
192
+ # All identities in a workload identity pool with a certain attribute. * `
193
+ # principalSet://iam.googleapis.com/projects/`project_number`/locations/global/
194
+ # workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool.
195
+ # * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
141
196
  # identifier) representing a user that has been recently deleted. For example, `
142
197
  # alice@example.com?uid=123456789012345678901`. If the user is recovered, this
143
198
  # value reverts to `user:`emailid`` and the recovered user retains the role in
@@ -151,8 +206,10 @@ module Google
151
206
  # been recently deleted. For example, `admins@example.com?uid=
152
207
  # 123456789012345678901`. If the group is recovered, this value reverts to `
153
208
  # group:`emailid`` and the recovered group retains the role in the binding. * `
154
- # domain:`domain``: The G Suite domain (primary) that represents all the users
155
- # of that domain. For example, `google.com` or `example.com`.
209
+ # deleted:principal://iam.googleapis.com/locations/global/workforcePools/`
210
+ # pool_id`/subject/`subject_attribute_value``: Deleted single identity in a
211
+ # workforce identity pool. For example, `deleted:principal://iam.googleapis.com/
212
+ # locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
156
213
  # Corresponds to the JSON property `members`
157
214
  # @return [Array<String>]
158
215
  attr_accessor :members
@@ -175,12 +232,105 @@ module Google
175
232
  end
176
233
  end
177
234
 
235
+ # Configuration for a Cloud Storage subscription.
236
+ class CloudStorageConfig
237
+ include Google::Apis::Core::Hashable
238
+
239
+ # Configuration for writing message data in Avro format. Message payloads and
240
+ # metadata will be written to files as an Avro binary.
241
+ # Corresponds to the JSON property `avroConfig`
242
+ # @return [Google::Apis::PubsubV1::AvroConfig]
243
+ attr_accessor :avro_config
244
+
245
+ # Required. User-provided name for the Cloud Storage bucket. The bucket must be
246
+ # created by the user. The bucket name must be without any prefix like "gs://".
247
+ # See the [bucket naming requirements] (https://cloud.google.com/storage/docs/
248
+ # buckets#naming).
249
+ # Corresponds to the JSON property `bucket`
250
+ # @return [String]
251
+ attr_accessor :bucket
252
+
253
+ # Optional. User-provided prefix for Cloud Storage filename. See the [object
254
+ # naming requirements](https://cloud.google.com/storage/docs/objects#naming).
255
+ # Corresponds to the JSON property `filenamePrefix`
256
+ # @return [String]
257
+ attr_accessor :filename_prefix
258
+
259
+ # Optional. User-provided suffix for Cloud Storage filename. See the [object
260
+ # naming requirements](https://cloud.google.com/storage/docs/objects#naming).
261
+ # Must not end in "/".
262
+ # Corresponds to the JSON property `filenameSuffix`
263
+ # @return [String]
264
+ attr_accessor :filename_suffix
265
+
266
+ # Optional. The maximum bytes that can be written to a Cloud Storage file before
267
+ # a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be
268
+ # exceeded in cases where messages are larger than the limit.
269
+ # Corresponds to the JSON property `maxBytes`
270
+ # @return [Fixnum]
271
+ attr_accessor :max_bytes
272
+
273
+ # Optional. The maximum duration that can elapse before a new Cloud Storage file
274
+ # is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
275
+ # the subscription's acknowledgement deadline.
276
+ # Corresponds to the JSON property `maxDuration`
277
+ # @return [String]
278
+ attr_accessor :max_duration
279
+
280
+ # Output only. An output-only field that indicates whether or not the
281
+ # subscription can receive messages.
282
+ # Corresponds to the JSON property `state`
283
+ # @return [String]
284
+ attr_accessor :state
285
+
286
+ # Configuration for writing message data in text format. Message payloads will
287
+ # be written to files as raw text, separated by a newline.
288
+ # Corresponds to the JSON property `textConfig`
289
+ # @return [Google::Apis::PubsubV1::TextConfig]
290
+ attr_accessor :text_config
291
+
292
+ def initialize(**args)
293
+ update!(**args)
294
+ end
295
+
296
+ # Update properties of this object
297
+ def update!(**args)
298
+ @avro_config = args[:avro_config] if args.key?(:avro_config)
299
+ @bucket = args[:bucket] if args.key?(:bucket)
300
+ @filename_prefix = args[:filename_prefix] if args.key?(:filename_prefix)
301
+ @filename_suffix = args[:filename_suffix] if args.key?(:filename_suffix)
302
+ @max_bytes = args[:max_bytes] if args.key?(:max_bytes)
303
+ @max_duration = args[:max_duration] if args.key?(:max_duration)
304
+ @state = args[:state] if args.key?(:state)
305
+ @text_config = args[:text_config] if args.key?(:text_config)
306
+ end
307
+ end
308
+
309
+ # Request for CommitSchema method.
310
+ class CommitSchemaRequest
311
+ include Google::Apis::Core::Hashable
312
+
313
+ # A schema resource.
314
+ # Corresponds to the JSON property `schema`
315
+ # @return [Google::Apis::PubsubV1::Schema]
316
+ attr_accessor :schema
317
+
318
+ def initialize(**args)
319
+ update!(**args)
320
+ end
321
+
322
+ # Update properties of this object
323
+ def update!(**args)
324
+ @schema = args[:schema] if args.key?(:schema)
325
+ end
326
+ end
327
+
178
328
  # Request for the `CreateSnapshot` method.
179
329
  class CreateSnapshotRequest
180
330
  include Google::Apis::Core::Hashable
181
331
 
182
- # See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels)
183
- # .
332
+ # Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/
333
+ # docs/labels).
184
334
  # Corresponds to the JSON property `labels`
185
335
  # @return [Hash<String,String>]
186
336
  attr_accessor :labels
@@ -214,8 +364,8 @@ module Google
214
364
  class DeadLetterPolicy
215
365
  include Google::Apis::Core::Hashable
216
366
 
217
- # The name of the topic to which dead letter messages should be published.
218
- # Format is `projects/`project`/topics/`topic``.The Cloud Pub/Sub service
367
+ # Optional. The name of the topic to which dead letter messages should be
368
+ # published. Format is `projects/`project`/topics/`topic``.The Pub/Sub service
219
369
  # account associated with the enclosing subscription's parent project (i.e.,
220
370
  # service-`project_number`@gcp-sa-pubsub.iam.gserviceaccount.com) must have
221
371
  # permission to Publish() to this topic. The operation will fail if the topic
@@ -225,13 +375,13 @@ module Google
225
375
  # @return [String]
226
376
  attr_accessor :dead_letter_topic
227
377
 
228
- # The maximum number of delivery attempts for any message. The value must be
229
- # between 5 and 100. The number of delivery attempts is defined as 1 + (the sum
230
- # of number of NACKs and number of times the acknowledgement deadline has been
231
- # exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0
232
- # deadline. Note that client libraries may automatically extend ack_deadlines.
233
- # This field will be honored on a best effort basis. If this parameter is 0, a
234
- # default value of 5 is used.
378
+ # Optional. The maximum number of delivery attempts for any message. The value
379
+ # must be between 5 and 100. The number of delivery attempts is defined as 1 + (
380
+ # the sum of number of NACKs and number of times the acknowledgement deadline
381
+ # has been exceeded for the message). A NACK is any call to ModifyAckDeadline
382
+ # with a 0 deadline. Note that client libraries may automatically extend
383
+ # ack_deadlines. This field will be honored on a best effort basis. If this
384
+ # parameter is 0, a default value of 5 is used.
235
385
  # Corresponds to the JSON property `maxDeliveryAttempts`
236
386
  # @return [Fixnum]
237
387
  attr_accessor :max_delivery_attempts
@@ -281,11 +431,11 @@ module Google
281
431
  class ExpirationPolicy
282
432
  include Google::Apis::Core::Hashable
283
433
 
284
- # Specifies the "time-to-live" duration for an associated resource. The resource
285
- # expires if it is not active for a period of `ttl`. The definition of "activity"
286
- # depends on the type of the associated resource. The minimum and maximum
287
- # allowed values for `ttl` depend on the type of the associated resource, as
288
- # well. If `ttl` is not set, the associated resource never expires.
434
+ # Optional. Specifies the "time-to-live" duration for an associated resource.
435
+ # The resource expires if it is not active for a period of `ttl`. The definition
436
+ # of "activity" depends on the type of the associated resource. The minimum and
437
+ # maximum allowed values for `ttl` depend on the type of the associated resource,
438
+ # as well. If `ttl` is not set, the associated resource never expires.
289
439
  # Corresponds to the JSON property `ttl`
290
440
  # @return [String]
291
441
  attr_accessor :ttl
@@ -354,6 +504,32 @@ module Google
354
504
  end
355
505
  end
356
506
 
507
+ # Response for the `ListSchemaRevisions` method.
508
+ class ListSchemaRevisionsResponse
509
+ include Google::Apis::Core::Hashable
510
+
511
+ # A token that can be sent as `page_token` to retrieve the next page. If this
512
+ # field is empty, there are no subsequent pages.
513
+ # Corresponds to the JSON property `nextPageToken`
514
+ # @return [String]
515
+ attr_accessor :next_page_token
516
+
517
+ # The revisions of the schema.
518
+ # Corresponds to the JSON property `schemas`
519
+ # @return [Array<Google::Apis::PubsubV1::Schema>]
520
+ attr_accessor :schemas
521
+
522
+ def initialize(**args)
523
+ update!(**args)
524
+ end
525
+
526
+ # Update properties of this object
527
+ def update!(**args)
528
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
529
+ @schemas = args[:schemas] if args.key?(:schemas)
530
+ end
531
+ end
532
+
357
533
  # Response for the `ListSchemas` method.
358
534
  class ListSchemasResponse
359
535
  include Google::Apis::Core::Hashable
@@ -384,13 +560,13 @@ module Google
384
560
  class ListSnapshotsResponse
385
561
  include Google::Apis::Core::Hashable
386
562
 
387
- # If not empty, indicates that there may be more snapshot that match the request;
388
- # this value should be passed in a new `ListSnapshotsRequest`.
563
+ # Optional. If not empty, indicates that there may be more snapshot that match
564
+ # the request; this value should be passed in a new `ListSnapshotsRequest`.
389
565
  # Corresponds to the JSON property `nextPageToken`
390
566
  # @return [String]
391
567
  attr_accessor :next_page_token
392
568
 
393
- # The resulting snapshots.
569
+ # Optional. The resulting snapshots.
394
570
  # Corresponds to the JSON property `snapshots`
395
571
  # @return [Array<Google::Apis::PubsubV1::Snapshot>]
396
572
  attr_accessor :snapshots
@@ -410,14 +586,14 @@ module Google
410
586
  class ListSubscriptionsResponse
411
587
  include Google::Apis::Core::Hashable
412
588
 
413
- # If not empty, indicates that there may be more subscriptions that match the
414
- # request; this value should be passed in a new `ListSubscriptionsRequest` to
415
- # get more subscriptions.
589
+ # Optional. If not empty, indicates that there may be more subscriptions that
590
+ # match the request; this value should be passed in a new `
591
+ # ListSubscriptionsRequest` to get more subscriptions.
416
592
  # Corresponds to the JSON property `nextPageToken`
417
593
  # @return [String]
418
594
  attr_accessor :next_page_token
419
595
 
420
- # The subscriptions that match the request.
596
+ # Optional. The subscriptions that match the request.
421
597
  # Corresponds to the JSON property `subscriptions`
422
598
  # @return [Array<Google::Apis::PubsubV1::Subscription>]
423
599
  attr_accessor :subscriptions
@@ -437,14 +613,14 @@ module Google
437
613
  class ListTopicSnapshotsResponse
438
614
  include Google::Apis::Core::Hashable
439
615
 
440
- # If not empty, indicates that there may be more snapshots that match the
441
- # request; this value should be passed in a new `ListTopicSnapshotsRequest` to
442
- # get more snapshots.
616
+ # Optional. If not empty, indicates that there may be more snapshots that match
617
+ # the request; this value should be passed in a new `ListTopicSnapshotsRequest`
618
+ # to get more snapshots.
443
619
  # Corresponds to the JSON property `nextPageToken`
444
620
  # @return [String]
445
621
  attr_accessor :next_page_token
446
622
 
447
- # The names of the snapshots that match the request.
623
+ # Optional. The names of the snapshots that match the request.
448
624
  # Corresponds to the JSON property `snapshots`
449
625
  # @return [Array<String>]
450
626
  attr_accessor :snapshots
@@ -464,14 +640,15 @@ module Google
464
640
  class ListTopicSubscriptionsResponse
465
641
  include Google::Apis::Core::Hashable
466
642
 
467
- # If not empty, indicates that there may be more subscriptions that match the
468
- # request; this value should be passed in a new `ListTopicSubscriptionsRequest`
469
- # to get more subscriptions.
643
+ # Optional. If not empty, indicates that there may be more subscriptions that
644
+ # match the request; this value should be passed in a new `
645
+ # ListTopicSubscriptionsRequest` to get more subscriptions.
470
646
  # Corresponds to the JSON property `nextPageToken`
471
647
  # @return [String]
472
648
  attr_accessor :next_page_token
473
649
 
474
- # The names of subscriptions attached to the topic specified in the request.
650
+ # Optional. The names of subscriptions attached to the topic specified in the
651
+ # request.
475
652
  # Corresponds to the JSON property `subscriptions`
476
653
  # @return [Array<String>]
477
654
  attr_accessor :subscriptions
@@ -491,13 +668,13 @@ module Google
491
668
  class ListTopicsResponse
492
669
  include Google::Apis::Core::Hashable
493
670
 
494
- # If not empty, indicates that there may be more topics that match the request;
495
- # this value should be passed in a new `ListTopicsRequest`.
671
+ # Optional. If not empty, indicates that there may be more topics that match the
672
+ # request; this value should be passed in a new `ListTopicsRequest`.
496
673
  # Corresponds to the JSON property `nextPageToken`
497
674
  # @return [String]
498
675
  attr_accessor :next_page_token
499
676
 
500
- # The resulting topics.
677
+ # Optional. The resulting topics.
501
678
  # Corresponds to the JSON property `topics`
502
679
  # @return [Array<Google::Apis::PubsubV1::Topic>]
503
680
  attr_accessor :topics
@@ -517,15 +694,25 @@ module Google
517
694
  class MessageStoragePolicy
518
695
  include Google::Apis::Core::Hashable
519
696
 
520
- # A list of IDs of GCP regions where messages that are published to the topic
521
- # may be persisted in storage. Messages published by publishers running in non-
522
- # allowed GCP regions (or running outside of GCP altogether) will be routed for
523
- # storage in one of the allowed regions. An empty list means that no regions are
524
- # allowed, and is not a valid configuration.
697
+ # Optional. A list of IDs of Google Cloud regions where messages that are
698
+ # published to the topic may be persisted in storage. Messages published by
699
+ # publishers running in non-allowed Google Cloud regions (or running outside of
700
+ # Google Cloud altogether) are routed for storage in one of the allowed regions.
701
+ # An empty list means that no regions are allowed, and is not a valid
702
+ # configuration.
525
703
  # Corresponds to the JSON property `allowedPersistenceRegions`
526
704
  # @return [Array<String>]
527
705
  attr_accessor :allowed_persistence_regions
528
706
 
707
+ # Optional. If true, `allowed_persistence_regions` is also used to enforce in-
708
+ # transit guarantees for messages. That is, Pub/Sub will fail Publish operations
709
+ # on this topic and subscribe operations on any subscription attached to this
710
+ # topic in any region that is not in `allowed_persistence_regions`.
711
+ # Corresponds to the JSON property `enforceInTransit`
712
+ # @return [Boolean]
713
+ attr_accessor :enforce_in_transit
714
+ alias_method :enforce_in_transit?, :enforce_in_transit
715
+
529
716
  def initialize(**args)
530
717
  update!(**args)
531
718
  end
@@ -533,6 +720,7 @@ module Google
533
720
  # Update properties of this object
534
721
  def update!(**args)
535
722
  @allowed_persistence_regions = args[:allowed_persistence_regions] if args.key?(:allowed_persistence_regions)
723
+ @enforce_in_transit = args[:enforce_in_transit] if args.key?(:enforce_in_transit)
536
724
  end
537
725
  end
538
726
 
@@ -587,25 +775,47 @@ module Google
587
775
  end
588
776
  end
589
777
 
778
+ # Sets the `data` field as the HTTP body for delivery.
779
+ class NoWrapper
780
+ include Google::Apis::Core::Hashable
781
+
782
+ # Optional. When true, writes the Pub/Sub message metadata to `x-goog-pubsub-:`
783
+ # headers of the HTTP request. Writes the Pub/Sub message attributes to `:`
784
+ # headers of the HTTP request.
785
+ # Corresponds to the JSON property `writeMetadata`
786
+ # @return [Boolean]
787
+ attr_accessor :write_metadata
788
+ alias_method :write_metadata?, :write_metadata
789
+
790
+ def initialize(**args)
791
+ update!(**args)
792
+ end
793
+
794
+ # Update properties of this object
795
+ def update!(**args)
796
+ @write_metadata = args[:write_metadata] if args.key?(:write_metadata)
797
+ end
798
+ end
799
+
590
800
  # Contains information needed for generating an [OpenID Connect token](https://
591
- # developers.google.com/identity/protocols/OpenIDConnect). [Service account
592
- # email](https://cloud.google.com/iam/docs/service-accounts) used for generating
593
- # the OIDC token. For more information on setting up authentication, see [Push
594
- # subscriptions](https://cloud.google.com/pubsub/docs/push).
801
+ # developers.google.com/identity/protocols/OpenIDConnect).
595
802
  class OidcToken
596
803
  include Google::Apis::Core::Hashable
597
804
 
598
- # Audience to be used when generating OIDC token. The audience claim identifies
599
- # the recipients that the JWT is intended for. The audience value is a single
600
- # case-sensitive string. Having multiple values (array) for the audience field
601
- # is not supported. More info about the OIDC JWT token audience here: https://
602
- # tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push
603
- # endpoint URL will be used.
805
+ # Optional. Audience to be used when generating OIDC token. The audience claim
806
+ # identifies the recipients that the JWT is intended for. The audience value is
807
+ # a single case-sensitive string. Having multiple values (array) for the
808
+ # audience field is not supported. More info about the OIDC JWT token audience
809
+ # here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified,
810
+ # the Push endpoint URL will be used.
604
811
  # Corresponds to the JSON property `audience`
605
812
  # @return [String]
606
813
  attr_accessor :audience
607
814
 
608
- #
815
+ # Optional. [Service account email](https://cloud.google.com/iam/docs/service-
816
+ # accounts) used for generating the OIDC token. For more information on setting
817
+ # up authentication, see [Push subscriptions](https://cloud.google.com/pubsub/
818
+ # docs/push).
609
819
  # Corresponds to the JSON property `serviceAccountEmail`
610
820
  # @return [String]
611
821
  attr_accessor :service_account_email
@@ -632,22 +842,22 @@ module Google
632
842
  # evaluates to `true`. A condition can add constraints based on attributes of
633
843
  # the request, the resource, or both. To learn which resources support
634
844
  # conditions in their IAM policies, see the [IAM documentation](https://cloud.
635
- # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
845
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
636
846
  # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
637
847
  # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
638
848
  # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
639
849
  # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
640
850
  # ], "condition": ` "title": "expirable access", "description": "Does not grant
641
851
  # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
642
- # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
643
- # bindings: - members: - user:mike@example.com - group:admins@example.com -
644
- # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
645
- # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
646
- # com role: roles/resourcemanager.organizationViewer condition: title: expirable
647
- # access description: Does not grant access after Sep 2020 expression: request.
648
- # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
649
- # a description of IAM and its features, see the [IAM documentation](https://
650
- # cloud.google.com/iam/docs/).
852
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
853
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
854
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
855
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
856
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
857
+ # title: expirable access description: Does not grant access after Sep 2020
858
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
859
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
860
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
651
861
  class Policy
652
862
  include Google::Apis::Core::Hashable
653
863
 
@@ -733,8 +943,9 @@ module Google
733
943
  class PublishResponse
734
944
  include Google::Apis::Core::Hashable
735
945
 
736
- # The server-assigned ID of each published message, in the same order as the
737
- # messages in the request. IDs are guaranteed to be unique within the topic.
946
+ # Optional. The server-assigned ID of each published message, in the same order
947
+ # as the messages in the request. IDs are guaranteed to be unique within the
948
+ # topic.
738
949
  # Corresponds to the JSON property `messageIds`
739
950
  # @return [Array<String>]
740
951
  attr_accessor :message_ids
@@ -759,30 +970,31 @@ module Google
759
970
  class Message
760
971
  include Google::Apis::Core::Hashable
761
972
 
762
- # Attributes for this message. If this field is empty, the message must contain
763
- # non-empty data. This can be used to filter messages on the subscription.
973
+ # Optional. Attributes for this message. If this field is empty, the message
974
+ # must contain non-empty data. This can be used to filter messages on the
975
+ # subscription.
764
976
  # Corresponds to the JSON property `attributes`
765
977
  # @return [Hash<String,String>]
766
978
  attr_accessor :attributes
767
979
 
768
- # The message data field. If this field is empty, the message must contain at
769
- # least one attribute.
980
+ # Optional. The message data field. If this field is empty, the message must
981
+ # contain at least one attribute.
770
982
  # Corresponds to the JSON property `data`
771
983
  # NOTE: Values are automatically base64 encoded/decoded in the client library.
772
984
  # @return [String]
773
985
  attr_accessor :data
774
986
 
775
- # ID of this message, assigned by the server when the message is published.
776
- # Guaranteed to be unique within the topic. This value may be read by a
777
- # subscriber that receives a `PubsubMessage` via a `Pull` call or a push
987
+ # Optional. ID of this message, assigned by the server when the message is
988
+ # published. Guaranteed to be unique within the topic. This value may be read by
989
+ # a subscriber that receives a `PubsubMessage` via a `Pull` call or a push
778
990
  # delivery. It must not be populated by the publisher in a `Publish` call.
779
991
  # Corresponds to the JSON property `messageId`
780
992
  # @return [String]
781
993
  attr_accessor :message_id
782
994
 
783
- # If non-empty, identifies related messages for which publish order should be
784
- # respected. If a `Subscription` has `enable_message_ordering` set to `true`,
785
- # messages published with the same non-empty `ordering_key` value will be
995
+ # Optional. If non-empty, identifies related messages for which publish order
996
+ # should be respected. If a `Subscription` has `enable_message_ordering` set to `
997
+ # true`, messages published with the same non-empty `ordering_key` value will be
786
998
  # delivered to subscribers in the order in which they are received by the Pub/
787
999
  # Sub system. All `PubsubMessage`s published in a given `PublishRequest` must
788
1000
  # specify the same `ordering_key` value. For more information, see [ordering
@@ -791,9 +1003,9 @@ module Google
791
1003
  # @return [String]
792
1004
  attr_accessor :ordering_key
793
1005
 
794
- # The time at which the message was published, populated by the server when it
795
- # receives the `Publish` call. It must not be populated by the publisher in a `
796
- # Publish` call.
1006
+ # Optional. The time at which the message was published, populated by the server
1007
+ # when it receives the `Publish` call. It must not be populated by the publisher
1008
+ # in a `Publish` call.
797
1009
  # Corresponds to the JSON property `publishTime`
798
1010
  # @return [String]
799
1011
  attr_accessor :publish_time
@@ -812,6 +1024,21 @@ module Google
812
1024
  end
813
1025
  end
814
1026
 
1027
+ # The payload to the push endpoint is in the form of the JSON representation of
1028
+ # a PubsubMessage (https://cloud.google.com/pubsub/docs/reference/rpc/google.
1029
+ # pubsub.v1#pubsubmessage).
1030
+ class PubsubWrapper
1031
+ include Google::Apis::Core::Hashable
1032
+
1033
+ def initialize(**args)
1034
+ update!(**args)
1035
+ end
1036
+
1037
+ # Update properties of this object
1038
+ def update!(**args)
1039
+ end
1040
+ end
1041
+
815
1042
  # Request for the `Pull` method.
816
1043
  class PullRequest
817
1044
  include Google::Apis::Core::Hashable
@@ -850,10 +1077,11 @@ module Google
850
1077
  class PullResponse
851
1078
  include Google::Apis::Core::Hashable
852
1079
 
853
- # Received Pub/Sub messages. The list will be empty if there are no more
854
- # messages available in the backlog. For JSON, the response can be entirely
855
- # empty. The Pub/Sub system may return fewer than the `maxMessages` requested
856
- # even if there are more messages available in the backlog.
1080
+ # Optional. Received Pub/Sub messages. The list will be empty if there are no
1081
+ # more messages available in the backlog, or if no messages could be returned
1082
+ # before the request timeout. For JSON, the response can be entirely empty. The
1083
+ # Pub/Sub system may return fewer than the `maxMessages` requested even if there
1084
+ # are more messages available in the backlog.
857
1085
  # Corresponds to the JSON property `receivedMessages`
858
1086
  # @return [Array<Google::Apis::PubsubV1::ReceivedMessage>]
859
1087
  attr_accessor :received_messages
@@ -872,34 +1100,43 @@ module Google
872
1100
  class PushConfig
873
1101
  include Google::Apis::Core::Hashable
874
1102
 
875
- # Endpoint configuration attributes that can be used to control different
876
- # aspects of the message delivery. The only currently supported attribute is `x-
877
- # goog-version`, which you can use to change the format of the pushed message.
878
- # This attribute indicates the version of the data expected by the endpoint.
879
- # This controls the shape of the pushed message (i.e., its fields and metadata).
880
- # If not present during the `CreateSubscription` call, it will default to the
881
- # version of the Pub/Sub API used to make such call. If not present in a `
882
- # ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls
883
- # will always return a valid version, even if the subscription was created
884
- # without this attribute. The only supported values for the `x-goog-version`
885
- # attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/
886
- # Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub
887
- # API. For example: `attributes ` "x-goog-version": "v1" ``
1103
+ # Optional. Endpoint configuration attributes that can be used to control
1104
+ # different aspects of the message delivery. The only currently supported
1105
+ # attribute is `x-goog-version`, which you can use to change the format of the
1106
+ # pushed message. This attribute indicates the version of the data expected by
1107
+ # the endpoint. This controls the shape of the pushed message (i.e., its fields
1108
+ # and metadata). If not present during the `CreateSubscription` call, it will
1109
+ # default to the version of the Pub/Sub API used to make such call. If not
1110
+ # present in a `ModifyPushConfig` call, its value will not be changed. `
1111
+ # GetSubscription` calls will always return a valid version, even if the
1112
+ # subscription was created without this attribute. The only supported values for
1113
+ # the `x-goog-version` attribute are: * `v1beta1`: uses the push format defined
1114
+ # in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined
1115
+ # in the v1 Pub/Sub API. For example: `attributes ` "x-goog-version": "v1" ``
888
1116
  # Corresponds to the JSON property `attributes`
889
1117
  # @return [Hash<String,String>]
890
1118
  attr_accessor :attributes
891
1119
 
1120
+ # Sets the `data` field as the HTTP body for delivery.
1121
+ # Corresponds to the JSON property `noWrapper`
1122
+ # @return [Google::Apis::PubsubV1::NoWrapper]
1123
+ attr_accessor :no_wrapper
1124
+
892
1125
  # Contains information needed for generating an [OpenID Connect token](https://
893
- # developers.google.com/identity/protocols/OpenIDConnect). [Service account
894
- # email](https://cloud.google.com/iam/docs/service-accounts) used for generating
895
- # the OIDC token. For more information on setting up authentication, see [Push
896
- # subscriptions](https://cloud.google.com/pubsub/docs/push).
1126
+ # developers.google.com/identity/protocols/OpenIDConnect).
897
1127
  # Corresponds to the JSON property `oidcToken`
898
1128
  # @return [Google::Apis::PubsubV1::OidcToken]
899
1129
  attr_accessor :oidc_token
900
1130
 
901
- # A URL locating the endpoint to which messages should be pushed. For example, a
902
- # Webhook endpoint might use `https://example.com/push`.
1131
+ # The payload to the push endpoint is in the form of the JSON representation of
1132
+ # a PubsubMessage (https://cloud.google.com/pubsub/docs/reference/rpc/google.
1133
+ # pubsub.v1#pubsubmessage).
1134
+ # Corresponds to the JSON property `pubsubWrapper`
1135
+ # @return [Google::Apis::PubsubV1::PubsubWrapper]
1136
+ attr_accessor :pubsub_wrapper
1137
+
1138
+ # Optional. A URL locating the endpoint to which messages should be pushed. For
1139
+ # example, a Webhook endpoint might use `https://example.com/push`.
903
1140
  # Corresponds to the JSON property `pushEndpoint`
904
1141
  # @return [String]
905
1142
  attr_accessor :push_endpoint
@@ -911,7 +1148,9 @@ module Google
911
1148
  # Update properties of this object
912
1149
  def update!(**args)
913
1150
  @attributes = args[:attributes] if args.key?(:attributes)
1151
+ @no_wrapper = args[:no_wrapper] if args.key?(:no_wrapper)
914
1152
  @oidc_token = args[:oidc_token] if args.key?(:oidc_token)
1153
+ @pubsub_wrapper = args[:pubsub_wrapper] if args.key?(:pubsub_wrapper)
915
1154
  @push_endpoint = args[:push_endpoint] if args.key?(:push_endpoint)
916
1155
  end
917
1156
  end
@@ -920,16 +1159,16 @@ module Google
920
1159
  class ReceivedMessage
921
1160
  include Google::Apis::Core::Hashable
922
1161
 
923
- # This ID can be used to acknowledge the received message.
1162
+ # Optional. This ID can be used to acknowledge the received message.
924
1163
  # Corresponds to the JSON property `ackId`
925
1164
  # @return [String]
926
1165
  attr_accessor :ack_id
927
1166
 
928
- # The approximate number of times that Cloud Pub/Sub has attempted to deliver
929
- # the associated message to a subscriber. More precisely, this is 1 + (number of
930
- # NACKs) + (number of ack_deadline exceeds) for this message. A NACK is any call
931
- # to ModifyAckDeadline with a 0 deadline. An ack_deadline exceeds event is
932
- # whenever a message is not acknowledged within ack_deadline. Note that
1167
+ # Optional. The approximate number of times that Pub/Sub has attempted to
1168
+ # deliver the associated message to a subscriber. More precisely, this is 1 + (
1169
+ # number of NACKs) + (number of ack_deadline exceeds) for this message. A NACK
1170
+ # is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline exceeds
1171
+ # event is whenever a message is not acknowledged within ack_deadline. Note that
933
1172
  # ack_deadline is initially Subscription.ackDeadlineSeconds, but may get
934
1173
  # extended automatically by the client library. Upon the first delivery of a
935
1174
  # given message, `delivery_attempt` will have a value of 1. The value is
@@ -962,24 +1201,24 @@ module Google
962
1201
  end
963
1202
  end
964
1203
 
965
- # A policy that specifies how Cloud Pub/Sub retries message delivery. Retry
966
- # delay will be exponential based on provided minimum and maximum backoffs.
967
- # https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be
968
- # triggered on NACKs or acknowledgement deadline exceeded events for a given
969
- # message. Retry Policy is implemented on a best effort basis. At times, the
970
- # delay between consecutive deliveries may not match the configuration. That is,
971
- # delay can be more or less than configured backoff.
1204
+ # A policy that specifies how Pub/Sub retries message delivery. Retry delay will
1205
+ # be exponential based on provided minimum and maximum backoffs. https://en.
1206
+ # wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs
1207
+ # or acknowledgement deadline exceeded events for a given message. Retry Policy
1208
+ # is implemented on a best effort basis. At times, the delay between consecutive
1209
+ # deliveries may not match the configuration. That is, delay can be more or less
1210
+ # than configured backoff.
972
1211
  class RetryPolicy
973
1212
  include Google::Apis::Core::Hashable
974
1213
 
975
- # The maximum delay between consecutive deliveries of a given message. Value
976
- # should be between 0 and 600 seconds. Defaults to 600 seconds.
1214
+ # Optional. The maximum delay between consecutive deliveries of a given message.
1215
+ # Value should be between 0 and 600 seconds. Defaults to 600 seconds.
977
1216
  # Corresponds to the JSON property `maximumBackoff`
978
1217
  # @return [String]
979
1218
  attr_accessor :maximum_backoff
980
1219
 
981
- # The minimum delay between consecutive deliveries of a given message. Value
982
- # should be between 0 and 600 seconds. Defaults to 10 seconds.
1220
+ # Optional. The minimum delay between consecutive deliveries of a given message.
1221
+ # Value should be between 0 and 600 seconds. Defaults to 10 seconds.
983
1222
  # Corresponds to the JSON property `minimumBackoff`
984
1223
  # @return [String]
985
1224
  attr_accessor :minimum_backoff
@@ -995,6 +1234,26 @@ module Google
995
1234
  end
996
1235
  end
997
1236
 
1237
+ # Request for the `RollbackSchema` method.
1238
+ class RollbackSchemaRequest
1239
+ include Google::Apis::Core::Hashable
1240
+
1241
+ # Required. The revision ID to roll back to. It must be a revision of the same
1242
+ # schema. Example: c7cfa2a8
1243
+ # Corresponds to the JSON property `revisionId`
1244
+ # @return [String]
1245
+ attr_accessor :revision_id
1246
+
1247
+ def initialize(**args)
1248
+ update!(**args)
1249
+ end
1250
+
1251
+ # Update properties of this object
1252
+ def update!(**args)
1253
+ @revision_id = args[:revision_id] if args.key?(:revision_id)
1254
+ end
1255
+ end
1256
+
998
1257
  # A schema resource.
999
1258
  class Schema
1000
1259
  include Google::Apis::Core::Hashable
@@ -1044,21 +1303,21 @@ module Google
1044
1303
  class SchemaSettings
1045
1304
  include Google::Apis::Core::Hashable
1046
1305
 
1047
- # The encoding of messages validated against `schema`.
1306
+ # Optional. The encoding of messages validated against `schema`.
1048
1307
  # Corresponds to the JSON property `encoding`
1049
1308
  # @return [String]
1050
1309
  attr_accessor :encoding
1051
1310
 
1052
- # The minimum (inclusive) revision allowed for validating messages. If empty or
1053
- # not present, allow any revision to be validated against last_revision or any
1054
- # revision created before.
1311
+ # Optional. The minimum (inclusive) revision allowed for validating messages. If
1312
+ # empty or not present, allow any revision to be validated against last_revision
1313
+ # or any revision created before.
1055
1314
  # Corresponds to the JSON property `firstRevisionId`
1056
1315
  # @return [String]
1057
1316
  attr_accessor :first_revision_id
1058
1317
 
1059
- # The maximum (inclusive) revision allowed for validating messages. If empty or
1060
- # not present, allow any revision to be validated against first_revision or any
1061
- # revision created after.
1318
+ # Optional. The maximum (inclusive) revision allowed for validating messages. If
1319
+ # empty or not present, allow any revision to be validated against
1320
+ # first_revision or any revision created after.
1062
1321
  # Corresponds to the JSON property `lastRevisionId`
1063
1322
  # @return [String]
1064
1323
  attr_accessor :last_revision_id
@@ -1087,21 +1346,23 @@ module Google
1087
1346
  class SeekRequest
1088
1347
  include Google::Apis::Core::Hashable
1089
1348
 
1090
- # The snapshot to seek to. The snapshot's topic must be the same as that of the
1091
- # provided subscription. Format is `projects/`project`/snapshots/`snap``.
1349
+ # Optional. The snapshot to seek to. The snapshot's topic must be the same as
1350
+ # that of the provided subscription. Format is `projects/`project`/snapshots/`
1351
+ # snap``.
1092
1352
  # Corresponds to the JSON property `snapshot`
1093
1353
  # @return [String]
1094
1354
  attr_accessor :snapshot
1095
1355
 
1096
- # The time to seek to. Messages retained in the subscription that were published
1097
- # before this time are marked as acknowledged, and messages retained in the
1098
- # subscription that were published after this time are marked as unacknowledged.
1099
- # Note that this operation affects only those messages retained in the
1100
- # subscription (configured by the combination of `message_retention_duration`
1101
- # and `retain_acked_messages`). For example, if `time` corresponds to a point
1102
- # before the message retention window (or to a point before the system's notion
1103
- # of the subscription creation time), only retained messages will be marked as
1104
- # unacknowledged, and already-expunged messages will not be restored.
1356
+ # Optional. The time to seek to. Messages retained in the subscription that were
1357
+ # published before this time are marked as acknowledged, and messages retained
1358
+ # in the subscription that were published after this time are marked as
1359
+ # unacknowledged. Note that this operation affects only those messages retained
1360
+ # in the subscription (configured by the combination of `
1361
+ # message_retention_duration` and `retain_acked_messages`). For example, if `
1362
+ # time` corresponds to a point before the message retention window (or to a
1363
+ # point before the system's notion of the subscription creation time), only
1364
+ # retained messages will be marked as unacknowledged, and already-expunged
1365
+ # messages will not be restored.
1105
1366
  # Corresponds to the JSON property `time`
1106
1367
  # @return [String]
1107
1368
  attr_accessor :time
@@ -1145,22 +1406,22 @@ module Google
1145
1406
  # evaluates to `true`. A condition can add constraints based on attributes of
1146
1407
  # the request, the resource, or both. To learn which resources support
1147
1408
  # conditions in their IAM policies, see the [IAM documentation](https://cloud.
1148
- # google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
1409
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
1149
1410
  # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
1150
1411
  # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
1151
1412
  # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
1152
1413
  # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
1153
1414
  # ], "condition": ` "title": "expirable access", "description": "Does not grant
1154
1415
  # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
1155
- # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
1156
- # bindings: - members: - user:mike@example.com - group:admins@example.com -
1157
- # domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
1158
- # role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
1159
- # com role: roles/resourcemanager.organizationViewer condition: title: expirable
1160
- # access description: Does not grant access after Sep 2020 expression: request.
1161
- # time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
1162
- # a description of IAM and its features, see the [IAM documentation](https://
1163
- # cloud.google.com/iam/docs/).
1416
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
1417
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
1418
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
1419
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
1420
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
1421
+ # title: expirable access description: Does not grant access after Sep 2020
1422
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
1423
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
1424
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
1164
1425
  # Corresponds to the JSON property `policy`
1165
1426
  # @return [Google::Apis::PubsubV1::Policy]
1166
1427
  attr_accessor :policy
@@ -1182,11 +1443,11 @@ module Google
1182
1443
  class Snapshot
1183
1444
  include Google::Apis::Core::Hashable
1184
1445
 
1185
- # The snapshot is guaranteed to exist up until this time. A newly-created
1186
- # snapshot expires no later than 7 days from the time of its creation. Its exact
1187
- # lifetime is determined at creation by the existing backlog in the source
1188
- # subscription. Specifically, the lifetime of the snapshot is `7 days - (age of
1189
- # oldest unacked message in the subscription)`. For example, consider a
1446
+ # Optional. The snapshot is guaranteed to exist up until this time. A newly-
1447
+ # created snapshot expires no later than 7 days from the time of its creation.
1448
+ # Its exact lifetime is determined at creation by the existing backlog in the
1449
+ # source subscription. Specifically, the lifetime of the snapshot is `7 days - (
1450
+ # age of oldest unacked message in the subscription)`. For example, consider a
1190
1451
  # subscription whose oldest unacked message is 3 days old. If a snapshot is
1191
1452
  # created from this subscription, the snapshot -- which will always capture this
1192
1453
  # 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The
@@ -1196,18 +1457,18 @@ module Google
1196
1457
  # @return [String]
1197
1458
  attr_accessor :expire_time
1198
1459
 
1199
- # See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/
1200
- # labels).
1460
+ # Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/
1461
+ # docs/labels).
1201
1462
  # Corresponds to the JSON property `labels`
1202
1463
  # @return [Hash<String,String>]
1203
1464
  attr_accessor :labels
1204
1465
 
1205
- # The name of the snapshot.
1466
+ # Optional. The name of the snapshot.
1206
1467
  # Corresponds to the JSON property `name`
1207
1468
  # @return [String]
1208
1469
  attr_accessor :name
1209
1470
 
1210
- # The name of the topic from which this snapshot is retaining messages.
1471
+ # Optional. The name of the topic from which this snapshot is retaining messages.
1211
1472
  # Corresponds to the JSON property `topic`
1212
1473
  # @return [String]
1213
1474
  attr_accessor :topic
@@ -1225,20 +1486,20 @@ module Google
1225
1486
  end
1226
1487
  end
1227
1488
 
1228
- # A subscription resource. If none of `push_config` or `bigquery_config` is set,
1229
- # then the subscriber will pull and ack messages using API methods. At most one
1230
- # of these fields may be set.
1489
+ # A subscription resource. If none of `push_config`, `bigquery_config`, or `
1490
+ # cloud_storage_config` is set, then the subscriber will pull and ack messages
1491
+ # using API methods. At most one of these fields may be set.
1231
1492
  class Subscription
1232
1493
  include Google::Apis::Core::Hashable
1233
1494
 
1234
- # The approximate amount of time (on a best-effort basis) Pub/Sub waits for the
1235
- # subscriber to acknowledge receipt before resending the message. In the
1236
- # interval after the message is delivered and before it is acknowledged, it is
1237
- # considered to be _outstanding_. During that time period, the message will not
1238
- # be redelivered (on a best-effort basis). For pull subscriptions, this value is
1239
- # used as the initial value for the ack deadline. To override this value for a
1240
- # given message, call `ModifyAckDeadline` with the corresponding `ack_id` if
1241
- # using non-streaming pull or send the `ack_id` in a `
1495
+ # Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
1496
+ # waits for the subscriber to acknowledge receipt before resending the message.
1497
+ # In the interval after the message is delivered and before it is acknowledged,
1498
+ # it is considered to be _outstanding_. During that time period, the message
1499
+ # will not be redelivered (on a best-effort basis). For pull subscriptions, this
1500
+ # value is used as the initial value for the ack deadline. To override this
1501
+ # value for a given message, call `ModifyAckDeadline` with the corresponding `
1502
+ # ack_id` if using non-streaming pull or send the `ack_id` in a `
1242
1503
  # StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom
1243
1504
  # deadline you can specify is 10 seconds. The maximum custom deadline you can
1244
1505
  # specify is 600 seconds (10 minutes). If this parameter is 0, a default value
@@ -1255,6 +1516,11 @@ module Google
1255
1516
  # @return [Google::Apis::PubsubV1::BigQueryConfig]
1256
1517
  attr_accessor :bigquery_config
1257
1518
 
1519
+ # Configuration for a Cloud Storage subscription.
1520
+ # Corresponds to the JSON property `cloudStorageConfig`
1521
+ # @return [Google::Apis::PubsubV1::CloudStorageConfig]
1522
+ attr_accessor :cloud_storage_config
1523
+
1258
1524
  # Dead lettering is done on a best effort basis. The same message might be dead
1259
1525
  # lettered multiple times. If validation on any of the fields fails at
1260
1526
  # subscription creation/updation, the create/update subscription request will
@@ -1263,32 +1529,33 @@ module Google
1263
1529
  # @return [Google::Apis::PubsubV1::DeadLetterPolicy]
1264
1530
  attr_accessor :dead_letter_policy
1265
1531
 
1266
- # Indicates whether the subscription is detached from its topic. Detached
1267
- # subscriptions don't receive messages from their topic and don't retain any
1268
- # backlog. `Pull` and `StreamingPull` requests will return FAILED_PRECONDITION.
1269
- # If the subscription is a push subscription, pushes to the endpoint will not be
1270
- # made.
1532
+ # Optional. Indicates whether the subscription is detached from its topic.
1533
+ # Detached subscriptions don't receive messages from their topic and don't
1534
+ # retain any backlog. `Pull` and `StreamingPull` requests will return
1535
+ # FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the
1536
+ # endpoint will not be made.
1271
1537
  # Corresponds to the JSON property `detached`
1272
1538
  # @return [Boolean]
1273
1539
  attr_accessor :detached
1274
1540
  alias_method :detached?, :detached
1275
1541
 
1276
- # If true, Pub/Sub provides the following guarantees for the delivery of a
1277
- # message with a given value of `message_id` on this subscription: * The message
1278
- # sent to a subscriber is guaranteed not to be resent before the message's
1279
- # acknowledgement deadline expires. * An acknowledged message will not be resent
1280
- # to a subscriber. Note that subscribers may still receive multiple copies of a
1281
- # message when `enable_exactly_once_delivery` is true if the message was
1282
- # published multiple times by a publisher client. These copies are considered
1283
- # distinct by Pub/Sub and have distinct `message_id` values.
1542
+ # Optional. If true, Pub/Sub provides the following guarantees for the delivery
1543
+ # of a message with a given value of `message_id` on this subscription: * The
1544
+ # message sent to a subscriber is guaranteed not to be resent before the message'
1545
+ # s acknowledgement deadline expires. * An acknowledged message will not be
1546
+ # resent to a subscriber. Note that subscribers may still receive multiple
1547
+ # copies of a message when `enable_exactly_once_delivery` is true if the message
1548
+ # was published multiple times by a publisher client. These copies are
1549
+ # considered distinct by Pub/Sub and have distinct `message_id` values.
1284
1550
  # Corresponds to the JSON property `enableExactlyOnceDelivery`
1285
1551
  # @return [Boolean]
1286
1552
  attr_accessor :enable_exactly_once_delivery
1287
1553
  alias_method :enable_exactly_once_delivery?, :enable_exactly_once_delivery
1288
1554
 
1289
- # If true, messages published with the same `ordering_key` in `PubsubMessage`
1290
- # will be delivered to the subscribers in the order in which they are received
1291
- # by the Pub/Sub system. Otherwise, they may be delivered in any order.
1555
+ # Optional. If true, messages published with the same `ordering_key` in `
1556
+ # PubsubMessage` will be delivered to the subscribers in the order in which they
1557
+ # are received by the Pub/Sub system. Otherwise, they may be delivered in any
1558
+ # order.
1292
1559
  # Corresponds to the JSON property `enableMessageOrdering`
1293
1560
  # @return [Boolean]
1294
1561
  attr_accessor :enable_message_ordering
@@ -1300,24 +1567,24 @@ module Google
1300
1567
  # @return [Google::Apis::PubsubV1::ExpirationPolicy]
1301
1568
  attr_accessor :expiration_policy
1302
1569
 
1303
- # An expression written in the Pub/Sub [filter language](https://cloud.google.
1304
- # com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s whose `
1305
- # attributes` field matches the filter are delivered on this subscription. If
1306
- # empty, then no messages are filtered out.
1570
+ # Optional. An expression written in the Pub/Sub [filter language](https://cloud.
1571
+ # google.com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s
1572
+ # whose `attributes` field matches the filter are delivered on this subscription.
1573
+ # If empty, then no messages are filtered out.
1307
1574
  # Corresponds to the JSON property `filter`
1308
1575
  # @return [String]
1309
1576
  attr_accessor :filter
1310
1577
 
1311
- # See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels)
1312
- # .
1578
+ # Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/
1579
+ # docs/labels).
1313
1580
  # Corresponds to the JSON property `labels`
1314
1581
  # @return [Hash<String,String>]
1315
1582
  attr_accessor :labels
1316
1583
 
1317
- # How long to retain unacknowledged messages in the subscription's backlog, from
1318
- # the moment a message is published. If `retain_acked_messages` is true, then
1319
- # this also configures the retention of acknowledged messages, and thus
1320
- # configures how far back in time a `Seek` can be done. Defaults to 7 days.
1584
+ # Optional. How long to retain unacknowledged messages in the subscription's
1585
+ # backlog, from the moment a message is published. If `retain_acked_messages` is
1586
+ # true, then this also configures the retention of acknowledged messages, and
1587
+ # thus configures how far back in time a `Seek` can be done. Defaults to 7 days.
1321
1588
  # Cannot be more than 7 days or less than 10 minutes.
1322
1589
  # Corresponds to the JSON property `messageRetentionDuration`
1323
1590
  # @return [String]
@@ -1338,24 +1605,24 @@ module Google
1338
1605
  # @return [Google::Apis::PubsubV1::PushConfig]
1339
1606
  attr_accessor :push_config
1340
1607
 
1341
- # Indicates whether to retain acknowledged messages. If true, then messages are
1342
- # not expunged from the subscription's backlog, even if they are acknowledged,
1343
- # until they fall out of the `message_retention_duration` window. This must be
1344
- # true if you would like to [`Seek` to a timestamp] (https://cloud.google.com/
1345
- # pubsub/docs/replay-overview#seek_to_a_time) in the past to replay previously-
1346
- # acknowledged messages.
1608
+ # Optional. Indicates whether to retain acknowledged messages. If true, then
1609
+ # messages are not expunged from the subscription's backlog, even if they are
1610
+ # acknowledged, until they fall out of the `message_retention_duration` window.
1611
+ # This must be true if you would like to [`Seek` to a timestamp] (https://cloud.
1612
+ # google.com/pubsub/docs/replay-overview#seek_to_a_time) in the past to replay
1613
+ # previously-acknowledged messages.
1347
1614
  # Corresponds to the JSON property `retainAckedMessages`
1348
1615
  # @return [Boolean]
1349
1616
  attr_accessor :retain_acked_messages
1350
1617
  alias_method :retain_acked_messages?, :retain_acked_messages
1351
1618
 
1352
- # A policy that specifies how Cloud Pub/Sub retries message delivery. Retry
1353
- # delay will be exponential based on provided minimum and maximum backoffs.
1354
- # https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be
1355
- # triggered on NACKs or acknowledgement deadline exceeded events for a given
1356
- # message. Retry Policy is implemented on a best effort basis. At times, the
1357
- # delay between consecutive deliveries may not match the configuration. That is,
1358
- # delay can be more or less than configured backoff.
1619
+ # A policy that specifies how Pub/Sub retries message delivery. Retry delay will
1620
+ # be exponential based on provided minimum and maximum backoffs. https://en.
1621
+ # wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs
1622
+ # or acknowledgement deadline exceeded events for a given message. Retry Policy
1623
+ # is implemented on a best effort basis. At times, the delay between consecutive
1624
+ # deliveries may not match the configuration. That is, delay can be more or less
1625
+ # than configured backoff.
1359
1626
  # Corresponds to the JSON property `retryPolicy`
1360
1627
  # @return [Google::Apis::PubsubV1::RetryPolicy]
1361
1628
  attr_accessor :retry_policy
@@ -1391,6 +1658,7 @@ module Google
1391
1658
  def update!(**args)
1392
1659
  @ack_deadline_seconds = args[:ack_deadline_seconds] if args.key?(:ack_deadline_seconds)
1393
1660
  @bigquery_config = args[:bigquery_config] if args.key?(:bigquery_config)
1661
+ @cloud_storage_config = args[:cloud_storage_config] if args.key?(:cloud_storage_config)
1394
1662
  @dead_letter_policy = args[:dead_letter_policy] if args.key?(:dead_letter_policy)
1395
1663
  @detached = args[:detached] if args.key?(:detached)
1396
1664
  @enable_exactly_once_delivery = args[:enable_exactly_once_delivery] if args.key?(:enable_exactly_once_delivery)
@@ -1449,31 +1717,45 @@ module Google
1449
1717
  end
1450
1718
  end
1451
1719
 
1720
+ # Configuration for writing message data in text format. Message payloads will
1721
+ # be written to files as raw text, separated by a newline.
1722
+ class TextConfig
1723
+ include Google::Apis::Core::Hashable
1724
+
1725
+ def initialize(**args)
1726
+ update!(**args)
1727
+ end
1728
+
1729
+ # Update properties of this object
1730
+ def update!(**args)
1731
+ end
1732
+ end
1733
+
1452
1734
  # A topic resource.
1453
1735
  class Topic
1454
1736
  include Google::Apis::Core::Hashable
1455
1737
 
1456
- # The resource name of the Cloud KMS CryptoKey to be used to protect access to
1457
- # messages published on this topic. The expected format is `projects/*/locations/
1458
- # */keyRings/*/cryptoKeys/*`.
1738
+ # Optional. The resource name of the Cloud KMS CryptoKey to be used to protect
1739
+ # access to messages published on this topic. The expected format is `projects/*/
1740
+ # locations/*/keyRings/*/cryptoKeys/*`.
1459
1741
  # Corresponds to the JSON property `kmsKeyName`
1460
1742
  # @return [String]
1461
1743
  attr_accessor :kms_key_name
1462
1744
 
1463
- # See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/
1464
- # labels).
1745
+ # Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/
1746
+ # docs/labels).
1465
1747
  # Corresponds to the JSON property `labels`
1466
1748
  # @return [Hash<String,String>]
1467
1749
  attr_accessor :labels
1468
1750
 
1469
- # Indicates the minimum duration to retain a message after it is published to
1470
- # the topic. If this field is set, messages published to the topic in the last `
1471
- # message_retention_duration` are always available to subscribers. For instance,
1472
- # it allows any attached subscription to [seek to a timestamp](https://cloud.
1473
- # google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `
1474
- # message_retention_duration` in the past. If this field is not set, message
1475
- # retention is controlled by settings on individual subscriptions. Cannot be
1476
- # more than 31 days or less than 10 minutes.
1751
+ # Optional. Indicates the minimum duration to retain a message after it is
1752
+ # published to the topic. If this field is set, messages published to the topic
1753
+ # in the last `message_retention_duration` are always available to subscribers.
1754
+ # For instance, it allows any attached subscription to [seek to a timestamp](
1755
+ # https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is
1756
+ # up to `message_retention_duration` in the past. If this field is not set,
1757
+ # message retention is controlled by settings on individual subscriptions.
1758
+ # Cannot be more than 31 days or less than 10 minutes.
1477
1759
  # Corresponds to the JSON property `messageRetentionDuration`
1478
1760
  # @return [String]
1479
1761
  attr_accessor :message_retention_duration
@@ -1492,8 +1774,8 @@ module Google
1492
1774
  # @return [String]
1493
1775
  attr_accessor :name
1494
1776
 
1495
- # Reserved for future use. This field is set only in responses from the server;
1496
- # it is ignored if it is set in any requests.
1777
+ # Optional. Reserved for future use. This field is set only in responses from
1778
+ # the server; it is ignored if it is set in any requests.
1497
1779
  # Corresponds to the JSON property `satisfiesPzs`
1498
1780
  # @return [Boolean]
1499
1781
  attr_accessor :satisfies_pzs
@@ -1553,9 +1835,9 @@ module Google
1553
1835
  class UpdateSubscriptionRequest
1554
1836
  include Google::Apis::Core::Hashable
1555
1837
 
1556
- # A subscription resource. If none of `push_config` or `bigquery_config` is set,
1557
- # then the subscriber will pull and ack messages using API methods. At most one
1558
- # of these fields may be set.
1838
+ # A subscription resource. If none of `push_config`, `bigquery_config`, or `
1839
+ # cloud_storage_config` is set, then the subscriber will pull and ack messages
1840
+ # using API methods. At most one of these fields may be set.
1559
1841
  # Corresponds to the JSON property `subscription`
1560
1842
  # @return [Google::Apis::PubsubV1::Subscription]
1561
1843
  attr_accessor :subscription