deimos-ruby 1.14.4 → 1.14.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,363 @@
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
+
40
+ spec/app/lib/schema_classes/generated.rb:
41
+ # frozen_string_literal: true
42
+
43
+ # This file is autogenerated by Deimos, Do NOT modify
44
+ module Schemas
45
+ ### Primary Schema Class ###
46
+ # Autogenerated Schema for Record at com.my-namespace.Generated
47
+ class Generated < Deimos::SchemaClass::Record
48
+
49
+ ### Secondary Schema Classes ###
50
+ # Autogenerated Schema for Record at com.my-namespace.ARecord
51
+ class ARecord < Deimos::SchemaClass::Record
52
+
53
+ ### Attribute Accessors ###
54
+ # @param value [String]
55
+ attr_accessor :a_record_field
56
+
57
+ # @override
58
+ def initialize(a_record_field: nil)
59
+ super
60
+ self.a_record_field = a_record_field
61
+ end
62
+
63
+ # @override
64
+ def schema
65
+ 'ARecord'
66
+ end
67
+
68
+ # @override
69
+ def namespace
70
+ 'com.my-namespace'
71
+ end
72
+
73
+ # @override
74
+ def to_h
75
+ {
76
+ 'a_record_field' => @a_record_field
77
+ }
78
+ end
79
+ end
80
+
81
+ # Autogenerated Schema for Enum at com.my-namespace.AnEnum
82
+ class AnEnum < Deimos::SchemaClass::Enum
83
+ # @return ['sym1', 'sym2']
84
+ attr_accessor :an_enum
85
+
86
+ # :nodoc:
87
+ def initialize(an_enum)
88
+ super
89
+ self.an_enum = an_enum
90
+ end
91
+
92
+ # @override
93
+ def symbols
94
+ %w(sym1 sym2)
95
+ end
96
+
97
+ # @override
98
+ def to_h
99
+ @an_enum
100
+ end
101
+ end
102
+
103
+
104
+ ### Attribute Readers ###
105
+ # @return [AnEnum]
106
+ attr_reader :an_enum
107
+ # @return [ARecord]
108
+ attr_reader :a_record
109
+
110
+ ### Attribute Accessors ###
111
+ # @param value [String]
112
+ attr_accessor :a_string
113
+ # @param value [Integer]
114
+ attr_accessor :a_int
115
+ # @param value [Integer]
116
+ attr_accessor :a_long
117
+ # @param value [Float]
118
+ attr_accessor :a_float
119
+ # @param value [Float]
120
+ attr_accessor :a_double
121
+ # @param value [nil, Integer]
122
+ attr_accessor :an_optional_int
123
+ # @param values [Array<Integer>]
124
+ attr_accessor :an_array
125
+ # @param values [Hash<String, String>]
126
+ attr_accessor :a_map
127
+ # @param value [String]
128
+ attr_accessor :timestamp
129
+ # @param value [String]
130
+ attr_accessor :message_id
131
+
132
+ ### Attribute Writers ###
133
+ # @param value [AnEnum]
134
+ def an_enum=(value)
135
+ @an_enum = AnEnum.initialize_from_value(value)
136
+ end
137
+
138
+ # @param value [ARecord]
139
+ def a_record=(value)
140
+ @a_record = ARecord.initialize_from_value(value)
141
+ end
142
+
143
+ # @override
144
+ def initialize(a_string: nil,
145
+ a_int: nil,
146
+ a_long: nil,
147
+ a_float: nil,
148
+ a_double: nil,
149
+ an_optional_int: nil,
150
+ an_enum: nil,
151
+ an_array: nil,
152
+ a_map: nil,
153
+ timestamp: nil,
154
+ message_id: nil,
155
+ a_record: nil)
156
+ super
157
+ self.a_string = a_string
158
+ self.a_int = a_int
159
+ self.a_long = a_long
160
+ self.a_float = a_float
161
+ self.a_double = a_double
162
+ self.an_optional_int = an_optional_int
163
+ self.an_enum = an_enum
164
+ self.an_array = an_array
165
+ self.a_map = a_map
166
+ self.timestamp = timestamp
167
+ self.message_id = message_id
168
+ self.a_record = a_record
169
+ end
170
+
171
+ # @override
172
+ def schema
173
+ 'Generated'
174
+ end
175
+
176
+ # @override
177
+ def namespace
178
+ 'com.my-namespace'
179
+ end
180
+
181
+ # @override
182
+ def to_h
183
+ {
184
+ 'a_string' => @a_string,
185
+ 'a_int' => @a_int,
186
+ 'a_long' => @a_long,
187
+ 'a_float' => @a_float,
188
+ 'a_double' => @a_double,
189
+ 'an_optional_int' => @an_optional_int,
190
+ 'an_enum' => @an_enum&.to_h,
191
+ 'an_array' => @an_array,
192
+ 'a_map' => @a_map,
193
+ 'timestamp' => @timestamp,
194
+ 'message_id' => @message_id,
195
+ 'a_record' => @a_record&.to_h
196
+ }
197
+ end
198
+ end
199
+ end
200
+
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
+
241
+ spec/app/lib/schema_classes/my_nested_schema.rb:
242
+ # frozen_string_literal: true
243
+
244
+ # This file is autogenerated by Deimos, Do NOT modify
245
+ module Schemas
246
+ ### Primary Schema Class ###
247
+ # Autogenerated Schema for Record at com.my-namespace.MyNestedSchema
248
+ class MyNestedSchema < Deimos::SchemaClass::Record
249
+
250
+ ### Secondary Schema Classes ###
251
+ # Autogenerated Schema for Record at com.my-namespace.MyNestedRecord
252
+ class MyNestedRecord < Deimos::SchemaClass::Record
253
+
254
+ ### Attribute Accessors ###
255
+ # @param value [Integer]
256
+ attr_accessor :some_int
257
+ # @param value [Float]
258
+ attr_accessor :some_float
259
+ # @param value [String]
260
+ attr_accessor :some_string
261
+ # @param value [nil, Integer]
262
+ attr_accessor :some_optional_int
263
+
264
+ # @override
265
+ def initialize(some_int: nil,
266
+ some_float: nil,
267
+ some_string: nil,
268
+ some_optional_int: nil)
269
+ super
270
+ self.some_int = some_int
271
+ self.some_float = some_float
272
+ self.some_string = some_string
273
+ self.some_optional_int = some_optional_int
274
+ end
275
+
276
+ # @override
277
+ def schema
278
+ 'MyNestedRecord'
279
+ end
280
+
281
+ # @override
282
+ def namespace
283
+ 'com.my-namespace'
284
+ end
285
+
286
+ # @override
287
+ def to_h
288
+ {
289
+ 'some_int' => @some_int,
290
+ 'some_float' => @some_float,
291
+ 'some_string' => @some_string,
292
+ 'some_optional_int' => @some_optional_int
293
+ }
294
+ end
295
+ end
296
+
297
+
298
+ ### Attribute Readers ###
299
+ # @return [MyNestedRecord]
300
+ attr_reader :some_nested_record
301
+ # @return [nil, MyNestedRecord]
302
+ attr_reader :some_optional_record
303
+
304
+ ### Attribute Accessors ###
305
+ # @param value [String]
306
+ attr_accessor :test_id
307
+ # @param value [Float]
308
+ attr_accessor :test_float
309
+ # @param values [Array<String>]
310
+ attr_accessor :test_array
311
+
312
+ ### Attribute Writers ###
313
+ # @param value [MyNestedRecord]
314
+ def some_nested_record=(value)
315
+ @some_nested_record = MyNestedRecord.initialize_from_value(value)
316
+ end
317
+
318
+ # @param value [nil, MyNestedRecord]
319
+ def some_optional_record=(value)
320
+ @some_optional_record = MyNestedRecord.initialize_from_value(value)
321
+ end
322
+
323
+ # @override
324
+ def initialize(test_id: nil,
325
+ test_float: nil,
326
+ test_array: nil,
327
+ some_nested_record: nil,
328
+ some_optional_record: nil)
329
+ super
330
+ self.test_id = test_id
331
+ self.test_float = test_float
332
+ self.test_array = test_array
333
+ self.some_nested_record = some_nested_record
334
+ self.some_optional_record = some_optional_record
335
+ end
336
+
337
+ # @override
338
+ def schema
339
+ 'MyNestedSchema'
340
+ end
341
+
342
+ # @override
343
+ def namespace
344
+ 'com.my-namespace'
345
+ end
346
+
347
+ # @override
348
+ def to_h
349
+ {
350
+ 'test_id' => @test_id,
351
+ 'test_float' => @test_float,
352
+ 'test_array' => @test_array,
353
+ 'some_nested_record' => @some_nested_record&.to_h,
354
+ 'some_optional_record' => @some_optional_record&.to_h
355
+ }
356
+ end
357
+ end
358
+ end
359
+
360
+
1
361
  spec/app/lib/schema_classes/my_schema.rb:
2
362
  # frozen_string_literal: true
3
363
 
@@ -55,6 +415,89 @@ module Schemas
55
415
  end
56
416
 
57
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
+
58
501
  spec/app/lib/schema_classes/my_schema_key.rb:
59
502
  # frozen_string_literal: true
60
503
 
@@ -93,3 +536,816 @@ module Schemas
93
536
  end
94
537
  end
95
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
+