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.
@@ -0,0 +1,1429 @@
1
+ spec/app/lib/schema_classes/my-namespace/generated.rb:
2
+ # frozen_string_literal: true
3
+
4
+ # This file is autogenerated by Deimos, Do NOT modify
5
+ module Schemas; module MyNamespace
6
+ ### Primary Schema Class ###
7
+ # Autogenerated Schema for Record at com.my-namespace.Generated
8
+ class Generated < Deimos::SchemaClass::Record
9
+
10
+ ### Secondary Schema Classes ###
11
+ # Autogenerated Schema for Record at com.my-namespace.ARecord
12
+ class ARecord < Deimos::SchemaClass::Record
13
+
14
+ ### Attribute Accessors ###
15
+ # @param value [String]
16
+ attr_accessor :a_record_field
17
+
18
+ # @override
19
+ def initialize(a_record_field: nil)
20
+ super
21
+ self.a_record_field = a_record_field
22
+ end
23
+
24
+ # @override
25
+ def schema
26
+ 'ARecord'
27
+ end
28
+
29
+ # @override
30
+ def namespace
31
+ 'com.my-namespace'
32
+ end
33
+
34
+ # @override
35
+ def to_h
36
+ {
37
+ 'a_record_field' => @a_record_field
38
+ }
39
+ end
40
+ end
41
+
42
+ # Autogenerated Schema for Enum at com.my-namespace.AnEnum
43
+ class AnEnum < Deimos::SchemaClass::Enum
44
+ # @return ['sym1', 'sym2']
45
+ attr_accessor :an_enum
46
+
47
+ # :nodoc:
48
+ def initialize(an_enum)
49
+ super
50
+ self.an_enum = an_enum
51
+ end
52
+
53
+ # @override
54
+ def symbols
55
+ %w(sym1 sym2)
56
+ end
57
+
58
+ # @override
59
+ def to_h
60
+ @an_enum
61
+ end
62
+ end
63
+
64
+
65
+ ### Attribute Readers ###
66
+ # @return [AnEnum]
67
+ attr_reader :an_enum
68
+ # @return [ARecord]
69
+ attr_reader :a_record
70
+
71
+ ### Attribute Accessors ###
72
+ # @param value [String]
73
+ attr_accessor :a_string
74
+ # @param value [Integer]
75
+ attr_accessor :a_int
76
+ # @param value [Integer]
77
+ attr_accessor :a_long
78
+ # @param value [Float]
79
+ attr_accessor :a_float
80
+ # @param value [Float]
81
+ attr_accessor :a_double
82
+ # @param value [nil, Integer]
83
+ attr_accessor :an_optional_int
84
+ # @param values [Array<Integer>]
85
+ attr_accessor :an_array
86
+ # @param values [Hash<String, String>]
87
+ attr_accessor :a_map
88
+ # @param value [String]
89
+ attr_accessor :timestamp
90
+ # @param value [String]
91
+ attr_accessor :message_id
92
+
93
+ ### Attribute Writers ###
94
+ # @param value [AnEnum]
95
+ def an_enum=(value)
96
+ @an_enum = AnEnum.initialize_from_value(value)
97
+ end
98
+
99
+ # @param value [ARecord]
100
+ def a_record=(value)
101
+ @a_record = ARecord.initialize_from_value(value)
102
+ end
103
+
104
+ # @override
105
+ def initialize(a_string: nil,
106
+ a_int: nil,
107
+ a_long: nil,
108
+ a_float: nil,
109
+ a_double: nil,
110
+ an_optional_int: nil,
111
+ an_enum: nil,
112
+ an_array: nil,
113
+ a_map: nil,
114
+ timestamp: nil,
115
+ message_id: nil,
116
+ a_record: nil)
117
+ super
118
+ self.a_string = a_string
119
+ self.a_int = a_int
120
+ self.a_long = a_long
121
+ self.a_float = a_float
122
+ self.a_double = a_double
123
+ self.an_optional_int = an_optional_int
124
+ self.an_enum = an_enum
125
+ self.an_array = an_array
126
+ self.a_map = a_map
127
+ self.timestamp = timestamp
128
+ self.message_id = message_id
129
+ self.a_record = a_record
130
+ end
131
+
132
+ # @override
133
+ def schema
134
+ 'Generated'
135
+ end
136
+
137
+ # @override
138
+ def namespace
139
+ 'com.my-namespace'
140
+ end
141
+
142
+ # @override
143
+ def to_h
144
+ {
145
+ 'a_string' => @a_string,
146
+ 'a_int' => @a_int,
147
+ 'a_long' => @a_long,
148
+ 'a_float' => @a_float,
149
+ 'a_double' => @a_double,
150
+ 'an_optional_int' => @an_optional_int,
151
+ 'an_enum' => @an_enum&.to_h,
152
+ 'an_array' => @an_array,
153
+ 'a_map' => @a_map,
154
+ 'timestamp' => @timestamp,
155
+ 'message_id' => @message_id,
156
+ 'a_record' => @a_record&.to_h
157
+ }
158
+ end
159
+ end
160
+ end; end
161
+
162
+
163
+ spec/app/lib/schema_classes/my-namespace/my_nested_schema.rb:
164
+ # frozen_string_literal: true
165
+
166
+ # This file is autogenerated by Deimos, Do NOT modify
167
+ module Schemas; module MyNamespace
168
+ ### Primary Schema Class ###
169
+ # Autogenerated Schema for Record at com.my-namespace.MyNestedSchema
170
+ class MyNestedSchema < Deimos::SchemaClass::Record
171
+
172
+ ### Secondary Schema Classes ###
173
+ # Autogenerated Schema for Record at com.my-namespace.MyNestedRecord
174
+ class MyNestedRecord < Deimos::SchemaClass::Record
175
+
176
+ ### Attribute Accessors ###
177
+ # @param value [Integer]
178
+ attr_accessor :some_int
179
+ # @param value [Float]
180
+ attr_accessor :some_float
181
+ # @param value [String]
182
+ attr_accessor :some_string
183
+ # @param value [nil, Integer]
184
+ attr_accessor :some_optional_int
185
+
186
+ # @override
187
+ def initialize(some_int: nil,
188
+ some_float: nil,
189
+ some_string: nil,
190
+ some_optional_int: nil)
191
+ super
192
+ self.some_int = some_int
193
+ self.some_float = some_float
194
+ self.some_string = some_string
195
+ self.some_optional_int = some_optional_int
196
+ end
197
+
198
+ # @override
199
+ def schema
200
+ 'MyNestedRecord'
201
+ end
202
+
203
+ # @override
204
+ def namespace
205
+ 'com.my-namespace'
206
+ end
207
+
208
+ # @override
209
+ def to_h
210
+ {
211
+ 'some_int' => @some_int,
212
+ 'some_float' => @some_float,
213
+ 'some_string' => @some_string,
214
+ 'some_optional_int' => @some_optional_int
215
+ }
216
+ end
217
+ end
218
+
219
+
220
+ ### Attribute Readers ###
221
+ # @return [MyNestedRecord]
222
+ attr_reader :some_nested_record
223
+ # @return [nil, MyNestedRecord]
224
+ attr_reader :some_optional_record
225
+
226
+ ### Attribute Accessors ###
227
+ # @param value [String]
228
+ attr_accessor :test_id
229
+ # @param value [Float]
230
+ attr_accessor :test_float
231
+ # @param values [Array<String>]
232
+ attr_accessor :test_array
233
+
234
+ ### Attribute Writers ###
235
+ # @param value [MyNestedRecord]
236
+ def some_nested_record=(value)
237
+ @some_nested_record = MyNestedRecord.initialize_from_value(value)
238
+ end
239
+
240
+ # @param value [nil, MyNestedRecord]
241
+ def some_optional_record=(value)
242
+ @some_optional_record = MyNestedRecord.initialize_from_value(value)
243
+ end
244
+
245
+ # @override
246
+ def initialize(test_id: nil,
247
+ test_float: nil,
248
+ test_array: nil,
249
+ some_nested_record: nil,
250
+ some_optional_record: nil)
251
+ super
252
+ self.test_id = test_id
253
+ self.test_float = test_float
254
+ self.test_array = test_array
255
+ self.some_nested_record = some_nested_record
256
+ self.some_optional_record = some_optional_record
257
+ end
258
+
259
+ # @override
260
+ def schema
261
+ 'MyNestedSchema'
262
+ end
263
+
264
+ # @override
265
+ def namespace
266
+ 'com.my-namespace'
267
+ end
268
+
269
+ # @override
270
+ def to_h
271
+ {
272
+ 'test_id' => @test_id,
273
+ 'test_float' => @test_float,
274
+ 'test_array' => @test_array,
275
+ 'some_nested_record' => @some_nested_record&.to_h,
276
+ 'some_optional_record' => @some_optional_record&.to_h
277
+ }
278
+ end
279
+ end
280
+ end; end
281
+
282
+
283
+ spec/app/lib/schema_classes/my-namespace/my_schema.rb:
284
+ # frozen_string_literal: true
285
+
286
+ # This file is autogenerated by Deimos, Do NOT modify
287
+ module Schemas; module MyNamespace
288
+ ### Primary Schema Class ###
289
+ # Autogenerated Schema for Record at com.my-namespace.MySchema
290
+ class MySchema < Deimos::SchemaClass::Record
291
+
292
+ ### Attribute Readers ###
293
+ # @return [MySchemaKey]
294
+ attr_reader :payload_key
295
+
296
+ ### Attribute Accessors ###
297
+ # @param value [String]
298
+ attr_accessor :test_id
299
+ # @param value [Integer]
300
+ attr_accessor :some_int
301
+
302
+ ### Attribute Writers ###
303
+ # @param value [MySchemaKey]
304
+ def payload_key=(value)
305
+ @payload_key = MySchemaKey.initialize_from_value(value)
306
+ end
307
+
308
+ # @override
309
+ def initialize(test_id: nil,
310
+ some_int: nil,
311
+ payload_key: nil)
312
+ super
313
+ self.test_id = test_id
314
+ self.some_int = some_int
315
+ self.payload_key = payload_key
316
+ end
317
+
318
+ # @override
319
+ def schema
320
+ 'MySchema'
321
+ end
322
+
323
+ # @override
324
+ def namespace
325
+ 'com.my-namespace'
326
+ end
327
+
328
+ # @override
329
+ def to_h
330
+ {
331
+ 'test_id' => @test_id,
332
+ 'some_int' => @some_int,
333
+ 'payload_key' => @payload_key&.to_h
334
+ }
335
+ end
336
+ end
337
+ end; end
338
+
339
+
340
+ spec/app/lib/schema_classes/my-namespace/my_schema_compound_key.rb:
341
+ # frozen_string_literal: true
342
+
343
+ # This file is autogenerated by Deimos, Do NOT modify
344
+ module Schemas; module MyNamespace
345
+ ### Primary Schema Class ###
346
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaCompound_key
347
+ class MySchemaCompoundKey < Deimos::SchemaClass::Record
348
+
349
+ ### Attribute Accessors ###
350
+ # @param value [String]
351
+ attr_accessor :part_one
352
+ # @param value [String]
353
+ attr_accessor :part_two
354
+
355
+ # @override
356
+ def initialize(part_one: nil,
357
+ part_two: nil)
358
+ super
359
+ self.part_one = part_one
360
+ self.part_two = part_two
361
+ end
362
+
363
+ # @override
364
+ def schema
365
+ 'MySchemaCompound_key'
366
+ end
367
+
368
+ # @override
369
+ def namespace
370
+ 'com.my-namespace'
371
+ end
372
+
373
+ # @override
374
+ def to_h
375
+ {
376
+ 'part_one' => @part_one,
377
+ 'part_two' => @part_two
378
+ }
379
+ end
380
+ end
381
+ end; end
382
+
383
+
384
+ spec/app/lib/schema_classes/my-namespace/my_schema_id_key.rb:
385
+ # frozen_string_literal: true
386
+
387
+ # This file is autogenerated by Deimos, Do NOT modify
388
+ module Schemas; module MyNamespace
389
+ ### Primary Schema Class ###
390
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaId_key
391
+ class MySchemaIdKey < Deimos::SchemaClass::Record
392
+
393
+ ### Attribute Accessors ###
394
+ # @param value [Integer]
395
+ attr_accessor :id
396
+
397
+ # @override
398
+ def initialize(id: nil)
399
+ super
400
+ self.id = id
401
+ end
402
+
403
+ # @override
404
+ def schema
405
+ 'MySchemaId_key'
406
+ end
407
+
408
+ # @override
409
+ def namespace
410
+ 'com.my-namespace'
411
+ end
412
+
413
+ # @override
414
+ def to_h
415
+ {
416
+ 'id' => @id
417
+ }
418
+ end
419
+ end
420
+ end; end
421
+
422
+
423
+ spec/app/lib/schema_classes/my-namespace/my_schema_key.rb:
424
+ # frozen_string_literal: true
425
+
426
+ # This file is autogenerated by Deimos, Do NOT modify
427
+ module Schemas; module MyNamespace
428
+ ### Primary Schema Class ###
429
+ # Autogenerated Schema for Record at com.my-namespace.MySchema_key
430
+ class MySchemaKey < Deimos::SchemaClass::Record
431
+
432
+ ### Attribute Accessors ###
433
+ # @param value [String]
434
+ attr_accessor :test_id
435
+
436
+ # @override
437
+ def initialize(test_id: nil)
438
+ super
439
+ self.test_id = test_id
440
+ end
441
+
442
+ # @override
443
+ def schema
444
+ 'MySchema_key'
445
+ end
446
+
447
+ # @override
448
+ def namespace
449
+ 'com.my-namespace'
450
+ end
451
+
452
+ # @override
453
+ def to_h
454
+ {
455
+ 'test_id' => @test_id
456
+ }
457
+ end
458
+ end
459
+ end; end
460
+
461
+
462
+ spec/app/lib/schema_classes/my-namespace/my_schema_with_boolean.rb:
463
+ # frozen_string_literal: true
464
+
465
+ # This file is autogenerated by Deimos, Do NOT modify
466
+ module Schemas; module MyNamespace
467
+ ### Primary Schema Class ###
468
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithBooleans
469
+ class MySchemaWithBoolean < Deimos::SchemaClass::Record
470
+
471
+ ### Attribute Accessors ###
472
+ # @param value [String]
473
+ attr_accessor :test_id
474
+ # @param value [Boolean]
475
+ attr_accessor :some_bool
476
+
477
+ # @override
478
+ def initialize(test_id: nil,
479
+ some_bool: nil)
480
+ super
481
+ self.test_id = test_id
482
+ self.some_bool = some_bool
483
+ end
484
+
485
+ # @override
486
+ def schema
487
+ 'MySchemaWithBooleans'
488
+ end
489
+
490
+ # @override
491
+ def namespace
492
+ 'com.my-namespace'
493
+ end
494
+
495
+ # @override
496
+ def to_h
497
+ {
498
+ 'test_id' => @test_id,
499
+ 'some_bool' => @some_bool
500
+ }
501
+ end
502
+ end
503
+ end; end
504
+
505
+
506
+ spec/app/lib/schema_classes/my-namespace/my_schema_with_circular_reference.rb:
507
+ # frozen_string_literal: true
508
+
509
+ # This file is autogenerated by Deimos, Do NOT modify
510
+ module Schemas; module MyNamespace
511
+ ### Primary Schema Class ###
512
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithCircularReference
513
+ class MySchemaWithCircularReference < Deimos::SchemaClass::Record
514
+
515
+ ### Secondary Schema Classes ###
516
+ # Autogenerated Schema for Record at com.my-namespace.Property
517
+ class Property < Deimos::SchemaClass::Record
518
+
519
+ ### Attribute Accessors ###
520
+ # @param value [Boolean, Integer, Integer, Float, Float, String, Array<Property>, Hash<String, Property>]
521
+ attr_accessor :property
522
+
523
+ # @override
524
+ def initialize(property: nil)
525
+ super
526
+ self.property = property
527
+ end
528
+
529
+ # @override
530
+ def schema
531
+ 'Property'
532
+ end
533
+
534
+ # @override
535
+ def namespace
536
+ 'com.my-namespace'
537
+ end
538
+
539
+ # @override
540
+ def to_h
541
+ {
542
+ 'property' => @property
543
+ }
544
+ end
545
+ end
546
+
547
+
548
+ ### Attribute Readers ###
549
+ # @return [Hash<String, Property>]
550
+ attr_reader :properties
551
+
552
+ ### Attribute Writers ###
553
+ # @param values [Hash<String, Property>]
554
+ def properties=(values)
555
+ @properties = values.transform_values do |value|
556
+ Property.initialize_from_value(value)
557
+ end
558
+ end
559
+
560
+ # @override
561
+ def initialize(properties: {})
562
+ super
563
+ self.properties = properties
564
+ end
565
+
566
+ # @override
567
+ def schema
568
+ 'MySchemaWithCircularReference'
569
+ end
570
+
571
+ # @override
572
+ def namespace
573
+ 'com.my-namespace'
574
+ end
575
+
576
+ # @override
577
+ def to_h
578
+ {
579
+ 'properties' => @properties.transform_values { |v| v&.to_h }
580
+ }
581
+ end
582
+ end
583
+ end; end
584
+
585
+
586
+ spec/app/lib/schema_classes/my-namespace/my_schema_with_complex_type.rb:
587
+ # frozen_string_literal: true
588
+
589
+ # This file is autogenerated by Deimos, Do NOT modify
590
+ module Schemas; module MyNamespace
591
+ ### Primary Schema Class ###
592
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithComplexTypes
593
+ class MySchemaWithComplexType < Deimos::SchemaClass::Record
594
+
595
+ ### Secondary Schema Classes ###
596
+ # Autogenerated Schema for Record at com.my-namespace.ARecord
597
+ class ARecord < Deimos::SchemaClass::Record
598
+
599
+ ### Attribute Accessors ###
600
+ # @param value [String]
601
+ attr_accessor :a_record_field
602
+
603
+ # @override
604
+ def initialize(a_record_field: nil)
605
+ super
606
+ self.a_record_field = a_record_field
607
+ end
608
+
609
+ # @override
610
+ def schema
611
+ 'ARecord'
612
+ end
613
+
614
+ # @override
615
+ def namespace
616
+ 'com.my-namespace'
617
+ end
618
+
619
+ # @override
620
+ def to_h
621
+ {
622
+ 'a_record_field' => @a_record_field
623
+ }
624
+ end
625
+ end
626
+
627
+ # Autogenerated Schema for Enum at com.my-namespace.AnEnum
628
+ class AnEnum < Deimos::SchemaClass::Enum
629
+ # @return ['sym1', 'sym2']
630
+ attr_accessor :an_enum
631
+
632
+ # :nodoc:
633
+ def initialize(an_enum)
634
+ super
635
+ self.an_enum = an_enum
636
+ end
637
+
638
+ # @override
639
+ def symbols
640
+ %w(sym1 sym2)
641
+ end
642
+
643
+ # @override
644
+ def to_h
645
+ @an_enum
646
+ end
647
+ end
648
+
649
+ # Autogenerated Schema for Enum at com.my-namespace.AnotherEnum
650
+ class AnotherEnum < Deimos::SchemaClass::Enum
651
+ # @return ['sym3', 'sym4']
652
+ attr_accessor :another_enum
653
+
654
+ # :nodoc:
655
+ def initialize(another_enum)
656
+ super
657
+ self.another_enum = another_enum
658
+ end
659
+
660
+ # @override
661
+ def symbols
662
+ %w(sym3 sym4)
663
+ end
664
+
665
+ # @override
666
+ def to_h
667
+ @another_enum
668
+ end
669
+ end
670
+
671
+ # Autogenerated Schema for Enum at com.my-namespace.YetAnotherEnum
672
+ class YetAnotherEnum < Deimos::SchemaClass::Enum
673
+ # @return ['sym5', 'sym6']
674
+ attr_accessor :yet_another_enum
675
+
676
+ # :nodoc:
677
+ def initialize(yet_another_enum)
678
+ super
679
+ self.yet_another_enum = yet_another_enum
680
+ end
681
+
682
+ # @override
683
+ def symbols
684
+ %w(sym5 sym6)
685
+ end
686
+
687
+ # @override
688
+ def to_h
689
+ @yet_another_enum
690
+ end
691
+ end
692
+
693
+
694
+ ### Attribute Readers ###
695
+ # @return [ARecord]
696
+ attr_reader :some_record
697
+ # @return [nil, ARecord]
698
+ attr_reader :some_optional_record
699
+ # @return [Array<ARecord>]
700
+ attr_reader :some_record_array
701
+ # @return [Hash<String, ARecord>]
702
+ attr_reader :some_record_map
703
+ # @return [Array<AnEnum>]
704
+ attr_reader :some_enum_array
705
+ # @return [nil, AnotherEnum]
706
+ attr_reader :some_optional_enum
707
+ # @return [YetAnotherEnum]
708
+ attr_reader :some_enum_with_default
709
+
710
+ ### Attribute Accessors ###
711
+ # @param value [String]
712
+ attr_accessor :test_id
713
+ # @param value [Float]
714
+ attr_accessor :test_float
715
+ # @param values [Array<String>]
716
+ attr_accessor :test_string_array
717
+ # @param values [Array<Integer>]
718
+ attr_accessor :test_int_array
719
+ # @param value [Integer, nil]
720
+ attr_accessor :test_optional_int
721
+ # @param values [Hash<String, Integer>]
722
+ attr_accessor :some_integer_map
723
+
724
+ ### Attribute Writers ###
725
+ # @param value [ARecord]
726
+ def some_record=(value)
727
+ @some_record = ARecord.initialize_from_value(value)
728
+ end
729
+
730
+ # @param value [nil, ARecord]
731
+ def some_optional_record=(value)
732
+ @some_optional_record = ARecord.initialize_from_value(value)
733
+ end
734
+
735
+ # @param values [Array<ARecord>]
736
+ def some_record_array=(values)
737
+ @some_record_array = values.map do |value|
738
+ ARecord.initialize_from_value(value)
739
+ end
740
+ end
741
+
742
+ # @param values [Hash<String, ARecord>]
743
+ def some_record_map=(values)
744
+ @some_record_map = values.transform_values do |value|
745
+ ARecord.initialize_from_value(value)
746
+ end
747
+ end
748
+
749
+ # @param values [Array<AnEnum>]
750
+ def some_enum_array=(values)
751
+ @some_enum_array = values.map do |value|
752
+ AnEnum.initialize_from_value(value)
753
+ end
754
+ end
755
+
756
+ # @param value [nil, AnotherEnum]
757
+ def some_optional_enum=(value)
758
+ @some_optional_enum = AnotherEnum.initialize_from_value(value)
759
+ end
760
+
761
+ # @param value [YetAnotherEnum]
762
+ def some_enum_with_default=(value)
763
+ @some_enum_with_default = YetAnotherEnum.initialize_from_value(value)
764
+ end
765
+
766
+ # @override
767
+ def initialize(test_id: nil,
768
+ test_float: nil,
769
+ test_string_array: ["test"],
770
+ test_int_array: [123],
771
+ test_optional_int: 123,
772
+ some_integer_map: {"abc"=>123},
773
+ some_record: {"a_record_field"=>"Test String"},
774
+ some_optional_record: nil,
775
+ some_record_array: nil,
776
+ some_record_map: nil,
777
+ some_enum_array: nil,
778
+ some_optional_enum: nil,
779
+ some_enum_with_default: "sym6")
780
+ super
781
+ self.test_id = test_id
782
+ self.test_float = test_float
783
+ self.test_string_array = test_string_array
784
+ self.test_int_array = test_int_array
785
+ self.test_optional_int = test_optional_int
786
+ self.some_integer_map = some_integer_map
787
+ self.some_record = some_record
788
+ self.some_optional_record = some_optional_record
789
+ self.some_record_array = some_record_array
790
+ self.some_record_map = some_record_map
791
+ self.some_enum_array = some_enum_array
792
+ self.some_optional_enum = some_optional_enum
793
+ self.some_enum_with_default = some_enum_with_default
794
+ end
795
+
796
+ # @override
797
+ def schema
798
+ 'MySchemaWithComplexTypes'
799
+ end
800
+
801
+ # @override
802
+ def namespace
803
+ 'com.my-namespace'
804
+ end
805
+
806
+ # @override
807
+ def to_h
808
+ {
809
+ 'test_id' => @test_id,
810
+ 'test_float' => @test_float,
811
+ 'test_string_array' => @test_string_array,
812
+ 'test_int_array' => @test_int_array,
813
+ 'test_optional_int' => @test_optional_int,
814
+ 'some_integer_map' => @some_integer_map,
815
+ 'some_record' => @some_record&.to_h,
816
+ 'some_optional_record' => @some_optional_record&.to_h,
817
+ 'some_record_array' => @some_record_array.map { |v| v&.to_h },
818
+ 'some_record_map' => @some_record_map.transform_values { |v| v&.to_h },
819
+ 'some_enum_array' => @some_enum_array.map { |v| v&.to_h },
820
+ 'some_optional_enum' => @some_optional_enum&.to_h,
821
+ 'some_enum_with_default' => @some_enum_with_default&.to_h
822
+ }
823
+ end
824
+ end
825
+ end; end
826
+
827
+
828
+ spec/app/lib/schema_classes/my-namespace/my_schema_with_date_time.rb:
829
+ # frozen_string_literal: true
830
+
831
+ # This file is autogenerated by Deimos, Do NOT modify
832
+ module Schemas; module MyNamespace
833
+ ### Primary Schema Class ###
834
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithDateTimes
835
+ class MySchemaWithDateTime < Deimos::SchemaClass::Record
836
+
837
+ ### Attribute Accessors ###
838
+ # @param value [String]
839
+ attr_accessor :test_id
840
+ # @param value [Integer, nil]
841
+ attr_accessor :updated_at
842
+ # @param value [nil, Integer]
843
+ attr_accessor :some_int
844
+ # @param value [nil, Integer]
845
+ attr_accessor :some_datetime_int
846
+ # @param value [String]
847
+ attr_accessor :timestamp
848
+
849
+ # @override
850
+ def initialize(test_id: nil,
851
+ updated_at: nil,
852
+ some_int: nil,
853
+ some_datetime_int: nil,
854
+ timestamp: nil)
855
+ super
856
+ self.test_id = test_id
857
+ self.updated_at = updated_at
858
+ self.some_int = some_int
859
+ self.some_datetime_int = some_datetime_int
860
+ self.timestamp = timestamp
861
+ end
862
+
863
+ # @override
864
+ def schema
865
+ 'MySchemaWithDateTimes'
866
+ end
867
+
868
+ # @override
869
+ def namespace
870
+ 'com.my-namespace'
871
+ end
872
+
873
+ # @override
874
+ def to_h
875
+ {
876
+ 'test_id' => @test_id,
877
+ 'updated_at' => @updated_at,
878
+ 'some_int' => @some_int,
879
+ 'some_datetime_int' => @some_datetime_int,
880
+ 'timestamp' => @timestamp
881
+ }
882
+ end
883
+ end
884
+ end; end
885
+
886
+
887
+ spec/app/lib/schema_classes/my-namespace/my_schema_with_id.rb:
888
+ # frozen_string_literal: true
889
+
890
+ # This file is autogenerated by Deimos, Do NOT modify
891
+ module Schemas; module MyNamespace
892
+ ### Primary Schema Class ###
893
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithId
894
+ class MySchemaWithId < Deimos::SchemaClass::Record
895
+
896
+ ### Attribute Accessors ###
897
+ # @param value [String]
898
+ attr_accessor :test_id
899
+ # @param value [Integer]
900
+ attr_accessor :some_int
901
+ # @param value [String]
902
+ attr_accessor :message_id
903
+ # @param value [String]
904
+ attr_accessor :timestamp
905
+
906
+ # @override
907
+ def initialize(test_id: nil,
908
+ some_int: nil,
909
+ message_id: nil,
910
+ timestamp: nil)
911
+ super
912
+ self.test_id = test_id
913
+ self.some_int = some_int
914
+ self.message_id = message_id
915
+ self.timestamp = timestamp
916
+ end
917
+
918
+ # @override
919
+ def schema
920
+ 'MySchemaWithId'
921
+ end
922
+
923
+ # @override
924
+ def namespace
925
+ 'com.my-namespace'
926
+ end
927
+
928
+ # @override
929
+ def to_h
930
+ {
931
+ 'test_id' => @test_id,
932
+ 'some_int' => @some_int,
933
+ 'message_id' => @message_id,
934
+ 'timestamp' => @timestamp
935
+ }
936
+ end
937
+ end
938
+ end; end
939
+
940
+
941
+ spec/app/lib/schema_classes/my-namespace/my_schema_with_unique_id.rb:
942
+ # frozen_string_literal: true
943
+
944
+ # This file is autogenerated by Deimos, Do NOT modify
945
+ module Schemas; module MyNamespace
946
+ ### Primary Schema Class ###
947
+ # Autogenerated Schema for Record at com.my-namespace.MySchemaWithUniqueId
948
+ class MySchemaWithUniqueId < Deimos::SchemaClass::Record
949
+
950
+ ### Attribute Accessors ###
951
+ # @param value [Integer]
952
+ attr_accessor :id
953
+ # @param value [String]
954
+ attr_accessor :test_id
955
+ # @param value [Integer]
956
+ attr_accessor :some_int
957
+ # @param value [String]
958
+ attr_accessor :message_id
959
+ # @param value [String]
960
+ attr_accessor :timestamp
961
+
962
+ # @override
963
+ def initialize(id: nil,
964
+ test_id: nil,
965
+ some_int: nil,
966
+ message_id: nil,
967
+ timestamp: nil)
968
+ super
969
+ self.id = id
970
+ self.test_id = test_id
971
+ self.some_int = some_int
972
+ self.message_id = message_id
973
+ self.timestamp = timestamp
974
+ end
975
+
976
+ # @override
977
+ def schema
978
+ 'MySchemaWithUniqueId'
979
+ end
980
+
981
+ # @override
982
+ def namespace
983
+ 'com.my-namespace'
984
+ end
985
+
986
+ # @override
987
+ def to_h
988
+ {
989
+ 'id' => @id,
990
+ 'test_id' => @test_id,
991
+ 'some_int' => @some_int,
992
+ 'message_id' => @message_id,
993
+ 'timestamp' => @timestamp
994
+ }
995
+ end
996
+ end
997
+ end; end
998
+
999
+
1000
+ spec/app/lib/schema_classes/my-namespace/wibble.rb:
1001
+ # frozen_string_literal: true
1002
+
1003
+ # This file is autogenerated by Deimos, Do NOT modify
1004
+ module Schemas; module MyNamespace
1005
+ ### Primary Schema Class ###
1006
+ # Autogenerated Schema for Record at com.my-namespace.Wibble
1007
+ class Wibble < Deimos::SchemaClass::Record
1008
+
1009
+ ### Attribute Accessors ###
1010
+ # @param value [Integer]
1011
+ attr_accessor :id
1012
+ # @param value [Integer]
1013
+ attr_accessor :wibble_id
1014
+ # @param value [String]
1015
+ attr_accessor :name
1016
+ # @param value [String]
1017
+ attr_accessor :floop
1018
+ # @param value [Integer]
1019
+ attr_accessor :birthday_int
1020
+ # @param value [Integer]
1021
+ attr_accessor :birthday_long
1022
+ # @param value [nil, Integer]
1023
+ attr_accessor :birthday_optional
1024
+ # @param value [Integer]
1025
+ attr_accessor :updated_at
1026
+ # @param value [Integer]
1027
+ attr_accessor :created_at
1028
+
1029
+ # @override
1030
+ def initialize(id: nil,
1031
+ wibble_id: nil,
1032
+ name: nil,
1033
+ floop: nil,
1034
+ birthday_int: nil,
1035
+ birthday_long: nil,
1036
+ birthday_optional: nil,
1037
+ updated_at: nil,
1038
+ created_at: nil)
1039
+ super
1040
+ self.id = id
1041
+ self.wibble_id = wibble_id
1042
+ self.name = name
1043
+ self.floop = floop
1044
+ self.birthday_int = birthday_int
1045
+ self.birthday_long = birthday_long
1046
+ self.birthday_optional = birthday_optional
1047
+ self.updated_at = updated_at
1048
+ self.created_at = created_at
1049
+ end
1050
+
1051
+ # @override
1052
+ def schema
1053
+ 'Wibble'
1054
+ end
1055
+
1056
+ # @override
1057
+ def namespace
1058
+ 'com.my-namespace'
1059
+ end
1060
+
1061
+ # @override
1062
+ def to_h
1063
+ {
1064
+ 'id' => @id,
1065
+ 'wibble_id' => @wibble_id,
1066
+ 'name' => @name,
1067
+ 'floop' => @floop,
1068
+ 'birthday_int' => @birthday_int,
1069
+ 'birthday_long' => @birthday_long,
1070
+ 'birthday_optional' => @birthday_optional,
1071
+ 'updated_at' => @updated_at,
1072
+ 'created_at' => @created_at
1073
+ }
1074
+ end
1075
+ end
1076
+ end; end
1077
+
1078
+
1079
+ spec/app/lib/schema_classes/my-namespace/widget.rb:
1080
+ # frozen_string_literal: true
1081
+
1082
+ # This file is autogenerated by Deimos, Do NOT modify
1083
+ module Schemas; module MyNamespace
1084
+ ### Primary Schema Class ###
1085
+ # Autogenerated Schema for Record at com.my-namespace.Widget
1086
+ class Widget < Deimos::SchemaClass::Record
1087
+
1088
+ ### Attribute Accessors ###
1089
+ # @param value [Integer]
1090
+ attr_accessor :id
1091
+ # @param value [Integer]
1092
+ attr_accessor :widget_id
1093
+ # @param value [String]
1094
+ attr_accessor :name
1095
+ # @param value [Integer]
1096
+ attr_accessor :updated_at
1097
+ # @param value [Integer]
1098
+ attr_accessor :created_at
1099
+
1100
+ # @override
1101
+ def initialize(id: nil,
1102
+ widget_id: nil,
1103
+ name: nil,
1104
+ updated_at: nil,
1105
+ created_at: nil)
1106
+ super
1107
+ self.id = id
1108
+ self.widget_id = widget_id
1109
+ self.name = name
1110
+ self.updated_at = updated_at
1111
+ self.created_at = created_at
1112
+ end
1113
+
1114
+ # @override
1115
+ def schema
1116
+ 'Widget'
1117
+ end
1118
+
1119
+ # @override
1120
+ def namespace
1121
+ 'com.my-namespace'
1122
+ end
1123
+
1124
+ # @override
1125
+ def to_h
1126
+ {
1127
+ 'id' => @id,
1128
+ 'widget_id' => @widget_id,
1129
+ 'name' => @name,
1130
+ 'updated_at' => @updated_at,
1131
+ 'created_at' => @created_at
1132
+ }
1133
+ end
1134
+ end
1135
+ end; end
1136
+
1137
+
1138
+ spec/app/lib/schema_classes/my-namespace/widget_the_second.rb:
1139
+ # frozen_string_literal: true
1140
+
1141
+ # This file is autogenerated by Deimos, Do NOT modify
1142
+ module Schemas; module MyNamespace
1143
+ ### Primary Schema Class ###
1144
+ # Autogenerated Schema for Record at com.my-namespace.WidgetTheSecond
1145
+ class WidgetTheSecond < Deimos::SchemaClass::Record
1146
+
1147
+ ### Attribute Accessors ###
1148
+ # @param value [Integer]
1149
+ attr_accessor :id
1150
+ # @param value [Integer]
1151
+ attr_accessor :widget_id
1152
+ # @param value [String]
1153
+ attr_accessor :model_id
1154
+ # @param value [Integer]
1155
+ attr_accessor :updated_at
1156
+ # @param value [Integer]
1157
+ attr_accessor :created_at
1158
+
1159
+ # @override
1160
+ def initialize(id: nil,
1161
+ widget_id: nil,
1162
+ model_id: nil,
1163
+ updated_at: nil,
1164
+ created_at: nil)
1165
+ super
1166
+ self.id = id
1167
+ self.widget_id = widget_id
1168
+ self.model_id = model_id
1169
+ self.updated_at = updated_at
1170
+ self.created_at = created_at
1171
+ end
1172
+
1173
+ # @override
1174
+ def schema
1175
+ 'WidgetTheSecond'
1176
+ end
1177
+
1178
+ # @override
1179
+ def namespace
1180
+ 'com.my-namespace'
1181
+ end
1182
+
1183
+ # @override
1184
+ def to_h
1185
+ {
1186
+ 'id' => @id,
1187
+ 'widget_id' => @widget_id,
1188
+ 'model_id' => @model_id,
1189
+ 'updated_at' => @updated_at,
1190
+ 'created_at' => @created_at
1191
+ }
1192
+ end
1193
+ end
1194
+ end; end
1195
+
1196
+
1197
+ spec/app/lib/schema_classes/request/create_topic.rb:
1198
+ # frozen_string_literal: true
1199
+
1200
+ # This file is autogenerated by Deimos, Do NOT modify
1201
+ module Schemas; module Request
1202
+ ### Primary Schema Class ###
1203
+ # Autogenerated Schema for Record at com.my-namespace.request.CreateTopic
1204
+ class CreateTopic < Deimos::SchemaClass::Record
1205
+
1206
+ ### Attribute Accessors ###
1207
+ # @param value [String]
1208
+ attr_accessor :request_id
1209
+
1210
+ # @override
1211
+ def initialize(request_id: nil)
1212
+ super
1213
+ self.request_id = request_id
1214
+ end
1215
+
1216
+ # @override
1217
+ def schema
1218
+ 'CreateTopic'
1219
+ end
1220
+
1221
+ # @override
1222
+ def namespace
1223
+ 'com.my-namespace.request'
1224
+ end
1225
+
1226
+ # @override
1227
+ def to_h
1228
+ {
1229
+ 'request_id' => @request_id
1230
+ }
1231
+ end
1232
+ end
1233
+ end; end
1234
+
1235
+
1236
+ spec/app/lib/schema_classes/request/index.rb:
1237
+ # frozen_string_literal: true
1238
+
1239
+ # This file is autogenerated by Deimos, Do NOT modify
1240
+ module Schemas; module Request
1241
+ ### Primary Schema Class ###
1242
+ # Autogenerated Schema for Record at com.my-namespace.request.Index
1243
+ class Index < Deimos::SchemaClass::Record
1244
+
1245
+ ### Attribute Accessors ###
1246
+ # @param value [String]
1247
+ attr_accessor :request_id
1248
+
1249
+ # @override
1250
+ def initialize(request_id: nil)
1251
+ super
1252
+ self.request_id = request_id
1253
+ end
1254
+
1255
+ # @override
1256
+ def schema
1257
+ 'Index'
1258
+ end
1259
+
1260
+ # @override
1261
+ def namespace
1262
+ 'com.my-namespace.request'
1263
+ end
1264
+
1265
+ # @override
1266
+ def to_h
1267
+ {
1268
+ 'request_id' => @request_id
1269
+ }
1270
+ end
1271
+ end
1272
+ end; end
1273
+
1274
+
1275
+ spec/app/lib/schema_classes/request/update_request.rb:
1276
+ # frozen_string_literal: true
1277
+
1278
+ # This file is autogenerated by Deimos, Do NOT modify
1279
+ module Schemas; module Request
1280
+ ### Primary Schema Class ###
1281
+ # Autogenerated Schema for Record at com.my-namespace.request.UpdateRequest
1282
+ class UpdateRequest < Deimos::SchemaClass::Record
1283
+
1284
+ ### Attribute Accessors ###
1285
+ # @param value [String]
1286
+ attr_accessor :update_request_id
1287
+
1288
+ # @override
1289
+ def initialize(update_request_id: nil)
1290
+ super
1291
+ self.update_request_id = update_request_id
1292
+ end
1293
+
1294
+ # @override
1295
+ def schema
1296
+ 'UpdateRequest'
1297
+ end
1298
+
1299
+ # @override
1300
+ def namespace
1301
+ 'com.my-namespace.request'
1302
+ end
1303
+
1304
+ # @override
1305
+ def to_h
1306
+ {
1307
+ 'update_request_id' => @update_request_id
1308
+ }
1309
+ end
1310
+ end
1311
+ end; end
1312
+
1313
+
1314
+ spec/app/lib/schema_classes/response/create_topic.rb:
1315
+ # frozen_string_literal: true
1316
+
1317
+ # This file is autogenerated by Deimos, Do NOT modify
1318
+ module Schemas; module Response
1319
+ ### Primary Schema Class ###
1320
+ # Autogenerated Schema for Record at com.my-namespace.response.CreateTopic
1321
+ class CreateTopic < Deimos::SchemaClass::Record
1322
+
1323
+ ### Attribute Accessors ###
1324
+ # @param value [String]
1325
+ attr_accessor :response_id
1326
+
1327
+ # @override
1328
+ def initialize(response_id: nil)
1329
+ super
1330
+ self.response_id = response_id
1331
+ end
1332
+
1333
+ # @override
1334
+ def schema
1335
+ 'CreateTopic'
1336
+ end
1337
+
1338
+ # @override
1339
+ def namespace
1340
+ 'com.my-namespace.response'
1341
+ end
1342
+
1343
+ # @override
1344
+ def to_h
1345
+ {
1346
+ 'response_id' => @response_id
1347
+ }
1348
+ end
1349
+ end
1350
+ end; end
1351
+
1352
+
1353
+ spec/app/lib/schema_classes/response/index.rb:
1354
+ # frozen_string_literal: true
1355
+
1356
+ # This file is autogenerated by Deimos, Do NOT modify
1357
+ module Schemas; module Response
1358
+ ### Primary Schema Class ###
1359
+ # Autogenerated Schema for Record at com.my-namespace.response.Index
1360
+ class Index < Deimos::SchemaClass::Record
1361
+
1362
+ ### Attribute Accessors ###
1363
+ # @param value [String]
1364
+ attr_accessor :response_id
1365
+
1366
+ # @override
1367
+ def initialize(response_id: nil)
1368
+ super
1369
+ self.response_id = response_id
1370
+ end
1371
+
1372
+ # @override
1373
+ def schema
1374
+ 'Index'
1375
+ end
1376
+
1377
+ # @override
1378
+ def namespace
1379
+ 'com.my-namespace.response'
1380
+ end
1381
+
1382
+ # @override
1383
+ def to_h
1384
+ {
1385
+ 'response_id' => @response_id
1386
+ }
1387
+ end
1388
+ end
1389
+ end; end
1390
+
1391
+
1392
+ spec/app/lib/schema_classes/response/update_response.rb:
1393
+ # frozen_string_literal: true
1394
+
1395
+ # This file is autogenerated by Deimos, Do NOT modify
1396
+ module Schemas; module Response
1397
+ ### Primary Schema Class ###
1398
+ # Autogenerated Schema for Record at com.my-namespace.response.UpdateResponse
1399
+ class UpdateResponse < Deimos::SchemaClass::Record
1400
+
1401
+ ### Attribute Accessors ###
1402
+ # @param value [String]
1403
+ attr_accessor :update_response_id
1404
+
1405
+ # @override
1406
+ def initialize(update_response_id: nil)
1407
+ super
1408
+ self.update_response_id = update_response_id
1409
+ end
1410
+
1411
+ # @override
1412
+ def schema
1413
+ 'UpdateResponse'
1414
+ end
1415
+
1416
+ # @override
1417
+ def namespace
1418
+ 'com.my-namespace.response'
1419
+ end
1420
+
1421
+ # @override
1422
+ def to_h
1423
+ {
1424
+ 'update_response_id' => @update_response_id
1425
+ }
1426
+ end
1427
+ end
1428
+ end; end
1429
+