google-cloud-pubsub 2.21.0 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c15b6a8127a10f5144ad00b65d9f68d9b9712258ee7f41d45fa3f642817510c9
4
- data.tar.gz: 65e672430dd2f4fe0ac933725c1de99203ec48b6905ada6396c7f3c03c0879b3
3
+ metadata.gz: 769d41360e1e561290f024664e2090b2a17322f0c7110bc31bb26d45f6a521d9
4
+ data.tar.gz: 340c7db4b5f7e27066bde07e838378c0c734738072363567d268b88657135a07
5
5
  SHA512:
6
- metadata.gz: 2450f89686a4a87e215bd0c8e162ce7eb5f0634721882023363cef6b2b91ecd7a06b4218ef97593b8dbcc01473f20091cb4384a3127f2af94ed2228f2bd39d92
7
- data.tar.gz: 5c84cf4a320c415ec122c2f3fdf061ab7637f13806b23d3adbf65ad1c459d6d126e875fd8dddcf508bcc5536c7b466f7b7434748413d603d6e7cedcc28652009
6
+ metadata.gz: c83de697da5723967ed3287d5256cb36ba6a6f010b9882f14893e016c3055772873fcb3dd6e47c89ed950c58ab16c6f1af89e11fb4974f21259233abeae39700
7
+ data.tar.gz: f1480d77dacda0b07cce8bb54ef8914014ef27b5371c8a6cf1ff204239485ea0822bc71ff18fe73a18769157d17a80b77a5ee1e48165d5624e3ff0fd2ecf4fb6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 2.22.0 (2025-03-27)
4
+
5
+ #### Features
6
+
7
+ * Support list schema revisions ([#29174](https://github.com/googleapis/google-cloud-ruby/issues/29174))
8
+
3
9
  ### 2.21.0 (2025-03-14)
4
10
 
5
11
  #### Features
@@ -241,6 +241,30 @@ module Google
241
241
  Schema.from_grpc grpc, service, view: @view
242
242
  end
243
243
 
244
+ ##
245
+ # Lists all schema revisions for the named schema.
246
+ #
247
+ # @param view [Symbol, String, nil] The set of fields to return in the response. Possible values:
248
+ # * `BASIC` - Include the `name` and `type` of the schema, but not the `definition`.
249
+ # * `FULL` - Include all Schema object fields.
250
+ #
251
+ # @return [Google::Cloud::PubSub::V1::ListSchemaRevisionsResponse]
252
+ #
253
+ # @example
254
+ # require "google/cloud/pubsub"
255
+ #
256
+ # pubsub = Google::Cloud::PubSub.new
257
+ #
258
+ # schema = pubsub.schema "my-schema"
259
+ # schema.list_revisions
260
+ #
261
+ def list_revisions view: nil, page_size: nil, page_token: nil
262
+ service.list_schema_revisions name,
263
+ view || @view,
264
+ page_size,
265
+ page_token
266
+ end
267
+
244
268
  ##
245
269
  # Determines whether the schema object was created without retrieving the
246
270
  # resource representation from the Pub/Sub service.
@@ -341,6 +341,21 @@ module Google
341
341
  paged_enum.response
342
342
  end
343
343
 
344
+ ##
345
+ # Lists all schema revisions for the named schema.
346
+ # @param name [String] The name of the schema to list revisions for.
347
+ # @param view [String, Symbol, nil] Possible values:
348
+ # * `BASIC` - Include the name and type of the schema, but not the definition.
349
+ # * `FULL` - Include all Schema object fields.
350
+ #
351
+ def list_schema_revisions name, view, page_size, page_token
352
+ schema_view = Google::Cloud::PubSub::V1::SchemaView.const_get view.to_s.upcase
353
+ schemas.list_schema_revisions name: name,
354
+ view: schema_view,
355
+ page_size: page_size,
356
+ page_token: page_token
357
+ end
358
+
344
359
  ##
345
360
  # Creates a schema in the current (or given) project.
346
361
  def create_schema schema_id, type, definition, options = {}
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module PubSub
19
- VERSION = "2.21.0".freeze
19
+ VERSION = "2.22.0".freeze
20
20
  end
21
21
 
22
22
  Pubsub = PubSub unless const_defined? :Pubsub
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-pubsub
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.21.0
4
+ version: 2.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
8
8
  - Chris Smith
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-14 00:00:00.000000000 Z
11
+ date: 2025-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby