Class: Verizon::ChangeConfigurationResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::ChangeConfigurationResponse
- Defined in:
- lib/verizon/models/change_configuration_response.rb
Overview
Change Configuration resource definition.
Instance Attribute Summary collapse
-
#action ⇒ String
The action requested in this event; “change” for device configuration changes.
-
#createdon ⇒ String
The date and time of the change request.
-
#deviceid ⇒ String
The device’s ThingSpace UUID.
-
#fields ⇒ Fields
List of fields affected by the event.
-
#foreignid ⇒ String
foreign id.
-
#id ⇒ String
The unique ID of this ts.event.configuration event.
-
#kind ⇒ String
The kind of the ThingSpace resource that is being reported.
-
#lastupdated ⇒ String
The date and time that the event was last updated.
-
#name ⇒ String
The name of the event; “SetConfigurationReq” for device configuration changes.
-
#state ⇒ String
The current status of the request.
-
#transactionid ⇒ String
transaction id.
-
#version ⇒ String
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(action = SKIP, createdon = SKIP, deviceid = SKIP, fields = SKIP, foreignid = SKIP, id = SKIP, kind = SKIP, lastupdated = SKIP, name = SKIP, state = SKIP, transactionid = SKIP, version = SKIP) ⇒ ChangeConfigurationResponse
constructor
A new instance of ChangeConfigurationResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(action = SKIP, createdon = SKIP, deviceid = SKIP, fields = SKIP, foreignid = SKIP, id = SKIP, kind = SKIP, lastupdated = SKIP, name = SKIP, state = SKIP, transactionid = SKIP, version = SKIP) ⇒ ChangeConfigurationResponse
Returns a new instance of ChangeConfigurationResponse.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/verizon/models/change_configuration_response.rb', line 104 def initialize(action = SKIP, createdon = SKIP, deviceid = SKIP, fields = SKIP, foreignid = SKIP, id = SKIP, kind = SKIP, lastupdated = SKIP, name = SKIP, state = SKIP, transactionid = SKIP, version = SKIP) @action = action unless action == SKIP @createdon = createdon unless createdon == SKIP @deviceid = deviceid unless deviceid == SKIP @fields = fields unless fields == SKIP @foreignid = foreignid unless foreignid == SKIP @id = id unless id == SKIP @kind = kind unless kind == SKIP @lastupdated = lastupdated unless lastupdated == SKIP @name = name unless name == SKIP @state = state unless state == SKIP @transactionid = transactionid unless transactionid == SKIP @version = version unless version == SKIP end |
Instance Attribute Details
#action ⇒ String
The action requested in this event; “change” for device configuration changes.
15 16 17 |
# File 'lib/verizon/models/change_configuration_response.rb', line 15 def action @action end |
#createdon ⇒ String
The date and time of the change request.
19 20 21 |
# File 'lib/verizon/models/change_configuration_response.rb', line 19 def createdon @createdon end |
#deviceid ⇒ String
The device’s ThingSpace UUID.
23 24 25 |
# File 'lib/verizon/models/change_configuration_response.rb', line 23 def deviceid @deviceid end |
#fields ⇒ Fields
List of fields affected by the event.
27 28 29 |
# File 'lib/verizon/models/change_configuration_response.rb', line 27 def fields @fields end |
#foreignid ⇒ String
foreign id
31 32 33 |
# File 'lib/verizon/models/change_configuration_response.rb', line 31 def foreignid @foreignid end |
#id ⇒ String
The unique ID of this ts.event.configuration event.
35 36 37 |
# File 'lib/verizon/models/change_configuration_response.rb', line 35 def id @id end |
#kind ⇒ String
The kind of the ThingSpace resource that is being reported
39 40 41 |
# File 'lib/verizon/models/change_configuration_response.rb', line 39 def kind @kind end |
#lastupdated ⇒ String
The date and time that the event was last updated.
43 44 45 |
# File 'lib/verizon/models/change_configuration_response.rb', line 43 def lastupdated @lastupdated end |
#name ⇒ String
The name of the event; “SetConfigurationReq” for device configuration changes.
48 49 50 |
# File 'lib/verizon/models/change_configuration_response.rb', line 48 def name @name end |
#state ⇒ String
The current status of the request. The value will be “pending” until the device wakes up and ThingSpace can send the request to the device.
53 54 55 |
# File 'lib/verizon/models/change_configuration_response.rb', line 53 def state @state end |
#transactionid ⇒ String
transaction id
57 58 59 |
# File 'lib/verizon/models/change_configuration_response.rb', line 57 def transactionid @transactionid end |
#version ⇒ String
version
61 62 63 |
# File 'lib/verizon/models/change_configuration_response.rb', line 61 def version @version end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
123 124 125 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 |
# File 'lib/verizon/models/change_configuration_response.rb', line 123 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. action = hash.key?('action') ? hash['action'] : SKIP createdon = hash.key?('createdon') ? hash['createdon'] : SKIP deviceid = hash.key?('deviceid') ? hash['deviceid'] : SKIP fields = Fields.from_hash(hash['fields']) if hash['fields'] foreignid = hash.key?('foreignid') ? hash['foreignid'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP kind = hash.key?('kind') ? hash['kind'] : SKIP lastupdated = hash.key?('lastupdated') ? hash['lastupdated'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP transactionid = hash.key?('transactionid') ? hash['transactionid'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP # Create object from extracted values. ChangeConfigurationResponse.new(action, createdon, deviceid, fields, foreignid, id, kind, lastupdated, name, state, transactionid, version) end |
.names ⇒ Object
A mapping from model property names to API property names.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/verizon/models/change_configuration_response.rb', line 64 def self.names @_hash = {} if @_hash.nil? @_hash['action'] = 'action' @_hash['createdon'] = 'createdon' @_hash['deviceid'] = 'deviceid' @_hash['fields'] = 'fields' @_hash['foreignid'] = 'foreignid' @_hash['id'] = 'id' @_hash['kind'] = 'kind' @_hash['lastupdated'] = 'lastupdated' @_hash['name'] = 'name' @_hash['state'] = 'state' @_hash['transactionid'] = 'transactionid' @_hash['version'] = 'version' @_hash end |
.nullables ⇒ Object
An array for nullable fields
100 101 102 |
# File 'lib/verizon/models/change_configuration_response.rb', line 100 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/verizon/models/change_configuration_response.rb', line 82 def self.optionals %w[ action createdon deviceid fields foreignid id kind lastupdated name state transactionid version ] end |