deimos-ruby 1.14.3 → 1.14.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,6 +67,75 @@ module Schemas
67
67
  end
68
68
 
69
69
 
70
+ spec/app/lib/schema_classes/another_enum.rb:
71
+ # frozen_string_literal: true
72
+
73
+ # This file is autogenerated by Deimos, Do NOT modify
74
+ module Schemas
75
+ ### Primary Schema Class ###
76
+ # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
77
+ class AnotherEnum < Deimos::SchemaClass::Enum
78
+ # @return ['sym3', 'sym4']
79
+ attr_accessor :another_enum
80
+
81
+ # :nodoc:
82
+ def initialize(another_enum)
83
+ super
84
+ self.another_enum = another_enum
85
+ end
86
+
87
+ # @override
88
+ def symbols
89
+ %w(sym3 sym4)
90
+ end
91
+
92
+ # @override
93
+ def to_h
94
+ @another_enum
95
+ end
96
+ end
97
+ end
98
+
99
+
100
+ spec/app/lib/schema_classes/create_topic.rb:
101
+ # frozen_string_literal: true
102
+
103
+ # This file is autogenerated by Deimos, Do NOT modify
104
+ module Schemas
105
+ ### Primary Schema Class ###
106
+ # Autogenerated Schema for Record at com.my-namespace.response.CreateTopic
107
+ class CreateTopic < Deimos::SchemaClass::Record
108
+
109
+ ### Attribute Accessors ###
110
+ # @param value [String]
111
+ attr_accessor :response_id
112
+
113
+ # @override
114
+ def initialize(response_id: nil)
115
+ super
116
+ self.response_id = response_id
117
+ end
118
+
119
+ # @override
120
+ def schema
121
+ 'CreateTopic'
122
+ end
123
+
124
+ # @override
125
+ def namespace
126
+ 'com.my-namespace.response'
127
+ end
128
+
129
+ # @override
130
+ def to_h
131
+ {
132
+ 'response_id' => @response_id
133
+ }
134
+ end
135
+ end
136
+ end
137
+
138
+
70
139
  spec/app/lib/schema_classes/generated.rb:
71
140
  # frozen_string_literal: true
72
141
 
@@ -174,6 +243,45 @@ module Schemas
174
243
  end
175
244
 
176
245
 
246
+ spec/app/lib/schema_classes/index.rb:
247
+ # frozen_string_literal: true
248
+
249
+ # This file is autogenerated by Deimos, Do NOT modify
250
+ module Schemas
251
+ ### Primary Schema Class ###
252
+ # Autogenerated Schema for Record at com.my-namespace.response.Index
253
+ class Index < Deimos::SchemaClass::Record
254
+
255
+ ### Attribute Accessors ###
256
+ # @param value [String]
257
+ attr_accessor :response_id
258
+
259
+ # @override
260
+ def initialize(response_id: nil)
261
+ super
262
+ self.response_id = response_id
263
+ end
264
+
265
+ # @override
266
+ def schema
267
+ 'Index'
268
+ end
269
+
270
+ # @override
271
+ def namespace
272
+ 'com.my-namespace.response'
273
+ end
274
+
275
+ # @override
276
+ def to_h
277
+ {
278
+ 'response_id' => @response_id
279
+ }
280
+ end
281
+ end
282
+ end
283
+
284
+
177
285
  spec/app/lib/schema_classes/my_nested_record.rb:
178
286
  # frozen_string_literal: true
179
287
 
@@ -357,6 +465,89 @@ module Schemas
357
465
  end
358
466
 
359
467
 
468
+ spec/app/lib/schema_classes/my_schema_compound_key.rb:
469
+ # frozen_string_literal: true
470
+
471
+ # This file is autogenerated by Deimos, Do NOT modify
472
+ module Schemas
473
+ ### Primary Schema Class ###
474
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaCompound_key
475
+ class MySchemaCompoundKey < Deimos::SchemaClass::Record
476
+
477
+ ### Attribute Accessors ###
478
+ # @param value [String]
479
+ attr_accessor :part_one
480
+ # @param value [String]
481
+ attr_accessor :part_two
482
+
483
+ # @override
484
+ def initialize(part_one: nil,
485
+ part_two: nil)
486
+ super
487
+ self.part_one = part_one
488
+ self.part_two = part_two
489
+ end
490
+
491
+ # @override
492
+ def schema
493
+ 'MySchemaCompound_key'
494
+ end
495
+
496
+ # @override
497
+ def namespace
498
+ 'com.my-namespace'
499
+ end
500
+
501
+ # @override
502
+ def to_h
503
+ {
504
+ 'part_one' => @part_one,
505
+ 'part_two' => @part_two
506
+ }
507
+ end
508
+ end
509
+ end
510
+
511
+
512
+ spec/app/lib/schema_classes/my_schema_id_key.rb:
513
+ # frozen_string_literal: true
514
+
515
+ # This file is autogenerated by Deimos, Do NOT modify
516
+ module Schemas
517
+ ### Primary Schema Class ###
518
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaId_key
519
+ class MySchemaIdKey < Deimos::SchemaClass::Record
520
+
521
+ ### Attribute Accessors ###
522
+ # @param value [Integer]
523
+ attr_accessor :id
524
+
525
+ # @override
526
+ def initialize(id: nil)
527
+ super
528
+ self.id = id
529
+ end
530
+
531
+ # @override
532
+ def schema
533
+ 'MySchemaId_key'
534
+ end
535
+
536
+ # @override
537
+ def namespace
538
+ 'com.my-namespace'
539
+ end
540
+
541
+ # @override
542
+ def to_h
543
+ {
544
+ 'id' => @id
545
+ }
546
+ end
547
+ end
548
+ end
549
+
550
+
360
551
  spec/app/lib/schema_classes/my_schema_key.rb:
361
552
  # frozen_string_literal: true
362
553
 
@@ -395,3 +586,753 @@ module Schemas
395
586
  end
396
587
  end
397
588
 
589
+
590
+ spec/app/lib/schema_classes/my_schema_with_boolean.rb:
591
+ # frozen_string_literal: true
592
+
593
+ # This file is autogenerated by Deimos, Do NOT modify
594
+ module Schemas
595
+ ### Primary Schema Class ###
596
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithBooleans
597
+ class MySchemaWithBoolean < Deimos::SchemaClass::Record
598
+
599
+ ### Attribute Accessors ###
600
+ # @param value [String]
601
+ attr_accessor :test_id
602
+ # @param value [Boolean]
603
+ attr_accessor :some_bool
604
+
605
+ # @override
606
+ def initialize(test_id: nil,
607
+ some_bool: nil)
608
+ super
609
+ self.test_id = test_id
610
+ self.some_bool = some_bool
611
+ end
612
+
613
+ # @override
614
+ def schema
615
+ 'MySchemaWithBooleans'
616
+ end
617
+
618
+ # @override
619
+ def namespace
620
+ 'com.my-namespace'
621
+ end
622
+
623
+ # @override
624
+ def to_h
625
+ {
626
+ 'test_id' => @test_id,
627
+ 'some_bool' => @some_bool
628
+ }
629
+ end
630
+ end
631
+ end
632
+
633
+
634
+ spec/app/lib/schema_classes/my_schema_with_circular_reference.rb:
635
+ # frozen_string_literal: true
636
+
637
+ # This file is autogenerated by Deimos, Do NOT modify
638
+ module Schemas
639
+ ### Primary Schema Class ###
640
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithCircularReference
641
+ class MySchemaWithCircularReference < Deimos::SchemaClass::Record
642
+
643
+ ### Attribute Readers ###
644
+ # @return [Hash<String, Property>]
645
+ attr_reader :properties
646
+
647
+ ### Attribute Writers ###
648
+ # @param values [Hash<String, Property>]
649
+ def properties=(values)
650
+ @properties = values.transform_values do |value|
651
+ Property.initialize_from_value(value)
652
+ end
653
+ end
654
+
655
+ # @override
656
+ def initialize(properties: {})
657
+ super
658
+ self.properties = properties
659
+ end
660
+
661
+ # @override
662
+ def schema
663
+ 'MySchemaWithCircularReference'
664
+ end
665
+
666
+ # @override
667
+ def namespace
668
+ 'com.my-namespace'
669
+ end
670
+
671
+ # @override
672
+ def to_h
673
+ {
674
+ 'properties' => @properties.transform_values { |v| v&.to_h }
675
+ }
676
+ end
677
+ end
678
+ end
679
+
680
+
681
+ spec/app/lib/schema_classes/my_schema_with_complex_type.rb:
682
+ # frozen_string_literal: true
683
+
684
+ # This file is autogenerated by Deimos, Do NOT modify
685
+ module Schemas
686
+ ### Primary Schema Class ###
687
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithComplexTypes
688
+ class MySchemaWithComplexType < Deimos::SchemaClass::Record
689
+
690
+ ### Attribute Readers ###
691
+ # @return [ARecord]
692
+ attr_reader :some_record
693
+ # @return [nil, ARecord]
694
+ attr_reader :some_optional_record
695
+ # @return [Array<ARecord>]
696
+ attr_reader :some_record_array
697
+ # @return [Hash<String, ARecord>]
698
+ attr_reader :some_record_map
699
+ # @return [Array<AnEnum>]
700
+ attr_reader :some_enum_array
701
+ # @return [nil, AnotherEnum]
702
+ attr_reader :some_optional_enum
703
+ # @return [YetAnotherEnum]
704
+ attr_reader :some_enum_with_default
705
+
706
+ ### Attribute Accessors ###
707
+ # @param value [String]
708
+ attr_accessor :test_id
709
+ # @param value [Float]
710
+ attr_accessor :test_float
711
+ # @param values [Array<String>]
712
+ attr_accessor :test_string_array
713
+ # @param values [Array<Integer>]
714
+ attr_accessor :test_int_array
715
+ # @param value [Integer, nil]
716
+ attr_accessor :test_optional_int
717
+ # @param values [Hash<String, Integer>]
718
+ attr_accessor :some_integer_map
719
+
720
+ ### Attribute Writers ###
721
+ # @param value [ARecord]
722
+ def some_record=(value)
723
+ @some_record = ARecord.initialize_from_value(value)
724
+ end
725
+
726
+ # @param value [nil, ARecord]
727
+ def some_optional_record=(value)
728
+ @some_optional_record = ARecord.initialize_from_value(value)
729
+ end
730
+
731
+ # @param values [Array<ARecord>]
732
+ def some_record_array=(values)
733
+ @some_record_array = values.map do |value|
734
+ ARecord.initialize_from_value(value)
735
+ end
736
+ end
737
+
738
+ # @param values [Hash<String, ARecord>]
739
+ def some_record_map=(values)
740
+ @some_record_map = values.transform_values do |value|
741
+ ARecord.initialize_from_value(value)
742
+ end
743
+ end
744
+
745
+ # @param values [Array<AnEnum>]
746
+ def some_enum_array=(values)
747
+ @some_enum_array = values.map do |value|
748
+ AnEnum.initialize_from_value(value)
749
+ end
750
+ end
751
+
752
+ # @param value [nil, AnotherEnum]
753
+ def some_optional_enum=(value)
754
+ @some_optional_enum = AnotherEnum.initialize_from_value(value)
755
+ end
756
+
757
+ # @param value [YetAnotherEnum]
758
+ def some_enum_with_default=(value)
759
+ @some_enum_with_default = YetAnotherEnum.initialize_from_value(value)
760
+ end
761
+
762
+ # @override
763
+ def initialize(test_id: nil,
764
+ test_float: nil,
765
+ test_string_array: ["test"],
766
+ test_int_array: [123],
767
+ test_optional_int: 123,
768
+ some_integer_map: {"abc"=>123},
769
+ some_record: {"a_record_field"=>"Test String"},
770
+ some_optional_record: nil,
771
+ some_record_array: nil,
772
+ some_record_map: nil,
773
+ some_enum_array: nil,
774
+ some_optional_enum: nil,
775
+ some_enum_with_default: "sym6")
776
+ super
777
+ self.test_id = test_id
778
+ self.test_float = test_float
779
+ self.test_string_array = test_string_array
780
+ self.test_int_array = test_int_array
781
+ self.test_optional_int = test_optional_int
782
+ self.some_integer_map = some_integer_map
783
+ self.some_record = some_record
784
+ self.some_optional_record = some_optional_record
785
+ self.some_record_array = some_record_array
786
+ self.some_record_map = some_record_map
787
+ self.some_enum_array = some_enum_array
788
+ self.some_optional_enum = some_optional_enum
789
+ self.some_enum_with_default = some_enum_with_default
790
+ end
791
+
792
+ # @override
793
+ def schema
794
+ 'MySchemaWithComplexTypes'
795
+ end
796
+
797
+ # @override
798
+ def namespace
799
+ 'com.my-namespace'
800
+ end
801
+
802
+ # @override
803
+ def to_h
804
+ {
805
+ 'test_id' => @test_id,
806
+ 'test_float' => @test_float,
807
+ 'test_string_array' => @test_string_array,
808
+ 'test_int_array' => @test_int_array,
809
+ 'test_optional_int' => @test_optional_int,
810
+ 'some_integer_map' => @some_integer_map,
811
+ 'some_record' => @some_record&.to_h,
812
+ 'some_optional_record' => @some_optional_record&.to_h,
813
+ 'some_record_array' => @some_record_array.map { |v| v&.to_h },
814
+ 'some_record_map' => @some_record_map.transform_values { |v| v&.to_h },
815
+ 'some_enum_array' => @some_enum_array.map { |v| v&.to_h },
816
+ 'some_optional_enum' => @some_optional_enum&.to_h,
817
+ 'some_enum_with_default' => @some_enum_with_default&.to_h
818
+ }
819
+ end
820
+ end
821
+ end
822
+
823
+
824
+ spec/app/lib/schema_classes/my_schema_with_date_time.rb:
825
+ # frozen_string_literal: true
826
+
827
+ # This file is autogenerated by Deimos, Do NOT modify
828
+ module Schemas
829
+ ### Primary Schema Class ###
830
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithDateTimes
831
+ class MySchemaWithDateTime < Deimos::SchemaClass::Record
832
+
833
+ ### Attribute Accessors ###
834
+ # @param value [String]
835
+ attr_accessor :test_id
836
+ # @param value [Integer, nil]
837
+ attr_accessor :updated_at
838
+ # @param value [nil, Integer]
839
+ attr_accessor :some_int
840
+ # @param value [nil, Integer]
841
+ attr_accessor :some_datetime_int
842
+ # @param value [String]
843
+ attr_accessor :timestamp
844
+
845
+ # @override
846
+ def initialize(test_id: nil,
847
+ updated_at: nil,
848
+ some_int: nil,
849
+ some_datetime_int: nil,
850
+ timestamp: nil)
851
+ super
852
+ self.test_id = test_id
853
+ self.updated_at = updated_at
854
+ self.some_int = some_int
855
+ self.some_datetime_int = some_datetime_int
856
+ self.timestamp = timestamp
857
+ end
858
+
859
+ # @override
860
+ def schema
861
+ 'MySchemaWithDateTimes'
862
+ end
863
+
864
+ # @override
865
+ def namespace
866
+ 'com.my-namespace'
867
+ end
868
+
869
+ # @override
870
+ def to_h
871
+ {
872
+ 'test_id' => @test_id,
873
+ 'updated_at' => @updated_at,
874
+ 'some_int' => @some_int,
875
+ 'some_datetime_int' => @some_datetime_int,
876
+ 'timestamp' => @timestamp
877
+ }
878
+ end
879
+ end
880
+ end
881
+
882
+
883
+ spec/app/lib/schema_classes/my_schema_with_id.rb:
884
+ # frozen_string_literal: true
885
+
886
+ # This file is autogenerated by Deimos, Do NOT modify
887
+ module Schemas
888
+ ### Primary Schema Class ###
889
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithId
890
+ class MySchemaWithId < Deimos::SchemaClass::Record
891
+
892
+ ### Attribute Accessors ###
893
+ # @param value [String]
894
+ attr_accessor :test_id
895
+ # @param value [Integer]
896
+ attr_accessor :some_int
897
+ # @param value [String]
898
+ attr_accessor :message_id
899
+ # @param value [String]
900
+ attr_accessor :timestamp
901
+
902
+ # @override
903
+ def initialize(test_id: nil,
904
+ some_int: nil,
905
+ message_id: nil,
906
+ timestamp: nil)
907
+ super
908
+ self.test_id = test_id
909
+ self.some_int = some_int
910
+ self.message_id = message_id
911
+ self.timestamp = timestamp
912
+ end
913
+
914
+ # @override
915
+ def schema
916
+ 'MySchemaWithId'
917
+ end
918
+
919
+ # @override
920
+ def namespace
921
+ 'com.my-namespace'
922
+ end
923
+
924
+ # @override
925
+ def to_h
926
+ {
927
+ 'test_id' => @test_id,
928
+ 'some_int' => @some_int,
929
+ 'message_id' => @message_id,
930
+ 'timestamp' => @timestamp
931
+ }
932
+ end
933
+ end
934
+ end
935
+
936
+
937
+ spec/app/lib/schema_classes/my_schema_with_unique_id.rb:
938
+ # frozen_string_literal: true
939
+
940
+ # This file is autogenerated by Deimos, Do NOT modify
941
+ module Schemas
942
+ ### Primary Schema Class ###
943
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithUniqueId
944
+ class MySchemaWithUniqueId < Deimos::SchemaClass::Record
945
+
946
+ ### Attribute Accessors ###
947
+ # @param value [Integer]
948
+ attr_accessor :id
949
+ # @param value [String]
950
+ attr_accessor :test_id
951
+ # @param value [Integer]
952
+ attr_accessor :some_int
953
+ # @param value [String]
954
+ attr_accessor :message_id
955
+ # @param value [String]
956
+ attr_accessor :timestamp
957
+
958
+ # @override
959
+ def initialize(id: nil,
960
+ test_id: nil,
961
+ some_int: nil,
962
+ message_id: nil,
963
+ timestamp: nil)
964
+ super
965
+ self.id = id
966
+ self.test_id = test_id
967
+ self.some_int = some_int
968
+ self.message_id = message_id
969
+ self.timestamp = timestamp
970
+ end
971
+
972
+ # @override
973
+ def schema
974
+ 'MySchemaWithUniqueId'
975
+ end
976
+
977
+ # @override
978
+ def namespace
979
+ 'com.my-namespace'
980
+ end
981
+
982
+ # @override
983
+ def to_h
984
+ {
985
+ 'id' => @id,
986
+ 'test_id' => @test_id,
987
+ 'some_int' => @some_int,
988
+ 'message_id' => @message_id,
989
+ 'timestamp' => @timestamp
990
+ }
991
+ end
992
+ end
993
+ end
994
+
995
+
996
+ spec/app/lib/schema_classes/property.rb:
997
+ # frozen_string_literal: true
998
+
999
+ # This file is autogenerated by Deimos, Do NOT modify
1000
+ module Schemas
1001
+ ### Primary Schema Class ###
1002
+ # Autogenerated Schema for Record at com.my-namespace.Property
1003
+ class Property < Deimos::SchemaClass::Record
1004
+
1005
+ ### Attribute Accessors ###
1006
+ # @param value [Boolean, Integer, Integer, Float, Float, String, Array<Property>, Hash<String, Property>]
1007
+ attr_accessor :property
1008
+
1009
+ # @override
1010
+ def initialize(property: nil)
1011
+ super
1012
+ self.property = property
1013
+ end
1014
+
1015
+ # @override
1016
+ def schema
1017
+ 'Property'
1018
+ end
1019
+
1020
+ # @override
1021
+ def namespace
1022
+ 'com.my-namespace'
1023
+ end
1024
+
1025
+ # @override
1026
+ def to_h
1027
+ {
1028
+ 'property' => @property
1029
+ }
1030
+ end
1031
+ end
1032
+ end
1033
+
1034
+
1035
+ spec/app/lib/schema_classes/update_request.rb:
1036
+ # frozen_string_literal: true
1037
+
1038
+ # This file is autogenerated by Deimos, Do NOT modify
1039
+ module Schemas
1040
+ ### Primary Schema Class ###
1041
+ # Autogenerated Schema for Record at com.my-namespace.request.UpdateRequest
1042
+ class UpdateRequest < Deimos::SchemaClass::Record
1043
+
1044
+ ### Attribute Accessors ###
1045
+ # @param value [String]
1046
+ attr_accessor :update_request_id
1047
+
1048
+ # @override
1049
+ def initialize(update_request_id: nil)
1050
+ super
1051
+ self.update_request_id = update_request_id
1052
+ end
1053
+
1054
+ # @override
1055
+ def schema
1056
+ 'UpdateRequest'
1057
+ end
1058
+
1059
+ # @override
1060
+ def namespace
1061
+ 'com.my-namespace.request'
1062
+ end
1063
+
1064
+ # @override
1065
+ def to_h
1066
+ {
1067
+ 'update_request_id' => @update_request_id
1068
+ }
1069
+ end
1070
+ end
1071
+ end
1072
+
1073
+
1074
+ spec/app/lib/schema_classes/update_response.rb:
1075
+ # frozen_string_literal: true
1076
+
1077
+ # This file is autogenerated by Deimos, Do NOT modify
1078
+ module Schemas
1079
+ ### Primary Schema Class ###
1080
+ # Autogenerated Schema for Record at com.my-namespace.response.UpdateResponse
1081
+ class UpdateResponse < Deimos::SchemaClass::Record
1082
+
1083
+ ### Attribute Accessors ###
1084
+ # @param value [String]
1085
+ attr_accessor :update_response_id
1086
+
1087
+ # @override
1088
+ def initialize(update_response_id: nil)
1089
+ super
1090
+ self.update_response_id = update_response_id
1091
+ end
1092
+
1093
+ # @override
1094
+ def schema
1095
+ 'UpdateResponse'
1096
+ end
1097
+
1098
+ # @override
1099
+ def namespace
1100
+ 'com.my-namespace.response'
1101
+ end
1102
+
1103
+ # @override
1104
+ def to_h
1105
+ {
1106
+ 'update_response_id' => @update_response_id
1107
+ }
1108
+ end
1109
+ end
1110
+ end
1111
+
1112
+
1113
+ spec/app/lib/schema_classes/wibble.rb:
1114
+ # frozen_string_literal: true
1115
+
1116
+ # This file is autogenerated by Deimos, Do NOT modify
1117
+ module Schemas
1118
+ ### Primary Schema Class ###
1119
+ # Autogenerated Schema for Record at com.my-namespace.Wibble
1120
+ class Wibble < Deimos::SchemaClass::Record
1121
+
1122
+ ### Attribute Accessors ###
1123
+ # @param value [Integer]
1124
+ attr_accessor :id
1125
+ # @param value [Integer]
1126
+ attr_accessor :wibble_id
1127
+ # @param value [String]
1128
+ attr_accessor :name
1129
+ # @param value [String]
1130
+ attr_accessor :floop
1131
+ # @param value [Integer]
1132
+ attr_accessor :birthday_int
1133
+ # @param value [Integer]
1134
+ attr_accessor :birthday_long
1135
+ # @param value [nil, Integer]
1136
+ attr_accessor :birthday_optional
1137
+ # @param value [Integer]
1138
+ attr_accessor :updated_at
1139
+ # @param value [Integer]
1140
+ attr_accessor :created_at
1141
+
1142
+ # @override
1143
+ def initialize(id: nil,
1144
+ wibble_id: nil,
1145
+ name: nil,
1146
+ floop: nil,
1147
+ birthday_int: nil,
1148
+ birthday_long: nil,
1149
+ birthday_optional: nil,
1150
+ updated_at: nil,
1151
+ created_at: nil)
1152
+ super
1153
+ self.id = id
1154
+ self.wibble_id = wibble_id
1155
+ self.name = name
1156
+ self.floop = floop
1157
+ self.birthday_int = birthday_int
1158
+ self.birthday_long = birthday_long
1159
+ self.birthday_optional = birthday_optional
1160
+ self.updated_at = updated_at
1161
+ self.created_at = created_at
1162
+ end
1163
+
1164
+ # @override
1165
+ def schema
1166
+ 'Wibble'
1167
+ end
1168
+
1169
+ # @override
1170
+ def namespace
1171
+ 'com.my-namespace'
1172
+ end
1173
+
1174
+ # @override
1175
+ def to_h
1176
+ {
1177
+ 'id' => @id,
1178
+ 'wibble_id' => @wibble_id,
1179
+ 'name' => @name,
1180
+ 'floop' => @floop,
1181
+ 'birthday_int' => @birthday_int,
1182
+ 'birthday_long' => @birthday_long,
1183
+ 'birthday_optional' => @birthday_optional,
1184
+ 'updated_at' => @updated_at,
1185
+ 'created_at' => @created_at
1186
+ }
1187
+ end
1188
+ end
1189
+ end
1190
+
1191
+
1192
+ spec/app/lib/schema_classes/widget.rb:
1193
+ # frozen_string_literal: true
1194
+
1195
+ # This file is autogenerated by Deimos, Do NOT modify
1196
+ module Schemas
1197
+ ### Primary Schema Class ###
1198
+ # Autogenerated Schema for Record at com.my-namespace.Widget
1199
+ class Widget < Deimos::SchemaClass::Record
1200
+
1201
+ ### Attribute Accessors ###
1202
+ # @param value [Integer]
1203
+ attr_accessor :id
1204
+ # @param value [Integer]
1205
+ attr_accessor :widget_id
1206
+ # @param value [String]
1207
+ attr_accessor :name
1208
+ # @param value [Integer]
1209
+ attr_accessor :updated_at
1210
+ # @param value [Integer]
1211
+ attr_accessor :created_at
1212
+
1213
+ # @override
1214
+ def initialize(id: nil,
1215
+ widget_id: nil,
1216
+ name: nil,
1217
+ updated_at: nil,
1218
+ created_at: nil)
1219
+ super
1220
+ self.id = id
1221
+ self.widget_id = widget_id
1222
+ self.name = name
1223
+ self.updated_at = updated_at
1224
+ self.created_at = created_at
1225
+ end
1226
+
1227
+ # @override
1228
+ def schema
1229
+ 'Widget'
1230
+ end
1231
+
1232
+ # @override
1233
+ def namespace
1234
+ 'com.my-namespace'
1235
+ end
1236
+
1237
+ # @override
1238
+ def to_h
1239
+ {
1240
+ 'id' => @id,
1241
+ 'widget_id' => @widget_id,
1242
+ 'name' => @name,
1243
+ 'updated_at' => @updated_at,
1244
+ 'created_at' => @created_at
1245
+ }
1246
+ end
1247
+ end
1248
+ end
1249
+
1250
+
1251
+ spec/app/lib/schema_classes/widget_the_second.rb:
1252
+ # frozen_string_literal: true
1253
+
1254
+ # This file is autogenerated by Deimos, Do NOT modify
1255
+ module Schemas
1256
+ ### Primary Schema Class ###
1257
+ # Autogenerated Schema for Record at com.my-namespace.WidgetTheSecond
1258
+ class WidgetTheSecond < Deimos::SchemaClass::Record
1259
+
1260
+ ### Attribute Accessors ###
1261
+ # @param value [Integer]
1262
+ attr_accessor :id
1263
+ # @param value [Integer]
1264
+ attr_accessor :widget_id
1265
+ # @param value [String]
1266
+ attr_accessor :model_id
1267
+ # @param value [Integer]
1268
+ attr_accessor :updated_at
1269
+ # @param value [Integer]
1270
+ attr_accessor :created_at
1271
+
1272
+ # @override
1273
+ def initialize(id: nil,
1274
+ widget_id: nil,
1275
+ model_id: nil,
1276
+ updated_at: nil,
1277
+ created_at: nil)
1278
+ super
1279
+ self.id = id
1280
+ self.widget_id = widget_id
1281
+ self.model_id = model_id
1282
+ self.updated_at = updated_at
1283
+ self.created_at = created_at
1284
+ end
1285
+
1286
+ # @override
1287
+ def schema
1288
+ 'WidgetTheSecond'
1289
+ end
1290
+
1291
+ # @override
1292
+ def namespace
1293
+ 'com.my-namespace'
1294
+ end
1295
+
1296
+ # @override
1297
+ def to_h
1298
+ {
1299
+ 'id' => @id,
1300
+ 'widget_id' => @widget_id,
1301
+ 'model_id' => @model_id,
1302
+ 'updated_at' => @updated_at,
1303
+ 'created_at' => @created_at
1304
+ }
1305
+ end
1306
+ end
1307
+ end
1308
+
1309
+
1310
+ spec/app/lib/schema_classes/yet_another_enum.rb:
1311
+ # frozen_string_literal: true
1312
+
1313
+ # This file is autogenerated by Deimos, Do NOT modify
1314
+ module Schemas
1315
+ ### Primary Schema Class ###
1316
+ # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
1317
+ class YetAnotherEnum < Deimos::SchemaClass::Enum
1318
+ # @return ['sym5', 'sym6']
1319
+ attr_accessor :yet_another_enum
1320
+
1321
+ # :nodoc:
1322
+ def initialize(yet_another_enum)
1323
+ super
1324
+ self.yet_another_enum = yet_another_enum
1325
+ end
1326
+
1327
+ # @override
1328
+ def symbols
1329
+ %w(sym5 sym6)
1330
+ end
1331
+
1332
+ # @override
1333
+ def to_h
1334
+ @yet_another_enum
1335
+ end
1336
+ end
1337
+ end
1338
+