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 :a_record_field
13
13
 
14
14
  # @override
15
- def initialize(a_record_field: nil)
15
+ def initialize(_from_message: false, a_record_field: nil)
16
+ @_from_message = _from_message
16
17
  super
17
18
  self.a_record_field = a_record_field
18
19
  end
@@ -89,7 +90,8 @@ module Schemas
89
90
  attr_accessor :response_id
90
91
 
91
92
  # @override
92
- def initialize(response_id: nil)
93
+ def initialize(_from_message: false, response_id: nil)
94
+ @_from_message = _from_message
93
95
  super
94
96
  self.response_id = response_id
95
97
  end
@@ -163,7 +165,7 @@ module Schemas
163
165
  end
164
166
 
165
167
  # @override
166
- def initialize(a_string: nil,
168
+ def initialize(_from_message: false, a_string: nil,
167
169
  a_int: nil,
168
170
  a_long: nil,
169
171
  a_float: nil,
@@ -175,6 +177,7 @@ module Schemas
175
177
  timestamp: nil,
176
178
  message_id: nil,
177
179
  a_record: nil)
180
+ @_from_message = _from_message
178
181
  super
179
182
  self.a_string = a_string
180
183
  self.a_int = a_int
@@ -200,13 +203,6 @@ module Schemas
200
203
  'com.my-namespace'
201
204
  end
202
205
 
203
- def self.tombstone(key)
204
- record = self.allocate
205
- record.tombstone_key = key
206
- record.a_string = key
207
- record
208
- end
209
-
210
206
  # @override
211
207
  def as_json(_opts={})
212
208
  {
@@ -242,7 +238,8 @@ module Schemas
242
238
  attr_accessor :response_id
243
239
 
244
240
  # @override
245
- def initialize(response_id: nil)
241
+ def initialize(_from_message: false, response_id: nil)
242
+ @_from_message = _from_message
246
243
  super
247
244
  self.response_id = response_id
248
245
  end
@@ -283,8 +280,9 @@ module Schemas
283
280
  attr_accessor :some_int
284
281
 
285
282
  # @override
286
- def initialize(test_id: nil,
283
+ def initialize(_from_message: false, test_id: nil,
287
284
  some_int: nil)
285
+ @_from_message = _from_message
288
286
  super
289
287
  self.test_id = test_id
290
288
  self.some_int = some_int
@@ -331,10 +329,11 @@ module Schemas
331
329
  attr_accessor :some_optional_int
332
330
 
333
331
  # @override
334
- def initialize(some_int: nil,
332
+ def initialize(_from_message: false, some_int: nil,
335
333
  some_float: nil,
336
334
  some_string: nil,
337
335
  some_optional_int: nil)
336
+ @_from_message = _from_message
338
337
  super
339
338
  self.some_int = some_int
340
339
  self.some_float = some_float
@@ -400,11 +399,12 @@ module Schemas
400
399
  end
401
400
 
402
401
  # @override
403
- def initialize(test_id: nil,
402
+ def initialize(_from_message: false, test_id: nil,
404
403
  test_float: nil,
405
404
  test_array: nil,
406
405
  some_nested_record: nil,
407
406
  some_optional_record: nil)
407
+ @_from_message = _from_message
408
408
  super
409
409
  self.test_id = test_id
410
410
  self.test_float = test_float
@@ -453,30 +453,19 @@ module Schemas
453
453
  # Autogenerated Schema for Record at com.my-namespace.MySchema
454
454
  class MySchema < Deimos::SchemaClass::Record
455
455
 
456
- ### Attribute Readers ###
457
- # @return [MySchemaKey]
458
- attr_reader :payload_key
459
-
460
456
  ### Attribute Accessors ###
461
457
  # @return [String]
462
458
  attr_accessor :test_id
463
459
  # @return [Integer]
464
460
  attr_accessor :some_int
465
461
 
466
- ### Attribute Writers ###
467
- # @return [MySchemaKey]
468
- def payload_key=(value)
469
- @payload_key = MySchemaKey.initialize_from_value(value, from_message: self._from_message)
470
- end
471
-
472
462
  # @override
473
- def initialize(test_id: nil,
474
- some_int: nil,
475
- payload_key: nil)
463
+ def initialize(_from_message: false, test_id: nil,
464
+ some_int: nil)
465
+ @_from_message = _from_message
476
466
  super
477
467
  self.test_id = test_id
478
468
  self.some_int = some_int
479
- self.payload_key = payload_key
480
469
  end
481
470
 
482
471
  # @override
@@ -489,19 +478,11 @@ module Schemas
489
478
  'com.my-namespace'
490
479
  end
491
480
 
492
- def self.tombstone(key)
493
- record = self.allocate
494
- record.tombstone_key = MySchemaKey.initialize_from_value(key, from_message: self._from_message)
495
- record.payload_key = key
496
- record
497
- end
498
-
499
481
  # @override
500
482
  def as_json(_opts={})
501
483
  {
502
484
  'test_id' => @test_id,
503
- 'some_int' => @some_int,
504
- 'payload_key' => @payload_key&.as_json
485
+ 'some_int' => @some_int
505
486
  }
506
487
  end
507
488
  end
@@ -524,8 +505,9 @@ module Schemas
524
505
  attr_accessor :part_two
525
506
 
526
507
  # @override
527
- def initialize(part_one: nil,
508
+ def initialize(_from_message: false, part_one: nil,
528
509
  part_two: nil)
510
+ @_from_message = _from_message
529
511
  super
530
512
  self.part_one = part_one
531
513
  self.part_two = part_two
@@ -566,7 +548,8 @@ module Schemas
566
548
  attr_accessor :id
567
549
 
568
550
  # @override
569
- def initialize(id: nil)
551
+ def initialize(_from_message: false, id: nil)
552
+ @_from_message = _from_message
570
553
  super
571
554
  self.id = id
572
555
  end
@@ -605,7 +588,8 @@ module Schemas
605
588
  attr_accessor :test_id
606
589
 
607
590
  # @override
608
- def initialize(test_id: nil)
591
+ def initialize(_from_message: false, test_id: nil)
592
+ @_from_message = _from_message
609
593
  super
610
594
  self.test_id = test_id
611
595
  end
@@ -646,8 +630,9 @@ module Schemas
646
630
  attr_accessor :some_bool
647
631
 
648
632
  # @override
649
- def initialize(test_id: nil,
633
+ def initialize(_from_message: false, test_id: nil,
650
634
  some_bool: nil)
635
+ @_from_message = _from_message
651
636
  super
652
637
  self.test_id = test_id
653
638
  self.some_bool = some_bool
@@ -696,7 +681,8 @@ module Schemas
696
681
  end
697
682
 
698
683
  # @override
699
- def initialize(properties: {})
684
+ def initialize(_from_message: false, properties: {})
685
+ @_from_message = _from_message
700
686
  super
701
687
  self.properties = properties
702
688
  end
@@ -803,7 +789,7 @@ module Schemas
803
789
  end
804
790
 
805
791
  # @override
806
- def initialize(test_id: nil,
792
+ def initialize(_from_message: false, test_id: nil,
807
793
  test_float: nil,
808
794
  test_string_array: ["test"],
809
795
  test_int_array: [123],
@@ -816,6 +802,7 @@ module Schemas
816
802
  some_enum_array: nil,
817
803
  some_optional_enum: nil,
818
804
  some_enum_with_default: "sym6")
805
+ @_from_message = _from_message
819
806
  super
820
807
  self.test_id = test_id
821
808
  self.test_float = test_float
@@ -886,11 +873,12 @@ module Schemas
886
873
  attr_accessor :timestamp
887
874
 
888
875
  # @override
889
- def initialize(test_id: nil,
876
+ def initialize(_from_message: false, test_id: nil,
890
877
  updated_at: nil,
891
878
  some_int: nil,
892
879
  some_datetime_int: nil,
893
880
  timestamp: nil)
881
+ @_from_message = _from_message
894
882
  super
895
883
  self.test_id = test_id
896
884
  self.updated_at = updated_at
@@ -943,10 +931,11 @@ module Schemas
943
931
  attr_accessor :timestamp
944
932
 
945
933
  # @override
946
- def initialize(test_id: nil,
934
+ def initialize(_from_message: false, test_id: nil,
947
935
  some_int: nil,
948
936
  message_id: nil,
949
937
  timestamp: nil)
938
+ @_from_message = _from_message
950
939
  super
951
940
  self.test_id = test_id
952
941
  self.some_int = some_int
@@ -995,9 +984,10 @@ module Schemas
995
984
  attr_accessor :title
996
985
 
997
986
  # @override
998
- def initialize(test_id: nil,
987
+ def initialize(_from_message: false, test_id: nil,
999
988
  some_int: nil,
1000
989
  title: nil)
990
+ @_from_message = _from_message
1001
991
  super
1002
992
  self.test_id = test_id
1003
993
  self.some_int = some_int
@@ -1067,9 +1057,10 @@ module Schemas
1067
1057
  end
1068
1058
 
1069
1059
  # @override
1070
- def initialize(test_id: "",
1060
+ def initialize(_from_message: false, test_id: "",
1071
1061
  test_long: nil,
1072
1062
  test_union_type: nil)
1063
+ @_from_message = _from_message
1073
1064
  super
1074
1065
  self.test_id = test_id
1075
1066
  self.test_long = test_long
@@ -1120,11 +1111,12 @@ module Schemas
1120
1111
  attr_accessor :timestamp
1121
1112
 
1122
1113
  # @override
1123
- def initialize(id: nil,
1114
+ def initialize(_from_message: false, id: nil,
1124
1115
  test_id: nil,
1125
1116
  some_int: nil,
1126
1117
  message_id: nil,
1127
1118
  timestamp: nil)
1119
+ @_from_message = _from_message
1128
1120
  super
1129
1121
  self.id = id
1130
1122
  self.test_id = test_id
@@ -1171,7 +1163,8 @@ module Schemas
1171
1163
  attr_accessor :property
1172
1164
 
1173
1165
  # @override
1174
- def initialize(property: nil)
1166
+ def initialize(_from_message: false, property: nil)
1167
+ @_from_message = _from_message
1175
1168
  super
1176
1169
  self.property = property
1177
1170
  end
@@ -1212,8 +1205,9 @@ module Schemas
1212
1205
  attr_accessor :record1_id
1213
1206
 
1214
1207
  # @override
1215
- def initialize(record1_map: {},
1208
+ def initialize(_from_message: false, record1_map: {},
1216
1209
  record1_id: 0)
1210
+ @_from_message = _from_message
1217
1211
  super
1218
1212
  self.record1_map = record1_map
1219
1213
  self.record1_id = record1_id
@@ -1254,7 +1248,8 @@ module Schemas
1254
1248
  attr_accessor :record2_id
1255
1249
 
1256
1250
  # @override
1257
- def initialize(record2_id: "")
1251
+ def initialize(_from_message: false, record2_id: "")
1252
+ @_from_message = _from_message
1258
1253
  super
1259
1254
  self.record2_id = record2_id
1260
1255
  end
@@ -1293,7 +1288,8 @@ module Schemas
1293
1288
  attr_accessor :record3_id
1294
1289
 
1295
1290
  # @override
1296
- def initialize(record3_id: 0.0)
1291
+ def initialize(_from_message: false, record3_id: 0.0)
1292
+ @_from_message = _from_message
1297
1293
  super
1298
1294
  self.record3_id = record3_id
1299
1295
  end
@@ -1332,7 +1328,8 @@ module Schemas
1332
1328
  attr_accessor :record4_id
1333
1329
 
1334
1330
  # @override
1335
- def initialize(record4_id: 0)
1331
+ def initialize(_from_message: false, record4_id: 0)
1332
+ @_from_message = _from_message
1336
1333
  super
1337
1334
  self.record4_id = record4_id
1338
1335
  end
@@ -1371,7 +1368,8 @@ module Schemas
1371
1368
  attr_accessor :update_request_id
1372
1369
 
1373
1370
  # @override
1374
- def initialize(update_request_id: nil)
1371
+ def initialize(_from_message: false, update_request_id: nil)
1372
+ @_from_message = _from_message
1375
1373
  super
1376
1374
  self.update_request_id = update_request_id
1377
1375
  end
@@ -1410,7 +1408,8 @@ module Schemas
1410
1408
  attr_accessor :update_response_id
1411
1409
 
1412
1410
  # @override
1413
- def initialize(update_response_id: nil)
1411
+ def initialize(_from_message: false, update_response_id: nil)
1412
+ @_from_message = _from_message
1414
1413
  super
1415
1414
  self.update_response_id = update_response_id
1416
1415
  end
@@ -1465,7 +1464,7 @@ module Schemas
1465
1464
  attr_accessor :created_at
1466
1465
 
1467
1466
  # @override
1468
- def initialize(id: nil,
1467
+ def initialize(_from_message: false, id: nil,
1469
1468
  wibble_id: nil,
1470
1469
  name: nil,
1471
1470
  floop: nil,
@@ -1474,6 +1473,7 @@ module Schemas
1474
1473
  birthday_optional: nil,
1475
1474
  updated_at: nil,
1476
1475
  created_at: nil)
1476
+ @_from_message = _from_message
1477
1477
  super
1478
1478
  self.id = id
1479
1479
  self.wibble_id = wibble_id
@@ -1536,11 +1536,12 @@ module Schemas
1536
1536
  attr_accessor :created_at
1537
1537
 
1538
1538
  # @override
1539
- def initialize(id: nil,
1539
+ def initialize(_from_message: false, id: nil,
1540
1540
  widget_id: nil,
1541
1541
  name: nil,
1542
1542
  updated_at: nil,
1543
1543
  created_at: nil)
1544
+ @_from_message = _from_message
1544
1545
  super
1545
1546
  self.id = id
1546
1547
  self.widget_id = widget_id
@@ -1595,11 +1596,12 @@ module Schemas
1595
1596
  attr_accessor :created_at
1596
1597
 
1597
1598
  # @override
1598
- def initialize(id: nil,
1599
+ def initialize(_from_message: false, id: nil,
1599
1600
  widget_id: nil,
1600
1601
  model_id: nil,
1601
1602
  updated_at: nil,
1602
1603
  created_at: nil)
1604
+ @_from_message = _from_message
1603
1605
  super
1604
1606
  self.id = id
1605
1607
  self.widget_id = widget_id