Class: MistApi::ResponseSsrUpgrade

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/response_ssr_upgrade.rb

Overview

ResponseSsrUpgrade Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(channel = nil, counts = nil, device_type = nil, id = nil, status = nil, strategy = nil, versions = nil) ⇒ ResponseSsrUpgrade

Returns a new instance of ResponseSsrUpgrade.



63
64
65
66
67
68
69
70
71
72
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 63

def initialize(channel = nil, counts = nil, device_type = nil, id = nil,
               status = nil, strategy = nil, versions = nil)
  @channel = channel
  @counts = counts
  @device_type = device_type
  @id = id
  @status = status
  @strategy = strategy
  @versions = versions
end

Instance Attribute Details

#channelString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 14

def channel
  @channel
end

#countsResponseSsrUpgradeCounts

TODO: Write general description for this method



18
19
20
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 18

def counts
  @counts
end

#device_typeString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 22

def device_type
  @device_type
end

#idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


26
27
28
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 26

def id
  @id
end

#statusString

Unique ID of the object instance in the Mist Organization

Returns:

  • (String)


30
31
32
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 30

def status
  @status
end

#strategyString

Unique ID of the object instance in the Mist Organization

Returns:

  • (String)


34
35
36
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 34

def strategy
  @strategy
end

#versionsHash[String, String]

Unique ID of the object instance in the Mist Organization

Returns:

  • (Hash[String, String])


38
39
40
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 38

def versions
  @versions
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 75

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  channel = hash.key?('channel') ? hash['channel'] : nil
  counts = ResponseSsrUpgradeCounts.from_hash(hash['counts']) if hash['counts']
  device_type = hash.key?('device_type') ? hash['device_type'] : nil
  id = hash.key?('id') ? hash['id'] : nil
  status = hash.key?('status') ? hash['status'] : nil
  strategy = hash.key?('strategy') ? hash['strategy'] : nil
  versions = hash.key?('versions') ? hash['versions'] : nil

  # Create object from extracted values.
  ResponseSsrUpgrade.new(channel,
                         counts,
                         device_type,
                         id,
                         status,
                         strategy,
                         versions)
end

.namesObject

A mapping from model property names to API property names.



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 41

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['channel'] = 'channel'
  @_hash['counts'] = 'counts'
  @_hash['device_type'] = 'device_type'
  @_hash['id'] = 'id'
  @_hash['status'] = 'status'
  @_hash['strategy'] = 'strategy'
  @_hash['versions'] = 'versions'
  @_hash
end

.nullablesObject

An array for nullable fields



59
60
61
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 59

def self.nullables
  []
end

.optionalsObject

An array for optional fields



54
55
56
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 54

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



105
106
107
108
109
110
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 105

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} channel: #{@channel.inspect}, counts: #{@counts.inspect}, device_type:"\
  " #{@device_type.inspect}, id: #{@id.inspect}, status: #{@status.inspect}, strategy:"\
  " #{@strategy.inspect}, versions: #{@versions.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



98
99
100
101
102
# File 'lib/mist_api/models/response_ssr_upgrade.rb', line 98

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} channel: #{@channel}, counts: #{@counts}, device_type: #{@device_type}, id:"\
  " #{@id}, status: #{@status}, strategy: #{@strategy}, versions: #{@versions}>"
end