deimos-ruby 2.0.1 → 2.0.2

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.
@@ -1,91 +0,0 @@
1
- {
2
- "namespace": "com.my-namespace",
3
- "name": "MySchemaWithUnionType",
4
- "type": "record",
5
- "doc": "Test schema",
6
- "fields": [
7
- {
8
- "name": "test_id",
9
- "type": "string",
10
- "default": ""
11
- },
12
- {
13
- "name": "test_long",
14
- "type": [
15
- "null",
16
- "long"
17
- ],
18
- "default": null
19
- },
20
- {
21
- "name": "test_union_type",
22
- "type": [
23
- "null",
24
- {
25
- "type": "record",
26
- "name": "Record1",
27
- "namespace": "com.flipp.content",
28
- "fields": [
29
- {
30
- "name": "record1_map",
31
- "type": {
32
- "type": "map",
33
- "values": "long"
34
- },
35
- "default": {}
36
- },
37
- {
38
- "name": "record1_id",
39
- "type": "int",
40
- "default": 0
41
- }
42
- ]
43
- },
44
- {
45
- "type": "record",
46
- "name": "Record2",
47
- "namespace": "com.flipp.content",
48
- "fields": [
49
- {
50
- "name": "record2_id",
51
- "type": "string",
52
- "default": ""
53
- }
54
- ]
55
- },
56
- {
57
- "type": "record",
58
- "name": "Record3",
59
- "namespace": "com.flipp.content",
60
- "fields": [
61
- {
62
- "name": "record3_id",
63
- "type": "float",
64
- "default": 0.0
65
- }
66
- ]
67
- },
68
- {
69
- "type": "record",
70
- "name": "Record4",
71
- "namespace": "com.flipp.content",
72
- "fields": [
73
- {
74
- "name": "record4_id",
75
- "type": "int",
76
- "default": 0
77
- }
78
- ]
79
- },
80
- "int",
81
- {
82
- "name": "test_array_of_strings",
83
- "type": "array",
84
- "default": [],
85
- "items":"string"
86
- }
87
- ],
88
- "default": null
89
- }
90
- ]
91
- }
@@ -1,185 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This file is autogenerated by Deimos, Do NOT modify
4
- module Schemas
5
- ### Primary Schema Class ###
6
- # Autogenerated Schema for Record at com.my-namespace.MySchemaWithUnionType
7
- class MySchemaWithUnionType < Deimos::SchemaClass::Record
8
-
9
- ### Secondary Schema Classes ###
10
- # Autogenerated Schema for Record at com.flipp.content.Record1
11
- class Record1 < Deimos::SchemaClass::Record
12
-
13
- ### Attribute Accessors ###
14
- # @return [Hash<String, Integer>]
15
- attr_accessor :record1_map
16
- # @return [Integer]
17
- attr_accessor :record1_id
18
-
19
- # @override
20
- def initialize(record1_map: {},
21
- record1_id: 0)
22
- super
23
- self.record1_map = record1_map
24
- self.record1_id = record1_id
25
- end
26
-
27
- # @override
28
- def schema
29
- 'Record1'
30
- end
31
-
32
- # @override
33
- def namespace
34
- 'com.flipp.content'
35
- end
36
-
37
- # @override
38
- def as_json(_opts={})
39
- {
40
- 'record1_map' => @record1_map,
41
- 'record1_id' => @record1_id
42
- }
43
- end
44
- end
45
-
46
- # Autogenerated Schema for Record at com.flipp.content.Record2
47
- class Record2 < Deimos::SchemaClass::Record
48
-
49
- ### Attribute Accessors ###
50
- # @return [String]
51
- attr_accessor :record2_id
52
-
53
- # @override
54
- def initialize(record2_id: "")
55
- super
56
- self.record2_id = record2_id
57
- end
58
-
59
- # @override
60
- def schema
61
- 'Record2'
62
- end
63
-
64
- # @override
65
- def namespace
66
- 'com.flipp.content'
67
- end
68
-
69
- # @override
70
- def as_json(_opts={})
71
- {
72
- 'record2_id' => @record2_id
73
- }
74
- end
75
- end
76
-
77
- # Autogenerated Schema for Record at com.flipp.content.Record3
78
- class Record3 < Deimos::SchemaClass::Record
79
-
80
- ### Attribute Accessors ###
81
- # @return [Float]
82
- attr_accessor :record3_id
83
-
84
- # @override
85
- def initialize(record3_id: 0.0)
86
- super
87
- self.record3_id = record3_id
88
- end
89
-
90
- # @override
91
- def schema
92
- 'Record3'
93
- end
94
-
95
- # @override
96
- def namespace
97
- 'com.flipp.content'
98
- end
99
-
100
- # @override
101
- def as_json(_opts={})
102
- {
103
- 'record3_id' => @record3_id
104
- }
105
- end
106
- end
107
-
108
- # Autogenerated Schema for Record at com.flipp.content.Record4
109
- class Record4 < Deimos::SchemaClass::Record
110
-
111
- ### Attribute Accessors ###
112
- # @return [Integer]
113
- attr_accessor :record4_id
114
-
115
- # @override
116
- def initialize(record4_id: 0)
117
- super
118
- self.record4_id = record4_id
119
- end
120
-
121
- # @override
122
- def schema
123
- 'Record4'
124
- end
125
-
126
- # @override
127
- def namespace
128
- 'com.flipp.content'
129
- end
130
-
131
- # @override
132
- def as_json(_opts={})
133
- {
134
- 'record4_id' => @record4_id
135
- }
136
- end
137
- end
138
-
139
-
140
- ### Attribute Readers ###
141
- # @return [nil, Record1, Record2, Record3, Record4, Integer, Array<String>]
142
- attr_reader :test_union_type
143
-
144
- ### Attribute Accessors ###
145
- # @return [String]
146
- attr_accessor :test_id
147
- # @return [nil, Integer]
148
- attr_accessor :test_long
149
-
150
- ### Attribute Writers ###
151
- # @return [nil, Record1, Record2, Record3, Record4, Integer, Array<String>]
152
- def test_union_type=(value)
153
- @test_union_type = Record1.initialize_from_value(value)
154
- end
155
-
156
- # @override
157
- def initialize(test_id: "",
158
- test_long: nil,
159
- test_union_type: nil)
160
- super
161
- self.test_id = test_id
162
- self.test_long = test_long
163
- self.test_union_type = test_union_type
164
- end
165
-
166
- # @override
167
- def schema
168
- 'MySchemaWithUnionType'
169
- end
170
-
171
- # @override
172
- def namespace
173
- 'com.my-namespace'
174
- end
175
-
176
- # @override
177
- def as_json(_opts={})
178
- {
179
- 'test_id' => @test_id,
180
- 'test_long' => @test_long,
181
- 'test_union_type' => @test_union_type&.as_json
182
- }
183
- end
184
- end
185
- end