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.



1030
1031
1032
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1030

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)


1008
1009
1010
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1008

def definition
  @definition
end

#nameString

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

Returns:

  • (String)


1013
1014
1015
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1013

def name
  @name
end

#revision_create_timeString

Output only. The timestamp that the revision was created. Corresponds to the JSON property revisionCreateTime

Returns:

  • (String)


1018
1019
1020
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1018

def revision_create_time
  @revision_create_time
end

#revision_idString

Output only. Immutable. The revision ID of the schema. Corresponds to the JSON property revisionId

Returns:

  • (String)


1023
1024
1025
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1023

def revision_id
  @revision_id
end

#typeString

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

Returns:

  • (String)


1028
1029
1030
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1028

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1035
1036
1037
1038
1039
1040
1041
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1035

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