Class: Google::Apis::PubsubV1::SchemaSettings

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SchemaSettings

Returns a new instance of SchemaSettings.



1605
1606
1607
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1605

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#encodingString

Optional. The encoding of messages validated against schema. Corresponds to the JSON property encoding

Returns:

  • (String)


1582
1583
1584
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1582

def encoding
  @encoding
end

#first_revision_idString

Optional. 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

Returns:

  • (String)


1589
1590
1591
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1589

def first_revision_id
  @first_revision_id
end

#last_revision_idString

Optional. 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

Returns:

  • (String)


1596
1597
1598
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1596

def last_revision_id
  @last_revision_id
end

#schemaString

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`

Returns:

  • (String)


1603
1604
1605
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1603

def schema
  @schema
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1610
1611
1612
1613
1614
1615
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1610

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