google-cloud-pubsub 0.32.0 → 0.32.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.
@@ -78,6 +78,7 @@ module Google
78
78
  V1::PublisherClient.new(
79
79
  credentials: channel,
80
80
  timeout: timeout,
81
+ client_config: client_config,
81
82
  lib_name: "gccl",
82
83
  lib_version: Google::Cloud::Pubsub::VERSION
83
84
  )
@@ -315,7 +315,7 @@ module Google
315
315
  end
316
316
 
317
317
  ##
318
- # Publishes a message asynchonously to the topic.
318
+ # Publishes a message asynchronously to the topic.
319
319
  #
320
320
  # The message payload must not be empty; it must contain either a
321
321
  # non-empty data field, or at least one attribute.
@@ -324,7 +324,7 @@ module Google
324
324
  # to bytes encoded as ASCII-8BIT.
325
325
  # @param [Hash] attributes Optional attributes for the message.
326
326
  # @yield [result] the callback for when the message has been published
327
- # @yieldparam [PublishResult] result the result of the asynchonous
327
+ # @yieldparam [PublishResult] result the result of the asynchronous
328
328
  # publish
329
329
  #
330
330
  # @example
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+
15
16
  require "googleauth"
16
17
 
17
18
  module Google
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+
15
16
  module Google
16
17
  module Iam
17
18
  module V1
@@ -20,7 +21,7 @@ module Google
20
21
  # @return [String]
21
22
  # REQUIRED: The resource for which the policy is being specified.
22
23
  # +resource+ is usually specified as a path. For example, a Project
23
- # resource is specified as +projects/{project}+.
24
+ # resource is specified as +projects/\\{project}+.
24
25
  # @!attribute [rw] policy
25
26
  # @return [Google::Iam::V1::Policy]
26
27
  # REQUIRED: The complete policy to be applied to the +resource+. The size of
@@ -34,7 +35,7 @@ module Google
34
35
  # @return [String]
35
36
  # REQUIRED: The resource for which the policy is being requested.
36
37
  # +resource+ is usually specified as a path. For example, a Project
37
- # resource is specified as +projects/{project}+.
38
+ # resource is specified as +projects/\\{project}+.
38
39
  class GetIamPolicyRequest; end
39
40
 
40
41
  # Request message for +TestIamPermissions+ method.
@@ -42,7 +43,7 @@ module Google
42
43
  # @return [String]
43
44
  # REQUIRED: The resource for which the policy detail is being requested.
44
45
  # +resource+ is usually specified as a path. For example, a Project
45
- # resource is specified as +projects/{project}+.
46
+ # resource is specified as +projects/\\{project}+.
46
47
  # @!attribute [rw] permissions
47
48
  # @return [Array<String>]
48
49
  # The set of permissions to check for the +resource+. Permissions with
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+
15
16
  module Google
16
17
  module Iam
17
18
  module V1
@@ -85,17 +86,17 @@ module Google
85
86
  # * +allAuthenticatedUsers+: A special identifier that represents anyone
86
87
  # who is authenticated with a Google account or a service account.
87
88
  #
88
- # * +user:{emailid}+: An email address that represents a specific Google
89
+ # * +user:\\{emailid}+: An email address that represents a specific Google
89
90
  # account. For example, +alice@gmail.com+ or +joe@example.com+.
90
91
  #
91
92
  #
92
- # * +serviceAccount:{emailid}+: An email address that represents a service
93
+ # * +serviceAccount:\\{emailid}+: An email address that represents a service
93
94
  # account. For example, +my-other-app@appspot.gserviceaccount.com+.
94
95
  #
95
- # * +group:{emailid}+: An email address that represents a Google group.
96
+ # * +group:\\{emailid}+: An email address that represents a Google group.
96
97
  # For example, +admins@example.com+.
97
98
  #
98
- # * +domain:{domain}+: A Google Apps domain name that represents all the
99
+ # * +domain:\\{domain}+: A Google Apps domain name that represents all the
99
100
  # users of that domain. For example, +google.com+ or +example.com+.
100
101
  class Binding; end
101
102
 
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+
15
16
  module Google
16
17
  module Protobuf
17
18
  # A Duration represents a signed, fixed-length span of time represented
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+
15
16
  module Google
16
17
  module Protobuf
17
18
  # A generic empty message that you can re-use to avoid defining duplicated
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+
15
16
  module Google
16
17
  module Protobuf
17
18
  # +FieldMask+ represents a set of symbolic field paths, for example:
@@ -215,6 +216,12 @@ module Google
215
216
  #
216
217
  # Note that oneof type names ("test_oneof" in this case) cannot be used in
217
218
  # paths.
219
+ #
220
+ # == Field Mask Verification
221
+ #
222
+ # The implementation of any API method which has a FieldMask type field in the
223
+ # request should verify the included field paths, and return an
224
+ # +INVALID_ARGUMENT+ error if any path is duplicated or unmappable.
218
225
  # @!attribute [rw] paths
219
226
  # @return [Array<String>]
220
227
  # The set of field mask paths.
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+
15
16
  module Google
16
17
  module Protobuf
17
18
  # A Timestamp represents a point in time independent of any time zone
@@ -72,12 +73,14 @@ module Google
72
73
  #
73
74
  # In JSON format, the Timestamp type is encoded as a string in the
74
75
  # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
75
- # format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
76
- # where {year} is always expressed using four digits while {month}, {day},
77
- # {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
76
+ # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
77
+ # where \\{year} is always expressed using four digits while \\{month}, \\{day},
78
+ # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
78
79
  # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
79
80
  # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
80
- # is required, though only UTC (as indicated by "Z") is presently supported.
81
+ # is required. A proto3 JSON serializer should always use UTC (as indicated by
82
+ # "Z") when printing the Timestamp type and a proto3 JSON parser should be
83
+ # able to accept both UTC and other timezones (as indicated by an offset).
81
84
  #
82
85
  # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
83
86
  # 01:30 UTC on January 15, 2017.
@@ -88,8 +91,8 @@ module Google
88
91
  # to this format using [+strftime+](https://docs.python.org/2/library/time.html#time.strftime)
89
92
  # with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
90
93
  # can use the Joda Time's [+ISODateTimeFormat.dateTime()+](
91
- # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime())
92
- # to obtain a formatter capable of generating timestamps in this format.
94
+ # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
95
+ # ) to obtain a formatter capable of generating timestamps in this format.
93
96
  # @!attribute [rw] seconds
94
97
  # @return [Integer]
95
98
  # Represents seconds of UTC time since Unix epoch
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+
15
16
  module Google
16
17
  module Pubsub
17
18
  module V1
@@ -29,7 +30,7 @@ module Google
29
30
  # @!attribute [rw] name
30
31
  # @return [String]
31
32
  # The name of the topic. It must have the format
32
- # +"projects/{project}/topics/{topic}"+. +{topic}+ must start with a letter,
33
+ # +"projects/\\{project}/topics/\\{topic}"+. +\\{topic}+ must start with a letter,
33
34
  # and contain only letters (+[A-Za-z]+), numbers (+[0-9]+), dashes (+-+),
34
35
  # underscores (+_+), periods (+.+), tildes (+~+), plus (+++) or percent
35
36
  # signs (+%+). It must be between 3 and 255 characters in length, and it
@@ -72,7 +73,7 @@ module Google
72
73
  # @!attribute [rw] topic
73
74
  # @return [String]
74
75
  # The name of the topic to get.
75
- # Format is +projects/{project}/topics/{topic}+.
76
+ # Format is +projects/\\{project}/topics/\\{topic}+.
76
77
  class GetTopicRequest; end
77
78
 
78
79
  # Request for the UpdateTopic method.
@@ -92,7 +93,7 @@ module Google
92
93
  # @!attribute [rw] topic
93
94
  # @return [String]
94
95
  # The messages in the request will be published on this topic.
95
- # Format is +projects/{project}/topics/{topic}+.
96
+ # Format is +projects/\\{project}/topics/\\{topic}+.
96
97
  # @!attribute [rw] messages
97
98
  # @return [Array<Google::Pubsub::V1::PubsubMessage>]
98
99
  # The messages to publish.
@@ -110,7 +111,7 @@ module Google
110
111
  # @!attribute [rw] project
111
112
  # @return [String]
112
113
  # The name of the cloud project that topics belong to.
113
- # Format is +projects/{project}+.
114
+ # Format is +projects/\\{project}+.
114
115
  # @!attribute [rw] page_size
115
116
  # @return [Integer]
116
117
  # Maximum number of topics to return.
@@ -135,7 +136,7 @@ module Google
135
136
  # @!attribute [rw] topic
136
137
  # @return [String]
137
138
  # The name of the topic that subscriptions are attached to.
138
- # Format is +projects/{project}/topics/{topic}+.
139
+ # Format is +projects/\\{project}/topics/\\{topic}+.
139
140
  # @!attribute [rw] page_size
140
141
  # @return [Integer]
141
142
  # Maximum number of subscription names to return.
@@ -164,7 +165,7 @@ module Google
164
165
  # @!attribute [rw] topic
165
166
  # @return [String]
166
167
  # The name of the topic that snapshots are attached to.
167
- # Format is +projects/{project}/topics/{topic}+.
168
+ # Format is +projects/\\{project}/topics/\\{topic}+.
168
169
  # @!attribute [rw] page_size
169
170
  # @return [Integer]
170
171
  # Maximum number of snapshot names to return.
@@ -193,14 +194,14 @@ module Google
193
194
  # @!attribute [rw] topic
194
195
  # @return [String]
195
196
  # Name of the topic to delete.
196
- # Format is +projects/{project}/topics/{topic}+.
197
+ # Format is +projects/\\{project}/topics/\\{topic}+.
197
198
  class DeleteTopicRequest; end
198
199
 
199
200
  # A subscription resource.
200
201
  # @!attribute [rw] name
201
202
  # @return [String]
202
203
  # The name of the subscription. It must have the format
203
- # +"projects/{project}/subscriptions/{subscription}"+. +{subscription}+ must
204
+ # +"projects/\\{project}/subscriptions/\\{subscription}"+. +\\{subscription}+ must
204
205
  # start with a letter, and contain only letters (+[A-Za-z]+), numbers
205
206
  # (+[0-9]+), dashes (+-+), underscores (+_+), periods (+.+), tildes (+~+),
206
207
  # plus (+++) or percent signs (+%+). It must be between 3 and 255 characters
@@ -208,7 +209,7 @@ module Google
208
209
  # @!attribute [rw] topic
209
210
  # @return [String]
210
211
  # The name of the topic from which this subscription is receiving messages.
211
- # Format is +projects/{project}/topics/{topic}+.
212
+ # Format is +projects/\\{project}/topics/\\{topic}+.
212
213
  # The value of this field will be +_deleted-topic_+ if the topic has been
213
214
  # deleted.
214
215
  # @!attribute [rw] push_config
@@ -306,7 +307,7 @@ module Google
306
307
  # @!attribute [rw] subscription
307
308
  # @return [String]
308
309
  # The name of the subscription to get.
309
- # Format is +projects/{project}/subscriptions/{sub}+.
310
+ # Format is +projects/\\{project}/subscriptions/\\{sub}+.
310
311
  class GetSubscriptionRequest; end
311
312
 
312
313
  # Request for the UpdateSubscription method.
@@ -323,7 +324,7 @@ module Google
323
324
  # @!attribute [rw] project
324
325
  # @return [String]
325
326
  # The name of the cloud project that subscriptions belong to.
326
- # Format is +projects/{project}+.
327
+ # Format is +projects/\\{project}+.
327
328
  # @!attribute [rw] page_size
328
329
  # @return [Integer]
329
330
  # Maximum number of subscriptions to return.
@@ -349,14 +350,14 @@ module Google
349
350
  # @!attribute [rw] subscription
350
351
  # @return [String]
351
352
  # The subscription to delete.
352
- # Format is +projects/{project}/subscriptions/{sub}+.
353
+ # Format is +projects/\\{project}/subscriptions/\\{sub}+.
353
354
  class DeleteSubscriptionRequest; end
354
355
 
355
356
  # Request for the ModifyPushConfig method.
356
357
  # @!attribute [rw] subscription
357
358
  # @return [String]
358
359
  # The name of the subscription.
359
- # Format is +projects/{project}/subscriptions/{sub}+.
360
+ # Format is +projects/\\{project}/subscriptions/\\{sub}+.
360
361
  # @!attribute [rw] push_config
361
362
  # @return [Google::Pubsub::V1::PushConfig]
362
363
  # The push configuration for future deliveries.
@@ -371,7 +372,7 @@ module Google
371
372
  # @!attribute [rw] subscription
372
373
  # @return [String]
373
374
  # The subscription from which messages should be pulled.
374
- # Format is +projects/{project}/subscriptions/{sub}+.
375
+ # Format is +projects/\\{project}/subscriptions/\\{sub}+.
375
376
  # @!attribute [rw] return_immediately
376
377
  # @return [true, false]
377
378
  # If this field set to true, the system will respond immediately even if
@@ -399,7 +400,7 @@ module Google
399
400
  # @!attribute [rw] subscription
400
401
  # @return [String]
401
402
  # The name of the subscription.
402
- # Format is +projects/{project}/subscriptions/{sub}+.
403
+ # Format is +projects/\\{project}/subscriptions/\\{sub}+.
403
404
  # @!attribute [rw] ack_ids
404
405
  # @return [Array<String>]
405
406
  # List of acknowledgment IDs.
@@ -418,7 +419,7 @@ module Google
418
419
  # @!attribute [rw] subscription
419
420
  # @return [String]
420
421
  # The subscription whose message is being acknowledged.
421
- # Format is +projects/{project}/subscriptions/{sub}+.
422
+ # Format is +projects/\\{project}/subscriptions/\\{sub}+.
422
423
  # @!attribute [rw] ack_ids
423
424
  # @return [Array<String>]
424
425
  # The acknowledgment ID for the messages being acknowledged that was returned
@@ -433,7 +434,7 @@ module Google
433
434
  # The subscription for which to initialize the new stream. This must be
434
435
  # provided in the first request on the stream, and must not be set in
435
436
  # subsequent requests from client to server.
436
- # Format is +projects/{project}/subscriptions/{sub}+.
437
+ # Format is +projects/\\{project}/subscriptions/\\{sub}+.
437
438
  # @!attribute [rw] ack_ids
438
439
  # @return [Array<String>]
439
440
  # List of acknowledgement IDs for acknowledging previously received messages
@@ -486,7 +487,7 @@ module Google
486
487
  # If the name is not provided in the request, the server will assign a random
487
488
  # name for this snapshot on the same project as the subscription.
488
489
  # Note that for REST API requests, you must specify a name.
489
- # Format is +projects/{project}/snapshots/{snap}+.
490
+ # Format is +projects/\\{project}/snapshots/\\{snap}+.
490
491
  # @!attribute [rw] subscription
491
492
  # @return [String]
492
493
  # The subscription whose backlog the snapshot retains.
@@ -497,7 +498,7 @@ module Google
497
498
  # +CreateSnapshot+ request; as well as:
498
499
  # (b) Any messages published to the subscription's topic following the
499
500
  # successful completion of the CreateSnapshot request.
500
- # Format is +projects/{project}/subscriptions/{sub}+.
501
+ # Format is +projects/\\{project}/subscriptions/\\{sub}+.
501
502
  # @!attribute [rw] labels
502
503
  # @return [Hash{String => String}]
503
504
  # User labels.
@@ -550,7 +551,7 @@ module Google
550
551
  # @!attribute [rw] snapshot
551
552
  # @return [String]
552
553
  # The name of the snapshot to get.
553
- # Format is +projects/{project}/snapshots/{snap}+.
554
+ # Format is +projects/\\{project}/snapshots/\\{snap}+.
554
555
  class GetSnapshotRequest; end
555
556
 
556
557
  # Request for the +ListSnapshots+ method.<br><br>
@@ -560,7 +561,7 @@ module Google
560
561
  # @!attribute [rw] project
561
562
  # @return [String]
562
563
  # The name of the cloud project that snapshots belong to.
563
- # Format is +projects/{project}+.
564
+ # Format is +projects/\\{project}+.
564
565
  # @!attribute [rw] page_size
565
566
  # @return [Integer]
566
567
  # Maximum number of snapshots to return.
@@ -591,7 +592,7 @@ module Google
591
592
  # @!attribute [rw] snapshot
592
593
  # @return [String]
593
594
  # The name of the snapshot to delete.
594
- # Format is +projects/{project}/snapshots/{snap}+.
595
+ # Format is +projects/\\{project}/snapshots/\\{snap}+.
595
596
  class DeleteSnapshotRequest; end
596
597
 
597
598
  # Request for the +Seek+ method.<br><br>
@@ -618,7 +619,7 @@ module Google
618
619
  # @return [String]
619
620
  # The snapshot to seek to. The snapshot's topic must be the same as that of
620
621
  # the provided subscription.
621
- # Format is +projects/{project}/snapshots/{snap}+.
622
+ # Format is +projects/\\{project}/snapshots/\\{snap}+.
622
623
  class SeekRequest; end
623
624
 
624
625
  class SeekResponse; end
@@ -19,6 +19,7 @@
19
19
  # For the short term, the refresh process will only be runnable by Google
20
20
  # engineers.
21
21
 
22
+
22
23
  require "json"
23
24
  require "pathname"
24
25
 
@@ -40,6 +41,7 @@ module Google
40
41
  # @!attribute [r] publisher_stub
41
42
  # @return [Google::Pubsub::V1::Publisher::Stub]
42
43
  class PublisherClient
44
+ # @private
43
45
  attr_reader :iam_policy_stub, :publisher_stub
44
46
 
45
47
  # The default address of the service.
@@ -291,7 +293,7 @@ module Google
291
293
  #
292
294
  # @param name [String]
293
295
  # The name of the topic. It must have the format
294
- # +"projects/{project}/topics/{topic}"+. +{topic}+ must start with a letter,
296
+ # +"projects/\\{project}/topics/\\{topic}"+. +\\{topic}+ must start with a letter,
295
297
  # and contain only letters (+[A-Za-z]+), numbers (+[0-9]+), dashes (+-+),
296
298
  # underscores (+_+), periods (+.+), tildes (+~+), plus (+++) or percent
297
299
  # signs (+%+). It must be between 3 and 255 characters in length, and it
@@ -391,7 +393,7 @@ module Google
391
393
  #
392
394
  # @param topic [String]
393
395
  # The messages in the request will be published on this topic.
394
- # Format is +projects/{project}/topics/{topic}+.
396
+ # Format is +projects/\\{project}/topics/\\{topic}+.
395
397
  # @param messages [Array<Google::Pubsub::V1::PubsubMessage | Hash>]
396
398
  # The messages to publish.
397
399
  # A hash of the same form as `Google::Pubsub::V1::PubsubMessage`
@@ -431,7 +433,7 @@ module Google
431
433
  #
432
434
  # @param topic [String]
433
435
  # The name of the topic to get.
434
- # Format is +projects/{project}/topics/{topic}+.
436
+ # Format is +projects/\\{project}/topics/\\{topic}+.
435
437
  # @param options [Google::Gax::CallOptions]
436
438
  # Overrides the default settings for this call, e.g, timeout,
437
439
  # retries, etc.
@@ -462,7 +464,7 @@ module Google
462
464
  #
463
465
  # @param project [String]
464
466
  # The name of the cloud project that topics belong to.
465
- # Format is +projects/{project}+.
467
+ # Format is +projects/\\{project}+.
466
468
  # @param page_size [Integer]
467
469
  # The maximum number of resources contained in the underlying API
468
470
  # response. If page streaming is performed per-resource, this
@@ -517,7 +519,7 @@ module Google
517
519
  #
518
520
  # @param topic [String]
519
521
  # The name of the topic that subscriptions are attached to.
520
- # Format is +projects/{project}/topics/{topic}+.
522
+ # Format is +projects/\\{project}/topics/\\{topic}+.
521
523
  # @param page_size [Integer]
522
524
  # The maximum number of resources contained in the underlying API
523
525
  # response. If page streaming is performed per-resource, this
@@ -576,7 +578,7 @@ module Google
576
578
  #
577
579
  # @param topic [String]
578
580
  # Name of the topic to delete.
579
- # Format is +projects/{project}/topics/{topic}+.
581
+ # Format is +projects/\\{project}/topics/\\{topic}+.
580
582
  # @param options [Google::Gax::CallOptions]
581
583
  # Overrides the default settings for this call, e.g, timeout,
582
584
  # retries, etc.
@@ -609,7 +611,7 @@ module Google
609
611
  # @param resource [String]
610
612
  # REQUIRED: The resource for which the policy is being specified.
611
613
  # +resource+ is usually specified as a path. For example, a Project
612
- # resource is specified as +projects/{project}+.
614
+ # resource is specified as +projects/\\{project}+.
613
615
  # @param policy [Google::Iam::V1::Policy | Hash]
614
616
  # REQUIRED: The complete policy to be applied to the +resource+. The size of
615
617
  # the policy is limited to a few 10s of KB. An empty policy is a
@@ -655,7 +657,7 @@ module Google
655
657
  # @param resource [String]
656
658
  # REQUIRED: The resource for which the policy is being requested.
657
659
  # +resource+ is usually specified as a path. For example, a Project
658
- # resource is specified as +projects/{project}+.
660
+ # resource is specified as +projects/\\{project}+.
659
661
  # @param options [Google::Gax::CallOptions]
660
662
  # Overrides the default settings for this call, e.g, timeout,
661
663
  # retries, etc.
@@ -689,7 +691,7 @@ module Google
689
691
  # @param resource [String]
690
692
  # REQUIRED: The resource for which the policy detail is being requested.
691
693
  # +resource+ is usually specified as a path. For example, a Project
692
- # resource is specified as +projects/{project}+.
694
+ # resource is specified as +projects/\\{project}+.
693
695
  # @param permissions [Array<String>]
694
696
  # The set of permissions to check for the +resource+. Permissions with
695
697
  # wildcards (such as '*' or 'storage.*') are not allowed. For more