Sha256: 88552ecc5628083ffe160d062c20f77de49733ed6147bd063d1d06cc00cb49c5
Contents?: true
Size: 1.34 KB
Versions: 36
Compression:
Stored size: 1.34 KB
Contents
# 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.MySchema class MySchema < Deimos::SchemaClass::Record ### Attribute Readers ### # @return [MySchemaKey] attr_reader :payload_key ### Attribute Accessors ### # @return [String] attr_accessor :test_id # @return [Integer] attr_accessor :some_int ### Attribute Writers ### # @return [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 def self.tombstone(key) record = self.new record.tombstone_key = MySchemaKey.initialize_from_value(key) record.payload_key = key record end # @override def as_json(_opts={}) { 'test_id' => @test_id, 'some_int' => @some_int, 'payload_key' => @payload_key&.as_json } end end end; end
Version data entries
36 entries across 36 versions & 1 rubygems