Class: Google::Apis::PubsubV1::Schema

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

A schema resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Schema

Returns a new instance of Schema.



953
954
955
# File 'lib/google/apis/pubsub_v1/classes.rb', line 953

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

Instance Attribute Details

#definitionString

The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in type. Corresponds to the JSON property definition

Returns:

  • (String)


941
942
943
# File 'lib/google/apis/pubsub_v1/classes.rb', line 941

def definition
  @definition
end

#nameString

Required. Name of the schema. Format is projects/project/schemas/schema`. Corresponds to the JSON propertyname`

Returns:

  • (String)


946
947
948
# File 'lib/google/apis/pubsub_v1/classes.rb', line 946

def name
  @name
end

#typeString

The type of the schema definition. Corresponds to the JSON property type

Returns:

  • (String)


951
952
953
# File 'lib/google/apis/pubsub_v1/classes.rb', line 951

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



958
959
960
961
962
# File 'lib/google/apis/pubsub_v1/classes.rb', line 958

def update!(**args)
  @definition = args[:definition] if args.key?(:definition)
  @name = args[:name] if args.key?(:name)
  @type = args[:type] if args.key?(:type)
end