deimos-ruby 1.14.4 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,42 @@
1
+ spec/app/lib/schema_classes/create_topic.rb:
2
+ # frozen_string_literal: true
3
+
4
+ # This file is autogenerated by Deimos, Do NOT modify
5
+ module Schemas
6
+ ### Primary Schema Class ###
7
+ # Autogenerated Schema for Record at com.my-namespace.response.CreateTopic
8
+ class CreateTopic < Deimos::SchemaClass::Record
9
+
10
+ ### Attribute Accessors ###
11
+ # @param value [String]
12
+ attr_accessor :response_id
13
+
14
+ # @override
15
+ def initialize(response_id: nil)
16
+ super
17
+ self.response_id = response_id
18
+ end
19
+
20
+ # @override
21
+ def schema
22
+ 'CreateTopic'
23
+ end
24
+
25
+ # @override
26
+ def namespace
27
+ 'com.my-namespace.response'
28
+ end
29
+
30
+ # @override
31
+ def to_h
32
+ {
33
+ 'response_id' => @response_id
34
+ }
35
+ end
36
+ end
37
+ end
38
+
39
+
1
40
  spec/app/lib/schema_classes/generated.rb:
2
41
  # frozen_string_literal: true
3
42
 
@@ -160,6 +199,45 @@ module Schemas
160
199
  end
161
200
 
162
201
 
202
+ spec/app/lib/schema_classes/index.rb:
203
+ # frozen_string_literal: true
204
+
205
+ # This file is autogenerated by Deimos, Do NOT modify
206
+ module Schemas
207
+ ### Primary Schema Class ###
208
+ # Autogenerated Schema for Record at com.my-namespace.response.Index
209
+ class Index < Deimos::SchemaClass::Record
210
+
211
+ ### Attribute Accessors ###
212
+ # @param value [String]
213
+ attr_accessor :response_id
214
+
215
+ # @override
216
+ def initialize(response_id: nil)
217
+ super
218
+ self.response_id = response_id
219
+ end
220
+
221
+ # @override
222
+ def schema
223
+ 'Index'
224
+ end
225
+
226
+ # @override
227
+ def namespace
228
+ 'com.my-namespace.response'
229
+ end
230
+
231
+ # @override
232
+ def to_h
233
+ {
234
+ 'response_id' => @response_id
235
+ }
236
+ end
237
+ end
238
+ end
239
+
240
+
163
241
  spec/app/lib/schema_classes/my_nested_schema.rb:
164
242
  # frozen_string_literal: true
165
243
 
@@ -337,6 +415,89 @@ module Schemas
337
415
  end
338
416
 
339
417
 
418
+ spec/app/lib/schema_classes/my_schema_compound_key.rb:
419
+ # frozen_string_literal: true
420
+
421
+ # This file is autogenerated by Deimos, Do NOT modify
422
+ module Schemas
423
+ ### Primary Schema Class ###
424
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaCompound_key
425
+ class MySchemaCompoundKey < Deimos::SchemaClass::Record
426
+
427
+ ### Attribute Accessors ###
428
+ # @param value [String]
429
+ attr_accessor :part_one
430
+ # @param value [String]
431
+ attr_accessor :part_two
432
+
433
+ # @override
434
+ def initialize(part_one: nil,
435
+ part_two: nil)
436
+ super
437
+ self.part_one = part_one
438
+ self.part_two = part_two
439
+ end
440
+
441
+ # @override
442
+ def schema
443
+ 'MySchemaCompound_key'
444
+ end
445
+
446
+ # @override
447
+ def namespace
448
+ 'com.my-namespace'
449
+ end
450
+
451
+ # @override
452
+ def to_h
453
+ {
454
+ 'part_one' => @part_one,
455
+ 'part_two' => @part_two
456
+ }
457
+ end
458
+ end
459
+ end
460
+
461
+
462
+ spec/app/lib/schema_classes/my_schema_id_key.rb:
463
+ # frozen_string_literal: true
464
+
465
+ # This file is autogenerated by Deimos, Do NOT modify
466
+ module Schemas
467
+ ### Primary Schema Class ###
468
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaId_key
469
+ class MySchemaIdKey < Deimos::SchemaClass::Record
470
+
471
+ ### Attribute Accessors ###
472
+ # @param value [Integer]
473
+ attr_accessor :id
474
+
475
+ # @override
476
+ def initialize(id: nil)
477
+ super
478
+ self.id = id
479
+ end
480
+
481
+ # @override
482
+ def schema
483
+ 'MySchemaId_key'
484
+ end
485
+
486
+ # @override
487
+ def namespace
488
+ 'com.my-namespace'
489
+ end
490
+
491
+ # @override
492
+ def to_h
493
+ {
494
+ 'id' => @id
495
+ }
496
+ end
497
+ end
498
+ end
499
+
500
+
340
501
  spec/app/lib/schema_classes/my_schema_key.rb:
341
502
  # frozen_string_literal: true
342
503
 
@@ -375,3 +536,816 @@ module Schemas
375
536
  end
376
537
  end
377
538
 
539
+
540
+ spec/app/lib/schema_classes/my_schema_with_boolean.rb:
541
+ # frozen_string_literal: true
542
+
543
+ # This file is autogenerated by Deimos, Do NOT modify
544
+ module Schemas
545
+ ### Primary Schema Class ###
546
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithBooleans
547
+ class MySchemaWithBoolean < Deimos::SchemaClass::Record
548
+
549
+ ### Attribute Accessors ###
550
+ # @param value [String]
551
+ attr_accessor :test_id
552
+ # @param value [Boolean]
553
+ attr_accessor :some_bool
554
+
555
+ # @override
556
+ def initialize(test_id: nil,
557
+ some_bool: nil)
558
+ super
559
+ self.test_id = test_id
560
+ self.some_bool = some_bool
561
+ end
562
+
563
+ # @override
564
+ def schema
565
+ 'MySchemaWithBooleans'
566
+ end
567
+
568
+ # @override
569
+ def namespace
570
+ 'com.my-namespace'
571
+ end
572
+
573
+ # @override
574
+ def to_h
575
+ {
576
+ 'test_id' => @test_id,
577
+ 'some_bool' => @some_bool
578
+ }
579
+ end
580
+ end
581
+ end
582
+
583
+
584
+ spec/app/lib/schema_classes/my_schema_with_circular_reference.rb:
585
+ # frozen_string_literal: true
586
+
587
+ # This file is autogenerated by Deimos, Do NOT modify
588
+ module Schemas
589
+ ### Primary Schema Class ###
590
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithCircularReference
591
+ class MySchemaWithCircularReference < Deimos::SchemaClass::Record
592
+
593
+ ### Secondary Schema Classes ###
594
+ # Autogenerated Schema for Record at com.my-namespace.Property
595
+ class Property < Deimos::SchemaClass::Record
596
+
597
+ ### Attribute Accessors ###
598
+ # @param value [Boolean, Integer, Integer, Float, Float, String, Array<Property>, Hash<String, Property>]
599
+ attr_accessor :property
600
+
601
+ # @override
602
+ def initialize(property: nil)
603
+ super
604
+ self.property = property
605
+ end
606
+
607
+ # @override
608
+ def schema
609
+ 'Property'
610
+ end
611
+
612
+ # @override
613
+ def namespace
614
+ 'com.my-namespace'
615
+ end
616
+
617
+ # @override
618
+ def to_h
619
+ {
620
+ 'property' => @property
621
+ }
622
+ end
623
+ end
624
+
625
+
626
+ ### Attribute Readers ###
627
+ # @return [Hash<String, Property>]
628
+ attr_reader :properties
629
+
630
+ ### Attribute Writers ###
631
+ # @param values [Hash<String, Property>]
632
+ def properties=(values)
633
+ @properties = values.transform_values do |value|
634
+ Property.initialize_from_value(value)
635
+ end
636
+ end
637
+
638
+ # @override
639
+ def initialize(properties: {})
640
+ super
641
+ self.properties = properties
642
+ end
643
+
644
+ # @override
645
+ def schema
646
+ 'MySchemaWithCircularReference'
647
+ end
648
+
649
+ # @override
650
+ def namespace
651
+ 'com.my-namespace'
652
+ end
653
+
654
+ # @override
655
+ def to_h
656
+ {
657
+ 'properties' => @properties.transform_values { |v| v&.to_h }
658
+ }
659
+ end
660
+ end
661
+ end
662
+
663
+
664
+ spec/app/lib/schema_classes/my_schema_with_complex_type.rb:
665
+ # frozen_string_literal: true
666
+
667
+ # This file is autogenerated by Deimos, Do NOT modify
668
+ module Schemas
669
+ ### Primary Schema Class ###
670
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithComplexTypes
671
+ class MySchemaWithComplexType < Deimos::SchemaClass::Record
672
+
673
+ ### Secondary Schema Classes ###
674
+ # Autogenerated Schema for Record at com.my-namespace.ARecord
675
+ class ARecord < Deimos::SchemaClass::Record
676
+
677
+ ### Attribute Accessors ###
678
+ # @param value [String]
679
+ attr_accessor :a_record_field
680
+
681
+ # @override
682
+ def initialize(a_record_field: nil)
683
+ super
684
+ self.a_record_field = a_record_field
685
+ end
686
+
687
+ # @override
688
+ def schema
689
+ 'ARecord'
690
+ end
691
+
692
+ # @override
693
+ def namespace
694
+ 'com.my-namespace'
695
+ end
696
+
697
+ # @override
698
+ def to_h
699
+ {
700
+ 'a_record_field' => @a_record_field
701
+ }
702
+ end
703
+ end
704
+
705
+ # Autogenerated Schema for Enum at com.my-namespace.AnEnum
706
+ class AnEnum < Deimos::SchemaClass::Enum
707
+ # @return ['sym1', 'sym2']
708
+ attr_accessor :an_enum
709
+
710
+ # :nodoc:
711
+ def initialize(an_enum)
712
+ super
713
+ self.an_enum = an_enum
714
+ end
715
+
716
+ # @override
717
+ def symbols
718
+ %w(sym1 sym2)
719
+ end
720
+
721
+ # @override
722
+ def to_h
723
+ @an_enum
724
+ end
725
+ end
726
+
727
+ # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
728
+ class AnotherEnum < Deimos::SchemaClass::Enum
729
+ # @return ['sym3', 'sym4']
730
+ attr_accessor :another_enum
731
+
732
+ # :nodoc:
733
+ def initialize(another_enum)
734
+ super
735
+ self.another_enum = another_enum
736
+ end
737
+
738
+ # @override
739
+ def symbols
740
+ %w(sym3 sym4)
741
+ end
742
+
743
+ # @override
744
+ def to_h
745
+ @another_enum
746
+ end
747
+ end
748
+
749
+ # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
750
+ class YetAnotherEnum < Deimos::SchemaClass::Enum
751
+ # @return ['sym5', 'sym6']
752
+ attr_accessor :yet_another_enum
753
+
754
+ # :nodoc:
755
+ def initialize(yet_another_enum)
756
+ super
757
+ self.yet_another_enum = yet_another_enum
758
+ end
759
+
760
+ # @override
761
+ def symbols
762
+ %w(sym5 sym6)
763
+ end
764
+
765
+ # @override
766
+ def to_h
767
+ @yet_another_enum
768
+ end
769
+ end
770
+
771
+
772
+ ### Attribute Readers ###
773
+ # @return [ARecord]
774
+ attr_reader :some_record
775
+ # @return [nil, ARecord]
776
+ attr_reader :some_optional_record
777
+ # @return [Array<ARecord>]
778
+ attr_reader :some_record_array
779
+ # @return [Hash<String, ARecord>]
780
+ attr_reader :some_record_map
781
+ # @return [Array<AnEnum>]
782
+ attr_reader :some_enum_array
783
+ # @return [nil, AnotherEnum]
784
+ attr_reader :some_optional_enum
785
+ # @return [YetAnotherEnum]
786
+ attr_reader :some_enum_with_default
787
+
788
+ ### Attribute Accessors ###
789
+ # @param value [String]
790
+ attr_accessor :test_id
791
+ # @param value [Float]
792
+ attr_accessor :test_float
793
+ # @param values [Array<String>]
794
+ attr_accessor :test_string_array
795
+ # @param values [Array<Integer>]
796
+ attr_accessor :test_int_array
797
+ # @param value [Integer, nil]
798
+ attr_accessor :test_optional_int
799
+ # @param values [Hash<String, Integer>]
800
+ attr_accessor :some_integer_map
801
+
802
+ ### Attribute Writers ###
803
+ # @param value [ARecord]
804
+ def some_record=(value)
805
+ @some_record = ARecord.initialize_from_value(value)
806
+ end
807
+
808
+ # @param value [nil, ARecord]
809
+ def some_optional_record=(value)
810
+ @some_optional_record = ARecord.initialize_from_value(value)
811
+ end
812
+
813
+ # @param values [Array<ARecord>]
814
+ def some_record_array=(values)
815
+ @some_record_array = values.map do |value|
816
+ ARecord.initialize_from_value(value)
817
+ end
818
+ end
819
+
820
+ # @param values [Hash<String, ARecord>]
821
+ def some_record_map=(values)
822
+ @some_record_map = values.transform_values do |value|
823
+ ARecord.initialize_from_value(value)
824
+ end
825
+ end
826
+
827
+ # @param values [Array<AnEnum>]
828
+ def some_enum_array=(values)
829
+ @some_enum_array = values.map do |value|
830
+ AnEnum.initialize_from_value(value)
831
+ end
832
+ end
833
+
834
+ # @param value [nil, AnotherEnum]
835
+ def some_optional_enum=(value)
836
+ @some_optional_enum = AnotherEnum.initialize_from_value(value)
837
+ end
838
+
839
+ # @param value [YetAnotherEnum]
840
+ def some_enum_with_default=(value)
841
+ @some_enum_with_default = YetAnotherEnum.initialize_from_value(value)
842
+ end
843
+
844
+ # @override
845
+ def initialize(test_id: nil,
846
+ test_float: nil,
847
+ test_string_array: ["test"],
848
+ test_int_array: [123],
849
+ test_optional_int: 123,
850
+ some_integer_map: {"abc"=>123},
851
+ some_record: {"a_record_field"=>"Test String"},
852
+ some_optional_record: nil,
853
+ some_record_array: nil,
854
+ some_record_map: nil,
855
+ some_enum_array: nil,
856
+ some_optional_enum: nil,
857
+ some_enum_with_default: "sym6")
858
+ super
859
+ self.test_id = test_id
860
+ self.test_float = test_float
861
+ self.test_string_array = test_string_array
862
+ self.test_int_array = test_int_array
863
+ self.test_optional_int = test_optional_int
864
+ self.some_integer_map = some_integer_map
865
+ self.some_record = some_record
866
+ self.some_optional_record = some_optional_record
867
+ self.some_record_array = some_record_array
868
+ self.some_record_map = some_record_map
869
+ self.some_enum_array = some_enum_array
870
+ self.some_optional_enum = some_optional_enum
871
+ self.some_enum_with_default = some_enum_with_default
872
+ end
873
+
874
+ # @override
875
+ def schema
876
+ 'MySchemaWithComplexTypes'
877
+ end
878
+
879
+ # @override
880
+ def namespace
881
+ 'com.my-namespace'
882
+ end
883
+
884
+ # @override
885
+ def to_h
886
+ {
887
+ 'test_id' => @test_id,
888
+ 'test_float' => @test_float,
889
+ 'test_string_array' => @test_string_array,
890
+ 'test_int_array' => @test_int_array,
891
+ 'test_optional_int' => @test_optional_int,
892
+ 'some_integer_map' => @some_integer_map,
893
+ 'some_record' => @some_record&.to_h,
894
+ 'some_optional_record' => @some_optional_record&.to_h,
895
+ 'some_record_array' => @some_record_array.map { |v| v&.to_h },
896
+ 'some_record_map' => @some_record_map.transform_values { |v| v&.to_h },
897
+ 'some_enum_array' => @some_enum_array.map { |v| v&.to_h },
898
+ 'some_optional_enum' => @some_optional_enum&.to_h,
899
+ 'some_enum_with_default' => @some_enum_with_default&.to_h
900
+ }
901
+ end
902
+ end
903
+ end
904
+
905
+
906
+ spec/app/lib/schema_classes/my_schema_with_date_time.rb:
907
+ # frozen_string_literal: true
908
+
909
+ # This file is autogenerated by Deimos, Do NOT modify
910
+ module Schemas
911
+ ### Primary Schema Class ###
912
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithDateTimes
913
+ class MySchemaWithDateTime < Deimos::SchemaClass::Record
914
+
915
+ ### Attribute Accessors ###
916
+ # @param value [String]
917
+ attr_accessor :test_id
918
+ # @param value [Integer, nil]
919
+ attr_accessor :updated_at
920
+ # @param value [nil, Integer]
921
+ attr_accessor :some_int
922
+ # @param value [nil, Integer]
923
+ attr_accessor :some_datetime_int
924
+ # @param value [String]
925
+ attr_accessor :timestamp
926
+
927
+ # @override
928
+ def initialize(test_id: nil,
929
+ updated_at: nil,
930
+ some_int: nil,
931
+ some_datetime_int: nil,
932
+ timestamp: nil)
933
+ super
934
+ self.test_id = test_id
935
+ self.updated_at = updated_at
936
+ self.some_int = some_int
937
+ self.some_datetime_int = some_datetime_int
938
+ self.timestamp = timestamp
939
+ end
940
+
941
+ # @override
942
+ def schema
943
+ 'MySchemaWithDateTimes'
944
+ end
945
+
946
+ # @override
947
+ def namespace
948
+ 'com.my-namespace'
949
+ end
950
+
951
+ # @override
952
+ def to_h
953
+ {
954
+ 'test_id' => @test_id,
955
+ 'updated_at' => @updated_at,
956
+ 'some_int' => @some_int,
957
+ 'some_datetime_int' => @some_datetime_int,
958
+ 'timestamp' => @timestamp
959
+ }
960
+ end
961
+ end
962
+ end
963
+
964
+
965
+ spec/app/lib/schema_classes/my_schema_with_id.rb:
966
+ # frozen_string_literal: true
967
+
968
+ # This file is autogenerated by Deimos, Do NOT modify
969
+ module Schemas
970
+ ### Primary Schema Class ###
971
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithId
972
+ class MySchemaWithId < Deimos::SchemaClass::Record
973
+
974
+ ### Attribute Accessors ###
975
+ # @param value [String]
976
+ attr_accessor :test_id
977
+ # @param value [Integer]
978
+ attr_accessor :some_int
979
+ # @param value [String]
980
+ attr_accessor :message_id
981
+ # @param value [String]
982
+ attr_accessor :timestamp
983
+
984
+ # @override
985
+ def initialize(test_id: nil,
986
+ some_int: nil,
987
+ message_id: nil,
988
+ timestamp: nil)
989
+ super
990
+ self.test_id = test_id
991
+ self.some_int = some_int
992
+ self.message_id = message_id
993
+ self.timestamp = timestamp
994
+ end
995
+
996
+ # @override
997
+ def schema
998
+ 'MySchemaWithId'
999
+ end
1000
+
1001
+ # @override
1002
+ def namespace
1003
+ 'com.my-namespace'
1004
+ end
1005
+
1006
+ # @override
1007
+ def to_h
1008
+ {
1009
+ 'test_id' => @test_id,
1010
+ 'some_int' => @some_int,
1011
+ 'message_id' => @message_id,
1012
+ 'timestamp' => @timestamp
1013
+ }
1014
+ end
1015
+ end
1016
+ end
1017
+
1018
+
1019
+ spec/app/lib/schema_classes/my_schema_with_unique_id.rb:
1020
+ # frozen_string_literal: true
1021
+
1022
+ # This file is autogenerated by Deimos, Do NOT modify
1023
+ module Schemas
1024
+ ### Primary Schema Class ###
1025
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithUniqueId
1026
+ class MySchemaWithUniqueId < Deimos::SchemaClass::Record
1027
+
1028
+ ### Attribute Accessors ###
1029
+ # @param value [Integer]
1030
+ attr_accessor :id
1031
+ # @param value [String]
1032
+ attr_accessor :test_id
1033
+ # @param value [Integer]
1034
+ attr_accessor :some_int
1035
+ # @param value [String]
1036
+ attr_accessor :message_id
1037
+ # @param value [String]
1038
+ attr_accessor :timestamp
1039
+
1040
+ # @override
1041
+ def initialize(id: nil,
1042
+ test_id: nil,
1043
+ some_int: nil,
1044
+ message_id: nil,
1045
+ timestamp: nil)
1046
+ super
1047
+ self.id = id
1048
+ self.test_id = test_id
1049
+ self.some_int = some_int
1050
+ self.message_id = message_id
1051
+ self.timestamp = timestamp
1052
+ end
1053
+
1054
+ # @override
1055
+ def schema
1056
+ 'MySchemaWithUniqueId'
1057
+ end
1058
+
1059
+ # @override
1060
+ def namespace
1061
+ 'com.my-namespace'
1062
+ end
1063
+
1064
+ # @override
1065
+ def to_h
1066
+ {
1067
+ 'id' => @id,
1068
+ 'test_id' => @test_id,
1069
+ 'some_int' => @some_int,
1070
+ 'message_id' => @message_id,
1071
+ 'timestamp' => @timestamp
1072
+ }
1073
+ end
1074
+ end
1075
+ end
1076
+
1077
+
1078
+ spec/app/lib/schema_classes/update_request.rb:
1079
+ # frozen_string_literal: true
1080
+
1081
+ # This file is autogenerated by Deimos, Do NOT modify
1082
+ module Schemas
1083
+ ### Primary Schema Class ###
1084
+ # Autogenerated Schema for Record at com.my-namespace.request.UpdateRequest
1085
+ class UpdateRequest < Deimos::SchemaClass::Record
1086
+
1087
+ ### Attribute Accessors ###
1088
+ # @param value [String]
1089
+ attr_accessor :update_request_id
1090
+
1091
+ # @override
1092
+ def initialize(update_request_id: nil)
1093
+ super
1094
+ self.update_request_id = update_request_id
1095
+ end
1096
+
1097
+ # @override
1098
+ def schema
1099
+ 'UpdateRequest'
1100
+ end
1101
+
1102
+ # @override
1103
+ def namespace
1104
+ 'com.my-namespace.request'
1105
+ end
1106
+
1107
+ # @override
1108
+ def to_h
1109
+ {
1110
+ 'update_request_id' => @update_request_id
1111
+ }
1112
+ end
1113
+ end
1114
+ end
1115
+
1116
+
1117
+ spec/app/lib/schema_classes/update_response.rb:
1118
+ # frozen_string_literal: true
1119
+
1120
+ # This file is autogenerated by Deimos, Do NOT modify
1121
+ module Schemas
1122
+ ### Primary Schema Class ###
1123
+ # Autogenerated Schema for Record at com.my-namespace.response.UpdateResponse
1124
+ class UpdateResponse < Deimos::SchemaClass::Record
1125
+
1126
+ ### Attribute Accessors ###
1127
+ # @param value [String]
1128
+ attr_accessor :update_response_id
1129
+
1130
+ # @override
1131
+ def initialize(update_response_id: nil)
1132
+ super
1133
+ self.update_response_id = update_response_id
1134
+ end
1135
+
1136
+ # @override
1137
+ def schema
1138
+ 'UpdateResponse'
1139
+ end
1140
+
1141
+ # @override
1142
+ def namespace
1143
+ 'com.my-namespace.response'
1144
+ end
1145
+
1146
+ # @override
1147
+ def to_h
1148
+ {
1149
+ 'update_response_id' => @update_response_id
1150
+ }
1151
+ end
1152
+ end
1153
+ end
1154
+
1155
+
1156
+ spec/app/lib/schema_classes/wibble.rb:
1157
+ # frozen_string_literal: true
1158
+
1159
+ # This file is autogenerated by Deimos, Do NOT modify
1160
+ module Schemas
1161
+ ### Primary Schema Class ###
1162
+ # Autogenerated Schema for Record at com.my-namespace.Wibble
1163
+ class Wibble < Deimos::SchemaClass::Record
1164
+
1165
+ ### Attribute Accessors ###
1166
+ # @param value [Integer]
1167
+ attr_accessor :id
1168
+ # @param value [Integer]
1169
+ attr_accessor :wibble_id
1170
+ # @param value [String]
1171
+ attr_accessor :name
1172
+ # @param value [String]
1173
+ attr_accessor :floop
1174
+ # @param value [Integer]
1175
+ attr_accessor :birthday_int
1176
+ # @param value [Integer]
1177
+ attr_accessor :birthday_long
1178
+ # @param value [nil, Integer]
1179
+ attr_accessor :birthday_optional
1180
+ # @param value [Integer]
1181
+ attr_accessor :updated_at
1182
+ # @param value [Integer]
1183
+ attr_accessor :created_at
1184
+
1185
+ # @override
1186
+ def initialize(id: nil,
1187
+ wibble_id: nil,
1188
+ name: nil,
1189
+ floop: nil,
1190
+ birthday_int: nil,
1191
+ birthday_long: nil,
1192
+ birthday_optional: nil,
1193
+ updated_at: nil,
1194
+ created_at: nil)
1195
+ super
1196
+ self.id = id
1197
+ self.wibble_id = wibble_id
1198
+ self.name = name
1199
+ self.floop = floop
1200
+ self.birthday_int = birthday_int
1201
+ self.birthday_long = birthday_long
1202
+ self.birthday_optional = birthday_optional
1203
+ self.updated_at = updated_at
1204
+ self.created_at = created_at
1205
+ end
1206
+
1207
+ # @override
1208
+ def schema
1209
+ 'Wibble'
1210
+ end
1211
+
1212
+ # @override
1213
+ def namespace
1214
+ 'com.my-namespace'
1215
+ end
1216
+
1217
+ # @override
1218
+ def to_h
1219
+ {
1220
+ 'id' => @id,
1221
+ 'wibble_id' => @wibble_id,
1222
+ 'name' => @name,
1223
+ 'floop' => @floop,
1224
+ 'birthday_int' => @birthday_int,
1225
+ 'birthday_long' => @birthday_long,
1226
+ 'birthday_optional' => @birthday_optional,
1227
+ 'updated_at' => @updated_at,
1228
+ 'created_at' => @created_at
1229
+ }
1230
+ end
1231
+ end
1232
+ end
1233
+
1234
+
1235
+ spec/app/lib/schema_classes/widget.rb:
1236
+ # frozen_string_literal: true
1237
+
1238
+ # This file is autogenerated by Deimos, Do NOT modify
1239
+ module Schemas
1240
+ ### Primary Schema Class ###
1241
+ # Autogenerated Schema for Record at com.my-namespace.Widget
1242
+ class Widget < Deimos::SchemaClass::Record
1243
+
1244
+ ### Attribute Accessors ###
1245
+ # @param value [Integer]
1246
+ attr_accessor :id
1247
+ # @param value [Integer]
1248
+ attr_accessor :widget_id
1249
+ # @param value [String]
1250
+ attr_accessor :name
1251
+ # @param value [Integer]
1252
+ attr_accessor :updated_at
1253
+ # @param value [Integer]
1254
+ attr_accessor :created_at
1255
+
1256
+ # @override
1257
+ def initialize(id: nil,
1258
+ widget_id: nil,
1259
+ name: nil,
1260
+ updated_at: nil,
1261
+ created_at: nil)
1262
+ super
1263
+ self.id = id
1264
+ self.widget_id = widget_id
1265
+ self.name = name
1266
+ self.updated_at = updated_at
1267
+ self.created_at = created_at
1268
+ end
1269
+
1270
+ # @override
1271
+ def schema
1272
+ 'Widget'
1273
+ end
1274
+
1275
+ # @override
1276
+ def namespace
1277
+ 'com.my-namespace'
1278
+ end
1279
+
1280
+ # @override
1281
+ def to_h
1282
+ {
1283
+ 'id' => @id,
1284
+ 'widget_id' => @widget_id,
1285
+ 'name' => @name,
1286
+ 'updated_at' => @updated_at,
1287
+ 'created_at' => @created_at
1288
+ }
1289
+ end
1290
+ end
1291
+ end
1292
+
1293
+
1294
+ spec/app/lib/schema_classes/widget_the_second.rb:
1295
+ # frozen_string_literal: true
1296
+
1297
+ # This file is autogenerated by Deimos, Do NOT modify
1298
+ module Schemas
1299
+ ### Primary Schema Class ###
1300
+ # Autogenerated Schema for Record at com.my-namespace.WidgetTheSecond
1301
+ class WidgetTheSecond < Deimos::SchemaClass::Record
1302
+
1303
+ ### Attribute Accessors ###
1304
+ # @param value [Integer]
1305
+ attr_accessor :id
1306
+ # @param value [Integer]
1307
+ attr_accessor :widget_id
1308
+ # @param value [String]
1309
+ attr_accessor :model_id
1310
+ # @param value [Integer]
1311
+ attr_accessor :updated_at
1312
+ # @param value [Integer]
1313
+ attr_accessor :created_at
1314
+
1315
+ # @override
1316
+ def initialize(id: nil,
1317
+ widget_id: nil,
1318
+ model_id: nil,
1319
+ updated_at: nil,
1320
+ created_at: nil)
1321
+ super
1322
+ self.id = id
1323
+ self.widget_id = widget_id
1324
+ self.model_id = model_id
1325
+ self.updated_at = updated_at
1326
+ self.created_at = created_at
1327
+ end
1328
+
1329
+ # @override
1330
+ def schema
1331
+ 'WidgetTheSecond'
1332
+ end
1333
+
1334
+ # @override
1335
+ def namespace
1336
+ 'com.my-namespace'
1337
+ end
1338
+
1339
+ # @override
1340
+ def to_h
1341
+ {
1342
+ 'id' => @id,
1343
+ 'widget_id' => @widget_id,
1344
+ 'model_id' => @model_id,
1345
+ 'updated_at' => @updated_at,
1346
+ 'created_at' => @created_at
1347
+ }
1348
+ end
1349
+ end
1350
+ end
1351
+