plainrouter-sdk 0.1.0

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.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +202 -0
  3. data/README.md +59 -0
  4. data/lib/plainrouter/client.rb +44 -0
  5. data/lib/plainrouter/openapi/api/event_api.rb +213 -0
  6. data/lib/plainrouter/openapi/api/operations_api.rb +542 -0
  7. data/lib/plainrouter/openapi/api/sandbox_api.rb +272 -0
  8. data/lib/plainrouter/openapi/api_client.rb +441 -0
  9. data/lib/plainrouter/openapi/api_error.rb +58 -0
  10. data/lib/plainrouter/openapi/api_model_base.rb +88 -0
  11. data/lib/plainrouter/openapi/configuration.rb +399 -0
  12. data/lib/plainrouter/openapi/models/create_event200_response.rb +190 -0
  13. data/lib/plainrouter/openapi/models/create_event_request.rb +103 -0
  14. data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +344 -0
  15. data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +346 -0
  16. data/lib/plainrouter/openapi/models/create_event_request_any_of_event_time.rb +104 -0
  17. data/lib/plainrouter/openapi/models/create_event_request_any_of_value_data.rb +186 -0
  18. data/lib/plainrouter/openapi/models/create_sandbox_key201_response.rb +320 -0
  19. data/lib/plainrouter/openapi/models/create_sandbox_key201_response_use.rb +216 -0
  20. data/lib/plainrouter/openapi/models/delete_user_data200_response.rb +268 -0
  21. data/lib/plainrouter/openapi/models/delete_user_data_request.rb +225 -0
  22. data/lib/plainrouter/openapi/models/delivery_status.rb +49 -0
  23. data/lib/plainrouter/openapi/models/destination.rb +354 -0
  24. data/lib/plainrouter/openapi/models/destination_credential_source.rb +40 -0
  25. data/lib/plainrouter/openapi/models/destination_status.rb +40 -0
  26. data/lib/plainrouter/openapi/models/destination_type.rb +39 -0
  27. data/lib/plainrouter/openapi/models/emq_snapshot.rb +344 -0
  28. data/lib/plainrouter/openapi/models/error_message.rb +164 -0
  29. data/lib/plainrouter/openapi/models/event.rb +782 -0
  30. data/lib/plainrouter/openapi/models/get_emq_report200_response.rb +166 -0
  31. data/lib/plainrouter/openapi/models/get_emq_report200_response_snapshots_inner.rb +342 -0
  32. data/lib/plainrouter/openapi/models/get_event200_response.rb +218 -0
  33. data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +440 -0
  34. data/lib/plainrouter/openapi/models/get_event200_response_event.rb +624 -0
  35. data/lib/plainrouter/openapi/models/get_event200_response_event_consent.rb +103 -0
  36. data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +414 -0
  37. data/lib/plainrouter/openapi/models/get_event200_response_lineage.rb +178 -0
  38. data/lib/plainrouter/openapi/models/get_event200_response_lineage_children_inner.rb +596 -0
  39. data/lib/plainrouter/openapi/models/get_event200_response_lineage_parent.rb +596 -0
  40. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response.rb +192 -0
  41. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner.rb +476 -0
  42. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_buckets_value.rb +216 -0
  43. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts.rb +190 -0
  44. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts_accepted.rb +103 -0
  45. data/lib/plainrouter/openapi/models/get_sandbox200_response.rb +372 -0
  46. data/lib/plainrouter/openapi/models/get_sandbox200_response_self_serve_key.rb +242 -0
  47. data/lib/plainrouter/openapi/models/get_sandbox200_response_try.rb +242 -0
  48. data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body.rb +242 -0
  49. data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body_value_data.rb +216 -0
  50. data/lib/plainrouter/openapi/models/jurisdiction_policy_class.rb +40 -0
  51. data/lib/plainrouter/openapi/models/list_events200_response.rb +190 -0
  52. data/lib/plainrouter/openapi/models/list_events200_response_events.rb +382 -0
  53. data/lib/plainrouter/openapi/models/list_events200_response_events_links_inner.rb +202 -0
  54. data/lib/plainrouter/openapi/models/list_events200_response_metrics.rb +228 -0
  55. data/lib/plainrouter/openapi/models/list_events_by_cursor200_response.rb +190 -0
  56. data/lib/plainrouter/openapi/models/list_events_by_cursor200_response_events.rb +252 -0
  57. data/lib/plainrouter/openapi/models/reconciliation_report.rb +464 -0
  58. data/lib/plainrouter/openapi/models/replay_deliveries202_response.rb +242 -0
  59. data/lib/plainrouter/openapi/models/replay_deliveries_request.rb +199 -0
  60. data/lib/plainrouter/openapi/models/send_test_purchase200_response.rb +224 -0
  61. data/lib/plainrouter/openapi/models/send_test_purchase422_response.rb +103 -0
  62. data/lib/plainrouter/openapi/models/send_test_purchase_request.rb +224 -0
  63. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response.rb +190 -0
  64. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +338 -0
  65. data/lib/plainrouter/openapi/models/set_destination_test_mode_request.rb +189 -0
  66. data/lib/plainrouter/openapi/models/traffic_class.rb +40 -0
  67. data/lib/plainrouter/openapi/models/validate_sandbox_event200_response.rb +320 -0
  68. data/lib/plainrouter/openapi/models/validate_sandbox_event_request.rb +194 -0
  69. data/lib/plainrouter/openapi/models/validate_sandbox_event_request_value_data.rb +166 -0
  70. data/lib/plainrouter/openapi/models/validation_error.rb +192 -0
  71. data/lib/plainrouter/openapi/version.rb +15 -0
  72. data/lib/plainrouter/openapi.rb +102 -0
  73. data/lib/plainrouter/version.rb +6 -0
  74. data/lib/plainrouter.rb +10 -0
  75. metadata +176 -0
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #PlainRouter Conversion API
3
+
4
+ #PlainRouter public Signals Conversion API.
5
+
6
+ The version of the OpenAPI document: 0.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PlainRouter::OpenAPI
17
+ class GetEvent200Response < ApiModelBase
18
+ attr_accessor :event
19
+
20
+ attr_accessor :lineage
21
+
22
+ attr_accessor :deliveries
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'event' => :'event',
28
+ :'lineage' => :'lineage',
29
+ :'deliveries' => :'deliveries'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'event' => :'GetEvent200ResponseEvent',
47
+ :'lineage' => :'GetEvent200ResponseLineage',
48
+ :'deliveries' => :'Array<GetEvent200ResponseDeliveriesInner>'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetEvent200Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetEvent200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'event')
75
+ self.event = attributes[:'event']
76
+ else
77
+ self.event = nil
78
+ end
79
+
80
+ if attributes.key?(:'lineage')
81
+ self.lineage = attributes[:'lineage']
82
+ else
83
+ self.lineage = nil
84
+ end
85
+
86
+ if attributes.key?(:'deliveries')
87
+ if (value = attributes[:'deliveries']).is_a?(Array)
88
+ self.deliveries = value
89
+ end
90
+ else
91
+ self.deliveries = nil
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @event.nil?
101
+ invalid_properties.push('invalid value for "event", event cannot be nil.')
102
+ end
103
+
104
+ if @lineage.nil?
105
+ invalid_properties.push('invalid value for "lineage", lineage cannot be nil.')
106
+ end
107
+
108
+ if @deliveries.nil?
109
+ invalid_properties.push('invalid value for "deliveries", deliveries cannot be nil.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ return false if @event.nil?
120
+ return false if @lineage.nil?
121
+ return false if @deliveries.nil?
122
+ true
123
+ end
124
+
125
+ # Custom attribute writer method with validation
126
+ # @param [Object] event Value to be assigned
127
+ def event=(event)
128
+ if event.nil?
129
+ fail ArgumentError, 'event cannot be nil'
130
+ end
131
+
132
+ @event = event
133
+ end
134
+
135
+ # Custom attribute writer method with validation
136
+ # @param [Object] lineage Value to be assigned
137
+ def lineage=(lineage)
138
+ if lineage.nil?
139
+ fail ArgumentError, 'lineage cannot be nil'
140
+ end
141
+
142
+ @lineage = lineage
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] deliveries Value to be assigned
147
+ def deliveries=(deliveries)
148
+ if deliveries.nil?
149
+ fail ArgumentError, 'deliveries cannot be nil'
150
+ end
151
+
152
+ @deliveries = deliveries
153
+ end
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] Object to be compared
157
+ def ==(o)
158
+ return true if self.equal?(o)
159
+ self.class == o.class &&
160
+ event == o.event &&
161
+ lineage == o.lineage &&
162
+ deliveries == o.deliveries
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [event, lineage, deliveries].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ return nil unless attributes.is_a?(Hash)
182
+ attributes = attributes.transform_keys(&:to_sym)
183
+ transformed_hash = {}
184
+ openapi_types.each_pair do |key, type|
185
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = nil
187
+ elsif type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[attribute_map[key]].is_a?(Array)
191
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
192
+ end
193
+ elsif !attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
195
+ end
196
+ end
197
+ new(transformed_hash)
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ end
217
+
218
+ end
@@ -0,0 +1,440 @@
1
+ =begin
2
+ #PlainRouter Conversion API
3
+
4
+ #PlainRouter public Signals Conversion API.
5
+
6
+ The version of the OpenAPI document: 0.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PlainRouter::OpenAPI
17
+ class GetEvent200ResponseDeliveriesInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :signal_tracker_id
21
+
22
+ attr_accessor :event_id
23
+
24
+ attr_accessor :destination_id
25
+
26
+ attr_accessor :status
27
+
28
+ attr_accessor :is_test
29
+
30
+ attr_accessor :attempt_count
31
+
32
+ attr_accessor :last_error
33
+
34
+ attr_accessor :platform_response
35
+
36
+ attr_accessor :platform_trace_id
37
+
38
+ attr_accessor :next_attempt_at
39
+
40
+ attr_accessor :created_at
41
+
42
+ attr_accessor :updated_at
43
+
44
+ attr_accessor :explanation
45
+
46
+ class EnumAttributeValidator
47
+ attr_reader :datatype
48
+ attr_reader :allowable_values
49
+
50
+ def initialize(datatype, allowable_values)
51
+ @allowable_values = allowable_values.map do |value|
52
+ case datatype.to_s
53
+ when /Integer/i
54
+ value.to_i
55
+ when /Float/i
56
+ value.to_f
57
+ else
58
+ value
59
+ end
60
+ end
61
+ end
62
+
63
+ def valid?(value)
64
+ !value || allowable_values.include?(value)
65
+ end
66
+ end
67
+
68
+ # Attribute mapping from ruby-style variable name to JSON key.
69
+ def self.attribute_map
70
+ {
71
+ :'id' => :'id',
72
+ :'signal_tracker_id' => :'signal_tracker_id',
73
+ :'event_id' => :'event_id',
74
+ :'destination_id' => :'destination_id',
75
+ :'status' => :'status',
76
+ :'is_test' => :'is_test',
77
+ :'attempt_count' => :'attempt_count',
78
+ :'last_error' => :'last_error',
79
+ :'platform_response' => :'platform_response',
80
+ :'platform_trace_id' => :'platform_trace_id',
81
+ :'next_attempt_at' => :'next_attempt_at',
82
+ :'created_at' => :'created_at',
83
+ :'updated_at' => :'updated_at',
84
+ :'explanation' => :'explanation'
85
+ }
86
+ end
87
+
88
+ # Returns attribute mapping this model knows about
89
+ def self.acceptable_attribute_map
90
+ attribute_map
91
+ end
92
+
93
+ # Returns all the JSON keys this model knows about
94
+ def self.acceptable_attributes
95
+ acceptable_attribute_map.values
96
+ end
97
+
98
+ # Attribute type mapping.
99
+ def self.openapi_types
100
+ {
101
+ :'id' => :'Integer',
102
+ :'signal_tracker_id' => :'String',
103
+ :'event_id' => :'String',
104
+ :'destination_id' => :'String',
105
+ :'status' => :'DeliveryStatus',
106
+ :'is_test' => :'Boolean',
107
+ :'attempt_count' => :'Integer',
108
+ :'last_error' => :'GetEvent200ResponseEventConsent',
109
+ :'platform_response' => :'GetEvent200ResponseEventConsent',
110
+ :'platform_trace_id' => :'String',
111
+ :'next_attempt_at' => :'String',
112
+ :'created_at' => :'String',
113
+ :'updated_at' => :'String',
114
+ :'explanation' => :'String'
115
+ }
116
+ end
117
+
118
+ # List of attributes with nullable: true
119
+ def self.openapi_nullable
120
+ Set.new([
121
+ :'destination_id',
122
+ :'last_error',
123
+ :'platform_response',
124
+ :'platform_trace_id',
125
+ :'next_attempt_at',
126
+ :'updated_at',
127
+ ])
128
+ end
129
+
130
+ # Initializes the object
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ def initialize(attributes = {})
133
+ if (!attributes.is_a?(Hash))
134
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetEvent200ResponseDeliveriesInner` initialize method"
135
+ end
136
+
137
+ # check to see if the attribute exists and convert string to symbol for hash key
138
+ acceptable_attribute_map = self.class.acceptable_attribute_map
139
+ attributes = attributes.each_with_object({}) { |(k, v), h|
140
+ if (!acceptable_attribute_map.key?(k.to_sym))
141
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetEvent200ResponseDeliveriesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
142
+ end
143
+ h[k.to_sym] = v
144
+ }
145
+
146
+ if attributes.key?(:'id')
147
+ self.id = attributes[:'id']
148
+ else
149
+ self.id = nil
150
+ end
151
+
152
+ if attributes.key?(:'signal_tracker_id')
153
+ self.signal_tracker_id = attributes[:'signal_tracker_id']
154
+ else
155
+ self.signal_tracker_id = nil
156
+ end
157
+
158
+ if attributes.key?(:'event_id')
159
+ self.event_id = attributes[:'event_id']
160
+ else
161
+ self.event_id = nil
162
+ end
163
+
164
+ if attributes.key?(:'destination_id')
165
+ self.destination_id = attributes[:'destination_id']
166
+ else
167
+ self.destination_id = nil
168
+ end
169
+
170
+ if attributes.key?(:'status')
171
+ self.status = attributes[:'status']
172
+ else
173
+ self.status = nil
174
+ end
175
+
176
+ if attributes.key?(:'is_test')
177
+ self.is_test = attributes[:'is_test']
178
+ else
179
+ self.is_test = nil
180
+ end
181
+
182
+ if attributes.key?(:'attempt_count')
183
+ self.attempt_count = attributes[:'attempt_count']
184
+ else
185
+ self.attempt_count = nil
186
+ end
187
+
188
+ if attributes.key?(:'last_error')
189
+ self.last_error = attributes[:'last_error']
190
+ else
191
+ self.last_error = nil
192
+ end
193
+
194
+ if attributes.key?(:'platform_response')
195
+ self.platform_response = attributes[:'platform_response']
196
+ else
197
+ self.platform_response = nil
198
+ end
199
+
200
+ if attributes.key?(:'platform_trace_id')
201
+ self.platform_trace_id = attributes[:'platform_trace_id']
202
+ else
203
+ self.platform_trace_id = nil
204
+ end
205
+
206
+ if attributes.key?(:'next_attempt_at')
207
+ self.next_attempt_at = attributes[:'next_attempt_at']
208
+ else
209
+ self.next_attempt_at = nil
210
+ end
211
+
212
+ if attributes.key?(:'created_at')
213
+ self.created_at = attributes[:'created_at']
214
+ else
215
+ self.created_at = nil
216
+ end
217
+
218
+ if attributes.key?(:'updated_at')
219
+ self.updated_at = attributes[:'updated_at']
220
+ else
221
+ self.updated_at = nil
222
+ end
223
+
224
+ if attributes.key?(:'explanation')
225
+ self.explanation = attributes[:'explanation']
226
+ else
227
+ self.explanation = nil
228
+ end
229
+ end
230
+
231
+ # Show invalid properties with the reasons. Usually used together with valid?
232
+ # @return Array for valid properties with the reasons
233
+ def list_invalid_properties
234
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
235
+ invalid_properties = Array.new
236
+ if @id.nil?
237
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
238
+ end
239
+
240
+ if @signal_tracker_id.nil?
241
+ invalid_properties.push('invalid value for "signal_tracker_id", signal_tracker_id cannot be nil.')
242
+ end
243
+
244
+ if @event_id.nil?
245
+ invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
246
+ end
247
+
248
+ if @status.nil?
249
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
250
+ end
251
+
252
+ if @is_test.nil?
253
+ invalid_properties.push('invalid value for "is_test", is_test cannot be nil.')
254
+ end
255
+
256
+ if @attempt_count.nil?
257
+ invalid_properties.push('invalid value for "attempt_count", attempt_count cannot be nil.')
258
+ end
259
+
260
+ if @created_at.nil?
261
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
262
+ end
263
+
264
+ if @explanation.nil?
265
+ invalid_properties.push('invalid value for "explanation", explanation cannot be nil.')
266
+ end
267
+
268
+ invalid_properties
269
+ end
270
+
271
+ # Check to see if the all the properties in the model are valid
272
+ # @return true if the model is valid
273
+ def valid?
274
+ warn '[DEPRECATED] the `valid?` method is obsolete'
275
+ return false if @id.nil?
276
+ return false if @signal_tracker_id.nil?
277
+ return false if @event_id.nil?
278
+ return false if @status.nil?
279
+ return false if @is_test.nil?
280
+ return false if @attempt_count.nil?
281
+ return false if @created_at.nil?
282
+ return false if @explanation.nil?
283
+ true
284
+ end
285
+
286
+ # Custom attribute writer method with validation
287
+ # @param [Object] id Value to be assigned
288
+ def id=(id)
289
+ if id.nil?
290
+ fail ArgumentError, 'id cannot be nil'
291
+ end
292
+
293
+ @id = id
294
+ end
295
+
296
+ # Custom attribute writer method with validation
297
+ # @param [Object] signal_tracker_id Value to be assigned
298
+ def signal_tracker_id=(signal_tracker_id)
299
+ if signal_tracker_id.nil?
300
+ fail ArgumentError, 'signal_tracker_id cannot be nil'
301
+ end
302
+
303
+ @signal_tracker_id = signal_tracker_id
304
+ end
305
+
306
+ # Custom attribute writer method with validation
307
+ # @param [Object] event_id Value to be assigned
308
+ def event_id=(event_id)
309
+ if event_id.nil?
310
+ fail ArgumentError, 'event_id cannot be nil'
311
+ end
312
+
313
+ @event_id = event_id
314
+ end
315
+
316
+ # Custom attribute writer method with validation
317
+ # @param [Object] status Value to be assigned
318
+ def status=(status)
319
+ if status.nil?
320
+ fail ArgumentError, 'status cannot be nil'
321
+ end
322
+
323
+ @status = status
324
+ end
325
+
326
+ # Custom attribute writer method with validation
327
+ # @param [Object] is_test Value to be assigned
328
+ def is_test=(is_test)
329
+ if is_test.nil?
330
+ fail ArgumentError, 'is_test cannot be nil'
331
+ end
332
+
333
+ @is_test = is_test
334
+ end
335
+
336
+ # Custom attribute writer method with validation
337
+ # @param [Object] attempt_count Value to be assigned
338
+ def attempt_count=(attempt_count)
339
+ if attempt_count.nil?
340
+ fail ArgumentError, 'attempt_count cannot be nil'
341
+ end
342
+
343
+ @attempt_count = attempt_count
344
+ end
345
+
346
+ # Custom attribute writer method with validation
347
+ # @param [Object] created_at Value to be assigned
348
+ def created_at=(created_at)
349
+ if created_at.nil?
350
+ fail ArgumentError, 'created_at cannot be nil'
351
+ end
352
+
353
+ @created_at = created_at
354
+ end
355
+
356
+ # Custom attribute writer method with validation
357
+ # @param [Object] explanation Value to be assigned
358
+ def explanation=(explanation)
359
+ if explanation.nil?
360
+ fail ArgumentError, 'explanation cannot be nil'
361
+ end
362
+
363
+ @explanation = explanation
364
+ end
365
+
366
+ # Checks equality by comparing each attribute.
367
+ # @param [Object] Object to be compared
368
+ def ==(o)
369
+ return true if self.equal?(o)
370
+ self.class == o.class &&
371
+ id == o.id &&
372
+ signal_tracker_id == o.signal_tracker_id &&
373
+ event_id == o.event_id &&
374
+ destination_id == o.destination_id &&
375
+ status == o.status &&
376
+ is_test == o.is_test &&
377
+ attempt_count == o.attempt_count &&
378
+ last_error == o.last_error &&
379
+ platform_response == o.platform_response &&
380
+ platform_trace_id == o.platform_trace_id &&
381
+ next_attempt_at == o.next_attempt_at &&
382
+ created_at == o.created_at &&
383
+ updated_at == o.updated_at &&
384
+ explanation == o.explanation
385
+ end
386
+
387
+ # @see the `==` method
388
+ # @param [Object] Object to be compared
389
+ def eql?(o)
390
+ self == o
391
+ end
392
+
393
+ # Calculates hash code according to all attributes.
394
+ # @return [Integer] Hash code
395
+ def hash
396
+ [id, signal_tracker_id, event_id, destination_id, status, is_test, attempt_count, last_error, platform_response, platform_trace_id, next_attempt_at, created_at, updated_at, explanation].hash
397
+ end
398
+
399
+ # Builds the object from hash
400
+ # @param [Hash] attributes Model attributes in the form of hash
401
+ # @return [Object] Returns the model itself
402
+ def self.build_from_hash(attributes)
403
+ return nil unless attributes.is_a?(Hash)
404
+ attributes = attributes.transform_keys(&:to_sym)
405
+ transformed_hash = {}
406
+ openapi_types.each_pair do |key, type|
407
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
408
+ transformed_hash["#{key}"] = nil
409
+ elsif type =~ /\AArray<(.*)>/i
410
+ # check to ensure the input is an array given that the attribute
411
+ # is documented as an array but the input is not
412
+ if attributes[attribute_map[key]].is_a?(Array)
413
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
414
+ end
415
+ elsif !attributes[attribute_map[key]].nil?
416
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
417
+ end
418
+ end
419
+ new(transformed_hash)
420
+ end
421
+
422
+ # Returns the object in the form of hash
423
+ # @return [Hash] Returns the object in the form of hash
424
+ def to_hash
425
+ hash = {}
426
+ self.class.attribute_map.each_pair do |attr, param|
427
+ value = self.send(attr)
428
+ if value.nil?
429
+ is_nullable = self.class.openapi_nullable.include?(attr)
430
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
431
+ end
432
+
433
+ hash[param] = _to_hash(value)
434
+ end
435
+ hash
436
+ end
437
+
438
+ end
439
+
440
+ end