spec/app/lib/schema_classes/a_record.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.ARecord class ARecord < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :a_record_field # @override def initialize(a_record_field: nil) super self.a_record_field = a_record_field end # @override def schema 'ARecord' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'a_record_field' => @a_record_field } end end end spec/app/lib/schema_classes/an_enum.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Enum at com.my-namespace.AnEnum class AnEnum < Deimos::SchemaClass::Enum # @return ['sym1', 'sym2'] attr_accessor :an_enum # @override def symbols %w(sym1 sym2) end end end spec/app/lib/schema_classes/another_enum.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum class AnotherEnum < Deimos::SchemaClass::Enum # @return ['sym3', 'sym4'] attr_accessor :another_enum # @override def symbols %w(sym3 sym4) end end end spec/app/lib/schema_classes/create_topic.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.response.CreateTopic class CreateTopic < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :response_id # @override def initialize(response_id: nil) super self.response_id = response_id end # @override def schema 'CreateTopic' end # @override def namespace 'com.my-namespace.response' end # @override def as_json(_opts={}) { 'response_id' => @response_id } end end end spec/app/lib/schema_classes/generated.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.Generated class Generated < Deimos::SchemaClass::Record ### Attribute Readers ### # @return [AnEnum] attr_reader :an_enum # @return [ARecord] attr_reader :a_record ### Attribute Accessors ### # @return [String] attr_accessor :a_string # @return [Integer] attr_accessor :a_int # @return [Integer] attr_accessor :a_long # @return [Float] attr_accessor :a_float # @return [Float] attr_accessor :a_double # @return [nil, Integer] attr_accessor :an_optional_int # @return [Array] attr_accessor :an_array # @return [Hash] attr_accessor :a_map # @return [String] attr_accessor :timestamp # @return [String] attr_accessor :message_id ### Attribute Writers ### # @return [AnEnum] def an_enum=(value) @an_enum = AnEnum.initialize_from_value(value) end # @return [ARecord] def a_record=(value) @a_record = ARecord.initialize_from_value(value) end # @override def initialize(a_string: nil, a_int: nil, a_long: nil, a_float: nil, a_double: nil, an_optional_int: nil, an_enum: nil, an_array: nil, a_map: nil, timestamp: nil, message_id: nil, a_record: nil) super self.a_string = a_string self.a_int = a_int self.a_long = a_long self.a_float = a_float self.a_double = a_double self.an_optional_int = an_optional_int self.an_enum = an_enum self.an_array = an_array self.a_map = a_map self.timestamp = timestamp self.message_id = message_id self.a_record = a_record end # @override def schema 'Generated' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'a_string' => @a_string, 'a_int' => @a_int, 'a_long' => @a_long, 'a_float' => @a_float, 'a_double' => @a_double, 'an_optional_int' => @an_optional_int, 'an_enum' => @an_enum&.as_json, 'an_array' => @an_array, 'a_map' => @a_map, 'timestamp' => @timestamp, 'message_id' => @message_id, 'a_record' => @a_record&.as_json } end end end spec/app/lib/schema_classes/index.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.response.Index class Index < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :response_id # @override def initialize(response_id: nil) super self.response_id = response_id end # @override def schema 'Index' end # @override def namespace 'com.my-namespace.response' end # @override def as_json(_opts={}) { 'response_id' => @response_id } end end end spec/app/lib/schema_classes/my_nested_record.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MyNestedRecord class MyNestedRecord < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [Integer] attr_accessor :some_int # @return [Float] attr_accessor :some_float # @return [String] attr_accessor :some_string # @return [nil, Integer] attr_accessor :some_optional_int # @override def initialize(some_int: nil, some_float: nil, some_string: nil, some_optional_int: nil) super self.some_int = some_int self.some_float = some_float self.some_string = some_string self.some_optional_int = some_optional_int end # @override def schema 'MyNestedRecord' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'some_int' => @some_int, 'some_float' => @some_float, 'some_string' => @some_string, 'some_optional_int' => @some_optional_int } end end end spec/app/lib/schema_classes/my_nested_schema.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MyNestedSchema class MyNestedSchema < Deimos::SchemaClass::Record ### Attribute Readers ### # @return [MyNestedRecord] attr_reader :some_nested_record # @return [nil, MyNestedRecord] attr_reader :some_optional_record ### Attribute Accessors ### # @return [String] attr_accessor :test_id # @return [Float] attr_accessor :test_float # @return [Array] attr_accessor :test_array ### Attribute Writers ### # @return [MyNestedRecord] def some_nested_record=(value) @some_nested_record = MyNestedRecord.initialize_from_value(value) end # @return [nil, MyNestedRecord] def some_optional_record=(value) @some_optional_record = MyNestedRecord.initialize_from_value(value) end # @override def initialize(test_id: nil, test_float: nil, test_array: nil, some_nested_record: nil, some_optional_record: nil) super self.test_id = test_id self.test_float = test_float self.test_array = test_array self.some_nested_record = some_nested_record self.some_optional_record = some_optional_record end # @override def schema 'MyNestedSchema' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'test_id' => @test_id, 'test_float' => @test_float, 'test_array' => @test_array, 'some_nested_record' => @some_nested_record&.as_json, 'some_optional_record' => @some_optional_record&.as_json } end end end spec/app/lib/schema_classes/my_schema.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MySchema class MySchema < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :test_id # @return [Integer] attr_accessor :some_int # @override def initialize(test_id: nil, some_int: nil) super self.test_id = test_id self.some_int = some_int end # @override def schema 'MySchema' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'test_id' => @test_id, 'some_int' => @some_int } end end end spec/app/lib/schema_classes/my_schema_compound_key.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MySchemaCompound_key class MySchemaCompoundKey < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :part_one # @return [String] attr_accessor :part_two # @override def initialize(part_one: nil, part_two: nil) super self.part_one = part_one self.part_two = part_two end # @override def schema 'MySchemaCompound_key' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'part_one' => @part_one, 'part_two' => @part_two } end end end spec/app/lib/schema_classes/my_schema_id_key.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MySchemaId_key class MySchemaIdKey < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [Integer] attr_accessor :id # @override def initialize(id: nil) super self.id = id end # @override def schema 'MySchemaId_key' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'id' => @id } end end end spec/app/lib/schema_classes/my_schema_key.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MySchema_key class MySchemaKey < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :test_id # @override def initialize(test_id: nil) super self.test_id = test_id end # @override def schema 'MySchema_key' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'test_id' => @test_id } end end end spec/app/lib/schema_classes/my_schema_with_boolean.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MySchemaWithBooleans class MySchemaWithBoolean < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :test_id # @return [Boolean] attr_accessor :some_bool # @override def initialize(test_id: nil, some_bool: nil) super self.test_id = test_id self.some_bool = some_bool end # @override def schema 'MySchemaWithBooleans' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'test_id' => @test_id, 'some_bool' => @some_bool } end end end spec/app/lib/schema_classes/my_schema_with_circular_reference.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MySchemaWithCircularReference class MySchemaWithCircularReference < Deimos::SchemaClass::Record ### Attribute Readers ### # @return [Hash] attr_reader :properties ### Attribute Writers ### # @return [Hash] def properties=(values) @properties = values&.transform_values do |value| Property.initialize_from_value(value) end end # @override def initialize(properties: {}) super self.properties = properties end # @override def schema 'MySchemaWithCircularReference' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'properties' => @properties.transform_values { |v| v&.as_json } } end end end spec/app/lib/schema_classes/my_schema_with_complex_type.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MySchemaWithComplexTypes class MySchemaWithComplexType < Deimos::SchemaClass::Record ### Attribute Readers ### # @return [ARecord] attr_reader :some_record # @return [nil, ARecord] attr_reader :some_optional_record # @return [Array] attr_reader :some_record_array # @return [Hash] attr_reader :some_record_map # @return [Array] attr_reader :some_enum_array # @return [nil, AnotherEnum] attr_reader :some_optional_enum # @return [YetAnotherEnum] attr_reader :some_enum_with_default ### Attribute Accessors ### # @return [String] attr_accessor :test_id # @return [Float] attr_accessor :test_float # @return [Array] attr_accessor :test_string_array # @return [Array] attr_accessor :test_int_array # @return [Integer, nil] attr_accessor :test_optional_int # @return [Hash] attr_accessor :some_integer_map ### Attribute Writers ### # @return [ARecord] def some_record=(value) @some_record = ARecord.initialize_from_value(value) end # @return [nil, ARecord] def some_optional_record=(value) @some_optional_record = ARecord.initialize_from_value(value) end # @return [Array] def some_record_array=(values) @some_record_array = values&.map do |value| ARecord.initialize_from_value(value) end end # @return [Hash] def some_record_map=(values) @some_record_map = values&.transform_values do |value| ARecord.initialize_from_value(value) end end # @return [Array] def some_enum_array=(values) @some_enum_array = values&.map do |value| AnEnum.initialize_from_value(value) end end # @return [nil, AnotherEnum] def some_optional_enum=(value) @some_optional_enum = AnotherEnum.initialize_from_value(value) end # @return [YetAnotherEnum] def some_enum_with_default=(value) @some_enum_with_default = YetAnotherEnum.initialize_from_value(value) end # @override def initialize(test_id: nil, test_float: nil, test_string_array: ["test"], test_int_array: [123], test_optional_int: 123, some_integer_map: {"abc"=>123}, some_record: {"a_record_field"=>"Test String"}, some_optional_record: nil, some_record_array: nil, some_record_map: nil, some_enum_array: nil, some_optional_enum: nil, some_enum_with_default: "sym6") super self.test_id = test_id self.test_float = test_float self.test_string_array = test_string_array self.test_int_array = test_int_array self.test_optional_int = test_optional_int self.some_integer_map = some_integer_map self.some_record = some_record self.some_optional_record = some_optional_record self.some_record_array = some_record_array self.some_record_map = some_record_map self.some_enum_array = some_enum_array self.some_optional_enum = some_optional_enum self.some_enum_with_default = some_enum_with_default end # @override def schema 'MySchemaWithComplexTypes' end # @override def namespace 'com.my-namespace' end def self.tombstone(key) record = self.allocate record.tombstone_key = key record.a_string = key record end # @override def as_json(_opts={}) { 'test_id' => @test_id, 'test_float' => @test_float, 'test_string_array' => @test_string_array, 'test_int_array' => @test_int_array, 'test_optional_int' => @test_optional_int, 'some_integer_map' => @some_integer_map, 'some_record' => @some_record&.as_json, 'some_optional_record' => @some_optional_record&.as_json, 'some_record_array' => @some_record_array.map { |v| v&.as_json }, 'some_record_map' => @some_record_map.transform_values { |v| v&.as_json }, 'some_enum_array' => @some_enum_array.map { |v| v&.as_json }, 'some_optional_enum' => @some_optional_enum&.as_json, 'some_enum_with_default' => @some_enum_with_default&.as_json } end end end spec/app/lib/schema_classes/my_schema_with_date_time.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MySchemaWithDateTimes class MySchemaWithDateTime < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :test_id # @return [Integer, nil] attr_accessor :updated_at # @return [nil, Integer] attr_accessor :some_int # @return [nil, Integer] attr_accessor :some_datetime_int # @return [String] attr_accessor :timestamp # @override def initialize(test_id: nil, updated_at: nil, some_int: nil, some_datetime_int: nil, timestamp: nil) super self.test_id = test_id self.updated_at = updated_at self.some_int = some_int self.some_datetime_int = some_datetime_int self.timestamp = timestamp end # @override def schema 'MySchemaWithDateTimes' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'test_id' => @test_id, 'updated_at' => @updated_at, 'some_int' => @some_int, 'some_datetime_int' => @some_datetime_int, 'timestamp' => @timestamp } end end end spec/app/lib/schema_classes/my_schema_with_id.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MySchemaWithId class MySchemaWithId < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :test_id # @return [Integer] attr_accessor :some_int # @return [String] attr_accessor :message_id # @return [String] attr_accessor :timestamp # @override def initialize(test_id: nil, some_int: nil, message_id: nil, timestamp: nil) super self.test_id = test_id self.some_int = some_int self.message_id = message_id self.timestamp = timestamp end # @override def schema 'MySchemaWithId' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'test_id' => @test_id, 'some_int' => @some_int, 'message_id' => @message_id, 'timestamp' => @timestamp } end end end spec/app/lib/schema_classes/my_schema_with_unique_id.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.MySchemaWithUniqueId class MySchemaWithUniqueId < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [Integer] attr_accessor :id # @return [String] attr_accessor :test_id # @return [Integer] attr_accessor :some_int # @return [String] attr_accessor :message_id # @return [String] attr_accessor :timestamp # @override def initialize(id: nil, test_id: nil, some_int: nil, message_id: nil, timestamp: nil) super self.id = id self.test_id = test_id self.some_int = some_int self.message_id = message_id self.timestamp = timestamp end # @override def schema 'MySchemaWithUniqueId' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'id' => @id, 'test_id' => @test_id, 'some_int' => @some_int, 'message_id' => @message_id, 'timestamp' => @timestamp } end end end spec/app/lib/schema_classes/property.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.Property class Property < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [Boolean, Integer, Integer, Float, Float, String, Array, Hash] attr_accessor :property # @override def initialize(property: nil) super self.property = property end # @override def schema 'Property' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'property' => @property } end end end spec/app/lib/schema_classes/update_request.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.request.UpdateRequest class UpdateRequest < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :update_request_id # @override def initialize(update_request_id: nil) super self.update_request_id = update_request_id end # @override def schema 'UpdateRequest' end # @override def namespace 'com.my-namespace.request' end # @override def as_json(_opts={}) { 'update_request_id' => @update_request_id } end end end spec/app/lib/schema_classes/update_response.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.response.UpdateResponse class UpdateResponse < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [String] attr_accessor :update_response_id # @override def initialize(update_response_id: nil) super self.update_response_id = update_response_id end # @override def schema 'UpdateResponse' end # @override def namespace 'com.my-namespace.response' end # @override def as_json(_opts={}) { 'update_response_id' => @update_response_id } end end end spec/app/lib/schema_classes/wibble.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.Wibble class Wibble < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [Integer] attr_accessor :id # @return [Integer] attr_accessor :wibble_id # @return [String] attr_accessor :name # @return [String] attr_accessor :floop # @return [Integer] attr_accessor :birthday_int # @return [Integer] attr_accessor :birthday_long # @return [nil, Integer] attr_accessor :birthday_optional # @return [Integer] attr_accessor :updated_at # @return [Integer] attr_accessor :created_at # @override def initialize(id: nil, wibble_id: nil, name: nil, floop: nil, birthday_int: nil, birthday_long: nil, birthday_optional: nil, updated_at: nil, created_at: nil) super self.id = id self.wibble_id = wibble_id self.name = name self.floop = floop self.birthday_int = birthday_int self.birthday_long = birthday_long self.birthday_optional = birthday_optional self.updated_at = updated_at self.created_at = created_at end # @override def schema 'Wibble' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'id' => @id, 'wibble_id' => @wibble_id, 'name' => @name, 'floop' => @floop, 'birthday_int' => @birthday_int, 'birthday_long' => @birthday_long, 'birthday_optional' => @birthday_optional, 'updated_at' => @updated_at, 'created_at' => @created_at } end end end spec/app/lib/schema_classes/widget.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.Widget class Widget < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [Integer] attr_accessor :id # @return [Integer] attr_accessor :widget_id # @return [String] attr_accessor :name # @return [Integer] attr_accessor :updated_at # @return [Integer] attr_accessor :created_at # @override def initialize(id: nil, widget_id: nil, name: nil, updated_at: nil, created_at: nil) super self.id = id self.widget_id = widget_id self.name = name self.updated_at = updated_at self.created_at = created_at end # @override def schema 'Widget' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'id' => @id, 'widget_id' => @widget_id, 'name' => @name, 'updated_at' => @updated_at, 'created_at' => @created_at } end end end spec/app/lib/schema_classes/widget_the_second.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Record at com.my-namespace.WidgetTheSecond class WidgetTheSecond < Deimos::SchemaClass::Record ### Attribute Accessors ### # @return [Integer] attr_accessor :id # @return [Integer] attr_accessor :widget_id # @return [String] attr_accessor :model_id # @return [Integer] attr_accessor :updated_at # @return [Integer] attr_accessor :created_at # @override def initialize(id: nil, widget_id: nil, model_id: nil, updated_at: nil, created_at: nil) super self.id = id self.widget_id = widget_id self.model_id = model_id self.updated_at = updated_at self.created_at = created_at end # @override def schema 'WidgetTheSecond' end # @override def namespace 'com.my-namespace' end # @override def as_json(_opts={}) { 'id' => @id, 'widget_id' => @widget_id, 'model_id' => @model_id, 'updated_at' => @updated_at, 'created_at' => @created_at } end end end spec/app/lib/schema_classes/yet_another_enum.rb: # frozen_string_literal: true # This file is autogenerated by Deimos, Do NOT modify module Schemas ### Primary Schema Class ### # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum class YetAnotherEnum < Deimos::SchemaClass::Enum # @return ['sym5', 'sym6'] attr_accessor :yet_another_enum # @override def symbols %w(sym5 sym6) end end end