Class: UntitledApi::InternalOcdevicesSecretResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/untitled_api/models/internal_ocdevices_secret_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(macs = SKIP, mac = SKIP, serial = SKIP, model = SKIP, sku = SKIP, type = SKIP, malias = SKIP, secrets = SKIP, ztp_status = SKIP, ztp_timestamp = SKIP) ⇒ InternalOcdevicesSecretResponse



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/untitled_api/models/internal_ocdevices_secret_response.rb', line 89

def initialize(macs = SKIP,
               mac = SKIP,
               serial = SKIP,
               model = SKIP,
               sku = SKIP,
               type = SKIP,
               malias = SKIP,
               secrets = SKIP,
               ztp_status = SKIP,
               ztp_timestamp = SKIP)
  @macs = macs unless macs == SKIP
  @mac = mac unless mac == SKIP
  @serial = serial unless serial == SKIP
  @model = model unless model == SKIP
  @sku = sku unless sku == SKIP
  @type = type unless type == SKIP
  @malias = malias unless malias == SKIP
  @secrets = secrets unless secrets == SKIP
  @ztp_status = ztp_status unless ztp_status == SKIP
  @ztp_timestamp = ztp_timestamp unless ztp_timestamp == SKIP
end

Instance Attribute Details

#macString

TODO: Write general description for this method



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

def mac
  @mac
end

#macsObject

TODO: Write general description for this method



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

def macs
  @macs
end

#maliasString

TODO: Write general description for this method



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

def malias
  @malias
end

#modelString

TODO: Write general description for this method



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

def model
  @model
end

#secretsObject

TODO: Write general description for this method



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

def secrets
  @secrets
end

#serialString

TODO: Write general description for this method



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

def serial
  @serial
end

#skuString

TODO: Write general description for this method



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

def sku
  @sku
end

#typeString

TODO: Write general description for this method



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

def type
  @type
end

#ztp_statusString

TODO: Write general description for this method



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

def ztp_status
  @ztp_status
end

#ztp_timestampFloat

TODO: Write general description for this method



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

def ztp_timestamp
  @ztp_timestamp
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/untitled_api/models/internal_ocdevices_secret_response.rb', line 112

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  macs = hash.key?('macs') ? hash['macs'] : SKIP
  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
  type = hash.key?('type') ? hash['type'] : SKIP
  malias = hash.key?('alias') ? hash['alias'] : SKIP
  secrets = hash.key?('secrets') ? hash['secrets'] : SKIP
  ztp_status = hash.key?('ztp_status') ? hash['ztp_status'] : SKIP
  ztp_timestamp = hash.key?('ztp_timestamp') ? hash['ztp_timestamp'] : SKIP

  # Create object from extracted values.
  InternalOcdevicesSecretResponse.new(macs,
                                      mac,
                                      serial,
                                      model,
                                      sku,
                                      type,
                                      malias,
                                      secrets,
                                      ztp_status,
                                      ztp_timestamp)
end

.namesObject

A mapping from model property names to API property names.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/untitled_api/models/internal_ocdevices_secret_response.rb', line 53

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['macs'] = 'macs'
  @_hash['mac'] = 'mac'
  @_hash['serial'] = 'serial'
  @_hash['model'] = 'model'
  @_hash['sku'] = 'sku'
  @_hash['type'] = 'type'
  @_hash['malias'] = 'alias'
  @_hash['secrets'] = 'secrets'
  @_hash['ztp_status'] = 'ztp_status'
  @_hash['ztp_timestamp'] = 'ztp_timestamp'
  @_hash
end

.nullablesObject

An array for nullable fields



85
86
87
# File 'lib/untitled_api/models/internal_ocdevices_secret_response.rb', line 85

def self.nullables
  []
end

.optionalsObject

An array for optional fields



69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/untitled_api/models/internal_ocdevices_secret_response.rb', line 69

def self.optionals
  %w[
    macs
    mac
    serial
    model
    sku
    type
    malias
    secrets
    ztp_status
    ztp_timestamp
  ]
end