Class: PinterestSdkClient::ConversionEventDeviceInfo

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/pinterest_sdk/models/conversion_event_device_info.rb

Overview

Object containing information about the device where event occurred.

Defined Under Namespace

Classes: EnumAttributeValidator

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 = {}) ⇒ ConversionEventDeviceInfo

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 191

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::ConversionEventDeviceInfo` 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 `PinterestSdkClient::ConversionEventDeviceInfo`. 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?(:'battery_level')
    self.battery_level = attributes[:'battery_level']
  end

  if attributes.key?(:'brand')
    self.brand = attributes[:'brand']
  end

  if attributes.key?(:'carrier')
    self.carrier = attributes[:'carrier']
  end

  if attributes.key?(:'cpu_cores')
    self.cpu_cores = attributes[:'cpu_cores']
  end

  if attributes.key?(:'external_storage_free_space')
    self.external_storage_free_space = attributes[:'external_storage_free_space']
  end

  if attributes.key?(:'external_storage_size')
    self.external_storage_size = attributes[:'external_storage_size']
  end

  if attributes.key?(:'form_factor')
    self.form_factor = attributes[:'form_factor']
  end

  if attributes.key?(:'kernel_version')
    self.kernel_version = attributes[:'kernel_version']
  end

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

  if attributes.key?(:'locale')
    self.locale = attributes[:'locale']
  end

  if attributes.key?(:'model')
    self.model = attributes[:'model']
  end

  if attributes.key?(:'network_type')
    self.network_type = attributes[:'network_type']
  end

  if attributes.key?(:'os_family')
    self.os_family = attributes[:'os_family']
  end

  if attributes.key?(:'os_name')
    self.os_name = attributes[:'os_name']
  end

  if attributes.key?(:'os_release_name')
    self.os_release_name = attributes[:'os_release_name']
  end

  if attributes.key?(:'os_version')
    self.os_version = attributes[:'os_version']
  end

  if attributes.key?(:'screen_density')
    self.screen_density = attributes[:'screen_density']
  end

  if attributes.key?(:'screen_height')
    self.screen_height = attributes[:'screen_height']
  end

  if attributes.key?(:'screen_width')
    self.screen_width = attributes[:'screen_width']
  end

  if attributes.key?(:'storage_free_space')
    self.storage_free_space = attributes[:'storage_free_space']
  end

  if attributes.key?(:'storage_size')
    self.storage_size = attributes[:'storage_size']
  end

  if attributes.key?(:'timezone')
    self.timezone = attributes[:'timezone']
  end

  if attributes.key?(:'timezone_abbr')
    self.timezone_abbr = attributes[:'timezone_abbr']
  end

  if attributes.key?(:'type')
    self.type = attributes[:'type']
  end
end

Instance Attribute Details

#battery_levelObject

Battery charge level percentage



20
21
22
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 20

def battery_level
  @battery_level
end

#brandObject

Device brand



23
24
25
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 23

def brand
  @brand
end

#carrierObject

User device’s mobile carrier.



26
27
28
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 26

def carrier
  @carrier
end

#cpu_coresObject

Number of CPU cores



29
30
31
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 29

def cpu_cores
  @cpu_cores
end

#external_storage_free_spaceObject

External storage size in GB



32
33
34
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 32

def external_storage_free_space
  @external_storage_free_space
end

#external_storage_sizeObject

External storage size in GB



35
36
37
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 35

def external_storage_size
  @external_storage_size
end

#form_factorObject

Device form factor



38
39
40
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 38

def form_factor
  @form_factor
end

#kernel_versionObject

Kernel version. Examples: Linux: 6.15. Obtain by running: uname -r MacOS: 24.3.0. Obtain by running: sysctl kern.version Android: 6.6. Obtain from OS.uname().release



41
42
43
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 41

def kernel_version
  @kernel_version
end

#languagesObject

List of user installed languages. ISO 639-1 format



44
45
46
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 44

def languages
  @languages
end

#localeObject

Device locale BCP-47 format



47
48
49
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 47

def locale
  @locale
end

#modelObject

Device model name



50
51
52
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 50

def model
  @model
end

#network_typeObject

Network type: 4G, 5G, ethernet, wifi In Android: NetworkCapabilities.getNetworkCapabilities()



53
54
55
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 53

def network_type
  @network_type
end

#os_familyObject

OS Family



56
57
58
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 56

def os_family
  @os_family
end

#os_nameObject

Short name of the OS. This value if specific to os family. Examples: Windows: 10, 11; Android: 16; iOS: 18; MacOS: 15; Linux: Debian, Ubuntu, Arch



59
60
61
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 59

def os_name
  @os_name
end

#os_release_nameObject

Marketing name for the release version iOS: Dawn Android: Baklava MacOS: Sequoia Ubuntu Linux: Plucky Puffin



62
63
64
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 62

def os_release_name
  @os_release_name
end

#os_versionObject

Full name of the version. Examples: iOS: 18.3 Android: 16.1 MacOS: 15.5 Windows: 24H2 Ubuntu Linux: 25.04



65
66
67
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 65

def os_version
  @os_version
end

#screen_densityObject

Screen density, PPI



68
69
70
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 68

def screen_density
  @screen_density
end

#screen_heightObject

Screen height in pixels



71
72
73
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 71

def screen_height
  @screen_height
end

#screen_widthObject

Screen width in pixels



74
75
76
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 74

def screen_width
  @screen_width
end

#storage_free_spaceObject

Internal storage size in GB



77
78
79
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 77

def storage_free_space
  @storage_free_space
end

#storage_sizeObject

Internal storage size in GB



80
81
82
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 80

def storage_size
  @storage_size
end

#timezoneObject

Device timezone



83
84
85
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 83

def timezone
  @timezone
end

#timezone_abbrObject

Timezone abbreviation



86
87
88
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 86

def timezone_abbr
  @timezone_abbr
end

#typeObject

Device type



89
90
91
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 89

def type
  @type
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



144
145
146
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 144

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



149
150
151
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 149

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 114

def self.attribute_map
  {
    :'battery_level' => :'battery_level',
    :'brand' => :'brand',
    :'carrier' => :'carrier',
    :'cpu_cores' => :'cpu_cores',
    :'external_storage_free_space' => :'external_storage_free_space',
    :'external_storage_size' => :'external_storage_size',
    :'form_factor' => :'form_factor',
    :'kernel_version' => :'kernel_version',
    :'languages' => :'languages',
    :'locale' => :'locale',
    :'model' => :'model',
    :'network_type' => :'network_type',
    :'os_family' => :'os_family',
    :'os_name' => :'os_name',
    :'os_release_name' => :'os_release_name',
    :'os_version' => :'os_version',
    :'screen_density' => :'screen_density',
    :'screen_height' => :'screen_height',
    :'screen_width' => :'screen_width',
    :'storage_free_space' => :'storage_free_space',
    :'storage_size' => :'storage_size',
    :'timezone' => :'timezone',
    :'timezone_abbr' => :'timezone_abbr',
    :'type' => :'type'
  }
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



890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 890

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



184
185
186
187
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 184

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 154

def self.openapi_types
  {
    :'battery_level' => :'Integer',
    :'brand' => :'String',
    :'carrier' => :'String',
    :'cpu_cores' => :'Integer',
    :'external_storage_free_space' => :'Integer',
    :'external_storage_size' => :'Integer',
    :'form_factor' => :'String',
    :'kernel_version' => :'String',
    :'languages' => :'Array<String>',
    :'locale' => :'String',
    :'model' => :'String',
    :'network_type' => :'String',
    :'os_family' => :'String',
    :'os_name' => :'String',
    :'os_release_name' => :'String',
    :'os_version' => :'String',
    :'screen_density' => :'Integer',
    :'screen_height' => :'Integer',
    :'screen_width' => :'Integer',
    :'storage_free_space' => :'Integer',
    :'storage_size' => :'Integer',
    :'timezone' => :'String',
    :'timezone_abbr' => :'String',
    :'type' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 846

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      battery_level == o.battery_level &&
      brand == o.brand &&
      carrier == o.carrier &&
      cpu_cores == o.cpu_cores &&
      external_storage_free_space == o.external_storage_free_space &&
      external_storage_size == o.external_storage_size &&
      form_factor == o.form_factor &&
      kernel_version == o.kernel_version &&
      languages == o.languages &&
      locale == o.locale &&
      model == o.model &&
      network_type == o.network_type &&
      os_family == o.os_family &&
      os_name == o.os_name &&
      os_release_name == o.os_release_name &&
      os_version == o.os_version &&
      screen_density == o.screen_density &&
      screen_height == o.screen_height &&
      screen_width == o.screen_width &&
      storage_free_space == o.storage_free_space &&
      storage_size == o.storage_size &&
      timezone == o.timezone &&
      timezone_abbr == o.timezone_abbr &&
      type == o.type
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


877
878
879
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 877

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



883
884
885
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 883

def hash
  [battery_level, brand, carrier, cpu_cores, external_storage_free_space, external_storage_size, form_factor, kernel_version, languages, locale, model, network_type, os_family, os_name, os_release_name, os_version, screen_density, screen_height, screen_width, storage_free_space, storage_size, timezone, timezone_abbr, type].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



306
307
308
309
310
311
312
313
314
315
316
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
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 306

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if !@battery_level.nil? && @battery_level > 100
    invalid_properties.push('invalid value for "battery_level", must be smaller than or equal to 100.')
  end

  if !@battery_level.nil? && @battery_level < 0
    invalid_properties.push('invalid value for "battery_level", must be greater than or equal to 0.')
  end

  if !@brand.nil? && @brand.to_s.length > 100
    invalid_properties.push('invalid value for "brand", the character length must be smaller than or equal to 100.')
  end

  if !@carrier.nil? && @carrier.to_s.length > 100
    invalid_properties.push('invalid value for "carrier", the character length must be smaller than or equal to 100.')
  end

  if !@cpu_cores.nil? && @cpu_cores > 1152
    invalid_properties.push('invalid value for "cpu_cores", must be smaller than or equal to 1152.')
  end

  if !@cpu_cores.nil? && @cpu_cores < 0
    invalid_properties.push('invalid value for "cpu_cores", must be greater than or equal to 0.')
  end

  if !@external_storage_free_space.nil? && @external_storage_free_space > 1048576
    invalid_properties.push('invalid value for "external_storage_free_space", must be smaller than or equal to 1048576.')
  end

  if !@external_storage_free_space.nil? && @external_storage_free_space < 0
    invalid_properties.push('invalid value for "external_storage_free_space", must be greater than or equal to 0.')
  end

  if !@external_storage_size.nil? && @external_storage_size > 1048576
    invalid_properties.push('invalid value for "external_storage_size", must be smaller than or equal to 1048576.')
  end

  if !@external_storage_size.nil? && @external_storage_size < 0
    invalid_properties.push('invalid value for "external_storage_size", must be greater than or equal to 0.')
  end

  if !@kernel_version.nil? && @kernel_version.to_s.length > 100
    invalid_properties.push('invalid value for "kernel_version", the character length must be smaller than or equal to 100.')
  end

  if !@languages.nil? && @languages.length > 100
    invalid_properties.push('invalid value for "languages", number of items must be less than or equal to 100.')
  end

  if !@languages.nil? && @languages.length < 0
    invalid_properties.push('invalid value for "languages", number of items must be greater than or equal to 0.')
  end

  if !@locale.nil? && @locale.to_s.length > 35
    invalid_properties.push('invalid value for "locale", the character length must be smaller than or equal to 35.')
  end

  if !@model.nil? && @model.to_s.length > 100
    invalid_properties.push('invalid value for "model", the character length must be smaller than or equal to 100.')
  end

  if !@os_name.nil? && @os_name.to_s.length > 100
    invalid_properties.push('invalid value for "os_name", the character length must be smaller than or equal to 100.')
  end

  if !@os_release_name.nil? && @os_release_name.to_s.length > 100
    invalid_properties.push('invalid value for "os_release_name", the character length must be smaller than or equal to 100.')
  end

  if !@os_version.nil? && @os_version.to_s.length > 100
    invalid_properties.push('invalid value for "os_version", the character length must be smaller than or equal to 100.')
  end

  if !@screen_density.nil? && @screen_density > 100000
    invalid_properties.push('invalid value for "screen_density", must be smaller than or equal to 100000.')
  end

  if !@screen_density.nil? && @screen_density < 0
    invalid_properties.push('invalid value for "screen_density", must be greater than or equal to 0.')
  end

  if !@screen_height.nil? && @screen_height > 30720
    invalid_properties.push('invalid value for "screen_height", must be smaller than or equal to 30720.')
  end

  if !@screen_height.nil? && @screen_height < 0
    invalid_properties.push('invalid value for "screen_height", must be greater than or equal to 0.')
  end

  if !@screen_width.nil? && @screen_width > 30720
    invalid_properties.push('invalid value for "screen_width", must be smaller than or equal to 30720.')
  end

  if !@screen_width.nil? && @screen_width < 0
    invalid_properties.push('invalid value for "screen_width", must be greater than or equal to 0.')
  end

  if !@storage_free_space.nil? && @storage_free_space > 1048576
    invalid_properties.push('invalid value for "storage_free_space", must be smaller than or equal to 1048576.')
  end

  if !@storage_free_space.nil? && @storage_free_space < 0
    invalid_properties.push('invalid value for "storage_free_space", must be greater than or equal to 0.')
  end

  if !@storage_size.nil? && @storage_size > 1048576
    invalid_properties.push('invalid value for "storage_size", must be smaller than or equal to 1048576.')
  end

  if !@storage_size.nil? && @storage_size < 0
    invalid_properties.push('invalid value for "storage_size", must be greater than or equal to 0.')
  end

  if !@timezone.nil? && @timezone.to_s.length > 40
    invalid_properties.push('invalid value for "timezone", the character length must be smaller than or equal to 40.')
  end

  if !@timezone_abbr.nil? && @timezone_abbr.to_s.length > 5
    invalid_properties.push('invalid value for "timezone_abbr", the character length must be smaller than or equal to 5.')
  end

  if !@type.nil? && @type.to_s.length > 100
    invalid_properties.push('invalid value for "type", the character length must be smaller than or equal to 100.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



912
913
914
915
916
917
918
919
920
921
922
923
924
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 912

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



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# File 'lib/pinterest_sdk/models/conversion_event_device_info.rb', line 438

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if !@battery_level.nil? && @battery_level > 100
  return false if !@battery_level.nil? && @battery_level < 0
  return false if !@brand.nil? && @brand.to_s.length > 100
  return false if !@carrier.nil? && @carrier.to_s.length > 100
  return false if !@cpu_cores.nil? && @cpu_cores > 1152
  return false if !@cpu_cores.nil? && @cpu_cores < 0
  return false if !@external_storage_free_space.nil? && @external_storage_free_space > 1048576
  return false if !@external_storage_free_space.nil? && @external_storage_free_space < 0
  return false if !@external_storage_size.nil? && @external_storage_size > 1048576
  return false if !@external_storage_size.nil? && @external_storage_size < 0
  form_factor_validator = EnumAttributeValidator.new('String', ["desktop", "laptop", "cellphone", "tablet", "smartwatch", "tv", "vr", "console", "other"])
  return false unless form_factor_validator.valid?(@form_factor)
  return false if !@kernel_version.nil? && @kernel_version.to_s.length > 100
  return false if !@languages.nil? && @languages.length > 100
  return false if !@languages.nil? && @languages.length < 0
  return false if !@locale.nil? && @locale.to_s.length > 35
  return false if !@model.nil? && @model.to_s.length > 100
  network_type_validator = EnumAttributeValidator.new('String', ["wifi", "cellular_2g", "cellular_3g", "cellular_4g", "cellular_5g", "cellular_6g", "ethernet", "unknown"])
  return false unless network_type_validator.valid?(@network_type)
  os_family_validator = EnumAttributeValidator.new('String', ["ios", "android", "macos", "windows", "linux", "bsd", "other"])
  return false unless os_family_validator.valid?(@os_family)
  return false if !@os_name.nil? && @os_name.to_s.length > 100
  return false if !@os_release_name.nil? && @os_release_name.to_s.length > 100
  return false if !@os_version.nil? && @os_version.to_s.length > 100
  return false if !@screen_density.nil? && @screen_density > 100000
  return false if !@screen_density.nil? && @screen_density < 0
  return false if !@screen_height.nil? && @screen_height > 30720
  return false if !@screen_height.nil? && @screen_height < 0
  return false if !@screen_width.nil? && @screen_width > 30720
  return false if !@screen_width.nil? && @screen_width < 0
  return false if !@storage_free_space.nil? && @storage_free_space > 1048576
  return false if !@storage_free_space.nil? && @storage_free_space < 0
  return false if !@storage_size.nil? && @storage_size > 1048576
  return false if !@storage_size.nil? && @storage_size < 0
  return false if !@timezone.nil? && @timezone.to_s.length > 40
  return false if !@timezone_abbr.nil? && @timezone_abbr.to_s.length > 5
  return false if !@type.nil? && @type.to_s.length > 100
  true
end