Class: UntitledApi::ManufV1EpRequest

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

Overview

Request parameters

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(serial = SKIP, sku = SKIP, type = SKIP, ip = SKIP, local_ip = SKIP, ap_type = SKIP, secret = SKIP, eeprom = SKIP) ⇒ ManufV1EpRequest

Returns a new instance of ManufV1EpRequest.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/untitled_api/models/manuf_v1_ep_request.rb', line 77

def initialize(serial = SKIP,
               sku = SKIP,
               type = SKIP,
               ip = SKIP,
               local_ip = SKIP,
               ap_type = SKIP,
               secret = SKIP,
               eeprom = SKIP)
  @serial = serial unless serial == SKIP
  @sku = sku unless sku == SKIP
  @type = type unless type == SKIP
  @ip = ip unless ip == SKIP
  @local_ip = local_ip unless local_ip == SKIP
  @ap_type = ap_type unless ap_type == SKIP
  @secret = secret unless secret == SKIP
  @eeprom = eeprom unless eeprom == SKIP
end

Instance Attribute Details

#ap_typeString

TODO: Write general description for this method

Returns:

  • (String)


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

def ap_type
  @ap_type
end

#eepromString

TODO: Write general description for this method

Returns:

  • (String)


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

def eeprom
  @eeprom
end

#ipString

TODO: Write general description for this method

Returns:

  • (String)


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

def ip
  @ip
end

#local_ipString

TODO: Write general description for this method

Returns:

  • (String)


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

def local_ip
  @local_ip
end

#secretString

TODO: Write general description for this method

Returns:

  • (String)


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

def secret
  @secret
end

#serialString

TODO: Write general description for this method

Returns:

  • (String)


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

def serial
  @serial
end

#skuString

TODO: Write general description for this method

Returns:

  • (String)


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

def sku
  @sku
end

#typeString

TODO: Write general description for this method

Returns:

  • (String)


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

def type
  @type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/untitled_api/models/manuf_v1_ep_request.rb', line 96

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  serial = hash.key?('serial') ? hash['serial'] : SKIP
  sku = hash.key?('sku') ? hash['sku'] : SKIP
  type = hash.key?('type') ? hash['type'] : SKIP
  ip = hash.key?('ip') ? hash['ip'] : SKIP
  local_ip = hash.key?('local_ip') ? hash['local_ip'] : SKIP
  ap_type = hash.key?('ap_type') ? hash['ap_type'] : SKIP
  secret = hash.key?('secret') ? hash['secret'] : SKIP
  eeprom = hash.key?('eeprom') ? hash['eeprom'] : SKIP

  # Create object from extracted values.
  ManufV1EpRequest.new(serial,
                       sku,
                       type,
                       ip,
                       local_ip,
                       ap_type,
                       secret,
                       eeprom)
end

.namesObject

A mapping from model property names to API property names.



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/untitled_api/models/manuf_v1_ep_request.rb', line 45

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['serial'] = 'serial'
  @_hash['sku'] = 'sku'
  @_hash['type'] = 'type'
  @_hash['ip'] = 'ip'
  @_hash['local_ip'] = 'local_ip'
  @_hash['ap_type'] = 'ap_type'
  @_hash['secret'] = 'secret'
  @_hash['eeprom'] = 'eeprom'
  @_hash
end

.nullablesObject

An array for nullable fields



73
74
75
# File 'lib/untitled_api/models/manuf_v1_ep_request.rb', line 73

def self.nullables
  []
end

.optionalsObject

An array for optional fields



59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/untitled_api/models/manuf_v1_ep_request.rb', line 59

def self.optionals
  %w[
    serial
    sku
    type
    ip
    local_ip
    ap_type
    secret
    eeprom
  ]
end