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.



996
997
998
# File 'lib/google/apis/pubsub_v1/classes.rb', line 996

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

Instance Attribute Details

#encodingString

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

Returns:

  • (String)


987
988
989
# File 'lib/google/apis/pubsub_v1/classes.rb', line 987

def encoding
  @encoding
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)


994
995
996
# File 'lib/google/apis/pubsub_v1/classes.rb', line 994

def schema
  @schema
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1001
1002
1003
1004
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1001

def update!(**args)
  @encoding = args[:encoding] if args.key?(:encoding)
  @schema = args[:schema] if args.key?(:schema)
end