google-apis-pubsub_v1 0.28.0 → 0.53.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.
@@ -32,6 +32,8 @@ module Google
32
32
  #
33
33
  # @see https://cloud.google.com/pubsub/docs
34
34
  class PubsubService < Google::Apis::Core::BaseService
35
+ DEFAULT_ENDPOINT_TEMPLATE = "https://pubsub.$UNIVERSE_DOMAIN$/"
36
+
35
37
  # @return [String]
36
38
  # API key. Your API key identifies your project and provides you with API access,
37
39
  # quota, and reports. Required unless you provide an OAuth 2.0 token.
@@ -43,12 +45,46 @@ module Google
43
45
  attr_accessor :quota_user
44
46
 
45
47
  def initialize
46
- super('https://pubsub.googleapis.com/', '',
48
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
47
49
  client_name: 'google-apis-pubsub_v1',
48
50
  client_version: Google::Apis::PubsubV1::GEM_VERSION)
49
51
  @batch_path = 'batch'
50
52
  end
51
53
 
54
+ # Commits a new schema revision to an existing schema.
55
+ # @param [String] name
56
+ # Required. The name of the schema we are revising. Format is `projects/`project`
57
+ # /schemas/`schema``.
58
+ # @param [Google::Apis::PubsubV1::CommitSchemaRequest] commit_schema_request_object
59
+ # @param [String] fields
60
+ # Selector specifying which fields to include in a partial response.
61
+ # @param [String] quota_user
62
+ # Available to use for quota purposes for server-side applications. Can be any
63
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
64
+ # @param [Google::Apis::RequestOptions] options
65
+ # Request-specific options
66
+ #
67
+ # @yield [result, err] Result & error if block supplied
68
+ # @yieldparam result [Google::Apis::PubsubV1::Schema] parsed result object
69
+ # @yieldparam err [StandardError] error object if request failed
70
+ #
71
+ # @return [Google::Apis::PubsubV1::Schema]
72
+ #
73
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
76
+ def commit_schema(name, commit_schema_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
77
+ command = make_simple_command(:post, 'v1/{+name}:commit', options)
78
+ command.request_representation = Google::Apis::PubsubV1::CommitSchemaRequest::Representation
79
+ command.request_object = commit_schema_request_object
80
+ command.response_representation = Google::Apis::PubsubV1::Schema::Representation
81
+ command.response_class = Google::Apis::PubsubV1::Schema
82
+ command.params['name'] = name unless name.nil?
83
+ command.query['fields'] = fields unless fields.nil?
84
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
85
+ execute_or_queue_command(command, &block)
86
+ end
87
+
52
88
  # Creates a schema.
53
89
  # @param [String] parent
54
90
  # Required. The name of the project in which to create the schema. Format is `
@@ -56,7 +92,7 @@ module Google
56
92
  # @param [Google::Apis::PubsubV1::Schema] schema_object
57
93
  # @param [String] schema_id
58
94
  # The ID to use for the schema, which will become the final component of the
59
- # schema's resource name. See https://cloud.google.com/pubsub/docs/admin#
95
+ # schema's resource name. See https://cloud.google.com/pubsub/docs/pubsub-basics#
60
96
  # resource_names for resource name constraints.
61
97
  # @param [String] fields
62
98
  # Selector specifying which fields to include in a partial response.
@@ -119,6 +155,41 @@ module Google
119
155
  execute_or_queue_command(command, &block)
120
156
  end
121
157
 
158
+ # Deletes a specific schema revision.
159
+ # @param [String] name
160
+ # Required. The name of the schema revision to be deleted, with a revision ID
161
+ # explicitly included. Example: `projects/123/schemas/my-schema@c7cfa2a8`
162
+ # @param [String] revision_id
163
+ # Optional. This field is deprecated and should not be used for specifying the
164
+ # revision ID. The revision ID should be specified via the `name` parameter.
165
+ # @param [String] fields
166
+ # Selector specifying which fields to include in a partial response.
167
+ # @param [String] quota_user
168
+ # Available to use for quota purposes for server-side applications. Can be any
169
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
170
+ # @param [Google::Apis::RequestOptions] options
171
+ # Request-specific options
172
+ #
173
+ # @yield [result, err] Result & error if block supplied
174
+ # @yieldparam result [Google::Apis::PubsubV1::Schema] parsed result object
175
+ # @yieldparam err [StandardError] error object if request failed
176
+ #
177
+ # @return [Google::Apis::PubsubV1::Schema]
178
+ #
179
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
180
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
181
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
182
+ def delete_project_schema_revision(name, revision_id: nil, fields: nil, quota_user: nil, options: nil, &block)
183
+ command = make_simple_command(:delete, 'v1/{+name}:deleteRevision', options)
184
+ command.response_representation = Google::Apis::PubsubV1::Schema::Representation
185
+ command.response_class = Google::Apis::PubsubV1::Schema
186
+ command.params['name'] = name unless name.nil?
187
+ command.query['revisionId'] = revision_id unless revision_id.nil?
188
+ command.query['fields'] = fields unless fields.nil?
189
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
190
+ execute_or_queue_command(command, &block)
191
+ end
192
+
122
193
  # Gets a schema.
123
194
  # @param [String] name
124
195
  # Required. The name of the schema to get. Format is `projects/`project`/schemas/
@@ -243,6 +314,81 @@ module Google
243
314
  execute_or_queue_command(command, &block)
244
315
  end
245
316
 
317
+ # Lists all schema revisions for the named schema.
318
+ # @param [String] name
319
+ # Required. The name of the schema to list revisions for.
320
+ # @param [Fixnum] page_size
321
+ # The maximum number of revisions to return per page.
322
+ # @param [String] page_token
323
+ # The page token, received from a previous ListSchemaRevisions call. Provide
324
+ # this to retrieve the subsequent page.
325
+ # @param [String] view
326
+ # The set of Schema fields to return in the response. If not set, returns
327
+ # Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
328
+ # retrieve all fields.
329
+ # @param [String] fields
330
+ # Selector specifying which fields to include in a partial response.
331
+ # @param [String] quota_user
332
+ # Available to use for quota purposes for server-side applications. Can be any
333
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
334
+ # @param [Google::Apis::RequestOptions] options
335
+ # Request-specific options
336
+ #
337
+ # @yield [result, err] Result & error if block supplied
338
+ # @yieldparam result [Google::Apis::PubsubV1::ListSchemaRevisionsResponse] parsed result object
339
+ # @yieldparam err [StandardError] error object if request failed
340
+ #
341
+ # @return [Google::Apis::PubsubV1::ListSchemaRevisionsResponse]
342
+ #
343
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
344
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
345
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
346
+ def list_project_schema_revisions(name, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
347
+ command = make_simple_command(:get, 'v1/{+name}:listRevisions', options)
348
+ command.response_representation = Google::Apis::PubsubV1::ListSchemaRevisionsResponse::Representation
349
+ command.response_class = Google::Apis::PubsubV1::ListSchemaRevisionsResponse
350
+ command.params['name'] = name unless name.nil?
351
+ command.query['pageSize'] = page_size unless page_size.nil?
352
+ command.query['pageToken'] = page_token unless page_token.nil?
353
+ command.query['view'] = view unless view.nil?
354
+ command.query['fields'] = fields unless fields.nil?
355
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
356
+ execute_or_queue_command(command, &block)
357
+ end
358
+
359
+ # Creates a new schema revision that is a copy of the provided revision_id.
360
+ # @param [String] name
361
+ # Required. The schema being rolled back with revision id.
362
+ # @param [Google::Apis::PubsubV1::RollbackSchemaRequest] rollback_schema_request_object
363
+ # @param [String] fields
364
+ # Selector specifying which fields to include in a partial response.
365
+ # @param [String] quota_user
366
+ # Available to use for quota purposes for server-side applications. Can be any
367
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
368
+ # @param [Google::Apis::RequestOptions] options
369
+ # Request-specific options
370
+ #
371
+ # @yield [result, err] Result & error if block supplied
372
+ # @yieldparam result [Google::Apis::PubsubV1::Schema] parsed result object
373
+ # @yieldparam err [StandardError] error object if request failed
374
+ #
375
+ # @return [Google::Apis::PubsubV1::Schema]
376
+ #
377
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
378
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
379
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
380
+ def rollback_schema(name, rollback_schema_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
381
+ command = make_simple_command(:post, 'v1/{+name}:rollback', options)
382
+ command.request_representation = Google::Apis::PubsubV1::RollbackSchemaRequest::Representation
383
+ command.request_object = rollback_schema_request_object
384
+ command.response_representation = Google::Apis::PubsubV1::Schema::Representation
385
+ command.response_class = Google::Apis::PubsubV1::Schema
386
+ command.params['name'] = name unless name.nil?
387
+ command.query['fields'] = fields unless fields.nil?
388
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
389
+ execute_or_queue_command(command, &block)
390
+ end
391
+
246
392
  # Sets the access control policy on the specified resource. Replaces any
247
393
  # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
248
394
  # PERMISSION_DENIED` errors.
@@ -398,15 +544,17 @@ module Google
398
544
  # returned. See also the `Snapshot.expire_time` field. If the name is not
399
545
  # provided in the request, the server will assign a random name for this
400
546
  # snapshot on the same project as the subscription, conforming to the [resource
401
- # name format] (https://cloud.google.com/pubsub/docs/admin#resource_names). The
402
- # generated name is populated in the returned Snapshot object. Note that for
403
- # REST API requests, you must specify a name in the request.
547
+ # name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#
548
+ # resource_names). The generated name is populated in the returned Snapshot
549
+ # object. Note that for REST API requests, you must specify a name in the
550
+ # request.
404
551
  # @param [String] name
405
552
  # Required. User-provided name for this snapshot. If the name is not provided in
406
553
  # the request, the server will assign a random name for this snapshot on the
407
554
  # same project as the subscription. Note that for REST API requests, you must
408
555
  # specify a name. See the [resource name rules](https://cloud.google.com/pubsub/
409
- # docs/admin#resource_names). Format is `projects/`project`/snapshots/`snap``.
556
+ # docs/pubsub-basics#resource_names). Format is `projects/`project`/snapshots/`
557
+ # snap``.
410
558
  # @param [Google::Apis::PubsubV1::CreateSnapshotRequest] create_snapshot_request_object
411
559
  # @param [String] fields
412
560
  # Selector specifying which fields to include in a partial response.
@@ -563,11 +711,11 @@ module Google
563
711
  # Required. The name of the project in which to list snapshots. Format is `
564
712
  # projects/`project-id``.
565
713
  # @param [Fixnum] page_size
566
- # Maximum number of snapshots to return.
714
+ # Optional. Maximum number of snapshots to return.
567
715
  # @param [String] page_token
568
- # The value returned by the last `ListSnapshotsResponse`; indicates that this is
569
- # a continuation of a prior `ListSnapshots` call, and that the system should
570
- # return the next page of data.
716
+ # Optional. The value returned by the last `ListSnapshotsResponse`; indicates
717
+ # that this is a continuation of a prior `ListSnapshots` call, and that the
718
+ # system should return the next page of data.
571
719
  # @param [String] fields
572
720
  # Selector specifying which fields to include in a partial response.
573
721
  # @param [String] quota_user
@@ -597,12 +745,13 @@ module Google
597
745
  execute_or_queue_command(command, &block)
598
746
  end
599
747
 
600
- # Updates an existing snapshot. Snapshots are used in [Seek](https://cloud.
601
- # google.com/pubsub/docs/replay-overview) operations, which allow you to manage
602
- # message acknowledgments in bulk. That is, you can set the acknowledgment state
603
- # of messages in an existing subscription to the state captured by a snapshot.
748
+ # Updates an existing snapshot by updating the fields specified in the update
749
+ # mask. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-
750
+ # overview) operations, which allow you to manage message acknowledgments in
751
+ # bulk. That is, you can set the acknowledgment state of messages in an existing
752
+ # subscription to the state captured by a snapshot.
604
753
  # @param [String] name
605
- # The name of the snapshot.
754
+ # Optional. The name of the snapshot.
606
755
  # @param [Google::Apis::PubsubV1::UpdateSnapshotRequest] update_snapshot_request_object
607
756
  # @param [String] fields
608
757
  # Selector specifying which fields to include in a partial response.
@@ -748,14 +897,14 @@ module Google
748
897
  end
749
898
 
750
899
  # Creates a subscription to a given topic. See the [resource name rules] (https:/
751
- # /cloud.google.com/pubsub/docs/admin#resource_names). If the subscription
752
- # already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't
753
- # exist, returns `NOT_FOUND`. If the name is not provided in the request, the
754
- # server will assign a random name for this subscription on the same project as
755
- # the topic, conforming to the [resource name format] (https://cloud.google.com/
756
- # pubsub/docs/admin#resource_names). The generated name is populated in the
757
- # returned Subscription object. Note that for REST API requests, you must
758
- # specify a name in the request.
900
+ # /cloud.google.com/pubsub/docs/pubsub-basics#resource_names). If the
901
+ # subscription already exists, returns `ALREADY_EXISTS`. If the corresponding
902
+ # topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the
903
+ # request, the server will assign a random name for this subscription on the
904
+ # same project as the topic, conforming to the [resource name format] (https://
905
+ # cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name
906
+ # is populated in the returned Subscription object. Note that for REST API
907
+ # requests, you must specify a name in the request.
759
908
  # @param [String] name
760
909
  # Required. The name of the subscription. It must have the format `"projects/`
761
910
  # project`/subscriptions/`subscription`"`. ``subscription`` must start with a
@@ -943,11 +1092,11 @@ module Google
943
1092
  # Required. The name of the project in which to list subscriptions. Format is `
944
1093
  # projects/`project-id``.
945
1094
  # @param [Fixnum] page_size
946
- # Maximum number of subscriptions to return.
1095
+ # Optional. Maximum number of subscriptions to return.
947
1096
  # @param [String] page_token
948
- # The value returned by the last `ListSubscriptionsResponse`; indicates that
949
- # this is a continuation of a prior `ListSubscriptions` call, and that the
950
- # system should return the next page of data.
1097
+ # Optional. The value returned by the last `ListSubscriptionsResponse`;
1098
+ # indicates that this is a continuation of a prior `ListSubscriptions` call, and
1099
+ # that the system should return the next page of data.
951
1100
  # @param [String] fields
952
1101
  # Selector specifying which fields to include in a partial response.
953
1102
  # @param [String] quota_user
@@ -1053,8 +1202,9 @@ module Google
1053
1202
  execute_or_queue_command(command, &block)
1054
1203
  end
1055
1204
 
1056
- # Updates an existing subscription. Note that certain properties of a
1057
- # subscription, such as its topic, are not modifiable.
1205
+ # Updates an existing subscription by updating the fields specified in the
1206
+ # update mask. Note that certain properties of a subscription, such as its topic,
1207
+ # are not modifiable.
1058
1208
  # @param [String] name
1059
1209
  # Required. The name of the subscription. It must have the format `"projects/`
1060
1210
  # project`/subscriptions/`subscription`"`. ``subscription`` must start with a
@@ -1242,7 +1392,7 @@ module Google
1242
1392
  end
1243
1393
 
1244
1394
  # Creates the given topic with the given name. See the [resource name rules] (
1245
- # https://cloud.google.com/pubsub/docs/admin#resource_names).
1395
+ # https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
1246
1396
  # @param [String] name
1247
1397
  # Required. The name of the topic. It must have the format `"projects/`project`/
1248
1398
  # topics/`topic`"`. ``topic`` must start with a letter, and contain only letters
@@ -1395,11 +1545,11 @@ module Google
1395
1545
  # Required. The name of the project in which to list topics. Format is `projects/
1396
1546
  # `project-id``.
1397
1547
  # @param [Fixnum] page_size
1398
- # Maximum number of topics to return.
1548
+ # Optional. Maximum number of topics to return.
1399
1549
  # @param [String] page_token
1400
- # The value returned by the last `ListTopicsResponse`; indicates that this is a
1401
- # continuation of a prior `ListTopics` call, and that the system should return
1402
- # the next page of data.
1550
+ # Optional. The value returned by the last `ListTopicsResponse`; indicates that
1551
+ # this is a continuation of a prior `ListTopics` call, and that the system
1552
+ # should return the next page of data.
1403
1553
  # @param [String] fields
1404
1554
  # Selector specifying which fields to include in a partial response.
1405
1555
  # @param [String] quota_user
@@ -1429,8 +1579,8 @@ module Google
1429
1579
  execute_or_queue_command(command, &block)
1430
1580
  end
1431
1581
 
1432
- # Updates an existing topic. Note that certain properties of a topic are not
1433
- # modifiable.
1582
+ # Updates an existing topic by updating the fields specified in the update mask.
1583
+ # Note that certain properties of a topic are not modifiable.
1434
1584
  # @param [String] name
1435
1585
  # Required. The name of the topic. It must have the format `"projects/`project`/
1436
1586
  # topics/`topic`"`. ``topic`` must start with a letter, and contain only letters
@@ -1587,11 +1737,11 @@ module Google
1587
1737
  # Required. The name of the topic that snapshots are attached to. Format is `
1588
1738
  # projects/`project`/topics/`topic``.
1589
1739
  # @param [Fixnum] page_size
1590
- # Maximum number of snapshot names to return.
1740
+ # Optional. Maximum number of snapshot names to return.
1591
1741
  # @param [String] page_token
1592
- # The value returned by the last `ListTopicSnapshotsResponse`; indicates that
1593
- # this is a continuation of a prior `ListTopicSnapshots` call, and that the
1594
- # system should return the next page of data.
1742
+ # Optional. The value returned by the last `ListTopicSnapshotsResponse`;
1743
+ # indicates that this is a continuation of a prior `ListTopicSnapshots` call,
1744
+ # and that the system should return the next page of data.
1595
1745
  # @param [String] fields
1596
1746
  # Selector specifying which fields to include in a partial response.
1597
1747
  # @param [String] quota_user
@@ -1626,11 +1776,11 @@ module Google
1626
1776
  # Required. The name of the topic that subscriptions are attached to. Format is `
1627
1777
  # projects/`project`/topics/`topic``.
1628
1778
  # @param [Fixnum] page_size
1629
- # Maximum number of subscription names to return.
1779
+ # Optional. Maximum number of subscription names to return.
1630
1780
  # @param [String] page_token
1631
- # The value returned by the last `ListTopicSubscriptionsResponse`; indicates
1632
- # that this is a continuation of a prior `ListTopicSubscriptions` call, and that
1633
- # the system should return the next page of data.
1781
+ # Optional. The value returned by the last `ListTopicSubscriptionsResponse`;
1782
+ # indicates that this is a continuation of a prior `ListTopicSubscriptions` call,
1783
+ # and that the system should return the next page of data.
1634
1784
  # @param [String] fields
1635
1785
  # Selector specifying which fields to include in a partial response.
1636
1786
  # @param [String] quota_user
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-pubsub_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.53.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: 2022-09-19 00:00:00.000000000 Z
11
+ date: 2024-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.2
19
+ version: 0.15.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.7.2
29
+ version: 0.15.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-pubsub_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-pubsub_v1/v0.28.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-pubsub_v1/v0.53.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-pubsub_v1
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -68,14 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: '2.5'
71
+ version: '2.7'
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.3.14
78
+ rubygems_version: 3.5.6
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Cloud Pub/Sub API V1