google-apis-pubsub_v1 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/google/apis/pubsub_v1/classes.rb +176 -0
- data/lib/google/apis/pubsub_v1/gem_version.rb +3 -3
- data/lib/google/apis/pubsub_v1/representations.rb +101 -0
- data/lib/google/apis/pubsub_v1/service.rb +217 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68ea4f04d659dc05ccbad6c6a277da0af285f7b751bf48825a24ca3ef3a042ad
|
4
|
+
data.tar.gz: 13c50dd1967eb63f3413dcb6787a9b779670feaec46292f63f6085d04d153da6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e55a08d0d35b902345e682e680e3f223c585eb27264b4319ddfcc752caf93798b757b7f437d0bdaeae442169605a4b6161ec42eb38cfeabf7c8f611913df4c1d
|
7
|
+
data.tar.gz: b6bd2d0123720cb53d8683516d972526386701db74dc339dbaaf49f8849c060282181f0fbcc3eb2b1c01dafb8fba4d3f79b78404539a3977b28a8fb86861cfc8
|
data/CHANGELOG.md
CHANGED
@@ -292,6 +292,32 @@ module Google
|
|
292
292
|
end
|
293
293
|
end
|
294
294
|
|
295
|
+
# Response for the `ListSchemas` method.
|
296
|
+
class ListSchemasResponse
|
297
|
+
include Google::Apis::Core::Hashable
|
298
|
+
|
299
|
+
# If not empty, indicates that there may be more schemas that match the request;
|
300
|
+
# this value should be passed in a new `ListSchemasRequest`.
|
301
|
+
# Corresponds to the JSON property `nextPageToken`
|
302
|
+
# @return [String]
|
303
|
+
attr_accessor :next_page_token
|
304
|
+
|
305
|
+
# The resulting schemas.
|
306
|
+
# Corresponds to the JSON property `schemas`
|
307
|
+
# @return [Array<Google::Apis::PubsubV1::Schema>]
|
308
|
+
attr_accessor :schemas
|
309
|
+
|
310
|
+
def initialize(**args)
|
311
|
+
update!(**args)
|
312
|
+
end
|
313
|
+
|
314
|
+
# Update properties of this object
|
315
|
+
def update!(**args)
|
316
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
317
|
+
@schemas = args[:schemas] if args.key?(:schemas)
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
295
321
|
# Response for the `ListSnapshots` method.
|
296
322
|
class ListSnapshotsResponse
|
297
323
|
include Google::Apis::Core::Hashable
|
@@ -898,6 +924,66 @@ module Google
|
|
898
924
|
end
|
899
925
|
end
|
900
926
|
|
927
|
+
# A schema resource.
|
928
|
+
class Schema
|
929
|
+
include Google::Apis::Core::Hashable
|
930
|
+
|
931
|
+
# The definition of the schema. This should contain a string representing the
|
932
|
+
# full definition of the schema that is a valid schema definition of the type
|
933
|
+
# specified in `type`.
|
934
|
+
# Corresponds to the JSON property `definition`
|
935
|
+
# @return [String]
|
936
|
+
attr_accessor :definition
|
937
|
+
|
938
|
+
# Required. Name of the schema. Format is `projects/`project`/schemas/`schema``.
|
939
|
+
# Corresponds to the JSON property `name`
|
940
|
+
# @return [String]
|
941
|
+
attr_accessor :name
|
942
|
+
|
943
|
+
# The type of the schema definition.
|
944
|
+
# Corresponds to the JSON property `type`
|
945
|
+
# @return [String]
|
946
|
+
attr_accessor :type
|
947
|
+
|
948
|
+
def initialize(**args)
|
949
|
+
update!(**args)
|
950
|
+
end
|
951
|
+
|
952
|
+
# Update properties of this object
|
953
|
+
def update!(**args)
|
954
|
+
@definition = args[:definition] if args.key?(:definition)
|
955
|
+
@name = args[:name] if args.key?(:name)
|
956
|
+
@type = args[:type] if args.key?(:type)
|
957
|
+
end
|
958
|
+
end
|
959
|
+
|
960
|
+
# Settings for validating messages published against a schema.
|
961
|
+
class SchemaSettings
|
962
|
+
include Google::Apis::Core::Hashable
|
963
|
+
|
964
|
+
# The encoding of messages validated against `schema`.
|
965
|
+
# Corresponds to the JSON property `encoding`
|
966
|
+
# @return [String]
|
967
|
+
attr_accessor :encoding
|
968
|
+
|
969
|
+
# Required. The name of the schema that messages published should be validated
|
970
|
+
# against. Format is `projects/`project`/schemas/`schema``. The value of this
|
971
|
+
# field will be `_deleted-schema_` if the schema has been deleted.
|
972
|
+
# Corresponds to the JSON property `schema`
|
973
|
+
# @return [String]
|
974
|
+
attr_accessor :schema
|
975
|
+
|
976
|
+
def initialize(**args)
|
977
|
+
update!(**args)
|
978
|
+
end
|
979
|
+
|
980
|
+
# Update properties of this object
|
981
|
+
def update!(**args)
|
982
|
+
@encoding = args[:encoding] if args.key?(:encoding)
|
983
|
+
@schema = args[:schema] if args.key?(:schema)
|
984
|
+
end
|
985
|
+
end
|
986
|
+
|
901
987
|
# Request for the `Seek` method.
|
902
988
|
class SeekRequest
|
903
989
|
include Google::Apis::Core::Hashable
|
@@ -1260,6 +1346,11 @@ module Google
|
|
1260
1346
|
attr_accessor :satisfies_pzs
|
1261
1347
|
alias_method :satisfies_pzs?, :satisfies_pzs
|
1262
1348
|
|
1349
|
+
# Settings for validating messages published against a schema.
|
1350
|
+
# Corresponds to the JSON property `schemaSettings`
|
1351
|
+
# @return [Google::Apis::PubsubV1::SchemaSettings]
|
1352
|
+
attr_accessor :schema_settings
|
1353
|
+
|
1263
1354
|
def initialize(**args)
|
1264
1355
|
update!(**args)
|
1265
1356
|
end
|
@@ -1271,6 +1362,7 @@ module Google
|
|
1271
1362
|
@message_storage_policy = args[:message_storage_policy] if args.key?(:message_storage_policy)
|
1272
1363
|
@name = args[:name] if args.key?(:name)
|
1273
1364
|
@satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
|
1365
|
+
@schema_settings = args[:schema_settings] if args.key?(:schema_settings)
|
1274
1366
|
end
|
1275
1367
|
end
|
1276
1368
|
|
@@ -1357,6 +1449,90 @@ module Google
|
|
1357
1449
|
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
1358
1450
|
end
|
1359
1451
|
end
|
1452
|
+
|
1453
|
+
# Request for the `ValidateMessage` method.
|
1454
|
+
class ValidateMessageRequest
|
1455
|
+
include Google::Apis::Core::Hashable
|
1456
|
+
|
1457
|
+
# The encoding expected for messages
|
1458
|
+
# Corresponds to the JSON property `encoding`
|
1459
|
+
# @return [String]
|
1460
|
+
attr_accessor :encoding
|
1461
|
+
|
1462
|
+
# Message to validate against the provided `schema_spec`.
|
1463
|
+
# Corresponds to the JSON property `message`
|
1464
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1465
|
+
# @return [String]
|
1466
|
+
attr_accessor :message
|
1467
|
+
|
1468
|
+
# Name of the schema against which to validate. Format is `projects/`project`/
|
1469
|
+
# schemas/`schema``.
|
1470
|
+
# Corresponds to the JSON property `name`
|
1471
|
+
# @return [String]
|
1472
|
+
attr_accessor :name
|
1473
|
+
|
1474
|
+
# A schema resource.
|
1475
|
+
# Corresponds to the JSON property `schema`
|
1476
|
+
# @return [Google::Apis::PubsubV1::Schema]
|
1477
|
+
attr_accessor :schema
|
1478
|
+
|
1479
|
+
def initialize(**args)
|
1480
|
+
update!(**args)
|
1481
|
+
end
|
1482
|
+
|
1483
|
+
# Update properties of this object
|
1484
|
+
def update!(**args)
|
1485
|
+
@encoding = args[:encoding] if args.key?(:encoding)
|
1486
|
+
@message = args[:message] if args.key?(:message)
|
1487
|
+
@name = args[:name] if args.key?(:name)
|
1488
|
+
@schema = args[:schema] if args.key?(:schema)
|
1489
|
+
end
|
1490
|
+
end
|
1491
|
+
|
1492
|
+
# Response for the `ValidateMessage` method. Empty for now.
|
1493
|
+
class ValidateMessageResponse
|
1494
|
+
include Google::Apis::Core::Hashable
|
1495
|
+
|
1496
|
+
def initialize(**args)
|
1497
|
+
update!(**args)
|
1498
|
+
end
|
1499
|
+
|
1500
|
+
# Update properties of this object
|
1501
|
+
def update!(**args)
|
1502
|
+
end
|
1503
|
+
end
|
1504
|
+
|
1505
|
+
# Request for the `ValidateSchema` method.
|
1506
|
+
class ValidateSchemaRequest
|
1507
|
+
include Google::Apis::Core::Hashable
|
1508
|
+
|
1509
|
+
# A schema resource.
|
1510
|
+
# Corresponds to the JSON property `schema`
|
1511
|
+
# @return [Google::Apis::PubsubV1::Schema]
|
1512
|
+
attr_accessor :schema
|
1513
|
+
|
1514
|
+
def initialize(**args)
|
1515
|
+
update!(**args)
|
1516
|
+
end
|
1517
|
+
|
1518
|
+
# Update properties of this object
|
1519
|
+
def update!(**args)
|
1520
|
+
@schema = args[:schema] if args.key?(:schema)
|
1521
|
+
end
|
1522
|
+
end
|
1523
|
+
|
1524
|
+
# Response for the `ValidateSchema` method. Empty for now.
|
1525
|
+
class ValidateSchemaResponse
|
1526
|
+
include Google::Apis::Core::Hashable
|
1527
|
+
|
1528
|
+
def initialize(**args)
|
1529
|
+
update!(**args)
|
1530
|
+
end
|
1531
|
+
|
1532
|
+
# Update properties of this object
|
1533
|
+
def update!(**args)
|
1534
|
+
end
|
1535
|
+
end
|
1360
1536
|
end
|
1361
1537
|
end
|
1362
1538
|
end
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module PubsubV1
|
18
18
|
# Version of the google-apis-pubsub_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.2.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.1.
|
22
|
+
GENERATOR_VERSION = "0.1.2"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20210208"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -70,6 +70,12 @@ module Google
|
|
70
70
|
include Google::Apis::Core::JsonObjectSupport
|
71
71
|
end
|
72
72
|
|
73
|
+
class ListSchemasResponse
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
73
79
|
class ListSnapshotsResponse
|
74
80
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
81
|
|
@@ -178,6 +184,18 @@ module Google
|
|
178
184
|
include Google::Apis::Core::JsonObjectSupport
|
179
185
|
end
|
180
186
|
|
187
|
+
class Schema
|
188
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
189
|
+
|
190
|
+
include Google::Apis::Core::JsonObjectSupport
|
191
|
+
end
|
192
|
+
|
193
|
+
class SchemaSettings
|
194
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
195
|
+
|
196
|
+
include Google::Apis::Core::JsonObjectSupport
|
197
|
+
end
|
198
|
+
|
181
199
|
class SeekRequest
|
182
200
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
183
201
|
|
@@ -244,6 +262,30 @@ module Google
|
|
244
262
|
include Google::Apis::Core::JsonObjectSupport
|
245
263
|
end
|
246
264
|
|
265
|
+
class ValidateMessageRequest
|
266
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
267
|
+
|
268
|
+
include Google::Apis::Core::JsonObjectSupport
|
269
|
+
end
|
270
|
+
|
271
|
+
class ValidateMessageResponse
|
272
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
273
|
+
|
274
|
+
include Google::Apis::Core::JsonObjectSupport
|
275
|
+
end
|
276
|
+
|
277
|
+
class ValidateSchemaRequest
|
278
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
279
|
+
|
280
|
+
include Google::Apis::Core::JsonObjectSupport
|
281
|
+
end
|
282
|
+
|
283
|
+
class ValidateSchemaResponse
|
284
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
285
|
+
|
286
|
+
include Google::Apis::Core::JsonObjectSupport
|
287
|
+
end
|
288
|
+
|
247
289
|
class AcknowledgeRequest
|
248
290
|
# @private
|
249
291
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -306,6 +348,15 @@ module Google
|
|
306
348
|
end
|
307
349
|
end
|
308
350
|
|
351
|
+
class ListSchemasResponse
|
352
|
+
# @private
|
353
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
354
|
+
property :next_page_token, as: 'nextPageToken'
|
355
|
+
collection :schemas, as: 'schemas', class: Google::Apis::PubsubV1::Schema, decorator: Google::Apis::PubsubV1::Schema::Representation
|
356
|
+
|
357
|
+
end
|
358
|
+
end
|
359
|
+
|
309
360
|
class ListSnapshotsResponse
|
310
361
|
# @private
|
311
362
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -460,6 +511,23 @@ module Google
|
|
460
511
|
end
|
461
512
|
end
|
462
513
|
|
514
|
+
class Schema
|
515
|
+
# @private
|
516
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
517
|
+
property :definition, as: 'definition'
|
518
|
+
property :name, as: 'name'
|
519
|
+
property :type, as: 'type'
|
520
|
+
end
|
521
|
+
end
|
522
|
+
|
523
|
+
class SchemaSettings
|
524
|
+
# @private
|
525
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
526
|
+
property :encoding, as: 'encoding'
|
527
|
+
property :schema, as: 'schema'
|
528
|
+
end
|
529
|
+
end
|
530
|
+
|
463
531
|
class SeekRequest
|
464
532
|
# @private
|
465
533
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -538,6 +606,8 @@ module Google
|
|
538
606
|
|
539
607
|
property :name, as: 'name'
|
540
608
|
property :satisfies_pzs, as: 'satisfiesPzs'
|
609
|
+
property :schema_settings, as: 'schemaSettings', class: Google::Apis::PubsubV1::SchemaSettings, decorator: Google::Apis::PubsubV1::SchemaSettings::Representation
|
610
|
+
|
541
611
|
end
|
542
612
|
end
|
543
613
|
|
@@ -567,6 +637,37 @@ module Google
|
|
567
637
|
property :update_mask, as: 'updateMask'
|
568
638
|
end
|
569
639
|
end
|
640
|
+
|
641
|
+
class ValidateMessageRequest
|
642
|
+
# @private
|
643
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
644
|
+
property :encoding, as: 'encoding'
|
645
|
+
property :message, :base64 => true, as: 'message'
|
646
|
+
property :name, as: 'name'
|
647
|
+
property :schema, as: 'schema', class: Google::Apis::PubsubV1::Schema, decorator: Google::Apis::PubsubV1::Schema::Representation
|
648
|
+
|
649
|
+
end
|
650
|
+
end
|
651
|
+
|
652
|
+
class ValidateMessageResponse
|
653
|
+
# @private
|
654
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
655
|
+
end
|
656
|
+
end
|
657
|
+
|
658
|
+
class ValidateSchemaRequest
|
659
|
+
# @private
|
660
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
661
|
+
property :schema, as: 'schema', class: Google::Apis::PubsubV1::Schema, decorator: Google::Apis::PubsubV1::Schema::Representation
|
662
|
+
|
663
|
+
end
|
664
|
+
end
|
665
|
+
|
666
|
+
class ValidateSchemaResponse
|
667
|
+
# @private
|
668
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
669
|
+
end
|
670
|
+
end
|
570
671
|
end
|
571
672
|
end
|
572
673
|
end
|
@@ -49,6 +49,223 @@ module Google
|
|
49
49
|
@batch_path = 'batch'
|
50
50
|
end
|
51
51
|
|
52
|
+
# Creates a schema.
|
53
|
+
# @param [String] parent
|
54
|
+
# Required. The name of the project in which to create the schema. Format is `
|
55
|
+
# projects/`project-id``.
|
56
|
+
# @param [Google::Apis::PubsubV1::Schema] schema_object
|
57
|
+
# @param [String] schema_id
|
58
|
+
# 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#
|
60
|
+
# resource_names for resource name constraints.
|
61
|
+
# @param [String] fields
|
62
|
+
# Selector specifying which fields to include in a partial response.
|
63
|
+
# @param [String] quota_user
|
64
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
65
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
66
|
+
# @param [Google::Apis::RequestOptions] options
|
67
|
+
# Request-specific options
|
68
|
+
#
|
69
|
+
# @yield [result, err] Result & error if block supplied
|
70
|
+
# @yieldparam result [Google::Apis::PubsubV1::Schema] parsed result object
|
71
|
+
# @yieldparam err [StandardError] error object if request failed
|
72
|
+
#
|
73
|
+
# @return [Google::Apis::PubsubV1::Schema]
|
74
|
+
#
|
75
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
76
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
77
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
78
|
+
def create_project_schema(parent, schema_object = nil, schema_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
79
|
+
command = make_simple_command(:post, 'v1/{+parent}/schemas', options)
|
80
|
+
command.request_representation = Google::Apis::PubsubV1::Schema::Representation
|
81
|
+
command.request_object = schema_object
|
82
|
+
command.response_representation = Google::Apis::PubsubV1::Schema::Representation
|
83
|
+
command.response_class = Google::Apis::PubsubV1::Schema
|
84
|
+
command.params['parent'] = parent unless parent.nil?
|
85
|
+
command.query['schemaId'] = schema_id unless schema_id.nil?
|
86
|
+
command.query['fields'] = fields unless fields.nil?
|
87
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
88
|
+
execute_or_queue_command(command, &block)
|
89
|
+
end
|
90
|
+
|
91
|
+
# Deletes a schema.
|
92
|
+
# @param [String] name
|
93
|
+
# Required. Name of the schema to delete. Format is `projects/`project`/schemas/`
|
94
|
+
# schema``.
|
95
|
+
# @param [String] fields
|
96
|
+
# Selector specifying which fields to include in a partial response.
|
97
|
+
# @param [String] quota_user
|
98
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
99
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
100
|
+
# @param [Google::Apis::RequestOptions] options
|
101
|
+
# Request-specific options
|
102
|
+
#
|
103
|
+
# @yield [result, err] Result & error if block supplied
|
104
|
+
# @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object
|
105
|
+
# @yieldparam err [StandardError] error object if request failed
|
106
|
+
#
|
107
|
+
# @return [Google::Apis::PubsubV1::Empty]
|
108
|
+
#
|
109
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
110
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
111
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
112
|
+
def delete_project_schema(name, fields: nil, quota_user: nil, options: nil, &block)
|
113
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
114
|
+
command.response_representation = Google::Apis::PubsubV1::Empty::Representation
|
115
|
+
command.response_class = Google::Apis::PubsubV1::Empty
|
116
|
+
command.params['name'] = name unless name.nil?
|
117
|
+
command.query['fields'] = fields unless fields.nil?
|
118
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
119
|
+
execute_or_queue_command(command, &block)
|
120
|
+
end
|
121
|
+
|
122
|
+
# Gets a schema.
|
123
|
+
# @param [String] name
|
124
|
+
# Required. The name of the schema to get. Format is `projects/`project`/schemas/
|
125
|
+
# `schema``.
|
126
|
+
# @param [String] view
|
127
|
+
# The set of fields to return in the response. If not set, returns a Schema with
|
128
|
+
# `name` and `type`, but not `definition`. Set to `FULL` to retrieve all fields.
|
129
|
+
# @param [String] fields
|
130
|
+
# Selector specifying which fields to include in a partial response.
|
131
|
+
# @param [String] quota_user
|
132
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
133
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
134
|
+
# @param [Google::Apis::RequestOptions] options
|
135
|
+
# Request-specific options
|
136
|
+
#
|
137
|
+
# @yield [result, err] Result & error if block supplied
|
138
|
+
# @yieldparam result [Google::Apis::PubsubV1::Schema] parsed result object
|
139
|
+
# @yieldparam err [StandardError] error object if request failed
|
140
|
+
#
|
141
|
+
# @return [Google::Apis::PubsubV1::Schema]
|
142
|
+
#
|
143
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
144
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
145
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
146
|
+
def get_project_schema(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
147
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
148
|
+
command.response_representation = Google::Apis::PubsubV1::Schema::Representation
|
149
|
+
command.response_class = Google::Apis::PubsubV1::Schema
|
150
|
+
command.params['name'] = name unless name.nil?
|
151
|
+
command.query['view'] = view unless view.nil?
|
152
|
+
command.query['fields'] = fields unless fields.nil?
|
153
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
154
|
+
execute_or_queue_command(command, &block)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Lists schemas in a project.
|
158
|
+
# @param [String] parent
|
159
|
+
# Required. The name of the project in which to list schemas. Format is `
|
160
|
+
# projects/`project-id``.
|
161
|
+
# @param [Fixnum] page_size
|
162
|
+
# Maximum number of schemas to return.
|
163
|
+
# @param [String] page_token
|
164
|
+
# The value returned by the last `ListSchemasResponse`; indicates that this is a
|
165
|
+
# continuation of a prior `ListSchemas` call, and that the system should return
|
166
|
+
# the next page of data.
|
167
|
+
# @param [String] view
|
168
|
+
# The set of Schema fields to return in the response. If not set, returns
|
169
|
+
# Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
|
170
|
+
# retrieve all fields.
|
171
|
+
# @param [String] fields
|
172
|
+
# Selector specifying which fields to include in a partial response.
|
173
|
+
# @param [String] quota_user
|
174
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
175
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
176
|
+
# @param [Google::Apis::RequestOptions] options
|
177
|
+
# Request-specific options
|
178
|
+
#
|
179
|
+
# @yield [result, err] Result & error if block supplied
|
180
|
+
# @yieldparam result [Google::Apis::PubsubV1::ListSchemasResponse] parsed result object
|
181
|
+
# @yieldparam err [StandardError] error object if request failed
|
182
|
+
#
|
183
|
+
# @return [Google::Apis::PubsubV1::ListSchemasResponse]
|
184
|
+
#
|
185
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
186
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
187
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
188
|
+
def list_project_schemas(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
189
|
+
command = make_simple_command(:get, 'v1/{+parent}/schemas', options)
|
190
|
+
command.response_representation = Google::Apis::PubsubV1::ListSchemasResponse::Representation
|
191
|
+
command.response_class = Google::Apis::PubsubV1::ListSchemasResponse
|
192
|
+
command.params['parent'] = parent unless parent.nil?
|
193
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
194
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
195
|
+
command.query['view'] = view unless view.nil?
|
196
|
+
command.query['fields'] = fields unless fields.nil?
|
197
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
198
|
+
execute_or_queue_command(command, &block)
|
199
|
+
end
|
200
|
+
|
201
|
+
# Validates a schema.
|
202
|
+
# @param [String] parent
|
203
|
+
# Required. The name of the project in which to validate schemas. Format is `
|
204
|
+
# projects/`project-id``.
|
205
|
+
# @param [Google::Apis::PubsubV1::ValidateSchemaRequest] validate_schema_request_object
|
206
|
+
# @param [String] fields
|
207
|
+
# Selector specifying which fields to include in a partial response.
|
208
|
+
# @param [String] quota_user
|
209
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
210
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
211
|
+
# @param [Google::Apis::RequestOptions] options
|
212
|
+
# Request-specific options
|
213
|
+
#
|
214
|
+
# @yield [result, err] Result & error if block supplied
|
215
|
+
# @yieldparam result [Google::Apis::PubsubV1::ValidateSchemaResponse] parsed result object
|
216
|
+
# @yieldparam err [StandardError] error object if request failed
|
217
|
+
#
|
218
|
+
# @return [Google::Apis::PubsubV1::ValidateSchemaResponse]
|
219
|
+
#
|
220
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
221
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
222
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
223
|
+
def validate_schema(parent, validate_schema_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
224
|
+
command = make_simple_command(:post, 'v1/{+parent}/schemas:validate', options)
|
225
|
+
command.request_representation = Google::Apis::PubsubV1::ValidateSchemaRequest::Representation
|
226
|
+
command.request_object = validate_schema_request_object
|
227
|
+
command.response_representation = Google::Apis::PubsubV1::ValidateSchemaResponse::Representation
|
228
|
+
command.response_class = Google::Apis::PubsubV1::ValidateSchemaResponse
|
229
|
+
command.params['parent'] = parent unless parent.nil?
|
230
|
+
command.query['fields'] = fields unless fields.nil?
|
231
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
232
|
+
execute_or_queue_command(command, &block)
|
233
|
+
end
|
234
|
+
|
235
|
+
# Validates a message against a schema.
|
236
|
+
# @param [String] parent
|
237
|
+
# Required. The name of the project in which to validate schemas. Format is `
|
238
|
+
# projects/`project-id``.
|
239
|
+
# @param [Google::Apis::PubsubV1::ValidateMessageRequest] validate_message_request_object
|
240
|
+
# @param [String] fields
|
241
|
+
# Selector specifying which fields to include in a partial response.
|
242
|
+
# @param [String] quota_user
|
243
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
244
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
245
|
+
# @param [Google::Apis::RequestOptions] options
|
246
|
+
# Request-specific options
|
247
|
+
#
|
248
|
+
# @yield [result, err] Result & error if block supplied
|
249
|
+
# @yieldparam result [Google::Apis::PubsubV1::ValidateMessageResponse] parsed result object
|
250
|
+
# @yieldparam err [StandardError] error object if request failed
|
251
|
+
#
|
252
|
+
# @return [Google::Apis::PubsubV1::ValidateMessageResponse]
|
253
|
+
#
|
254
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
255
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
256
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
257
|
+
def validate_schema_message(parent, validate_message_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
258
|
+
command = make_simple_command(:post, 'v1/{+parent}/schemas:validateMessage', options)
|
259
|
+
command.request_representation = Google::Apis::PubsubV1::ValidateMessageRequest::Representation
|
260
|
+
command.request_object = validate_message_request_object
|
261
|
+
command.response_representation = Google::Apis::PubsubV1::ValidateMessageResponse::Representation
|
262
|
+
command.response_class = Google::Apis::PubsubV1::ValidateMessageResponse
|
263
|
+
command.params['parent'] = parent unless parent.nil?
|
264
|
+
command.query['fields'] = fields unless fields.nil?
|
265
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
266
|
+
execute_or_queue_command(command, &block)
|
267
|
+
end
|
268
|
+
|
52
269
|
# Creates a snapshot from the requested subscription. Snapshots are used in [
|
53
270
|
# Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which
|
54
271
|
# allow you to manage message acknowledgments in bulk. That is, you can set the
|
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.
|
4
|
+
version: 0.2.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-
|
11
|
+
date: 2021-02-22 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-pubsub_v1/CHANGELOG.md
|
55
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-pubsub_v1/v0.
|
55
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-pubsub_v1/v0.2.0
|
56
56
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-pubsub_v1
|
57
57
|
post_install_message:
|
58
58
|
rdoc_options: []
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.
|
72
|
+
rubygems_version: 3.2.6
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Simple REST client for Cloud Pub/Sub API V1
|