# 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 ### Secondary Schema Classes ### # Autogenerated Schema for Record at com.my-namespace.ARecord class ARecord < Deimos::SchemaClass::Record ### Attribute Accessors ### # @param value [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 to_h { 'a_record_field' => @a_record_field } end end # Autogenerated Schema for Enum at com.my-namespace.AnEnum class AnEnum < Deimos::SchemaClass::Enum # @return ['sym1', 'sym2'] attr_accessor :an_enum # :nodoc: def initialize(an_enum) super self.an_enum = an_enum end # @override def symbols %w(sym1 sym2) end # @override def to_h @an_enum end end ### Attribute Readers ### # @return [AnEnum] attr_reader :an_enum # @return [ARecord] attr_reader :a_record ### Attribute Accessors ### # @param value [String] attr_accessor :a_string # @param value [Integer] attr_accessor :a_int # @param value [Integer] attr_accessor :a_long # @param value [Float] attr_accessor :a_float # @param value [Float] attr_accessor :a_double # @param value [nil, Integer] attr_accessor :an_optional_int # @param values [Array] attr_accessor :an_array # @param values [Hash] attr_accessor :a_map # @param value [String] attr_accessor :timestamp # @param value [String] attr_accessor :message_id ### Attribute Writers ### # @param value [AnEnum] def an_enum=(value) @an_enum = AnEnum.initialize_from_value(value) end # @param value [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 to_h { '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&.to_h, 'an_array' => @an_array, 'a_map' => @a_map, 'timestamp' => @timestamp, 'message_id' => @message_id, 'a_record' => @a_record&.to_h } end end end