google-apis-pubsublite_v1 0.2.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd39f992772e40ef1b6515b62e89a600362caa10e342e9cff070a4c62541be25
4
- data.tar.gz: 6aac6fed88ac0b109ae10c2f93939fa866db9eeab8fe6bfcef3ac3b365afd82d
3
+ metadata.gz: 5a208439243ca81538c440c06726fd39d8da0919e08bf61951b5e7dc8cb21793
4
+ data.tar.gz: e452671b9306d7f617cc6454d340a27b78a7f173584564ccfa5b55ddbd72f4ec
5
5
  SHA512:
6
- metadata.gz: 9d6e461b6dd2b331116e642d711bd67834bc718db311febee3b19499fdea188ffe12ba88b5a0540bf1984fe7eb3322e1f1f0d43659f04cff0248e324c66bac89
7
- data.tar.gz: 1c2212c4485af6d835f0cf58fbcd568c8e4fcfc58147ca0f384b1e5009f77b4839bb7c710a4256aaed16b5bc1bac3d38adc86c5b1e6d4ca5010aa6eb659f0229
6
+ metadata.gz: 599eecc1e36cc8194d598efc109ccbb4a6dc5f9a08f900abd648ad62b7a1ee389b3ef77b6d38f83f5a7e911e91fe00f0a74cc70710a80a20aef379ab8d8a4996
7
+ data.tar.gz: 045efc187b46a09f85fc2920616b143d6930eef80ca4605ef77138eb6a8933e51b36985c8e112f7e696674f62678784ca9a86322dd2718417a3d9d06568b7c82
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Release history for google-apis-pubsublite_v1
2
2
 
3
+ ### v0.7.0 (2021-05-14)
4
+
5
+ * Regenerated from discovery document revision 20210513
6
+
7
+ ### v0.6.0 (2021-03-27)
8
+
9
+ * Regenerated from discovery document revision 20210322
10
+
11
+ ### v0.5.0 (2021-03-20)
12
+
13
+ * Regenerated from discovery document revision 20210316
14
+ * Regenerated using generator version 0.2.0
15
+
16
+ ### v0.4.0 (2021-03-05)
17
+
18
+ * Regenerated from discovery document revision 20210302
19
+ * Unspecified changes
20
+
21
+ ### v0.3.0 (2021-02-27)
22
+
23
+ * Regenerated from discovery document revision 20210224
24
+
3
25
  ### v0.2.0 (2021-02-09)
4
26
 
5
27
  * Regenerated from discovery document revision 20210202
@@ -29,7 +29,7 @@ module Google
29
29
  # This is NOT the gem version.
30
30
  VERSION = 'V1'
31
31
 
32
- # View and manage your data across Google Cloud Platform services
32
+ # See, edit, configure, and delete your Google Cloud Platform data
33
33
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
34
  end
35
35
  end
@@ -47,6 +47,45 @@ module Google
47
47
  end
48
48
  end
49
49
 
50
+ # Request for CommitCursor.
51
+ class CommitCursorRequest
52
+ include Google::Apis::Core::Hashable
53
+
54
+ # A cursor that describes the position of a message within a topic partition.
55
+ # Corresponds to the JSON property `cursor`
56
+ # @return [Google::Apis::PubsubliteV1::Cursor]
57
+ attr_accessor :cursor
58
+
59
+ # The partition for which to update the cursor. Partitions are zero indexed, so `
60
+ # partition` must be in the range [0, topic.num_partitions).
61
+ # Corresponds to the JSON property `partition`
62
+ # @return [Fixnum]
63
+ attr_accessor :partition
64
+
65
+ def initialize(**args)
66
+ update!(**args)
67
+ end
68
+
69
+ # Update properties of this object
70
+ def update!(**args)
71
+ @cursor = args[:cursor] if args.key?(:cursor)
72
+ @partition = args[:partition] if args.key?(:partition)
73
+ end
74
+ end
75
+
76
+ # Response for CommitCursor.
77
+ class CommitCursorResponse
78
+ include Google::Apis::Core::Hashable
79
+
80
+ def initialize(**args)
81
+ update!(**args)
82
+ end
83
+
84
+ # Update properties of this object
85
+ def update!(**args)
86
+ end
87
+ end
88
+
50
89
  # Compute the current head cursor for a partition.
51
90
  class ComputeHeadCursorRequest
52
91
  include Google::Apis::Core::Hashable
@@ -157,6 +196,53 @@ module Google
157
196
  end
158
197
  end
159
198
 
199
+ # Compute the corresponding cursor for a publish or event time in a topic
200
+ # partition.
201
+ class ComputeTimeCursorRequest
202
+ include Google::Apis::Core::Hashable
203
+
204
+ # Required. The partition for which we should compute the cursor.
205
+ # Corresponds to the JSON property `partition`
206
+ # @return [Fixnum]
207
+ attr_accessor :partition
208
+
209
+ # A target publish or event time. Can be used for seeking to or retrieving the
210
+ # corresponding cursor.
211
+ # Corresponds to the JSON property `target`
212
+ # @return [Google::Apis::PubsubliteV1::TimeTarget]
213
+ attr_accessor :target
214
+
215
+ def initialize(**args)
216
+ update!(**args)
217
+ end
218
+
219
+ # Update properties of this object
220
+ def update!(**args)
221
+ @partition = args[:partition] if args.key?(:partition)
222
+ @target = args[:target] if args.key?(:target)
223
+ end
224
+ end
225
+
226
+ # Response containing the cursor corresponding to a publish or event time in a
227
+ # topic partition.
228
+ class ComputeTimeCursorResponse
229
+ include Google::Apis::Core::Hashable
230
+
231
+ # A cursor that describes the position of a message within a topic partition.
232
+ # Corresponds to the JSON property `cursor`
233
+ # @return [Google::Apis::PubsubliteV1::Cursor]
234
+ attr_accessor :cursor
235
+
236
+ def initialize(**args)
237
+ update!(**args)
238
+ end
239
+
240
+ # Update properties of this object
241
+ def update!(**args)
242
+ @cursor = args[:cursor] if args.key?(:cursor)
243
+ end
244
+ end
245
+
160
246
  # A cursor that describes the position of a message within a topic partition.
161
247
  class Cursor
162
248
  include Google::Apis::Core::Hashable
@@ -329,7 +415,10 @@ module Google
329
415
  # @return [Google::Apis::PubsubliteV1::Capacity]
330
416
  attr_accessor :capacity
331
417
 
332
- # The number of partitions in the topic. Must be at least 1.
418
+ # The number of partitions in the topic. Must be at least 1. Once a topic has
419
+ # been created the number of partitions can be increased but not decreased.
420
+ # Message ordering is not guaranteed across a topic resize. For more information
421
+ # see https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity
333
422
  # Corresponds to the JSON property `count`
334
423
  # @return [Fixnum]
335
424
  attr_accessor :count
@@ -444,6 +533,38 @@ module Google
444
533
  end
445
534
  end
446
535
 
536
+ # A target publish or event time. Can be used for seeking to or retrieving the
537
+ # corresponding cursor.
538
+ class TimeTarget
539
+ include Google::Apis::Core::Hashable
540
+
541
+ # Request the cursor of the first message with event time greater than or equal
542
+ # to `event_time`. If messages are missing an event time, the publish time is
543
+ # used as a fallback. As event times are user supplied, subsequent messages may
544
+ # have event times less than `event_time` and should be filtered by the client,
545
+ # if necessary.
546
+ # Corresponds to the JSON property `eventTime`
547
+ # @return [String]
548
+ attr_accessor :event_time
549
+
550
+ # Request the cursor of the first message with publish time greater than or
551
+ # equal to `publish_time`. All messages thereafter are guaranteed to have
552
+ # publish times >= `publish_time`.
553
+ # Corresponds to the JSON property `publishTime`
554
+ # @return [String]
555
+ attr_accessor :publish_time
556
+
557
+ def initialize(**args)
558
+ update!(**args)
559
+ end
560
+
561
+ # Update properties of this object
562
+ def update!(**args)
563
+ @event_time = args[:event_time] if args.key?(:event_time)
564
+ @publish_time = args[:publish_time] if args.key?(:publish_time)
565
+ end
566
+ end
567
+
447
568
  # Metadata about a topic resource.
448
569
  class Topic
449
570
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module PubsubliteV1
18
18
  # Version of the google-apis-pubsublite_v1 gem
19
- GEM_VERSION = "0.2.0"
19
+ GEM_VERSION = "0.7.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.1.2"
22
+ GENERATOR_VERSION = "0.2.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210202"
25
+ REVISION = "20210513"
26
26
  end
27
27
  end
28
28
  end
@@ -28,6 +28,18 @@ module Google
28
28
  include Google::Apis::Core::JsonObjectSupport
29
29
  end
30
30
 
31
+ class CommitCursorRequest
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class CommitCursorResponse
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
31
43
  class ComputeHeadCursorRequest
32
44
  class Representation < Google::Apis::Core::JsonRepresentation; end
33
45
 
@@ -52,6 +64,18 @@ module Google
52
64
  include Google::Apis::Core::JsonObjectSupport
53
65
  end
54
66
 
67
+ class ComputeTimeCursorRequest
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class ComputeTimeCursorResponse
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
55
79
  class Cursor
56
80
  class Representation < Google::Apis::Core::JsonRepresentation; end
57
81
 
@@ -118,6 +142,12 @@ module Google
118
142
  include Google::Apis::Core::JsonObjectSupport
119
143
  end
120
144
 
145
+ class TimeTarget
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
121
151
  class Topic
122
152
  class Representation < Google::Apis::Core::JsonRepresentation; end
123
153
 
@@ -138,6 +168,21 @@ module Google
138
168
  end
139
169
  end
140
170
 
171
+ class CommitCursorRequest
172
+ # @private
173
+ class Representation < Google::Apis::Core::JsonRepresentation
174
+ property :cursor, as: 'cursor', class: Google::Apis::PubsubliteV1::Cursor, decorator: Google::Apis::PubsubliteV1::Cursor::Representation
175
+
176
+ property :partition, :numeric_string => true, as: 'partition'
177
+ end
178
+ end
179
+
180
+ class CommitCursorResponse
181
+ # @private
182
+ class Representation < Google::Apis::Core::JsonRepresentation
183
+ end
184
+ end
185
+
141
186
  class ComputeHeadCursorRequest
142
187
  # @private
143
188
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -174,6 +219,23 @@ module Google
174
219
  end
175
220
  end
176
221
 
222
+ class ComputeTimeCursorRequest
223
+ # @private
224
+ class Representation < Google::Apis::Core::JsonRepresentation
225
+ property :partition, :numeric_string => true, as: 'partition'
226
+ property :target, as: 'target', class: Google::Apis::PubsubliteV1::TimeTarget, decorator: Google::Apis::PubsubliteV1::TimeTarget::Representation
227
+
228
+ end
229
+ end
230
+
231
+ class ComputeTimeCursorResponse
232
+ # @private
233
+ class Representation < Google::Apis::Core::JsonRepresentation
234
+ property :cursor, as: 'cursor', class: Google::Apis::PubsubliteV1::Cursor, decorator: Google::Apis::PubsubliteV1::Cursor::Representation
235
+
236
+ end
237
+ end
238
+
177
239
  class Cursor
178
240
  # @private
179
241
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -266,6 +328,14 @@ module Google
266
328
  end
267
329
  end
268
330
 
331
+ class TimeTarget
332
+ # @private
333
+ class Representation < Google::Apis::Core::JsonRepresentation
334
+ property :event_time, as: 'eventTime'
335
+ property :publish_time, as: 'publishTime'
336
+ end
337
+ end
338
+
269
339
  class Topic
270
340
  # @private
271
341
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -54,6 +54,10 @@ module Google
54
54
  # Required. The parent location in which to create the subscription. Structured
55
55
  # like `projects/`project_number`/locations/`location``.
56
56
  # @param [Google::Apis::PubsubliteV1::Subscription] subscription_object
57
+ # @param [Boolean] skip_backlog
58
+ # If true, the newly created subscription will only receive messages published
59
+ # after the subscription was created. Otherwise, the entire message backlog will
60
+ # be received on the subscription. Defaults to false.
57
61
  # @param [String] subscription_id
58
62
  # Required. The ID to use for the subscription, which will become the final
59
63
  # component of the subscription's name. This value is structured like: `my-sub-
@@ -75,13 +79,14 @@ module Google
75
79
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
80
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
81
  # @raise [Google::Apis::AuthorizationError] Authorization is required
78
- def create_admin_project_location_subscription(parent, subscription_object = nil, subscription_id: nil, fields: nil, quota_user: nil, options: nil, &block)
82
+ def create_admin_project_location_subscription(parent, subscription_object = nil, skip_backlog: nil, subscription_id: nil, fields: nil, quota_user: nil, options: nil, &block)
79
83
  command = make_simple_command(:post, 'v1/admin/{+parent}/subscriptions', options)
80
84
  command.request_representation = Google::Apis::PubsubliteV1::Subscription::Representation
81
85
  command.request_object = subscription_object
82
86
  command.response_representation = Google::Apis::PubsubliteV1::Subscription::Representation
83
87
  command.response_class = Google::Apis::PubsubliteV1::Subscription
84
88
  command.params['parent'] = parent unless parent.nil?
89
+ command.query['skipBacklog'] = skip_backlog unless skip_backlog.nil?
85
90
  command.query['subscriptionId'] = subscription_id unless subscription_id.nil?
86
91
  command.query['fields'] = fields unless fields.nil?
87
92
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -473,6 +478,39 @@ module Google
473
478
  execute_or_queue_command(command, &block)
474
479
  end
475
480
 
481
+ # Updates the committed cursor.
482
+ # @param [String] subscription
483
+ # The subscription for which to update the cursor.
484
+ # @param [Google::Apis::PubsubliteV1::CommitCursorRequest] commit_cursor_request_object
485
+ # @param [String] fields
486
+ # Selector specifying which fields to include in a partial response.
487
+ # @param [String] quota_user
488
+ # Available to use for quota purposes for server-side applications. Can be any
489
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
490
+ # @param [Google::Apis::RequestOptions] options
491
+ # Request-specific options
492
+ #
493
+ # @yield [result, err] Result & error if block supplied
494
+ # @yieldparam result [Google::Apis::PubsubliteV1::CommitCursorResponse] parsed result object
495
+ # @yieldparam err [StandardError] error object if request failed
496
+ #
497
+ # @return [Google::Apis::PubsubliteV1::CommitCursorResponse]
498
+ #
499
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
500
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
501
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
502
+ def commit_subscription_cursor(subscription, commit_cursor_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
503
+ command = make_simple_command(:post, 'v1/cursor/{+subscription}:commitCursor', options)
504
+ command.request_representation = Google::Apis::PubsubliteV1::CommitCursorRequest::Representation
505
+ command.request_object = commit_cursor_request_object
506
+ command.response_representation = Google::Apis::PubsubliteV1::CommitCursorResponse::Representation
507
+ command.response_class = Google::Apis::PubsubliteV1::CommitCursorResponse
508
+ command.params['subscription'] = subscription unless subscription.nil?
509
+ command.query['fields'] = fields unless fields.nil?
510
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
511
+ execute_or_queue_command(command, &block)
512
+ end
513
+
476
514
  # Returns all committed cursor information for a subscription.
477
515
  # @param [String] parent
478
516
  # Required. The subscription for which to retrieve cursors. Structured like `
@@ -515,11 +553,11 @@ module Google
515
553
  execute_or_queue_command(command, &block)
516
554
  end
517
555
 
518
- # Compute the head cursor for the partition. The head cursors offset is
519
- # guaranteed to be before or equal to all messages which have not yet been
520
- # acknowledged to be published, and greater than the offset of any message whose
521
- # publish has already been acknowledged. It is 0 if there have never been
522
- # messages on the partition.
556
+ # Compute the head cursor for the partition. The head cursor's offset is
557
+ # guaranteed to be less than or equal to all messages which have not yet been
558
+ # acknowledged as published, and greater than the offset of any message whose
559
+ # publish has already been acknowledged. It is zero if there have never been
560
+ # messages in the partition.
523
561
  # @param [String] topic
524
562
  # Required. The topic for which we should compute the head cursor.
525
563
  # @param [Google::Apis::PubsubliteV1::ComputeHeadCursorRequest] compute_head_cursor_request_object
@@ -584,6 +622,40 @@ module Google
584
622
  command.query['quotaUser'] = quota_user unless quota_user.nil?
585
623
  execute_or_queue_command(command, &block)
586
624
  end
625
+
626
+ # Compute the corresponding cursor for a publish or event time in a topic
627
+ # partition.
628
+ # @param [String] topic
629
+ # Required. The topic for which we should compute the cursor.
630
+ # @param [Google::Apis::PubsubliteV1::ComputeTimeCursorRequest] compute_time_cursor_request_object
631
+ # @param [String] fields
632
+ # Selector specifying which fields to include in a partial response.
633
+ # @param [String] quota_user
634
+ # Available to use for quota purposes for server-side applications. Can be any
635
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
636
+ # @param [Google::Apis::RequestOptions] options
637
+ # Request-specific options
638
+ #
639
+ # @yield [result, err] Result & error if block supplied
640
+ # @yieldparam result [Google::Apis::PubsubliteV1::ComputeTimeCursorResponse] parsed result object
641
+ # @yieldparam err [StandardError] error object if request failed
642
+ #
643
+ # @return [Google::Apis::PubsubliteV1::ComputeTimeCursorResponse]
644
+ #
645
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
646
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
647
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
648
+ def compute_topic_time_cursor(topic, compute_time_cursor_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
649
+ command = make_simple_command(:post, 'v1/topicStats/{+topic}:computeTimeCursor', options)
650
+ command.request_representation = Google::Apis::PubsubliteV1::ComputeTimeCursorRequest::Representation
651
+ command.request_object = compute_time_cursor_request_object
652
+ command.response_representation = Google::Apis::PubsubliteV1::ComputeTimeCursorResponse::Representation
653
+ command.response_class = Google::Apis::PubsubliteV1::ComputeTimeCursorResponse
654
+ command.params['topic'] = topic unless topic.nil?
655
+ command.query['fields'] = fields unless fields.nil?
656
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
657
+ execute_or_queue_command(command, &block)
658
+ end
587
659
 
588
660
  protected
589
661
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-pubsublite_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-15 00:00:00.000000000 Z
11
+ date: 2021-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -52,7 +52,7 @@ licenses:
52
52
  metadata:
53
53
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
54
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-pubsublite_v1/CHANGELOG.md
55
- documentation_uri: https://googleapis.dev/ruby/google-apis-pubsublite_v1/v0.2.0
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-pubsublite_v1/v0.7.0
56
56
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-pubsublite_v1
57
57
  post_install_message:
58
58
  rdoc_options: []
@@ -62,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: '2.4'
65
+ version: '2.5'
66
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.2.6
72
+ rubygems_version: 3.2.17
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Simple REST client for Pub/Sub Lite API V1