Class: Google::Apis::PubsubV1::SchemaSettings
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1::SchemaSettings
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb
Overview
Settings for validating messages published against a schema.
Instance Attribute Summary collapse
-
#encoding ⇒ String
The encoding of messages validated against
schema. -
#first_revision_id ⇒ String
The minimum (inclusive) revision allowed for validating messages.
-
#last_revision_id ⇒ String
The maximum (inclusive) revision allowed for validating messages.
-
#schema ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SchemaSettings
constructor
A new instance of SchemaSettings.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SchemaSettings
Returns a new instance of SchemaSettings.
1282 1283 1284 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1282 def initialize(**args) update!(**args) end |
Instance Attribute Details
#encoding ⇒ String
The encoding of messages validated against schema.
Corresponds to the JSON property encoding
1259 1260 1261 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1259 def encoding @encoding end |
#first_revision_id ⇒ String
The minimum (inclusive) revision allowed for validating messages. If empty or
not present, allow any revision to be validated against last_revision or any
revision created before.
Corresponds to the JSON property firstRevisionId
1266 1267 1268 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1266 def first_revision_id @first_revision_id end |
#last_revision_id ⇒ String
The maximum (inclusive) revision allowed for validating messages. If empty or
not present, allow any revision to be validated against first_revision or any
revision created after.
Corresponds to the JSON property lastRevisionId
1273 1274 1275 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1273 def last_revision_id @last_revision_id end |
#schema ⇒ String
Required. The name of the schema that messages published should be validated
against. Format is projects/project/schemas/schema`. The value of this
field will bedeleted-schemaif the schema has been deleted.
Corresponds to the JSON propertyschema`
1280 1281 1282 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1280 def schema @schema end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1287 1288 1289 1290 1291 1292 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1287 def update!(**args) @encoding = args[:encoding] if args.key?(:encoding) @first_revision_id = args[:first_revision_id] if args.key?(:first_revision_id) @last_revision_id = args[:last_revision_id] if args.key?(:last_revision_id) @schema = args[:schema] if args.key?(:schema) end |