Class: UntitledApi::ApiV1OrgsInventoryResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/untitled_api/models/api_v1_orgs_inventory_response.rb

Overview

Response data

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(mac = SKIP, serial = SKIP, model = SKIP, sku = SKIP, hw_rev = SKIP, type = SKIP, magic = SKIP, jsi = SKIP, org_id = SKIP, site_id = SKIP, created_time = SKIP, modified_time = SKIP, id = SKIP, deviceprofile_id = SKIP, connected = SKIP) ⇒ ApiV1OrgsInventoryResponse

Returns a new instance of ApiV1OrgsInventoryResponse.



119
120
121
122
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
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 119

def initialize(mac = SKIP,
               serial = SKIP,
               model = SKIP,
               sku = SKIP,
               hw_rev = SKIP,
               type = SKIP,
               magic = SKIP,
               jsi = SKIP,
               org_id = SKIP,
               site_id = SKIP,
               created_time = SKIP,
               modified_time = SKIP,
               id = SKIP,
               deviceprofile_id = SKIP,
               connected = SKIP)
  @mac = mac unless mac == SKIP
  @serial = serial unless serial == SKIP
  @model = model unless model == SKIP
  @sku = sku unless sku == SKIP
  @hw_rev = hw_rev unless hw_rev == SKIP
  @type = type unless type == SKIP
  @magic = magic unless magic == SKIP
  @jsi = jsi unless jsi == SKIP
  @org_id = org_id unless org_id == SKIP
  @site_id = site_id unless site_id == SKIP
  @created_time = created_time unless created_time == SKIP
  @modified_time = modified_time unless modified_time == SKIP
  @id = id unless id == SKIP
  @deviceprofile_id = deviceprofile_id unless deviceprofile_id == SKIP
  @connected = connected unless connected == SKIP
end

Instance Attribute Details

#connectedObject

TODO: Write general description for this method

Returns:

  • (Object)


70
71
72
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 70

def connected
  @connected
end

#created_timeFloat

TODO: Write general description for this method

Returns:

  • (Float)


54
55
56
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 54

def created_time
  @created_time
end

#deviceprofile_idObject

TODO: Write general description for this method

Returns:

  • (Object)


66
67
68
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 66

def deviceprofile_id
  @deviceprofile_id
end

#hw_revString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 30

def hw_rev
  @hw_rev
end

#idString

TODO: Write general description for this method

Returns:

  • (String)


62
63
64
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 62

def id
  @id
end

#jsiObject

TODO: Write general description for this method

Returns:

  • (Object)


42
43
44
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 42

def jsi
  @jsi
end

#macString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 14

def mac
  @mac
end

#magicString

TODO: Write general description for this method

Returns:

  • (String)


38
39
40
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 38

def magic
  @magic
end

#modelString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 22

def model
  @model
end

#modified_timeFloat

TODO: Write general description for this method

Returns:

  • (Float)


58
59
60
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 58

def modified_time
  @modified_time
end

#org_idString

TODO: Write general description for this method

Returns:

  • (String)


46
47
48
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 46

def org_id
  @org_id
end

#serialString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 18

def serial
  @serial
end

#site_idString

TODO: Write general description for this method

Returns:

  • (String)


50
51
52
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 50

def site_id
  @site_id
end

#skuString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 26

def sku
  @sku
end

#typeString

TODO: Write general description for this method

Returns:

  • (String)


34
35
36
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 34

def type
  @type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



152
153
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
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 152

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  mac = hash.key?('mac') ? hash['mac'] : SKIP
  serial = hash.key?('serial') ? hash['serial'] : SKIP
  model = hash.key?('model') ? hash['model'] : SKIP
  sku = hash.key?('sku') ? hash['sku'] : SKIP
  hw_rev = hash.key?('hw_rev') ? hash['hw_rev'] : SKIP
  type = hash.key?('type') ? hash['type'] : SKIP
  magic = hash.key?('magic') ? hash['magic'] : SKIP
  jsi = hash.key?('jsi') ? hash['jsi'] : SKIP
  org_id = hash.key?('org_id') ? hash['org_id'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  created_time = hash.key?('created_time') ? hash['created_time'] : SKIP
  modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP
  deviceprofile_id =
    hash.key?('deviceprofile_id') ? hash['deviceprofile_id'] : SKIP
  connected = hash.key?('connected') ? hash['connected'] : SKIP

  # Create object from extracted values.
  ApiV1OrgsInventoryResponse.new(mac,
                                 serial,
                                 model,
                                 sku,
                                 hw_rev,
                                 type,
                                 magic,
                                 jsi,
                                 org_id,
                                 site_id,
                                 created_time,
                                 modified_time,
                                 id,
                                 deviceprofile_id,
                                 connected)
end

.namesObject

A mapping from model property names to API property names.



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 73

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['mac'] = 'mac'
  @_hash['serial'] = 'serial'
  @_hash['model'] = 'model'
  @_hash['sku'] = 'sku'
  @_hash['hw_rev'] = 'hw_rev'
  @_hash['type'] = 'type'
  @_hash['magic'] = 'magic'
  @_hash['jsi'] = 'jsi'
  @_hash['org_id'] = 'org_id'
  @_hash['site_id'] = 'site_id'
  @_hash['created_time'] = 'created_time'
  @_hash['modified_time'] = 'modified_time'
  @_hash['id'] = 'id'
  @_hash['deviceprofile_id'] = 'deviceprofile_id'
  @_hash['connected'] = 'connected'
  @_hash
end

.nullablesObject

An array for nullable fields



115
116
117
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 115

def self.nullables
  []
end

.optionalsObject

An array for optional fields



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/untitled_api/models/api_v1_orgs_inventory_response.rb', line 94

def self.optionals
  %w[
    mac
    serial
    model
    sku
    hw_rev
    type
    magic
    jsi
    org_id
    site_id
    created_time
    modified_time
    id
    deviceprofile_id
    connected
  ]
end