Sha256: 39c441d9e46b340d95245ec8d07b83d776266803bc44741beb2dbec68aa161de

Contents?: true

Size: 1.14 KB

Versions: 11

Compression:

Stored size: 1.14 KB

Contents

# 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 Readers ###
    # @return [MySchemaKey]
    attr_reader :payload_key

    ### Attribute Accessors ###
    # @param value [String]
    attr_accessor :test_id
    # @param value [Integer]
    attr_accessor :some_int

    ### Attribute Writers ###
    # @param value [MySchemaKey]
    def payload_key=(value)
      @payload_key = MySchemaKey.initialize_from_value(value)
    end

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

    # @override
    def schema
      'MySchema'
    end

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

    # @override
    def to_h
      {
        'test_id' => @test_id,
        'some_int' => @some_int,
        'payload_key' => @payload_key&.to_h
      }
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
deimos-ruby-1.13.3 spec/schema_classes/my_schema.rb
deimos-ruby-1.13.2 spec/schema_classes/my_schema.rb
deimos-ruby-1.13.1 spec/schema_classes/my_schema.rb
deimos-ruby-1.13.0 spec/schema_classes/my_schema.rb
deimos-ruby-1.12.6 spec/schema_classes/my_schema.rb
deimos-ruby-1.12.5 spec/schema_classes/my_schema.rb
deimos-ruby-1.12.4 spec/schema_classes/my_schema.rb
deimos-ruby-1.12.3 spec/schema_classes/my_schema.rb
deimos-ruby-1.12.2 spec/schema_classes/my_schema.rb
deimos-ruby-1.12.1 spec/schema_classes/my_schema.rb
deimos-ruby-1.12.0 spec/schema_classes/my_schema.rb