Class: PlainRouter::OpenAPI::GetEvent200ResponseEvent

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/plainrouter/openapi/models/get_event200_response_event.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ GetEvent200ResponseEvent

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 154

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetEvent200ResponseEvent` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetEvent200ResponseEvent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  else
    self.id = nil
  end

  if attributes.key?(:'signal_tracker_id')
    self.signal_tracker_id = attributes[:'signal_tracker_id']
  else
    self.signal_tracker_id = nil
  end

  if attributes.key?(:'parent_event_id')
    self.parent_event_id = attributes[:'parent_event_id']
  else
    self.parent_event_id = nil
  end

  if attributes.key?(:'event_name')
    self.event_name = attributes[:'event_name']
  else
    self.event_name = nil
  end

  if attributes.key?(:'event_time')
    self.event_time = attributes[:'event_time']
  else
    self.event_time = nil
  end

  if attributes.key?(:'action_source')
    self.action_source = attributes[:'action_source']
  else
    self.action_source = nil
  end

  if attributes.key?(:'event_class')
    self.event_class = attributes[:'event_class']
  else
    self.event_class = nil
  end

  if attributes.key?(:'order_id')
    self.order_id = attributes[:'order_id']
  else
    self.order_id = nil
  end

  if attributes.key?(:'value_amount')
    self.value_amount = attributes[:'value_amount']
  else
    self.value_amount = nil
  end

  if attributes.key?(:'value_currency')
    self.value_currency = attributes[:'value_currency']
  else
    self.value_currency = nil
  end

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  else
    self.created_at = nil
  end

  if attributes.key?(:'consent_basis')
    self.consent_basis = attributes[:'consent_basis']
  else
    self.consent_basis = nil
  end

  if attributes.key?(:'measurement_class')
    self.measurement_class = attributes[:'measurement_class']
  else
    self.measurement_class = nil
  end

  if attributes.key?(:'attribution_join')
    self.attribution_join = attributes[:'attribution_join']
  else
    self.attribution_join = nil
  end

  if attributes.key?(:'enforcement_scope')
    self.enforcement_scope = attributes[:'enforcement_scope']
  else
    self.enforcement_scope = nil
  end

  if attributes.key?(:'consent_normalization_version')
    self.consent_normalization_version = attributes[:'consent_normalization_version']
  else
    self.consent_normalization_version = nil
  end

  if attributes.key?(:'consent')
    self.consent = attributes[:'consent']
  else
    self.consent = nil
  end

  if attributes.key?(:'user_data_hashed')
    self.user_data_hashed = attributes[:'user_data_hashed']
  else
    self.user_data_hashed = nil
  end

  if attributes.key?(:'click_ids')
    self.click_ids = attributes[:'click_ids']
  else
    self.click_ids = nil
  end

  if attributes.key?(:'session')
    self.session = attributes[:'session']
  else
    self.session = nil
  end

  if attributes.key?(:'value_data')
    self.value_data = attributes[:'value_data']
  else
    self.value_data = nil
  end

  if attributes.key?(:'event_source')
    self.event_source = attributes[:'event_source']
  else
    self.event_source = nil
  end

  if attributes.key?(:'payload_expired')
    self.payload_expired = attributes[:'payload_expired']
  else
    self.payload_expired = nil
  end

  if attributes.key?(:'deliveries')
    if (value = attributes[:'deliveries']).is_a?(Array)
      self.deliveries = value
    end
  else
    self.deliveries = nil
  end
end

Instance Attribute Details

#action_sourceObject

Returns the value of attribute action_source.



28
29
30
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 28

def action_source
  @action_source
end

#attribution_joinObject

Returns the value of attribute attribution_join.



44
45
46
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 44

def attribution_join
  @attribution_join
end

#click_idsObject

Returns the value of attribute click_ids.



54
55
56
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 54

def click_ids
  @click_ids
end

Returns the value of attribute consent.



50
51
52
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 50

def consent
  @consent
end

Returns the value of attribute consent_basis.



40
41
42
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 40

def consent_basis
  @consent_basis
end

Returns the value of attribute consent_normalization_version.



48
49
50
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 48

def consent_normalization_version
  @consent_normalization_version
end

#created_atObject

Returns the value of attribute created_at.



38
39
40
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 38

def created_at
  @created_at
end

#deliveriesObject

Returns the value of attribute deliveries.



64
65
66
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 64

def deliveries
  @deliveries
end

#enforcement_scopeObject

Returns the value of attribute enforcement_scope.



46
47
48
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 46

def enforcement_scope
  @enforcement_scope
end

#event_classObject

Returns the value of attribute event_class.



30
31
32
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 30

def event_class
  @event_class
end

#event_nameObject

Returns the value of attribute event_name.



24
25
26
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 24

def event_name
  @event_name
end

#event_sourceObject

Returns the value of attribute event_source.



60
61
62
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 60

def event_source
  @event_source
end

#event_timeObject

Returns the value of attribute event_time.



26
27
28
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 26

def event_time
  @event_time
end

#idObject

Returns the value of attribute id.



18
19
20
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 18

def id
  @id
end

#measurement_classObject

Returns the value of attribute measurement_class.



42
43
44
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 42

def measurement_class
  @measurement_class
end

#order_idObject

Returns the value of attribute order_id.



32
33
34
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 32

def order_id
  @order_id
end

#parent_event_idObject

Returns the value of attribute parent_event_id.



22
23
24
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 22

def parent_event_id
  @parent_event_id
end

#payload_expiredObject

Returns the value of attribute payload_expired.



62
63
64
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 62

def payload_expired
  @payload_expired
end

#sessionObject

Returns the value of attribute session.



56
57
58
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 56

def session
  @session
end

#signal_tracker_idObject

Returns the value of attribute signal_tracker_id.



20
21
22
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 20

def signal_tracker_id
  @signal_tracker_id
end

#user_data_hashedObject

Returns the value of attribute user_data_hashed.



52
53
54
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 52

def user_data_hashed
  @user_data_hashed
end

#value_amountObject

Returns the value of attribute value_amount.



34
35
36
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 34

def value_amount
  @value_amount
end

#value_currencyObject

Returns the value of attribute value_currency.



36
37
38
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 36

def value_currency
  @value_currency
end

#value_dataObject

Returns the value of attribute value_data.



58
59
60
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 58

def value_data
  @value_data
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



97
98
99
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 97

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



102
103
104
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 102

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 67

def self.attribute_map
  {
    :'id' => :'id',
    :'signal_tracker_id' => :'signal_tracker_id',
    :'parent_event_id' => :'parent_event_id',
    :'event_name' => :'event_name',
    :'event_time' => :'event_time',
    :'action_source' => :'action_source',
    :'event_class' => :'event_class',
    :'order_id' => :'order_id',
    :'value_amount' => :'value_amount',
    :'value_currency' => :'value_currency',
    :'created_at' => :'created_at',
    :'consent_basis' => :'consent_basis',
    :'measurement_class' => :'measurement_class',
    :'attribution_join' => :'attribution_join',
    :'enforcement_scope' => :'enforcement_scope',
    :'consent_normalization_version' => :'consent_normalization_version',
    :'consent' => :'consent',
    :'user_data_hashed' => :'user_data_hashed',
    :'click_ids' => :'click_ids',
    :'session' => :'session',
    :'value_data' => :'value_data',
    :'event_source' => :'event_source',
    :'payload_expired' => :'payload_expired',
    :'deliveries' => :'deliveries'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 586

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 137

def self.openapi_nullable
  Set.new([
    :'parent_event_id',
    :'order_id',
    :'value_amount',
    :'value_currency',
    :'consent',
    :'user_data_hashed',
    :'click_ids',
    :'session',
    :'value_data',
    :'event_source',
  ])
end

.openapi_typesObject

Attribute type mapping.



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 107

def self.openapi_types
  {
    :'id' => :'String',
    :'signal_tracker_id' => :'String',
    :'parent_event_id' => :'String',
    :'event_name' => :'String',
    :'event_time' => :'String',
    :'action_source' => :'String',
    :'event_class' => :'String',
    :'order_id' => :'String',
    :'value_amount' => :'Integer',
    :'value_currency' => :'String',
    :'created_at' => :'String',
    :'consent_basis' => :'String',
    :'measurement_class' => :'String',
    :'attribution_join' => :'String',
    :'enforcement_scope' => :'String',
    :'consent_normalization_version' => :'String',
    :'consent' => :'GetEvent200ResponseEventConsent',
    :'user_data_hashed' => :'GetEvent200ResponseEventConsent',
    :'click_ids' => :'GetEvent200ResponseEventConsent',
    :'session' => :'GetEvent200ResponseEventConsent',
    :'value_data' => :'GetEvent200ResponseEventConsent',
    :'event_source' => :'String',
    :'payload_expired' => :'Boolean',
    :'deliveries' => :'Array<GetEvent200ResponseEventDeliveriesInner>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 542

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      signal_tracker_id == o.signal_tracker_id &&
      parent_event_id == o.parent_event_id &&
      event_name == o.event_name &&
      event_time == o.event_time &&
      action_source == o.action_source &&
      event_class == o.event_class &&
      order_id == o.order_id &&
      value_amount == o.value_amount &&
      value_currency == o.value_currency &&
      created_at == o.created_at &&
      consent_basis == o.consent_basis &&
      measurement_class == o.measurement_class &&
      attribution_join == o.attribution_join &&
      enforcement_scope == o.enforcement_scope &&
      consent_normalization_version == o.consent_normalization_version &&
      consent == o.consent &&
      user_data_hashed == o.user_data_hashed &&
      click_ids == o.click_ids &&
      session == o.session &&
      value_data == o.value_data &&
      event_source == o.event_source &&
      payload_expired == o.payload_expired &&
      deliveries == o.deliveries
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


573
574
575
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 573

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



579
580
581
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 579

def hash
  [id, signal_tracker_id, parent_event_id, event_name, event_time, action_source, event_class, order_id, value_amount, value_currency, created_at, consent_basis, measurement_class, attribution_join, enforcement_scope, consent_normalization_version, consent, user_data_hashed, click_ids, session, value_data, event_source, payload_expired, deliveries].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 317

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @id.nil?
    invalid_properties.push('invalid value for "id", id cannot be nil.')
  end

  if @signal_tracker_id.nil?
    invalid_properties.push('invalid value for "signal_tracker_id", signal_tracker_id cannot be nil.')
  end

  if @event_name.nil?
    invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
  end

  if @event_time.nil?
    invalid_properties.push('invalid value for "event_time", event_time cannot be nil.')
  end

  if @action_source.nil?
    invalid_properties.push('invalid value for "action_source", action_source cannot be nil.')
  end

  if @event_class.nil?
    invalid_properties.push('invalid value for "event_class", event_class cannot be nil.')
  end

  if @created_at.nil?
    invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
  end

  if @consent_basis.nil?
    invalid_properties.push('invalid value for "consent_basis", consent_basis cannot be nil.')
  end

  if @measurement_class.nil?
    invalid_properties.push('invalid value for "measurement_class", measurement_class cannot be nil.')
  end

  if @attribution_join.nil?
    invalid_properties.push('invalid value for "attribution_join", attribution_join cannot be nil.')
  end

  if @enforcement_scope.nil?
    invalid_properties.push('invalid value for "enforcement_scope", enforcement_scope cannot be nil.')
  end

  if @consent_normalization_version.nil?
    invalid_properties.push('invalid value for "consent_normalization_version", consent_normalization_version cannot be nil.')
  end

  if @payload_expired.nil?
    invalid_properties.push('invalid value for "payload_expired", payload_expired cannot be nil.')
  end

  if @deliveries.nil?
    invalid_properties.push('invalid value for "deliveries", deliveries cannot be nil.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



608
609
610
611
612
613
614
615
616
617
618
619
620
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 608

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
# File 'lib/plainrouter/openapi/models/get_event200_response_event.rb', line 381

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @id.nil?
  return false if @signal_tracker_id.nil?
  return false if @event_name.nil?
  return false if @event_time.nil?
  return false if @action_source.nil?
  return false if @event_class.nil?
  return false if @created_at.nil?
  return false if @consent_basis.nil?
  return false if @measurement_class.nil?
  return false if @attribution_join.nil?
  return false if @enforcement_scope.nil?
  return false if @consent_normalization_version.nil?
  return false if @payload_expired.nil?
  return false if @deliveries.nil?
  true
end