# frozen_string_literal: true

# This file is autogenerated by Deimos, Do NOT modify
module Schemas; module MyNamespace
  ### Primary Schema Class ###
  # Autogenerated Schema for Record at com.my-namespace.MySchemaWithTitle
  class MySchemaWithTitle < Deimos::SchemaClass::Record

    ### Attribute Accessors ###
    # @return [String]
    attr_accessor :test_id
    # @return [Integer]
    attr_accessor :some_int
    # @return [String]
    attr_accessor :title

    # @override
    def initialize(_from_message: false, test_id: nil,
                   some_int: nil,
                   title: nil)
      @_from_message = _from_message
      super
      self.test_id = test_id
      self.some_int = some_int
      self.title = title
    end

    # @override
    def schema
      'MySchemaWithTitle'
    end

    # @override
    def namespace
      'com.my-namespace'
    end

    # @override
    def as_json(_opts={})
      {
        'test_id' => @test_id,
        'some_int' => @some_int,
        'title' => @title
      }
    end
  end
end; end
