Class: MistApi::MxedgeUpgradeVersion

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

Overview

Version to upgrade for each service, ‘current` / `latest` / `default` / specific version (e.g. `2.5.100`).nIgnored if distro upgrade, `tunterm`, `radsecproxy`, `mxagent`, `mxocproxy`, `mxdas` or `mxnacedge`

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(mxagent = 'current', tunterm = 'current', mxdas = 'current', mxocproxy = 'current', radsecproxy = 'current') ⇒ MxedgeUpgradeVersion

Returns a new instance of MxedgeUpgradeVersion.



59
60
61
62
63
64
65
66
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 59

def initialize(mxagent = 'current', tunterm = 'current', mxdas = 'current',
               mxocproxy = 'current', radsecproxy = 'current')
  @mxagent = mxagent
  @mxdas = mxdas unless mxdas == SKIP
  @mxocproxy = mxocproxy unless mxocproxy == SKIP
  @radsecproxy = radsecproxy unless radsecproxy == SKIP
  @tunterm = tunterm
end

Instance Attribute Details

#mxagentString

TODO: Write general description for this method

Returns:

  • (String)


16
17
18
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 16

def mxagent
  @mxagent
end

#mxdasString

TODO: Write general description for this method

Returns:

  • (String)


20
21
22
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 20

def mxdas
  @mxdas
end

#mxocproxyString

TODO: Write general description for this method

Returns:

  • (String)


24
25
26
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 24

def mxocproxy
  @mxocproxy
end

#radsecproxyString

TODO: Write general description for this method

Returns:

  • (String)


28
29
30
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 28

def radsecproxy
  @radsecproxy
end

#tuntermString

TODO: Write general description for this method

Returns:

  • (String)


32
33
34
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 32

def tunterm
  @tunterm
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 69

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  mxagent = hash['mxagent'] ||= 'current'
  tunterm = hash['tunterm'] ||= 'current'
  mxdas = hash['mxdas'] ||= 'current'
  mxocproxy = hash['mxocproxy'] ||= 'current'
  radsecproxy = hash['radsecproxy'] ||= 'current'

  # Create object from extracted values.
  MxedgeUpgradeVersion.new(mxagent,
                           tunterm,
                           mxdas,
                           mxocproxy,
                           radsecproxy)
end

.namesObject

A mapping from model property names to API property names.



35
36
37
38
39
40
41
42
43
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 35

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['mxagent'] = 'mxagent'
  @_hash['mxdas'] = 'mxdas'
  @_hash['mxocproxy'] = 'mxocproxy'
  @_hash['radsecproxy'] = 'radsecproxy'
  @_hash['tunterm'] = 'tunterm'
  @_hash
end

.nullablesObject

An array for nullable fields



55
56
57
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 55

def self.nullables
  []
end

.optionalsObject

An array for optional fields



46
47
48
49
50
51
52
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 46

def self.optionals
  %w[
    mxdas
    mxocproxy
    radsecproxy
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



95
96
97
98
99
100
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 95

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} mxagent: #{@mxagent.inspect}, mxdas: #{@mxdas.inspect}, mxocproxy:"\
  " #{@mxocproxy.inspect}, radsecproxy: #{@radsecproxy.inspect}, tunterm:"\
  " #{@tunterm.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



88
89
90
91
92
# File 'lib/mist_api/models/mxedge_upgrade_version.rb', line 88

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} mxagent: #{@mxagent}, mxdas: #{@mxdas}, mxocproxy: #{@mxocproxy},"\
  " radsecproxy: #{@radsecproxy}, tunterm: #{@tunterm}>"
end