Class: Verizon::DtoDeviceResourceIdentifier
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::DtoDeviceResourceIdentifier
- Defined in:
- lib/verizon/models/dto_device_resource_identifier.rb
Overview
Device identifiers, one or more are required
Instance Attribute Summary collapse
-
#deveui ⇒ String
the IEEE EUI64 address space used to identify a device.
-
#deviceid ⇒ String
This is a UUID value of the device created when the device is onboarded.
-
#esn ⇒ Integer
The Electronic Serial Number (ESN) of the device.
-
#iccid ⇒ String
The 20-digit Integrated Circuit Card ID (SIM card ID).
-
#imei ⇒ Integer
The 15-digit International Mobile Equipment ID.
-
#imsi ⇒ Integer
The 64-bit International Mobile Subscriber Identity.
-
#mac ⇒ String
The Media Access Control address of the device, listed on the device in the format XX-XX-XX-XX-XX-XX or XX:XX:XX:XX:XX:XX.
-
#manufacturer ⇒ String
The manufacturer of the device.
-
#meid ⇒ String
The 56-bit Mobile Equipment ID.
-
#msisdn ⇒ String
The Mobile Station International Subscriber Directory Number.
-
#node_uuid ⇒ String
The UUID of the node the device is associated with.
-
#qrcode ⇒ String
The numeric value of the Quick Response (QR) code.
-
#serial ⇒ String
The device’s serial number.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(deveui: SKIP, deviceid: SKIP, esn: SKIP, iccid: SKIP, imei: SKIP, imsi: SKIP, mac: SKIP, manufacturer: SKIP, meid: SKIP, msisdn: SKIP, node_uuid: SKIP, qrcode: SKIP, serial: SKIP) ⇒ DtoDeviceResourceIdentifier
constructor
A new instance of DtoDeviceResourceIdentifier.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(deveui: SKIP, deviceid: SKIP, esn: SKIP, iccid: SKIP, imei: SKIP, imsi: SKIP, mac: SKIP, manufacturer: SKIP, meid: SKIP, msisdn: SKIP, node_uuid: SKIP, qrcode: SKIP, serial: SKIP) ⇒ DtoDeviceResourceIdentifier
Returns a new instance of DtoDeviceResourceIdentifier.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 110 def initialize(deveui: SKIP, deviceid: SKIP, esn: SKIP, iccid: SKIP, imei: SKIP, imsi: SKIP, mac: SKIP, manufacturer: SKIP, meid: SKIP, msisdn: SKIP, node_uuid: SKIP, qrcode: SKIP, serial: SKIP) @deveui = deveui unless deveui == SKIP @deviceid = deviceid unless deviceid == SKIP @esn = esn unless esn == SKIP @iccid = iccid unless iccid == SKIP @imei = imei unless imei == SKIP @imsi = imsi unless imsi == SKIP @mac = mac unless mac == SKIP @manufacturer = manufacturer unless manufacturer == SKIP @meid = meid unless meid == SKIP @msisdn = msisdn unless msisdn == SKIP @node_uuid = node_uuid unless node_uuid == SKIP @qrcode = qrcode unless qrcode == SKIP @serial = serial unless serial == SKIP end |
Instance Attribute Details
#deveui ⇒ String
the IEEE EUI64 address space used to identify a device. It is supplied by the device manufacturer
15 16 17 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 15 def deveui @deveui end |
#deviceid ⇒ String
This is a UUID value of the device created when the device is onboarded
19 20 21 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 19 def deviceid @deviceid end |
#esn ⇒ Integer
The Electronic Serial Number (ESN) of the device
23 24 25 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 23 def esn @esn end |
#iccid ⇒ String
The 20-digit Integrated Circuit Card ID (SIM card ID)
27 28 29 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 27 def iccid @iccid end |
#imei ⇒ Integer
The 15-digit International Mobile Equipment ID
31 32 33 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 31 def imei @imei end |
#imsi ⇒ Integer
The 64-bit International Mobile Subscriber Identity
35 36 37 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 35 def imsi @imsi end |
#mac ⇒ String
The Media Access Control address of the device, listed on the device in the format XX-XX-XX-XX-XX-XX or XX:XX:XX:XX:XX:XX
40 41 42 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 40 def mac @mac end |
#manufacturer ⇒ String
The manufacturer of the device
44 45 46 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 44 def manufacturer @manufacturer end |
#meid ⇒ String
The 56-bit Mobile Equipment ID
48 49 50 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 48 def meid @meid end |
#msisdn ⇒ String
The Mobile Station International Subscriber Directory Number. In the USA, this is 1+ a 10-digit phone number
53 54 55 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 53 def msisdn @msisdn end |
#node_uuid ⇒ String
The UUID of the node the device is associated with
57 58 59 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 57 def node_uuid @node_uuid end |
#qrcode ⇒ String
The numeric value of the Quick Response (QR) code
61 62 63 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 61 def qrcode @qrcode end |
#serial ⇒ String
The device’s serial number
65 66 67 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 65 def serial @serial end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 130 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. deveui = hash.key?('deveui') ? hash['deveui'] : SKIP deviceid = hash.key?('deviceid') ? hash['deviceid'] : SKIP esn = hash.key?('esn') ? hash['esn'] : SKIP iccid = hash.key?('iccid') ? hash['iccid'] : SKIP imei = hash.key?('imei') ? hash['imei'] : SKIP imsi = hash.key?('imsi') ? hash['imsi'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP manufacturer = hash.key?('manufacturer') ? hash['manufacturer'] : SKIP meid = hash.key?('meid') ? hash['meid'] : SKIP msisdn = hash.key?('msisdn') ? hash['msisdn'] : SKIP node_uuid = hash.key?('node_uuid') ? hash['node_uuid'] : SKIP qrcode = hash.key?('qrcode') ? hash['qrcode'] : SKIP serial = hash.key?('serial') ? hash['serial'] : SKIP # Create object from extracted values. DtoDeviceResourceIdentifier.new(deveui: deveui, deviceid: deviceid, esn: esn, iccid: iccid, imei: imei, imsi: imsi, mac: mac, manufacturer: manufacturer, meid: meid, msisdn: msisdn, node_uuid: node_uuid, qrcode: qrcode, serial: serial) end |
.names ⇒ Object
A mapping from model property names to API property names.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 68 def self.names @_hash = {} if @_hash.nil? @_hash['deveui'] = 'deveui' @_hash['deviceid'] = 'deviceid' @_hash['esn'] = 'esn' @_hash['iccid'] = 'iccid' @_hash['imei'] = 'imei' @_hash['imsi'] = 'imsi' @_hash['mac'] = 'mac' @_hash['manufacturer'] = 'manufacturer' @_hash['meid'] = 'meid' @_hash['msisdn'] = 'msisdn' @_hash['node_uuid'] = 'node_uuid' @_hash['qrcode'] = 'qrcode' @_hash['serial'] = 'serial' @_hash end |
.nullables ⇒ Object
An array for nullable fields
106 107 108 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 106 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 87 def self.optionals %w[ deveui deviceid esn iccid imei imsi mac manufacturer meid msisdn node_uuid qrcode serial ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
166 167 168 169 170 171 172 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 166 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
184 185 186 187 188 189 190 191 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 184 def inspect class_name = self.class.name.split('::').last "<#{class_name} deveui: #{@deveui.inspect}, deviceid: #{@deviceid.inspect}, esn:"\ " #{@esn.inspect}, iccid: #{@iccid.inspect}, imei: #{@imei.inspect}, imsi: #{@imsi.inspect},"\ " mac: #{@mac.inspect}, manufacturer: #{@manufacturer.inspect}, meid: #{@meid.inspect},"\ " msisdn: #{@msisdn.inspect}, node_uuid: #{@node_uuid.inspect}, qrcode: #{@qrcode.inspect},"\ " serial: #{@serial.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
175 176 177 178 179 180 181 |
# File 'lib/verizon/models/dto_device_resource_identifier.rb', line 175 def to_s class_name = self.class.name.split('::').last "<#{class_name} deveui: #{@deveui}, deviceid: #{@deviceid}, esn: #{@esn}, iccid: #{@iccid},"\ " imei: #{@imei}, imsi: #{@imsi}, mac: #{@mac}, manufacturer: #{@manufacturer}, meid:"\ " #{@meid}, msisdn: #{@msisdn}, node_uuid: #{@node_uuid}, qrcode: #{@qrcode}, serial:"\ " #{@serial}>" end |