google-cloud-pubsub-v1 0.20.2 → 0.21.1

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.
@@ -24,12 +24,19 @@ module Google
24
24
  # A policy constraining the storage of messages published to the topic.
25
25
  # @!attribute [rw] allowed_persistence_regions
26
26
  # @return [::Array<::String>]
27
- # A list of IDs of Google Cloud regions where messages that are published
28
- # to the topic may be persisted in storage. Messages published by publishers
29
- # running in non-allowed Google Cloud regions (or running outside of Google
30
- # Cloud altogether) are routed for storage in one of the allowed regions.
31
- # An empty list means that no regions are allowed, and is not a valid
32
- # configuration.
27
+ # Optional. A list of IDs of Google Cloud regions where messages that are
28
+ # published to the topic may be persisted in storage. Messages published by
29
+ # publishers running in non-allowed Google Cloud regions (or running outside
30
+ # of Google Cloud altogether) are routed for storage in one of the allowed
31
+ # regions. An empty list means that no regions are allowed, and is not a
32
+ # valid configuration.
33
+ # @!attribute [rw] enforce_in_transit
34
+ # @return [::Boolean]
35
+ # Optional. If true, `allowed_persistence_regions` is also used to enforce
36
+ # in-transit guarantees for messages. That is, Pub/Sub will fail
37
+ # Publish operations on this topic and subscribe operations
38
+ # on any subscription attached to this topic in any region that is
39
+ # not in `allowed_persistence_regions`.
33
40
  class MessageStoragePolicy
34
41
  include ::Google::Protobuf::MessageExts
35
42
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -44,22 +51,90 @@ module Google
44
51
  # deleted.
45
52
  # @!attribute [rw] encoding
46
53
  # @return [::Google::Cloud::PubSub::V1::Encoding]
47
- # The encoding of messages validated against `schema`.
54
+ # Optional. The encoding of messages validated against `schema`.
48
55
  # @!attribute [rw] first_revision_id
49
56
  # @return [::String]
50
- # The minimum (inclusive) revision allowed for validating messages. If empty
51
- # or not present, allow any revision to be validated against last_revision or
52
- # any revision created before.
57
+ # Optional. The minimum (inclusive) revision allowed for validating messages.
58
+ # If empty or not present, allow any revision to be validated against
59
+ # last_revision or any revision created before.
53
60
  # @!attribute [rw] last_revision_id
54
61
  # @return [::String]
55
- # The maximum (inclusive) revision allowed for validating messages. If empty
56
- # or not present, allow any revision to be validated against first_revision
57
- # or any revision created after.
62
+ # Optional. The maximum (inclusive) revision allowed for validating messages.
63
+ # If empty or not present, allow any revision to be validated against
64
+ # first_revision or any revision created after.
58
65
  class SchemaSettings
59
66
  include ::Google::Protobuf::MessageExts
60
67
  extend ::Google::Protobuf::MessageExts::ClassMethods
61
68
  end
62
69
 
70
+ # Settings for an ingestion data source on a topic.
71
+ # @!attribute [rw] aws_kinesis
72
+ # @return [::Google::Cloud::PubSub::V1::IngestionDataSourceSettings::AwsKinesis]
73
+ # Optional. Amazon Kinesis Data Streams.
74
+ class IngestionDataSourceSettings
75
+ include ::Google::Protobuf::MessageExts
76
+ extend ::Google::Protobuf::MessageExts::ClassMethods
77
+
78
+ # Ingestion settings for Amazon Kinesis Data Streams.
79
+ # @!attribute [r] state
80
+ # @return [::Google::Cloud::PubSub::V1::IngestionDataSourceSettings::AwsKinesis::State]
81
+ # Output only. An output-only field that indicates the state of the Kinesis
82
+ # ingestion source.
83
+ # @!attribute [rw] stream_arn
84
+ # @return [::String]
85
+ # Required. The Kinesis stream ARN to ingest data from.
86
+ # @!attribute [rw] consumer_arn
87
+ # @return [::String]
88
+ # Required. The Kinesis consumer ARN to used for ingestion in Enhanced
89
+ # Fan-Out mode. The consumer must be already created and ready to be used.
90
+ # @!attribute [rw] aws_role_arn
91
+ # @return [::String]
92
+ # Required. AWS role ARN to be used for Federated Identity authentication
93
+ # with Kinesis. Check the Pub/Sub docs for how to set up this role and the
94
+ # required permissions that need to be attached to it.
95
+ # @!attribute [rw] gcp_service_account
96
+ # @return [::String]
97
+ # Required. The GCP service account to be used for Federated Identity
98
+ # authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
99
+ # the provided role). The `aws_role_arn` must be set up with
100
+ # `accounts.google.com:sub` equals to this service account number.
101
+ class AwsKinesis
102
+ include ::Google::Protobuf::MessageExts
103
+ extend ::Google::Protobuf::MessageExts::ClassMethods
104
+
105
+ # Possible states for managed ingestion from Amazon Kinesis Data Streams.
106
+ module State
107
+ # Default value. This value is unused.
108
+ STATE_UNSPECIFIED = 0
109
+
110
+ # Ingestion is active.
111
+ ACTIVE = 1
112
+
113
+ # Permission denied encountered while consuming data from Kinesis.
114
+ # This can happen if:
115
+ # - The provided `aws_role_arn` does not exist or does not have the
116
+ # appropriate permissions attached.
117
+ # - The provided `aws_role_arn` is not set up properly for Identity
118
+ # Federation using `gcp_service_account`.
119
+ # - The Pub/Sub SA is not granted the
120
+ # `iam.serviceAccounts.getOpenIdToken` permission on
121
+ # `gcp_service_account`.
122
+ KINESIS_PERMISSION_DENIED = 2
123
+
124
+ # Permission denied encountered while publishing to the topic. This can
125
+ # happen due to Pub/Sub SA has not been granted the [appropriate publish
126
+ # permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
127
+ PUBLISH_PERMISSION_DENIED = 3
128
+
129
+ # The Kinesis stream does not exist.
130
+ STREAM_NOT_FOUND = 4
131
+
132
+ # The Kinesis consumer does not exist.
133
+ CONSUMER_NOT_FOUND = 5
134
+ end
135
+ end
136
+ end
137
+
63
138
  # A topic resource.
64
139
  # @!attribute [rw] name
65
140
  # @return [::String]
@@ -71,36 +146,44 @@ module Google
71
146
  # must not start with `"goog"`.
72
147
  # @!attribute [rw] labels
73
148
  # @return [::Google::Protobuf::Map{::String => ::String}]
74
- # See [Creating and managing labels]
149
+ # Optional. See [Creating and managing labels]
75
150
  # (https://cloud.google.com/pubsub/docs/labels).
76
151
  # @!attribute [rw] message_storage_policy
77
152
  # @return [::Google::Cloud::PubSub::V1::MessageStoragePolicy]
78
- # Policy constraining the set of Google Cloud Platform regions where messages
79
- # published to the topic may be stored. If not present, then no constraints
80
- # are in effect.
153
+ # Optional. Policy constraining the set of Google Cloud Platform regions
154
+ # where messages published to the topic may be stored. If not present, then
155
+ # no constraints are in effect.
81
156
  # @!attribute [rw] kms_key_name
82
157
  # @return [::String]
83
- # The resource name of the Cloud KMS CryptoKey to be used to protect access
84
- # to messages published on this topic.
158
+ # Optional. The resource name of the Cloud KMS CryptoKey to be used to
159
+ # protect access to messages published on this topic.
85
160
  #
86
161
  # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
87
162
  # @!attribute [rw] schema_settings
88
163
  # @return [::Google::Cloud::PubSub::V1::SchemaSettings]
89
- # Settings for validating messages published against a schema.
164
+ # Optional. Settings for validating messages published against a schema.
90
165
  # @!attribute [rw] satisfies_pzs
91
166
  # @return [::Boolean]
92
- # Reserved for future use. This field is set only in responses from the
93
- # server; it is ignored if it is set in any requests.
167
+ # Optional. Reserved for future use. This field is set only in responses from
168
+ # the server; it is ignored if it is set in any requests.
94
169
  # @!attribute [rw] message_retention_duration
95
170
  # @return [::Google::Protobuf::Duration]
96
- # Indicates the minimum duration to retain a message after it is published to
97
- # the topic. If this field is set, messages published to the topic in the
98
- # last `message_retention_duration` are always available to subscribers. For
99
- # instance, it allows any attached subscription to [seek to a
171
+ # Optional. Indicates the minimum duration to retain a message after it is
172
+ # published to the topic. If this field is set, messages published to the
173
+ # topic in the last `message_retention_duration` are always available to
174
+ # subscribers. For instance, it allows any attached subscription to [seek to
175
+ # a
100
176
  # timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
101
177
  # that is up to `message_retention_duration` in the past. If this field is
102
178
  # not set, message retention is controlled by settings on individual
103
179
  # subscriptions. Cannot be more than 31 days or less than 10 minutes.
180
+ # @!attribute [r] state
181
+ # @return [::Google::Cloud::PubSub::V1::Topic::State]
182
+ # Output only. An output-only field indicating the state of the topic.
183
+ # @!attribute [rw] ingestion_data_source_settings
184
+ # @return [::Google::Cloud::PubSub::V1::IngestionDataSourceSettings]
185
+ # Optional. Settings for managed ingestion from a data source into this
186
+ # topic.
104
187
  class Topic
105
188
  include ::Google::Protobuf::MessageExts
106
189
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -113,6 +196,20 @@ module Google
113
196
  include ::Google::Protobuf::MessageExts
114
197
  extend ::Google::Protobuf::MessageExts::ClassMethods
115
198
  end
199
+
200
+ # The state of the topic.
201
+ module State
202
+ # Default value. This value is unused.
203
+ STATE_UNSPECIFIED = 0
204
+
205
+ # The topic does not have any persistent errors.
206
+ ACTIVE = 1
207
+
208
+ # Ingestion from the data source has encountered a permanent error.
209
+ # See the more detailed error state in the corresponding ingestion
210
+ # source configuration.
211
+ INGESTION_RESOURCE_ERROR = 2
212
+ end
116
213
  end
117
214
 
118
215
  # A message that is published by publishers and consumed by subscribers. The
@@ -125,12 +222,12 @@ module Google
125
222
  # limits.
126
223
  # @!attribute [rw] data
127
224
  # @return [::String]
128
- # The message data field. If this field is empty, the message must contain
129
- # at least one attribute.
225
+ # Optional. The message data field. If this field is empty, the message must
226
+ # contain at least one attribute.
130
227
  # @!attribute [rw] attributes
131
228
  # @return [::Google::Protobuf::Map{::String => ::String}]
132
- # Attributes for this message. If this field is empty, the message must
133
- # contain non-empty data. This can be used to filter messages on the
229
+ # Optional. Attributes for this message. If this field is empty, the message
230
+ # must contain non-empty data. This can be used to filter messages on the
134
231
  # subscription.
135
232
  # @!attribute [rw] message_id
136
233
  # @return [::String]
@@ -145,13 +242,13 @@ module Google
145
242
  # publisher in a `Publish` call.
146
243
  # @!attribute [rw] ordering_key
147
244
  # @return [::String]
148
- # If non-empty, identifies related messages for which publish order should be
149
- # respected. If a `Subscription` has `enable_message_ordering` set to `true`,
150
- # messages published with the same non-empty `ordering_key` value will be
151
- # delivered to subscribers in the order in which they are received by the
152
- # Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
153
- # must specify the same `ordering_key` value.
154
- # For more information, see [ordering
245
+ # Optional. If non-empty, identifies related messages for which publish order
246
+ # should be respected. If a `Subscription` has `enable_message_ordering` set
247
+ # to `true`, messages published with the same non-empty `ordering_key` value
248
+ # will be delivered to subscribers in the order in which they are received by
249
+ # the Pub/Sub system. All `PubsubMessage`s published in a given
250
+ # `PublishRequest` must specify the same `ordering_key` value. For more
251
+ # information, see [ordering
155
252
  # messages](https://cloud.google.com/pubsub/docs/ordering).
156
253
  class PubsubMessage
157
254
  include ::Google::Protobuf::MessageExts
@@ -209,9 +306,9 @@ module Google
209
306
  # Response for the `Publish` method.
210
307
  # @!attribute [rw] message_ids
211
308
  # @return [::Array<::String>]
212
- # The server-assigned ID of each published message, in the same order as
213
- # the messages in the request. IDs are guaranteed to be unique within
214
- # the topic.
309
+ # Optional. The server-assigned ID of each published message, in the same
310
+ # order as the messages in the request. IDs are guaranteed to be unique
311
+ # within the topic.
215
312
  class PublishResponse
216
313
  include ::Google::Protobuf::MessageExts
217
314
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -224,12 +321,12 @@ module Google
224
321
  # Format is `projects/{project-id}`.
225
322
  # @!attribute [rw] page_size
226
323
  # @return [::Integer]
227
- # Maximum number of topics to return.
324
+ # Optional. Maximum number of topics to return.
228
325
  # @!attribute [rw] page_token
229
326
  # @return [::String]
230
- # The value returned by the last `ListTopicsResponse`; indicates that this is
231
- # a continuation of a prior `ListTopics` call, and that the system should
232
- # return the next page of data.
327
+ # Optional. The value returned by the last `ListTopicsResponse`; indicates
328
+ # that this is a continuation of a prior `ListTopics` call, and that the
329
+ # system should return the next page of data.
233
330
  class ListTopicsRequest
234
331
  include ::Google::Protobuf::MessageExts
235
332
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -238,11 +335,11 @@ module Google
238
335
  # Response for the `ListTopics` method.
239
336
  # @!attribute [rw] topics
240
337
  # @return [::Array<::Google::Cloud::PubSub::V1::Topic>]
241
- # The resulting topics.
338
+ # Optional. The resulting topics.
242
339
  # @!attribute [rw] next_page_token
243
340
  # @return [::String]
244
- # If not empty, indicates that there may be more topics that match the
245
- # request; this value should be passed in a new `ListTopicsRequest`.
341
+ # Optional. If not empty, indicates that there may be more topics that match
342
+ # the request; this value should be passed in a new `ListTopicsRequest`.
246
343
  class ListTopicsResponse
247
344
  include ::Google::Protobuf::MessageExts
248
345
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -255,12 +352,12 @@ module Google
255
352
  # Format is `projects/{project}/topics/{topic}`.
256
353
  # @!attribute [rw] page_size
257
354
  # @return [::Integer]
258
- # Maximum number of subscription names to return.
355
+ # Optional. Maximum number of subscription names to return.
259
356
  # @!attribute [rw] page_token
260
357
  # @return [::String]
261
- # The value returned by the last `ListTopicSubscriptionsResponse`; indicates
262
- # that this is a continuation of a prior `ListTopicSubscriptions` call, and
263
- # that the system should return the next page of data.
358
+ # Optional. The value returned by the last `ListTopicSubscriptionsResponse`;
359
+ # indicates that this is a continuation of a prior `ListTopicSubscriptions`
360
+ # call, and that the system should return the next page of data.
264
361
  class ListTopicSubscriptionsRequest
265
362
  include ::Google::Protobuf::MessageExts
266
363
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -269,11 +366,12 @@ module Google
269
366
  # Response for the `ListTopicSubscriptions` method.
270
367
  # @!attribute [rw] subscriptions
271
368
  # @return [::Array<::String>]
272
- # The names of subscriptions attached to the topic specified in the request.
369
+ # Optional. The names of subscriptions attached to the topic specified in the
370
+ # request.
273
371
  # @!attribute [rw] next_page_token
274
372
  # @return [::String]
275
- # If not empty, indicates that there may be more subscriptions that match
276
- # the request; this value should be passed in a new
373
+ # Optional. If not empty, indicates that there may be more subscriptions that
374
+ # match the request; this value should be passed in a new
277
375
  # `ListTopicSubscriptionsRequest` to get more subscriptions.
278
376
  class ListTopicSubscriptionsResponse
279
377
  include ::Google::Protobuf::MessageExts
@@ -287,12 +385,12 @@ module Google
287
385
  # Format is `projects/{project}/topics/{topic}`.
288
386
  # @!attribute [rw] page_size
289
387
  # @return [::Integer]
290
- # Maximum number of snapshot names to return.
388
+ # Optional. Maximum number of snapshot names to return.
291
389
  # @!attribute [rw] page_token
292
390
  # @return [::String]
293
- # The value returned by the last `ListTopicSnapshotsResponse`; indicates
294
- # that this is a continuation of a prior `ListTopicSnapshots` call, and
295
- # that the system should return the next page of data.
391
+ # Optional. The value returned by the last `ListTopicSnapshotsResponse`;
392
+ # indicates that this is a continuation of a prior `ListTopicSnapshots` call,
393
+ # and that the system should return the next page of data.
296
394
  class ListTopicSnapshotsRequest
297
395
  include ::Google::Protobuf::MessageExts
298
396
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -301,11 +399,11 @@ module Google
301
399
  # Response for the `ListTopicSnapshots` method.
302
400
  # @!attribute [rw] snapshots
303
401
  # @return [::Array<::String>]
304
- # The names of the snapshots that match the request.
402
+ # Optional. The names of the snapshots that match the request.
305
403
  # @!attribute [rw] next_page_token
306
404
  # @return [::String]
307
- # If not empty, indicates that there may be more snapshots that match
308
- # the request; this value should be passed in a new
405
+ # Optional. If not empty, indicates that there may be more snapshots that
406
+ # match the request; this value should be passed in a new
309
407
  # `ListTopicSnapshotsRequest` to get more snapshots.
310
408
  class ListTopicSnapshotsResponse
311
409
  include ::Google::Protobuf::MessageExts
@@ -357,23 +455,23 @@ module Google
357
455
  # field will be `_deleted-topic_` if the topic has been deleted.
358
456
  # @!attribute [rw] push_config
359
457
  # @return [::Google::Cloud::PubSub::V1::PushConfig]
360
- # If push delivery is used with this subscription, this field is
458
+ # Optional. If push delivery is used with this subscription, this field is
361
459
  # used to configure it.
362
460
  # @!attribute [rw] bigquery_config
363
461
  # @return [::Google::Cloud::PubSub::V1::BigQueryConfig]
364
- # If delivery to BigQuery is used with this subscription, this field is
365
- # used to configure it.
462
+ # Optional. If delivery to BigQuery is used with this subscription, this
463
+ # field is used to configure it.
366
464
  # @!attribute [rw] cloud_storage_config
367
465
  # @return [::Google::Cloud::PubSub::V1::CloudStorageConfig]
368
- # If delivery to Google Cloud Storage is used with this subscription, this
369
- # field is used to configure it.
466
+ # Optional. If delivery to Google Cloud Storage is used with this
467
+ # subscription, this field is used to configure it.
370
468
  # @!attribute [rw] ack_deadline_seconds
371
469
  # @return [::Integer]
372
- # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
373
- # the subscriber to acknowledge receipt before resending the message. In the
374
- # interval after the message is delivered and before it is acknowledged, it
375
- # is considered to be _outstanding_. During that time period, the
376
- # message will not be redelivered (on a best-effort basis).
470
+ # Optional. The approximate amount of time (on a best-effort basis) Pub/Sub
471
+ # waits for the subscriber to acknowledge receipt before resending the
472
+ # message. In the interval after the message is delivered and before it is
473
+ # acknowledged, it is considered to be _outstanding_. During that time
474
+ # period, the message will not be redelivered (on a best-effort basis).
377
475
  #
378
476
  # For pull subscriptions, this value is used as the initial value for the ack
379
477
  # deadline. To override this value for a given message, call
@@ -391,7 +489,7 @@ module Google
391
489
  # system will eventually redeliver the message.
392
490
  # @!attribute [rw] retain_acked_messages
393
491
  # @return [::Boolean]
394
- # Indicates whether to retain acknowledged messages. If true, then
492
+ # Optional. Indicates whether to retain acknowledged messages. If true, then
395
493
  # messages are not expunged from the subscription's backlog, even if they are
396
494
  # acknowledged, until they fall out of the `message_retention_duration`
397
495
  # window. This must be true if you would like to [`Seek` to a timestamp]
@@ -399,52 +497,51 @@ module Google
399
497
  # the past to replay previously-acknowledged messages.
400
498
  # @!attribute [rw] message_retention_duration
401
499
  # @return [::Google::Protobuf::Duration]
402
- # How long to retain unacknowledged messages in the subscription's backlog,
403
- # from the moment a message is published.
404
- # If `retain_acked_messages` is true, then this also configures the retention
405
- # of acknowledged messages, and thus configures how far back in time a `Seek`
406
- # can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
407
- # minutes.
500
+ # Optional. How long to retain unacknowledged messages in the subscription's
501
+ # backlog, from the moment a message is published. If `retain_acked_messages`
502
+ # is true, then this also configures the retention of acknowledged messages,
503
+ # and thus configures how far back in time a `Seek` can be done. Defaults to
504
+ # 7 days. Cannot be more than 7 days or less than 10 minutes.
408
505
  # @!attribute [rw] labels
409
506
  # @return [::Google::Protobuf::Map{::String => ::String}]
410
- # See [Creating and managing
507
+ # Optional. See [Creating and managing
411
508
  # labels](https://cloud.google.com/pubsub/docs/labels).
412
509
  # @!attribute [rw] enable_message_ordering
413
510
  # @return [::Boolean]
414
- # If true, messages published with the same `ordering_key` in `PubsubMessage`
415
- # will be delivered to the subscribers in the order in which they
416
- # are received by the Pub/Sub system. Otherwise, they may be delivered in
417
- # any order.
511
+ # Optional. If true, messages published with the same `ordering_key` in
512
+ # `PubsubMessage` will be delivered to the subscribers in the order in which
513
+ # they are received by the Pub/Sub system. Otherwise, they may be delivered
514
+ # in any order.
418
515
  # @!attribute [rw] expiration_policy
419
516
  # @return [::Google::Cloud::PubSub::V1::ExpirationPolicy]
420
- # A policy that specifies the conditions for this subscription's expiration.
421
- # A subscription is considered active as long as any connected subscriber is
422
- # successfully consuming messages from the subscription or is issuing
423
- # operations on the subscription. If `expiration_policy` is not set, a
424
- # *default policy* with `ttl` of 31 days will be used. The minimum allowed
517
+ # Optional. A policy that specifies the conditions for this subscription's
518
+ # expiration. A subscription is considered active as long as any connected
519
+ # subscriber is successfully consuming messages from the subscription or is
520
+ # issuing operations on the subscription. If `expiration_policy` is not set,
521
+ # a *default policy* with `ttl` of 31 days will be used. The minimum allowed
425
522
  # value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set,
426
523
  # but `expiration_policy.ttl` is not set, the subscription never expires.
427
524
  # @!attribute [rw] filter
428
525
  # @return [::String]
429
- # An expression written in the Pub/Sub [filter
526
+ # Optional. An expression written in the Pub/Sub [filter
430
527
  # language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
431
528
  # then only `PubsubMessage`s whose `attributes` field matches the filter are
432
529
  # delivered on this subscription. If empty, then no messages are filtered
433
530
  # out.
434
531
  # @!attribute [rw] dead_letter_policy
435
532
  # @return [::Google::Cloud::PubSub::V1::DeadLetterPolicy]
436
- # A policy that specifies the conditions for dead lettering messages in
437
- # this subscription. If dead_letter_policy is not set, dead lettering
438
- # is disabled.
533
+ # Optional. A policy that specifies the conditions for dead lettering
534
+ # messages in this subscription. If dead_letter_policy is not set, dead
535
+ # lettering is disabled.
439
536
  #
440
- # The Cloud Pub/Sub service account associated with this subscriptions's
537
+ # The Pub/Sub service account associated with this subscriptions's
441
538
  # parent project (i.e.,
442
539
  # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
443
540
  # permission to Acknowledge() messages on this subscription.
444
541
  # @!attribute [rw] retry_policy
445
542
  # @return [::Google::Cloud::PubSub::V1::RetryPolicy]
446
- # A policy that specifies how Pub/Sub retries message delivery for this
447
- # subscription.
543
+ # Optional. A policy that specifies how Pub/Sub retries message delivery for
544
+ # this subscription.
448
545
  #
449
546
  # If not set, the default retry policy is applied. This generally implies
450
547
  # that messages will be retried as soon as possible for healthy subscribers.
@@ -452,15 +549,16 @@ module Google
452
549
  # exceeded events for a given message.
453
550
  # @!attribute [rw] detached
454
551
  # @return [::Boolean]
455
- # Indicates whether the subscription is detached from its topic. Detached
456
- # subscriptions don't receive messages from their topic and don't retain any
457
- # backlog. `Pull` and `StreamingPull` requests will return
552
+ # Optional. Indicates whether the subscription is detached from its topic.
553
+ # Detached subscriptions don't receive messages from their topic and don't
554
+ # retain any backlog. `Pull` and `StreamingPull` requests will return
458
555
  # FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
459
556
  # the endpoint will not be made.
460
557
  # @!attribute [rw] enable_exactly_once_delivery
461
558
  # @return [::Boolean]
462
- # If true, Pub/Sub provides the following guarantees for the delivery of
463
- # a message with a given value of `message_id` on this subscription:
559
+ # Optional. If true, Pub/Sub provides the following guarantees for the
560
+ # delivery of a message with a given value of `message_id` on this
561
+ # subscription:
464
562
  #
465
563
  # * The message sent to a subscriber is guaranteed not to be resent
466
564
  # before the message's acknowledgement deadline expires.
@@ -510,7 +608,7 @@ module Google
510
608
  end
511
609
  end
512
610
 
513
- # A policy that specifies how Cloud Pub/Sub retries message delivery.
611
+ # A policy that specifies how Pub/Sub retries message delivery.
514
612
  #
515
613
  # Retry delay will be exponential based on provided minimum and maximum
516
614
  # backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
@@ -523,12 +621,13 @@ module Google
523
621
  # delay can be more or less than configured backoff.
524
622
  # @!attribute [rw] minimum_backoff
525
623
  # @return [::Google::Protobuf::Duration]
526
- # The minimum delay between consecutive deliveries of a given message.
527
- # Value should be between 0 and 600 seconds. Defaults to 10 seconds.
624
+ # Optional. The minimum delay between consecutive deliveries of a given
625
+ # message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.
528
626
  # @!attribute [rw] maximum_backoff
529
627
  # @return [::Google::Protobuf::Duration]
530
- # The maximum delay between consecutive deliveries of a given message.
531
- # Value should be between 0 and 600 seconds. Defaults to 600 seconds.
628
+ # Optional. The maximum delay between consecutive deliveries of a given
629
+ # message. Value should be between 0 and 600 seconds. Defaults to 600
630
+ # seconds.
532
631
  class RetryPolicy
533
632
  include ::Google::Protobuf::MessageExts
534
633
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -541,19 +640,19 @@ module Google
541
640
  # the create/update subscription request will fail.
542
641
  # @!attribute [rw] dead_letter_topic
543
642
  # @return [::String]
544
- # The name of the topic to which dead letter messages should be published.
545
- # Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
546
- # account associated with the enclosing subscription's parent project (i.e.,
547
- # service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
548
- # permission to Publish() to this topic.
643
+ # Optional. The name of the topic to which dead letter messages should be
644
+ # published. Format is `projects/{project}/topics/{topic}`.The Pub/Sub
645
+ # service account associated with the enclosing subscription's parent project
646
+ # (i.e., service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must
647
+ # have permission to Publish() to this topic.
549
648
  #
550
649
  # The operation will fail if the topic does not exist.
551
650
  # Users should ensure that there is a subscription attached to this topic
552
651
  # since messages published to a topic with no subscriptions are lost.
553
652
  # @!attribute [rw] max_delivery_attempts
554
653
  # @return [::Integer]
555
- # The maximum number of delivery attempts for any message. The value must be
556
- # between 5 and 100.
654
+ # Optional. The maximum number of delivery attempts for any message. The
655
+ # value must be between 5 and 100.
557
656
  #
558
657
  # The number of delivery attempts is defined as 1 + (the sum of number of
559
658
  # NACKs and number of times the acknowledgement deadline has been exceeded
@@ -574,12 +673,12 @@ module Google
574
673
  # automatic resource deletion).
575
674
  # @!attribute [rw] ttl
576
675
  # @return [::Google::Protobuf::Duration]
577
- # Specifies the "time-to-live" duration for an associated resource. The
578
- # resource expires if it is not active for a period of `ttl`. The definition
579
- # of "activity" depends on the type of the associated resource. The minimum
580
- # and maximum allowed values for `ttl` depend on the type of the associated
581
- # resource, as well. If `ttl` is not set, the associated resource never
582
- # expires.
676
+ # Optional. Specifies the "time-to-live" duration for an associated resource.
677
+ # The resource expires if it is not active for a period of `ttl`. The
678
+ # definition of "activity" depends on the type of the associated resource.
679
+ # The minimum and maximum allowed values for `ttl` depend on the type of the
680
+ # associated resource, as well. If `ttl` is not set, the associated resource
681
+ # never expires.
583
682
  class ExpirationPolicy
584
683
  include ::Google::Protobuf::MessageExts
585
684
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -588,12 +687,12 @@ module Google
588
687
  # Configuration for a push delivery endpoint.
589
688
  # @!attribute [rw] push_endpoint
590
689
  # @return [::String]
591
- # A URL locating the endpoint to which messages should be pushed.
690
+ # Optional. A URL locating the endpoint to which messages should be pushed.
592
691
  # For example, a Webhook endpoint might use `https://example.com/push`.
593
692
  # @!attribute [rw] attributes
594
693
  # @return [::Google::Protobuf::Map{::String => ::String}]
595
- # Endpoint configuration attributes that can be used to control different
596
- # aspects of the message delivery.
694
+ # Optional. Endpoint configuration attributes that can be used to control
695
+ # different aspects of the message delivery.
597
696
  #
598
697
  # The only currently supported attribute is `x-goog-version`, which you can
599
698
  # use to change the format of the pushed message. This attribute
@@ -615,16 +714,17 @@ module Google
615
714
  # `attributes { "x-goog-version": "v1" }`
616
715
  # @!attribute [rw] oidc_token
617
716
  # @return [::Google::Cloud::PubSub::V1::PushConfig::OidcToken]
618
- # If specified, Pub/Sub will generate and attach an OIDC JWT token as an
619
- # `Authorization` header in the HTTP request for every pushed message.
717
+ # Optional. If specified, Pub/Sub will generate and attach an OIDC JWT
718
+ # token as an `Authorization` header in the HTTP request for every pushed
719
+ # message.
620
720
  # @!attribute [rw] pubsub_wrapper
621
721
  # @return [::Google::Cloud::PubSub::V1::PushConfig::PubsubWrapper]
622
- # When set, the payload to the push endpoint is in the form of the JSON
623
- # representation of a PubsubMessage
722
+ # Optional. When set, the payload to the push endpoint is in the form of
723
+ # the JSON representation of a PubsubMessage
624
724
  # (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
625
725
  # @!attribute [rw] no_wrapper
626
726
  # @return [::Google::Cloud::PubSub::V1::PushConfig::NoWrapper]
627
- # When set, the payload to the push endpoint is not wrapped.
727
+ # Optional. When set, the payload to the push endpoint is not wrapped.
628
728
  class PushConfig
629
729
  include ::Google::Protobuf::MessageExts
630
730
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -634,19 +734,20 @@ module Google
634
734
  # token](https://developers.google.com/identity/protocols/OpenIDConnect).
635
735
  # @!attribute [rw] service_account_email
636
736
  # @return [::String]
637
- # [Service account
737
+ # Optional. [Service account
638
738
  # email](https://cloud.google.com/iam/docs/service-accounts)
639
739
  # used for generating the OIDC token. For more information
640
740
  # on setting up authentication, see
641
741
  # [Push subscriptions](https://cloud.google.com/pubsub/docs/push).
642
742
  # @!attribute [rw] audience
643
743
  # @return [::String]
644
- # Audience to be used when generating OIDC token. The audience claim
645
- # identifies the recipients that the JWT is intended for. The audience
646
- # value is a single case-sensitive string. Having multiple values (array)
647
- # for the audience field is not supported. More info about the OIDC JWT
648
- # token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
649
- # Note: if not specified, the Push endpoint URL will be used.
744
+ # Optional. Audience to be used when generating OIDC token. The audience
745
+ # claim identifies the recipients that the JWT is intended for. The
746
+ # audience value is a single case-sensitive string. Having multiple values
747
+ # (array) for the audience field is not supported. More info about the OIDC
748
+ # JWT token audience here:
749
+ # https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified,
750
+ # the Push endpoint URL will be used.
650
751
  class OidcToken
651
752
  include ::Google::Protobuf::MessageExts
652
753
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -663,7 +764,7 @@ module Google
663
764
  # Sets the `data` field as the HTTP body for delivery.
664
765
  # @!attribute [rw] write_metadata
665
766
  # @return [::Boolean]
666
- # When true, writes the Pub/Sub message metadata to
767
+ # Optional. When true, writes the Pub/Sub message metadata to
667
768
  # `x-goog-pubsub-<KEY>:<VAL>` headers of the HTTP request. Writes the
668
769
  # Pub/Sub message attributes to `<KEY>:<VAL>` headers of the HTTP request.
669
770
  class NoWrapper
@@ -684,7 +785,7 @@ module Google
684
785
  # Configuration for a BigQuery subscription.
685
786
  # @!attribute [rw] table
686
787
  # @return [::String]
687
- # The name of the table to which to write data, of the form
788
+ # Optional. The name of the table to which to write data, of the form
688
789
  # \\{projectId}.\\{datasetId}.\\{tableId}
689
790
  # @!attribute [rw] use_topic_schema
690
791
  # @return [::Boolean]
@@ -693,17 +794,17 @@ module Google
693
794
  # enabled at the same time.
694
795
  # @!attribute [rw] write_metadata
695
796
  # @return [::Boolean]
696
- # When true, write the subscription name, message_id, publish_time,
797
+ # Optional. When true, write the subscription name, message_id, publish_time,
697
798
  # attributes, and ordering_key to additional columns in the table. The
698
799
  # subscription name, message_id, and publish_time fields are put in their own
699
800
  # columns while all other message properties (other than data) are written to
700
801
  # a JSON object in the attributes column.
701
802
  # @!attribute [rw] drop_unknown_fields
702
803
  # @return [::Boolean]
703
- # When true and use_topic_schema is true, any fields that are a part of the
704
- # topic schema that are not part of the BigQuery table schema are dropped
705
- # when writing to BigQuery. Otherwise, the schemas must be kept in sync and
706
- # any messages with extra fields are not written and remain in the
804
+ # Optional. When true and use_topic_schema is true, any fields that are a
805
+ # part of the topic schema that are not part of the BigQuery table schema are
806
+ # dropped when writing to BigQuery. Otherwise, the schemas must be kept in
807
+ # sync and any messages with extra fields are not written and remain in the
707
808
  # subscription's backlog.
708
809
  # @!attribute [r] state
709
810
  # @return [::Google::Cloud::PubSub::V1::BigQueryConfig::State]
@@ -739,6 +840,10 @@ module Google
739
840
 
740
841
  # Cannot write to the BigQuery table due to a schema mismatch.
741
842
  SCHEMA_MISMATCH = 4
843
+
844
+ # Cannot write to the destination because enforce_in_transit is set to true
845
+ # and the destination locations are not in the allowed regions.
846
+ IN_TRANSIT_LOCATION_RESTRICTION = 5
742
847
  end
743
848
  end
744
849
 
@@ -751,29 +856,31 @@ module Google
751
856
  # requirements] (https://cloud.google.com/storage/docs/buckets#naming).
752
857
  # @!attribute [rw] filename_prefix
753
858
  # @return [::String]
754
- # User-provided prefix for Cloud Storage filename. See the [object naming
755
- # requirements](https://cloud.google.com/storage/docs/objects#naming).
859
+ # Optional. User-provided prefix for Cloud Storage filename. See the [object
860
+ # naming requirements](https://cloud.google.com/storage/docs/objects#naming).
756
861
  # @!attribute [rw] filename_suffix
757
862
  # @return [::String]
758
- # User-provided suffix for Cloud Storage filename. See the [object naming
759
- # requirements](https://cloud.google.com/storage/docs/objects#naming). Must
760
- # not end in "/".
863
+ # Optional. User-provided suffix for Cloud Storage filename. See the [object
864
+ # naming requirements](https://cloud.google.com/storage/docs/objects#naming).
865
+ # Must not end in "/".
761
866
  # @!attribute [rw] text_config
762
867
  # @return [::Google::Cloud::PubSub::V1::CloudStorageConfig::TextConfig]
763
- # If set, message data will be written to Cloud Storage in text format.
868
+ # Optional. If set, message data will be written to Cloud Storage in text
869
+ # format.
764
870
  # @!attribute [rw] avro_config
765
871
  # @return [::Google::Cloud::PubSub::V1::CloudStorageConfig::AvroConfig]
766
- # If set, message data will be written to Cloud Storage in Avro format.
872
+ # Optional. If set, message data will be written to Cloud Storage in Avro
873
+ # format.
767
874
  # @!attribute [rw] max_duration
768
875
  # @return [::Google::Protobuf::Duration]
769
- # The maximum duration that can elapse before a new Cloud Storage file is
770
- # created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
771
- # the subscription's acknowledgement deadline.
876
+ # Optional. The maximum duration that can elapse before a new Cloud Storage
877
+ # file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not
878
+ # exceed the subscription's acknowledgement deadline.
772
879
  # @!attribute [rw] max_bytes
773
880
  # @return [::Integer]
774
- # The maximum bytes that can be written to a Cloud Storage file before a new
775
- # file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded
776
- # in cases where messages are larger than the limit.
881
+ # Optional. The maximum bytes that can be written to a Cloud Storage file
882
+ # before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may
883
+ # be exceeded in cases where messages are larger than the limit.
777
884
  # @!attribute [r] state
778
885
  # @return [::Google::Cloud::PubSub::V1::CloudStorageConfig::State]
779
886
  # Output only. An output-only field that indicates whether or not the
@@ -794,12 +901,12 @@ module Google
794
901
  # Message payloads and metadata will be written to files as an Avro binary.
795
902
  # @!attribute [rw] write_metadata
796
903
  # @return [::Boolean]
797
- # When true, write the subscription name, message_id, publish_time,
798
- # attributes, and ordering_key as additional fields in the output. The
799
- # subscription name, message_id, and publish_time fields are put in their
800
- # own fields while all other message properties other than data (for
801
- # example, an ordering_key, if present) are added as entries in the
802
- # attributes map.
904
+ # Optional. When true, write the subscription name, message_id,
905
+ # publish_time, attributes, and ordering_key as additional fields in the
906
+ # output. The subscription name, message_id, and publish_time fields are
907
+ # put in their own fields while all other message properties other than
908
+ # data (for example, an ordering_key, if present) are added as entries in
909
+ # the attributes map.
803
910
  class AvroConfig
804
911
  include ::Google::Protobuf::MessageExts
805
912
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -819,20 +926,24 @@ module Google
819
926
 
820
927
  # Cannot write to the Cloud Storage bucket because it does not exist.
821
928
  NOT_FOUND = 3
929
+
930
+ # Cannot write to the destination because enforce_in_transit is set to true
931
+ # and the destination locations are not in the allowed regions.
932
+ IN_TRANSIT_LOCATION_RESTRICTION = 4
822
933
  end
823
934
  end
824
935
 
825
936
  # A message and its corresponding acknowledgment ID.
826
937
  # @!attribute [rw] ack_id
827
938
  # @return [::String]
828
- # This ID can be used to acknowledge the received message.
939
+ # Optional. This ID can be used to acknowledge the received message.
829
940
  # @!attribute [rw] message
830
941
  # @return [::Google::Cloud::PubSub::V1::PubsubMessage]
831
- # The message.
942
+ # Optional. The message.
832
943
  # @!attribute [rw] delivery_attempt
833
944
  # @return [::Integer]
834
- # The approximate number of times that Cloud Pub/Sub has attempted to deliver
835
- # the associated message to a subscriber.
945
+ # Optional. The approximate number of times that Pub/Sub has attempted to
946
+ # deliver the associated message to a subscriber.
836
947
  #
837
948
  # More precisely, this is 1 + (number of NACKs) +
838
949
  # (number of ack_deadline exceeds) for this message.
@@ -882,12 +993,12 @@ module Google
882
993
  # Format is `projects/{project-id}`.
883
994
  # @!attribute [rw] page_size
884
995
  # @return [::Integer]
885
- # Maximum number of subscriptions to return.
996
+ # Optional. Maximum number of subscriptions to return.
886
997
  # @!attribute [rw] page_token
887
998
  # @return [::String]
888
- # The value returned by the last `ListSubscriptionsResponse`; indicates that
889
- # this is a continuation of a prior `ListSubscriptions` call, and that the
890
- # system should return the next page of data.
999
+ # Optional. The value returned by the last `ListSubscriptionsResponse`;
1000
+ # indicates that this is a continuation of a prior `ListSubscriptions` call,
1001
+ # and that the system should return the next page of data.
891
1002
  class ListSubscriptionsRequest
892
1003
  include ::Google::Protobuf::MessageExts
893
1004
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -896,11 +1007,11 @@ module Google
896
1007
  # Response for the `ListSubscriptions` method.
897
1008
  # @!attribute [rw] subscriptions
898
1009
  # @return [::Array<::Google::Cloud::PubSub::V1::Subscription>]
899
- # The subscriptions that match the request.
1010
+ # Optional. The subscriptions that match the request.
900
1011
  # @!attribute [rw] next_page_token
901
1012
  # @return [::String]
902
- # If not empty, indicates that there may be more subscriptions that match
903
- # the request; this value should be passed in a new
1013
+ # Optional. If not empty, indicates that there may be more subscriptions that
1014
+ # match the request; this value should be passed in a new
904
1015
  # `ListSubscriptionsRequest` to get more subscriptions.
905
1016
  class ListSubscriptionsResponse
906
1017
  include ::Google::Protobuf::MessageExts
@@ -963,8 +1074,8 @@ module Google
963
1074
  # Response for the `Pull` method.
964
1075
  # @!attribute [rw] received_messages
965
1076
  # @return [::Array<::Google::Cloud::PubSub::V1::ReceivedMessage>]
966
- # Received Pub/Sub messages. The list will be empty if there are no more
967
- # messages available in the backlog, or if no messages could be returned
1077
+ # Optional. Received Pub/Sub messages. The list will be empty if there are no
1078
+ # more messages available in the backlog, or if no messages could be returned
968
1079
  # before the request timeout. For JSON, the response can be entirely
969
1080
  # empty. The Pub/Sub system may return fewer than the `maxMessages` requested
970
1081
  # even if there are more messages available in the backlog.
@@ -990,7 +1101,8 @@ module Google
990
1101
  # delivery to another subscriber client. This typically results in an
991
1102
  # increase in the rate of message redeliveries (that is, duplicates).
992
1103
  # The minimum deadline you can specify is 0 seconds.
993
- # The maximum deadline you can specify is 600 seconds (10 minutes).
1104
+ # The maximum deadline you can specify in a single request is 600 seconds
1105
+ # (10 minutes).
994
1106
  class ModifyAckDeadlineRequest
995
1107
  include ::Google::Protobuf::MessageExts
996
1108
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1022,14 +1134,15 @@ module Google
1022
1134
  # Format is `projects/{project}/subscriptions/{sub}`.
1023
1135
  # @!attribute [rw] ack_ids
1024
1136
  # @return [::Array<::String>]
1025
- # List of acknowledgement IDs for acknowledging previously received messages
1026
- # (received on this stream or a different stream). If an ack ID has expired,
1027
- # the corresponding message may be redelivered later. Acknowledging a message
1028
- # more than once will not result in an error. If the acknowledgement ID is
1029
- # malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
1137
+ # Optional. List of acknowledgement IDs for acknowledging previously received
1138
+ # messages (received on this stream or a different stream). If an ack ID has
1139
+ # expired, the corresponding message may be redelivered later. Acknowledging
1140
+ # a message more than once will not result in an error. If the
1141
+ # acknowledgement ID is malformed, the stream will be aborted with status
1142
+ # `INVALID_ARGUMENT`.
1030
1143
  # @!attribute [rw] modify_deadline_seconds
1031
1144
  # @return [::Array<::Integer>]
1032
- # The list of new ack deadlines for the IDs listed in
1145
+ # Optional. The list of new ack deadlines for the IDs listed in
1033
1146
  # `modify_deadline_ack_ids`. The size of this list must be the same as the
1034
1147
  # size of `modify_deadline_ack_ids`. If it differs the stream will be aborted
1035
1148
  # with `INVALID_ARGUMENT`. Each element in this list is applied to the
@@ -1042,9 +1155,9 @@ module Google
1042
1155
  # be aborted with status `INVALID_ARGUMENT`.
1043
1156
  # @!attribute [rw] modify_deadline_ack_ids
1044
1157
  # @return [::Array<::String>]
1045
- # List of acknowledgement IDs whose deadline will be modified based on the
1046
- # corresponding element in `modify_deadline_seconds`. This field can be used
1047
- # to indicate that more time is needed to process a message by the
1158
+ # Optional. List of acknowledgement IDs whose deadline will be modified based
1159
+ # on the corresponding element in `modify_deadline_seconds`. This field can
1160
+ # be used to indicate that more time is needed to process a message by the
1048
1161
  # subscriber, or to make the message available for redelivery if the
1049
1162
  # processing was interrupted.
1050
1163
  # @!attribute [rw] stream_ack_deadline_seconds
@@ -1055,16 +1168,16 @@ module Google
1055
1168
  # seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
1056
1169
  # @!attribute [rw] client_id
1057
1170
  # @return [::String]
1058
- # A unique identifier that is used to distinguish client instances from each
1059
- # other. Only needs to be provided on the initial request. When a stream
1060
- # disconnects and reconnects for the same stream, the client_id should be set
1061
- # to the same value so that state associated with the old stream can be
1062
- # transferred to the new stream. The same client_id should not be used for
1171
+ # Optional. A unique identifier that is used to distinguish client instances
1172
+ # from each other. Only needs to be provided on the initial request. When a
1173
+ # stream disconnects and reconnects for the same stream, the client_id should
1174
+ # be set to the same value so that state associated with the old stream can
1175
+ # be transferred to the new stream. The same client_id should not be used for
1063
1176
  # different client instances.
1064
1177
  # @!attribute [rw] max_outstanding_messages
1065
1178
  # @return [::Integer]
1066
- # Flow control settings for the maximum number of outstanding messages. When
1067
- # there are `max_outstanding_messages` or more currently sent to the
1179
+ # Optional. Flow control settings for the maximum number of outstanding
1180
+ # messages. When there are `max_outstanding_messages` currently sent to the
1068
1181
  # streaming pull client that have not yet been acked or nacked, the server
1069
1182
  # stops sending more messages. The sending of messages resumes once the
1070
1183
  # number of outstanding messages is less than this value. If the value is
@@ -1074,14 +1187,14 @@ module Google
1074
1187
  # `INVALID_ARGUMENT`.
1075
1188
  # @!attribute [rw] max_outstanding_bytes
1076
1189
  # @return [::Integer]
1077
- # Flow control settings for the maximum number of outstanding bytes. When
1078
- # there are `max_outstanding_bytes` or more worth of messages currently sent
1079
- # to the streaming pull client that have not yet been acked or nacked, the
1080
- # server will stop sending more messages. The sending of messages resumes
1081
- # once the number of outstanding bytes is less than this value. If the value
1082
- # is <= 0, there is no limit to the number of outstanding bytes. This
1083
- # property can only be set on the initial StreamingPullRequest. If it is set
1084
- # on a subsequent request, the stream will be aborted with status
1190
+ # Optional. Flow control settings for the maximum number of outstanding
1191
+ # bytes. When there are `max_outstanding_bytes` or more worth of messages
1192
+ # currently sent to the streaming pull client that have not yet been acked or
1193
+ # nacked, the server will stop sending more messages. The sending of messages
1194
+ # resumes once the number of outstanding bytes is less than this value. If
1195
+ # the value is <= 0, there is no limit to the number of outstanding bytes.
1196
+ # This property can only be set on the initial StreamingPullRequest. If it is
1197
+ # set on a subsequent request, the stream will be aborted with status
1085
1198
  # `INVALID_ARGUMENT`.
1086
1199
  class StreamingPullRequest
1087
1200
  include ::Google::Protobuf::MessageExts
@@ -1092,18 +1205,18 @@ module Google
1092
1205
  # messages from the server to the client.
1093
1206
  # @!attribute [rw] received_messages
1094
1207
  # @return [::Array<::Google::Cloud::PubSub::V1::ReceivedMessage>]
1095
- # Received Pub/Sub messages. This will not be empty.
1208
+ # Optional. Received Pub/Sub messages. This will not be empty.
1096
1209
  # @!attribute [rw] acknowledge_confirmation
1097
1210
  # @return [::Google::Cloud::PubSub::V1::StreamingPullResponse::AcknowledgeConfirmation]
1098
- # This field will only be set if `enable_exactly_once_delivery` is set to
1099
- # `true`.
1211
+ # Optional. This field will only be set if `enable_exactly_once_delivery` is
1212
+ # set to `true`.
1100
1213
  # @!attribute [rw] modify_ack_deadline_confirmation
1101
1214
  # @return [::Google::Cloud::PubSub::V1::StreamingPullResponse::ModifyAckDeadlineConfirmation]
1102
- # This field will only be set if `enable_exactly_once_delivery` is set to
1103
- # `true`.
1215
+ # Optional. This field will only be set if `enable_exactly_once_delivery` is
1216
+ # set to `true`.
1104
1217
  # @!attribute [rw] subscription_properties
1105
1218
  # @return [::Google::Cloud::PubSub::V1::StreamingPullResponse::SubscriptionProperties]
1106
- # Properties associated with this subscription.
1219
+ # Optional. Properties associated with this subscription.
1107
1220
  class StreamingPullResponse
1108
1221
  include ::Google::Protobuf::MessageExts
1109
1222
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1112,17 +1225,18 @@ module Google
1112
1225
  # previously received message.
1113
1226
  # @!attribute [rw] ack_ids
1114
1227
  # @return [::Array<::String>]
1115
- # Successfully processed acknowledgement IDs.
1228
+ # Optional. Successfully processed acknowledgement IDs.
1116
1229
  # @!attribute [rw] invalid_ack_ids
1117
1230
  # @return [::Array<::String>]
1118
- # List of acknowledgement IDs that were malformed or whose acknowledgement
1119
- # deadline has expired.
1231
+ # Optional. List of acknowledgement IDs that were malformed or whose
1232
+ # acknowledgement deadline has expired.
1120
1233
  # @!attribute [rw] unordered_ack_ids
1121
1234
  # @return [::Array<::String>]
1122
- # List of acknowledgement IDs that were out of order.
1235
+ # Optional. List of acknowledgement IDs that were out of order.
1123
1236
  # @!attribute [rw] temporary_failed_ack_ids
1124
1237
  # @return [::Array<::String>]
1125
- # List of acknowledgement IDs that failed processing with temporary issues.
1238
+ # Optional. List of acknowledgement IDs that failed processing with
1239
+ # temporary issues.
1126
1240
  class AcknowledgeConfirmation
1127
1241
  include ::Google::Protobuf::MessageExts
1128
1242
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1132,14 +1246,15 @@ module Google
1132
1246
  # deadline for a specific message.
1133
1247
  # @!attribute [rw] ack_ids
1134
1248
  # @return [::Array<::String>]
1135
- # Successfully processed acknowledgement IDs.
1249
+ # Optional. Successfully processed acknowledgement IDs.
1136
1250
  # @!attribute [rw] invalid_ack_ids
1137
1251
  # @return [::Array<::String>]
1138
- # List of acknowledgement IDs that were malformed or whose acknowledgement
1139
- # deadline has expired.
1252
+ # Optional. List of acknowledgement IDs that were malformed or whose
1253
+ # acknowledgement deadline has expired.
1140
1254
  # @!attribute [rw] temporary_failed_ack_ids
1141
1255
  # @return [::Array<::String>]
1142
- # List of acknowledgement IDs that failed processing with temporary issues.
1256
+ # Optional. List of acknowledgement IDs that failed processing with
1257
+ # temporary issues.
1143
1258
  class ModifyAckDeadlineConfirmation
1144
1259
  include ::Google::Protobuf::MessageExts
1145
1260
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1148,10 +1263,11 @@ module Google
1148
1263
  # Subscription properties sent as part of the response.
1149
1264
  # @!attribute [rw] exactly_once_delivery_enabled
1150
1265
  # @return [::Boolean]
1151
- # True iff exactly once delivery is enabled for this subscription.
1266
+ # Optional. True iff exactly once delivery is enabled for this
1267
+ # subscription.
1152
1268
  # @!attribute [rw] message_ordering_enabled
1153
1269
  # @return [::Boolean]
1154
- # True iff message ordering is enabled for this subscription.
1270
+ # Optional. True iff message ordering is enabled for this subscription.
1155
1271
  class SubscriptionProperties
1156
1272
  include ::Google::Protobuf::MessageExts
1157
1273
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1180,7 +1296,7 @@ module Google
1180
1296
  # Format is `projects/{project}/subscriptions/{sub}`.
1181
1297
  # @!attribute [rw] labels
1182
1298
  # @return [::Google::Protobuf::Map{::String => ::String}]
1183
- # See [Creating and managing
1299
+ # Optional. See [Creating and managing
1184
1300
  # labels](https://cloud.google.com/pubsub/docs/labels).
1185
1301
  class CreateSnapshotRequest
1186
1302
  include ::Google::Protobuf::MessageExts
@@ -1216,13 +1332,14 @@ module Google
1216
1332
  # subscription to the state captured by a snapshot.
1217
1333
  # @!attribute [rw] name
1218
1334
  # @return [::String]
1219
- # The name of the snapshot.
1335
+ # Optional. The name of the snapshot.
1220
1336
  # @!attribute [rw] topic
1221
1337
  # @return [::String]
1222
- # The name of the topic from which this snapshot is retaining messages.
1338
+ # Optional. The name of the topic from which this snapshot is retaining
1339
+ # messages.
1223
1340
  # @!attribute [rw] expire_time
1224
1341
  # @return [::Google::Protobuf::Timestamp]
1225
- # The snapshot is guaranteed to exist up until this time.
1342
+ # Optional. The snapshot is guaranteed to exist up until this time.
1226
1343
  # A newly-created snapshot expires no later than 7 days from the time of its
1227
1344
  # creation. Its exact lifetime is determined at creation by the existing
1228
1345
  # backlog in the source subscription. Specifically, the lifetime of the
@@ -1234,7 +1351,7 @@ module Google
1234
1351
  # snapshot that would expire in less than 1 hour after creation.
1235
1352
  # @!attribute [rw] labels
1236
1353
  # @return [::Google::Protobuf::Map{::String => ::String}]
1237
- # See [Creating and managing labels]
1354
+ # Optional. See [Creating and managing labels]
1238
1355
  # (https://cloud.google.com/pubsub/docs/labels).
1239
1356
  class Snapshot
1240
1357
  include ::Google::Protobuf::MessageExts
@@ -1267,12 +1384,12 @@ module Google
1267
1384
  # Format is `projects/{project-id}`.
1268
1385
  # @!attribute [rw] page_size
1269
1386
  # @return [::Integer]
1270
- # Maximum number of snapshots to return.
1387
+ # Optional. Maximum number of snapshots to return.
1271
1388
  # @!attribute [rw] page_token
1272
1389
  # @return [::String]
1273
- # The value returned by the last `ListSnapshotsResponse`; indicates that this
1274
- # is a continuation of a prior `ListSnapshots` call, and that the system
1275
- # should return the next page of data.
1390
+ # Optional. The value returned by the last `ListSnapshotsResponse`; indicates
1391
+ # that this is a continuation of a prior `ListSnapshots` call, and that the
1392
+ # system should return the next page of data.
1276
1393
  class ListSnapshotsRequest
1277
1394
  include ::Google::Protobuf::MessageExts
1278
1395
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1281,11 +1398,12 @@ module Google
1281
1398
  # Response for the `ListSnapshots` method.
1282
1399
  # @!attribute [rw] snapshots
1283
1400
  # @return [::Array<::Google::Cloud::PubSub::V1::Snapshot>]
1284
- # The resulting snapshots.
1401
+ # Optional. The resulting snapshots.
1285
1402
  # @!attribute [rw] next_page_token
1286
1403
  # @return [::String]
1287
- # If not empty, indicates that there may be more snapshot that match the
1288
- # request; this value should be passed in a new `ListSnapshotsRequest`.
1404
+ # Optional. If not empty, indicates that there may be more snapshot that
1405
+ # match the request; this value should be passed in a new
1406
+ # `ListSnapshotsRequest`.
1289
1407
  class ListSnapshotsResponse
1290
1408
  include ::Google::Protobuf::MessageExts
1291
1409
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1307,7 +1425,7 @@ module Google
1307
1425
  # Required. The subscription to affect.
1308
1426
  # @!attribute [rw] time
1309
1427
  # @return [::Google::Protobuf::Timestamp]
1310
- # The time to seek to.
1428
+ # Optional. The time to seek to.
1311
1429
  # Messages retained in the subscription that were published before this
1312
1430
  # time are marked as acknowledged, and messages retained in the
1313
1431
  # subscription that were published after this time are marked as
@@ -1320,9 +1438,9 @@ module Google
1320
1438
  # and already-expunged messages will not be restored.
1321
1439
  # @!attribute [rw] snapshot
1322
1440
  # @return [::String]
1323
- # The snapshot to seek to. The snapshot's topic must be the same as that of
1324
- # the provided subscription.
1325
- # Format is `projects/{project}/snapshots/{snap}`.
1441
+ # Optional. The snapshot to seek to. The snapshot's topic must be the same
1442
+ # as that of the provided subscription. Format is
1443
+ # `projects/{project}/snapshots/{snap}`.
1326
1444
  class SeekRequest
1327
1445
  include ::Google::Protobuf::MessageExts
1328
1446
  extend ::Google::Protobuf::MessageExts::ClassMethods