Class: Verizon::ActionResultwithDeviceConfig
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::ActionResultwithDeviceConfig
- Defined in:
- lib/verizon/models/action_resultwith_device_config.rb
Overview
ActionResultwithDeviceConfig Model.
Instance Attribute Summary collapse
-
#createdon ⇒ DateTime
Timestamp of the record.
-
#description ⇒ String
Timestamp of the record.
-
#deviceid ⇒ String
This is a UUID value of the device created when the device is onboarded.
-
#errmsg ⇒ String
Error message.
-
#fields ⇒ DtoDeviceActionSetConfiguration
Error message.
-
#foreignid ⇒ String
UUID of the ECPD account the user belongs to.
-
#id ⇒ String
UUID of the user record, assigned at creation.
-
#lastupdated ⇒ DateTime
Timestamp of the record.
-
#state ⇒ String
The current status of the device or transaction and will be ‘success` or `failed`.
-
#transactionid ⇒ String
The system-generated UUID of the transaction.
-
#version ⇒ String
The resource version.
-
#versionid ⇒ String
The UUID of the resource version.
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.
Instance Method Summary collapse
-
#initialize(createdon: SKIP, description: SKIP, deviceid: SKIP, errmsg: SKIP, fields: SKIP, foreignid: SKIP, id: SKIP, lastupdated: SKIP, state: SKIP, transactionid: SKIP, version: SKIP, versionid: SKIP, additional_properties: nil) ⇒ ActionResultwithDeviceConfig
constructor
A new instance of ActionResultwithDeviceConfig.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_createdon ⇒ Object
- #to_custom_lastupdated ⇒ Object
-
#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(createdon: SKIP, description: SKIP, deviceid: SKIP, errmsg: SKIP, fields: SKIP, foreignid: SKIP, id: SKIP, lastupdated: SKIP, state: SKIP, transactionid: SKIP, version: SKIP, versionid: SKIP, additional_properties: nil) ⇒ ActionResultwithDeviceConfig
Returns a new instance of ActionResultwithDeviceConfig.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 103 def initialize(createdon: SKIP, description: SKIP, deviceid: SKIP, errmsg: SKIP, fields: SKIP, foreignid: SKIP, id: SKIP, lastupdated: SKIP, state: SKIP, transactionid: SKIP, version: SKIP, versionid: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @createdon = createdon unless createdon == SKIP @description = description unless description == SKIP @deviceid = deviceid unless deviceid == SKIP @errmsg = errmsg unless errmsg == SKIP @fields = fields unless fields == SKIP @foreignid = foreignid unless foreignid == SKIP @id = id unless id == SKIP @lastupdated = lastupdated unless lastupdated == SKIP @state = state unless state == SKIP @transactionid = transactionid unless transactionid == SKIP @version = version unless version == SKIP @versionid = versionid unless versionid == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#createdon ⇒ DateTime
Timestamp of the record
15 16 17 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 15 def createdon @createdon end |
#description ⇒ String
Timestamp of the record
19 20 21 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 19 def description @description end |
#deviceid ⇒ String
This is a UUID value of the device created when the device is onboarded
23 24 25 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 23 def deviceid @deviceid end |
#errmsg ⇒ String
Error message
27 28 29 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 27 def errmsg @errmsg end |
#fields ⇒ DtoDeviceActionSetConfiguration
Error message
31 32 33 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 31 def fields @fields end |
#foreignid ⇒ String
UUID of the ECPD account the user belongs to
35 36 37 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 35 def foreignid @foreignid end |
#id ⇒ String
UUID of the user record, assigned at creation
39 40 41 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 39 def id @id end |
#lastupdated ⇒ DateTime
Timestamp of the record
43 44 45 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 43 def lastupdated @lastupdated end |
#state ⇒ String
The current status of the device or transaction and will be ‘success` or `failed`
48 49 50 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 48 def state @state end |
#transactionid ⇒ String
The system-generated UUID of the transaction
52 53 54 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 52 def transactionid @transactionid end |
#version ⇒ String
The resource version
56 57 58 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 56 def version @version end |
#versionid ⇒ String
The UUID of the resource version
60 61 62 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 60 def versionid @versionid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
126 127 128 129 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 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 126 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. createdon = if hash.key?('createdon') (DateTimeHelper.from_rfc3339(hash['createdon']) if hash['createdon']) else SKIP end description = hash.key?('description') ? hash['description'] : SKIP deviceid = hash.key?('deviceid') ? hash['deviceid'] : SKIP errmsg = hash.key?('errmsg') ? hash['errmsg'] : SKIP fields = DtoDeviceActionSetConfiguration.from_hash(hash['fields']) if hash['fields'] foreignid = hash.key?('foreignid') ? hash['foreignid'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP lastupdated = if hash.key?('lastupdated') (DateTimeHelper.from_rfc3339(hash['lastupdated']) if hash['lastupdated']) else SKIP end state = hash.key?('state') ? hash['state'] : SKIP transactionid = hash.key?('transactionid') ? hash['transactionid'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP versionid = hash.key?('versionid') ? hash['versionid'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. ActionResultwithDeviceConfig.new(createdon: createdon, description: description, deviceid: deviceid, errmsg: errmsg, fields: fields, foreignid: foreignid, id: id, lastupdated: lastupdated, state: state, transactionid: transactionid, version: version, versionid: versionid, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 63 def self.names @_hash = {} if @_hash.nil? @_hash['createdon'] = 'createdon' @_hash['description'] = 'description' @_hash['deviceid'] = 'deviceid' @_hash['errmsg'] = 'errmsg' @_hash['fields'] = 'fields' @_hash['foreignid'] = 'foreignid' @_hash['id'] = 'id' @_hash['lastupdated'] = 'lastupdated' @_hash['state'] = 'state' @_hash['transactionid'] = 'transactionid' @_hash['version'] = 'version' @_hash['versionid'] = 'versionid' @_hash end |
.nullables ⇒ Object
An array for nullable fields
99 100 101 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 99 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 81 def self.optionals %w[ createdon description deviceid errmsg fields foreignid id lastupdated state transactionid version versionid ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
193 194 195 196 197 198 199 200 201 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 193 def inspect class_name = self.class.name.split('::').last "<#{class_name} createdon: #{@createdon.inspect}, description: #{@description.inspect},"\ " deviceid: #{@deviceid.inspect}, errmsg: #{@errmsg.inspect}, fields: #{@fields.inspect},"\ " foreignid: #{@foreignid.inspect}, id: #{@id.inspect}, lastupdated:"\ " #{@lastupdated.inspect}, state: #{@state.inspect}, transactionid:"\ " #{@transactionid.inspect}, version: #{@version.inspect}, versionid: #{@versionid.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_custom_createdon ⇒ Object
174 175 176 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 174 def to_custom_createdon DateTimeHelper.to_rfc3339(createdon) end |
#to_custom_lastupdated ⇒ Object
178 179 180 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 178 def to_custom_lastupdated DateTimeHelper.to_rfc3339(lastupdated) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
183 184 185 186 187 188 189 190 |
# File 'lib/verizon/models/action_resultwith_device_config.rb', line 183 def to_s class_name = self.class.name.split('::').last "<#{class_name} createdon: #{@createdon}, description: #{@description}, deviceid:"\ " #{@deviceid}, errmsg: #{@errmsg}, fields: #{@fields}, foreignid: #{@foreignid}, id:"\ " #{@id}, lastupdated: #{@lastupdated}, state: #{@state}, transactionid: #{@transactionid},"\ " version: #{@version}, versionid: #{@versionid}, additional_properties:"\ " #{@additional_properties}>" end |