Class: UntitledApi::InternalOrgsOpenconfigJoinedApsResponse1

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

Overview

InternalOrgsOpenconfigJoinedApsResponse1 Model.

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, hostname = SKIP, cc = SKIP, opstate = SKIP, uptime = SKIP, enabled = SKIP, serial = SKIP, model = SKIP, version = SKIP, power_src = SKIP, ipv4 = SKIP, ipv6 = SKIP) ⇒ InternalOrgsOpenconfigJoinedApsResponse1

Returns a new instance of InternalOrgsOpenconfigJoinedApsResponse1.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/untitled_api/models/internal_orgs_openconfig_joined_aps_response1.rb', line 101

def initialize(mac = SKIP,
               hostname = SKIP,
               cc = SKIP,
               opstate = SKIP,
               uptime = SKIP,
               enabled = SKIP,
               serial = SKIP,
               model = SKIP,
               version = SKIP,
               power_src = SKIP,
               ipv4 = SKIP,
               ipv6 = SKIP)
  @mac = mac unless mac == SKIP
  @hostname = hostname unless hostname == SKIP
  @cc = cc unless cc == SKIP
  @opstate = opstate unless opstate == SKIP
  @uptime = uptime unless uptime == SKIP
  @enabled = enabled unless enabled == SKIP
  @serial = serial unless serial == SKIP
  @model = model unless model == SKIP
  @version = version unless version == SKIP
  @power_src = power_src unless power_src == SKIP
  @ipv4 = ipv4 unless ipv4 == SKIP
  @ipv6 = ipv6 unless ipv6 == SKIP
end

Instance Attribute Details

#ccString

TODO: Write general description for this method

Returns:

  • (String)


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

def cc
  @cc
end

#enabledObject

TODO: Write general description for this method

Returns:

  • (Object)


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

def enabled
  @enabled
end

#hostnameString

TODO: Write general description for this method

Returns:

  • (String)


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

def hostname
  @hostname
end

#ipv4String

TODO: Write general description for this method

Returns:

  • (String)


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

def ipv4
  @ipv4
end

#ipv6String

TODO: Write general description for this method

Returns:

  • (String)


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

def ipv6
  @ipv6
end

#macString

TODO: Write general description for this method

Returns:

  • (String)


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

def mac
  @mac
end

#modelString

TODO: Write general description for this method

Returns:

  • (String)


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

def model
  @model
end

#opstateString

TODO: Write general description for this method

Returns:

  • (String)


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

def opstate
  @opstate
end

#power_srcString

TODO: Write general description for this method

Returns:

  • (String)


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

def power_src
  @power_src
end

#serialString

TODO: Write general description for this method

Returns:

  • (String)


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

def serial
  @serial
end

#uptimeFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def uptime
  @uptime
end

#versionString

TODO: Write general description for this method

Returns:

  • (String)


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

def version
  @version
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
# File 'lib/untitled_api/models/internal_orgs_openconfig_joined_aps_response1.rb', line 128

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.

  mac = hash.key?('mac') ? hash['mac'] : SKIP
  hostname = hash.key?('hostname') ? hash['hostname'] : SKIP
  cc = hash.key?('cc') ? hash['cc'] : SKIP
  opstate = hash.key?('opstate') ? hash['opstate'] : SKIP
  uptime = hash.key?('uptime') ? hash['uptime'] : SKIP
  enabled = hash.key?('enabled') ? hash['enabled'] : SKIP
  serial = hash.key?('serial') ? hash['serial'] : SKIP
  model = hash.key?('model') ? hash['model'] : SKIP
  version = hash.key?('version') ? hash['version'] : SKIP
  power_src = hash.key?('power_src') ? hash['power_src'] : SKIP
  ipv4 = hash.key?('ipv4') ? hash['ipv4'] : SKIP
  ipv6 = hash.key?('ipv6') ? hash['ipv6'] : SKIP

  # Create object from extracted values.

  InternalOrgsOpenconfigJoinedApsResponse1.new(mac,
                                               hostname,
                                               cc,
                                               opstate,
                                               uptime,
                                               enabled,
                                               serial,
                                               model,
                                               version,
                                               power_src,
                                               ipv4,
                                               ipv6)
end

.namesObject

A mapping from model property names to API property names.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/untitled_api/models/internal_orgs_openconfig_joined_aps_response1.rb', line 61

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['mac'] = 'mac'
  @_hash['hostname'] = 'hostname'
  @_hash['cc'] = 'cc'
  @_hash['opstate'] = 'opstate'
  @_hash['uptime'] = 'uptime'
  @_hash['enabled'] = 'enabled'
  @_hash['serial'] = 'serial'
  @_hash['model'] = 'model'
  @_hash['version'] = 'version'
  @_hash['power_src'] = 'power_src'
  @_hash['ipv4'] = 'ipv4'
  @_hash['ipv6'] = 'ipv6'
  @_hash
end

.nullablesObject

An array for nullable fields



97
98
99
# File 'lib/untitled_api/models/internal_orgs_openconfig_joined_aps_response1.rb', line 97

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    mac
    hostname
    cc
    opstate
    uptime
    enabled
    serial
    model
    version
    power_src
    ipv4
    ipv6
  ]
end