deimos-ruby 2.1.2 → 2.1.3

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.
@@ -12,7 +12,8 @@ module Schemas
12
12
  attr_accessor :response_id
13
13
 
14
14
  # @override
15
- def initialize(response_id: nil)
15
+ def initialize(_from_message: false, response_id: nil)
16
+ @_from_message = _from_message
16
17
  super
17
18
  self.response_id = response_id
18
19
  end
@@ -55,7 +56,8 @@ module Schemas
55
56
  attr_accessor :a_record_field
56
57
 
57
58
  # @override
58
- def initialize(a_record_field: nil)
59
+ def initialize(_from_message: false, a_record_field: nil)
60
+ @_from_message = _from_message
59
61
  super
60
62
  self.a_record_field = a_record_field
61
63
  end
@@ -130,7 +132,7 @@ module Schemas
130
132
  end
131
133
 
132
134
  # @override
133
- def initialize(a_string: nil,
135
+ def initialize(_from_message: false, a_string: nil,
134
136
  a_int: nil,
135
137
  a_long: nil,
136
138
  a_float: nil,
@@ -142,6 +144,7 @@ module Schemas
142
144
  timestamp: nil,
143
145
  message_id: nil,
144
146
  a_record: nil)
147
+ @_from_message = _from_message
145
148
  super
146
149
  self.a_string = a_string
147
150
  self.a_int = a_int
@@ -167,13 +170,6 @@ module Schemas
167
170
  'com.my-namespace'
168
171
  end
169
172
 
170
- def self.tombstone(key)
171
- record = self.allocate
172
- record.tombstone_key = key
173
- record.a_string = key
174
- record
175
- end
176
-
177
173
  # @override
178
174
  def as_json(_opts={})
179
175
  {
@@ -209,7 +205,8 @@ module Schemas
209
205
  attr_accessor :response_id
210
206
 
211
207
  # @override
212
- def initialize(response_id: nil)
208
+ def initialize(_from_message: false, response_id: nil)
209
+ @_from_message = _from_message
213
210
  super
214
211
  self.response_id = response_id
215
212
  end
@@ -250,8 +247,9 @@ module Schemas
250
247
  attr_accessor :some_int
251
248
 
252
249
  # @override
253
- def initialize(test_id: nil,
250
+ def initialize(_from_message: false, test_id: nil,
254
251
  some_int: nil)
252
+ @_from_message = _from_message
255
253
  super
256
254
  self.test_id = test_id
257
255
  self.some_int = some_int
@@ -302,10 +300,11 @@ module Schemas
302
300
  attr_accessor :some_optional_int
303
301
 
304
302
  # @override
305
- def initialize(some_int: nil,
303
+ def initialize(_from_message: false, some_int: nil,
306
304
  some_float: nil,
307
305
  some_string: nil,
308
306
  some_optional_int: nil)
307
+ @_from_message = _from_message
309
308
  super
310
309
  self.some_int = some_int
311
310
  self.some_float = some_float
@@ -361,11 +360,12 @@ module Schemas
361
360
  end
362
361
 
363
362
  # @override
364
- def initialize(test_id: nil,
363
+ def initialize(_from_message: false, test_id: nil,
365
364
  test_float: nil,
366
365
  test_array: nil,
367
366
  some_nested_record: nil,
368
367
  some_optional_record: nil)
368
+ @_from_message = _from_message
369
369
  super
370
370
  self.test_id = test_id
371
371
  self.test_float = test_float
@@ -414,30 +414,19 @@ module Schemas
414
414
  # Autogenerated Schema for Record at com.my-namespace.MySchema
415
415
  class MySchema < Deimos::SchemaClass::Record
416
416
 
417
- ### Attribute Readers ###
418
- # @return [MySchemaKey]
419
- attr_reader :payload_key
420
-
421
417
  ### Attribute Accessors ###
422
418
  # @return [String]
423
419
  attr_accessor :test_id
424
420
  # @return [Integer]
425
421
  attr_accessor :some_int
426
422
 
427
- ### Attribute Writers ###
428
- # @return [MySchemaKey]
429
- def payload_key=(value)
430
- @payload_key = MySchemaKey.initialize_from_value(value, from_message: self._from_message)
431
- end
432
-
433
423
  # @override
434
- def initialize(test_id: nil,
435
- some_int: nil,
436
- payload_key: nil)
424
+ def initialize(_from_message: false, test_id: nil,
425
+ some_int: nil)
426
+ @_from_message = _from_message
437
427
  super
438
428
  self.test_id = test_id
439
429
  self.some_int = some_int
440
- self.payload_key = payload_key
441
430
  end
442
431
 
443
432
  # @override
@@ -450,19 +439,11 @@ module Schemas
450
439
  'com.my-namespace'
451
440
  end
452
441
 
453
- def self.tombstone(key)
454
- record = self.allocate
455
- record.tombstone_key = MySchemaKey.initialize_from_value(key, from_message: self._from_message)
456
- record.payload_key = key
457
- record
458
- end
459
-
460
442
  # @override
461
443
  def as_json(_opts={})
462
444
  {
463
445
  'test_id' => @test_id,
464
- 'some_int' => @some_int,
465
- 'payload_key' => @payload_key&.as_json
446
+ 'some_int' => @some_int
466
447
  }
467
448
  end
468
449
  end
@@ -485,8 +466,9 @@ module Schemas
485
466
  attr_accessor :part_two
486
467
 
487
468
  # @override
488
- def initialize(part_one: nil,
469
+ def initialize(_from_message: false, part_one: nil,
489
470
  part_two: nil)
471
+ @_from_message = _from_message
490
472
  super
491
473
  self.part_one = part_one
492
474
  self.part_two = part_two
@@ -527,7 +509,8 @@ module Schemas
527
509
  attr_accessor :id
528
510
 
529
511
  # @override
530
- def initialize(id: nil)
512
+ def initialize(_from_message: false, id: nil)
513
+ @_from_message = _from_message
531
514
  super
532
515
  self.id = id
533
516
  end
@@ -566,7 +549,8 @@ module Schemas
566
549
  attr_accessor :test_id
567
550
 
568
551
  # @override
569
- def initialize(test_id: nil)
552
+ def initialize(_from_message: false, test_id: nil)
553
+ @_from_message = _from_message
570
554
  super
571
555
  self.test_id = test_id
572
556
  end
@@ -607,8 +591,9 @@ module Schemas
607
591
  attr_accessor :some_bool
608
592
 
609
593
  # @override
610
- def initialize(test_id: nil,
594
+ def initialize(_from_message: false, test_id: nil,
611
595
  some_bool: nil)
596
+ @_from_message = _from_message
612
597
  super
613
598
  self.test_id = test_id
614
599
  self.some_bool = some_bool
@@ -653,7 +638,8 @@ module Schemas
653
638
  attr_accessor :property
654
639
 
655
640
  # @override
656
- def initialize(property: nil)
641
+ def initialize(_from_message: false, property: nil)
642
+ @_from_message = _from_message
657
643
  super
658
644
  self.property = property
659
645
  end
@@ -690,7 +676,8 @@ module Schemas
690
676
  end
691
677
 
692
678
  # @override
693
- def initialize(properties: {})
679
+ def initialize(_from_message: false, properties: {})
680
+ @_from_message = _from_message
694
681
  super
695
682
  self.properties = properties
696
683
  end
@@ -733,7 +720,8 @@ module Schemas
733
720
  attr_accessor :a_record_field
734
721
 
735
722
  # @override
736
- def initialize(a_record_field: nil)
723
+ def initialize(_from_message: false, a_record_field: nil)
724
+ @_from_message = _from_message
737
725
  super
738
726
  self.a_record_field = a_record_field
739
727
  end
@@ -863,7 +851,7 @@ module Schemas
863
851
  end
864
852
 
865
853
  # @override
866
- def initialize(test_id: nil,
854
+ def initialize(_from_message: false, test_id: nil,
867
855
  test_float: nil,
868
856
  test_string_array: ["test"],
869
857
  test_int_array: [123],
@@ -876,6 +864,7 @@ module Schemas
876
864
  some_enum_array: nil,
877
865
  some_optional_enum: nil,
878
866
  some_enum_with_default: "sym6")
867
+ @_from_message = _from_message
879
868
  super
880
869
  self.test_id = test_id
881
870
  self.test_float = test_float
@@ -946,11 +935,12 @@ module Schemas
946
935
  attr_accessor :timestamp
947
936
 
948
937
  # @override
949
- def initialize(test_id: nil,
938
+ def initialize(_from_message: false, test_id: nil,
950
939
  updated_at: nil,
951
940
  some_int: nil,
952
941
  some_datetime_int: nil,
953
942
  timestamp: nil)
943
+ @_from_message = _from_message
954
944
  super
955
945
  self.test_id = test_id
956
946
  self.updated_at = updated_at
@@ -1003,10 +993,11 @@ module Schemas
1003
993
  attr_accessor :timestamp
1004
994
 
1005
995
  # @override
1006
- def initialize(test_id: nil,
996
+ def initialize(_from_message: false, test_id: nil,
1007
997
  some_int: nil,
1008
998
  message_id: nil,
1009
999
  timestamp: nil)
1000
+ @_from_message = _from_message
1010
1001
  super
1011
1002
  self.test_id = test_id
1012
1003
  self.some_int = some_int
@@ -1055,9 +1046,10 @@ module Schemas
1055
1046
  attr_accessor :title
1056
1047
 
1057
1048
  # @override
1058
- def initialize(test_id: nil,
1049
+ def initialize(_from_message: false, test_id: nil,
1059
1050
  some_int: nil,
1060
1051
  title: nil)
1052
+ @_from_message = _from_message
1061
1053
  super
1062
1054
  self.test_id = test_id
1063
1055
  self.some_int = some_int
@@ -1106,8 +1098,9 @@ module Schemas
1106
1098
  attr_accessor :record1_id
1107
1099
 
1108
1100
  # @override
1109
- def initialize(record1_map: {},
1101
+ def initialize(_from_message: false, record1_map: {},
1110
1102
  record1_id: 0)
1103
+ @_from_message = _from_message
1111
1104
  super
1112
1105
  self.record1_map = record1_map
1113
1106
  self.record1_id = record1_id
@@ -1140,7 +1133,8 @@ module Schemas
1140
1133
  attr_accessor :record2_id
1141
1134
 
1142
1135
  # @override
1143
- def initialize(record2_id: "")
1136
+ def initialize(_from_message: false, record2_id: "")
1137
+ @_from_message = _from_message
1144
1138
  super
1145
1139
  self.record2_id = record2_id
1146
1140
  end
@@ -1171,7 +1165,8 @@ module Schemas
1171
1165
  attr_accessor :record3_id
1172
1166
 
1173
1167
  # @override
1174
- def initialize(record3_id: 0.0)
1168
+ def initialize(_from_message: false, record3_id: 0.0)
1169
+ @_from_message = _from_message
1175
1170
  super
1176
1171
  self.record3_id = record3_id
1177
1172
  end
@@ -1202,7 +1197,8 @@ module Schemas
1202
1197
  attr_accessor :record4_id
1203
1198
 
1204
1199
  # @override
1205
- def initialize(record4_id: 0)
1200
+ def initialize(_from_message: false, record4_id: 0)
1201
+ @_from_message = _from_message
1206
1202
  super
1207
1203
  self.record4_id = record4_id
1208
1204
  end
@@ -1258,9 +1254,10 @@ module Schemas
1258
1254
  end
1259
1255
 
1260
1256
  # @override
1261
- def initialize(test_id: "",
1257
+ def initialize(_from_message: false, test_id: "",
1262
1258
  test_long: nil,
1263
1259
  test_union_type: nil)
1260
+ @_from_message = _from_message
1264
1261
  super
1265
1262
  self.test_id = test_id
1266
1263
  self.test_long = test_long
@@ -1311,11 +1308,12 @@ module Schemas
1311
1308
  attr_accessor :timestamp
1312
1309
 
1313
1310
  # @override
1314
- def initialize(id: nil,
1311
+ def initialize(_from_message: false, id: nil,
1315
1312
  test_id: nil,
1316
1313
  some_int: nil,
1317
1314
  message_id: nil,
1318
1315
  timestamp: nil)
1316
+ @_from_message = _from_message
1319
1317
  super
1320
1318
  self.id = id
1321
1319
  self.test_id = test_id
@@ -1362,7 +1360,8 @@ module Schemas
1362
1360
  attr_accessor :update_request_id
1363
1361
 
1364
1362
  # @override
1365
- def initialize(update_request_id: nil)
1363
+ def initialize(_from_message: false, update_request_id: nil)
1364
+ @_from_message = _from_message
1366
1365
  super
1367
1366
  self.update_request_id = update_request_id
1368
1367
  end
@@ -1401,7 +1400,8 @@ module Schemas
1401
1400
  attr_accessor :update_response_id
1402
1401
 
1403
1402
  # @override
1404
- def initialize(update_response_id: nil)
1403
+ def initialize(_from_message: false, update_response_id: nil)
1404
+ @_from_message = _from_message
1405
1405
  super
1406
1406
  self.update_response_id = update_response_id
1407
1407
  end
@@ -1456,7 +1456,7 @@ module Schemas
1456
1456
  attr_accessor :created_at
1457
1457
 
1458
1458
  # @override
1459
- def initialize(id: nil,
1459
+ def initialize(_from_message: false, id: nil,
1460
1460
  wibble_id: nil,
1461
1461
  name: nil,
1462
1462
  floop: nil,
@@ -1465,6 +1465,7 @@ module Schemas
1465
1465
  birthday_optional: nil,
1466
1466
  updated_at: nil,
1467
1467
  created_at: nil)
1468
+ @_from_message = _from_message
1468
1469
  super
1469
1470
  self.id = id
1470
1471
  self.wibble_id = wibble_id
@@ -1527,11 +1528,12 @@ module Schemas
1527
1528
  attr_accessor :created_at
1528
1529
 
1529
1530
  # @override
1530
- def initialize(id: nil,
1531
+ def initialize(_from_message: false, id: nil,
1531
1532
  widget_id: nil,
1532
1533
  name: nil,
1533
1534
  updated_at: nil,
1534
1535
  created_at: nil)
1536
+ @_from_message = _from_message
1535
1537
  super
1536
1538
  self.id = id
1537
1539
  self.widget_id = widget_id
@@ -1586,11 +1588,12 @@ module Schemas
1586
1588
  attr_accessor :created_at
1587
1589
 
1588
1590
  # @override
1589
- def initialize(id: nil,
1591
+ def initialize(_from_message: false, id: nil,
1590
1592
  widget_id: nil,
1591
1593
  model_id: nil,
1592
1594
  updated_at: nil,
1593
1595
  created_at: nil)
1596
+ @_from_message = _from_message
1594
1597
  super
1595
1598
  self.id = id
1596
1599
  self.widget_id = widget_id